月关宝盒
1.新建个js文件,在里面按照官网指令的写法,写完代码,类似Vue.directive('fullpage', { inserted: function (el, binding, vnode) { var opts = binding.value || {} that.init(el, opts, vnode) }, componentUpdated: function (el, binding, vnode) { var opts = binding.value || {} that.init(el, opts, vnode) } })2.在main.js里import这个js文件3.Vue.use(xxxx)