We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vue] 手写一个自定义指令及写出如何调用
The text was updated successfully, but these errors were encountered:
vue.directive('custom-module', { insetred: function(el,binding,vnode){
} });
Sorry, something went wrong.
const style={ bind(el,binding,vnode){ el.style.color = 'pink' } } Vue.directive('style',style)
pink
全局自定义指令 Vue,directive('test',(el,binding,vnode)=>{ 业务逻辑 })
局部指令 directives:{ test(el,binding,vnode){ 业务逻辑 } } 调用,都是v-test
No branches or pull requests
[vue] 手写一个自定义指令及写出如何调用
The text was updated successfully, but these errors were encountered: