[requirements]: enter an interface and the input box automatically gets the focus.
[question]: how do I add a custom directive to this input box using the input box in the iView framework?
[Code]:
iView:
<template>
<Input v-model="value14" v-focus placeholder="Enter something..." clearable style="width: 200px"></Input>
</template>
:
Vue.directive("focus", {
inserted: function (el) {
console.log("el-->",el);
// el.focus();
}
});
[problem description]: now that this el operates on the parent element of input, how can I manipulate the child elements of the current element?