main.js文件里
过滤器
import commonFilter from './assets/js/filter/commonFilter'; // 公共filter
Object.keys(commonFilter).forEach(key => Vue.filter(key, commonFilter[key]));
自定义指令
import commonDirective from './assets/js/directive/commonDirective'; // 公共指令
Object.keys(commonDirective).forEach(key => Vue.directive(key, commonDirective[key]));
全局方法
import portService from './assets/js/service/http/http'; // http请求
Vue.prototype.portService = portService;
版权属于:小小窝/禾下月
本文链接:https://hxyxyz.top/index.php/Web/284.html
本站文章采用 知识共享署名4.0 国际许可协议 进行许可,请在转载时注明出处及本声明!