深入浅出vue.js---全局API的实现原理----Vue.directive、Vue.filter、Vue.component
一、Vue.directiveVue.directive(id,[definition]);(1)参数{string}id{Function|Object}[definition](2)用法注册或获取全局指令。Vue.directive('my-directive',{bind:function(){},inserted:function(){},update:function(){},compo