initialize.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import config from "./config.js"
  2. import {
  3. decimalNum,
  4. setStorageSync,
  5. getStorageSync,
  6. removeStorageSync,
  7. setColor,
  8. getData_,
  9. readArticleInfo,
  10. numIntercepting,
  11. getChange,
  12. showAccount
  13. } from "./common.js"
  14. import path from "./path.js"
  15. // import share from "@/components/headModules/share.vue"
  16. // import reverseBack from "@/components/headModules/reverse-back.vue"
  17. export default {
  18. install(Vue) {
  19. // 挂载全局对象
  20. Vue.prototype.$config = config; // 全局配置
  21. Vue.prototype.$stocksColorObj = config.stocksColorObj; // 股票颜色
  22. Vue.prototype.$decimalNum = decimalNum; // 计算精度
  23. Vue.prototype.$setStorageSync = setStorageSync;
  24. Vue.prototype.$getStorageSync = getStorageSync;
  25. Vue.prototype.$removeStorageSync = removeStorageSync;
  26. Vue.prototype.$getData_ = getData_;
  27. Vue.prototype.$readArticleInfo = readArticleInfo; // 阅读文章详情
  28. Vue.prototype.$numIntercepting = numIntercepting; // 数字小数剪切
  29. Vue.prototype.$getChange = getChange; // 数字小数剪切
  30. Vue.prototype.$showAccount = showAccount; // 账户名称脱敏
  31. Vue.prototype.$setColor = setColor;
  32. Vue.prototype.$path = path;
  33. Vue.prototype.$eventBus = new Vue()
  34. // Vue.component('share', share)
  35. // Vue.component('reverseBack', reverseBack)
  36. }
  37. }