initialize.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. } from "./common.js"
  13. // import share from "@/components/headModules/share.vue"
  14. // import reverseBack from "@/components/headModules/reverse-back.vue"
  15. export default {
  16. install(Vue) {
  17. // 挂载全局对象
  18. Vue.prototype.$config = config; // 全局配置
  19. Vue.prototype.$stocksColorObj = config.stocksColorObj; // 股票颜色
  20. Vue.prototype.$decimalNum = decimalNum; // 计算精度
  21. Vue.prototype.$setStorageSync = setStorageSync;
  22. Vue.prototype.$getStorageSync = getStorageSync;
  23. Vue.prototype.$removeStorageSync = removeStorageSync;
  24. Vue.prototype.$getData_ = getData_;
  25. Vue.prototype.$readArticleInfo = readArticleInfo; // 阅读文章详情
  26. Vue.prototype.$numIntercepting = numIntercepting; // 数字小数剪切
  27. Vue.prototype.$getChange = getChange; // 数字小数剪切
  28. Vue.prototype.$setColor = setColor;
  29. Vue.prototype.$eventBus = new Vue()
  30. // Vue.component('share', share)
  31. // Vue.component('reverseBack', reverseBack)
  32. }
  33. }