global.js 627 B

12345678910111213141516171819202122232425
  1. import globalMixins from "./globalMixins"
  2. const globals = {
  3. install: function (Vue, option) {
  4. // 全局混入
  5. Vue.mixin(globalMixins);
  6. // // 全局过滤
  7. // Object.keys(filters).forEach((key) => {
  8. // Vue.filter(key, filters[key]);
  9. // });
  10. // // 全局指令
  11. // Object.keys(directives).forEach((key) => {
  12. // Vue.directive(key, directives[key]);
  13. // });
  14. // // 全局属性和方法
  15. // Object.keys(propertiesAndMethods).forEach((key) => {
  16. // Vue.prototype[key] = propertiesAndMethods[key];
  17. // });
  18. },
  19. }
  20. export default globals