index.js 276 字节 编辑Web IDE 1 2 3 4 5 6 7 8 9 10 11 import Print from './packages/print.js'; import vPrint from './packages/vPrint.js' Print.install = function(Vue) { Vue.prototype.$print = function(obj){ Print(obj) } }; vPrint.install= function(Vue) { Vue.directive('print', vPrint); }; export {Print,vPrint} ;