/*
自定义全局指令:获取输入框焦点
*/
Vue.directive('focus', {
inserted: function (el) {
return el.focus()
}
})
Vue习题(自定义一个全局指令,让输入框自动获取焦点)
猜你喜欢
转载自blog.csdn.net/weixin_46611729/article/details/109763637
今日推荐
周排行