How to add a custom instruction to the input box in IView?

[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?

clipboard.png

Mar.22,2021

find the input component in iview, customize it from the bottom, or write your own input component


iview api has autofocus

   directives: {
    focus: {
      inserted: function(el, binding, vnode) {
         vnode.child.$refs.input.autofocus=true
      },
    },
   }
Menu