/*
自定义全局指令:获取输入框焦点
*/
Vue.directive('focus', {
inserted: function (el) {
return el.focus()
}
})
Vue exercises (customize a global command, let the input box automatically get the focus)
Guess you like
Origin blog.csdn.net/weixin_46611729/article/details/109763637
Recommended
Ranking