initialize.js 1.0 KB

1234567891011121314151617181920212223242526272829
  1. import config from "./config.js"
  2. import { decimalNum , setStorageSync , getStorageSync , removeStorageSync, setColor , getData_ , readArticleInfo , numIntercepting } from "./common.js"
  3. // import share from "@/components/headModules/share.vue"
  4. // import reverseBack from "@/components/headModules/reverse-back.vue"
  5. export default {
  6. install(Vue) {setColor
  7. // 挂载全局对象
  8. Vue.prototype.$config = config; // 全局配置
  9. Vue.prototype.$stocksColorObj = config.stocksColorObj; // 股票颜色
  10. Vue.prototype.$decimalNum = decimalNum; // 计算精度
  11. Vue.prototype.$setStorageSync = setStorageSync;
  12. Vue.prototype.$getStorageSync = getStorageSync;
  13. Vue.prototype.$removeStorageSync = removeStorageSync;
  14. Vue.prototype.$getData_ = getData_;
  15. Vue.prototype.$readArticleInfo = readArticleInfo; // 阅读文章详情
  16. Vue.prototype.$numIntercepting = numIntercepting; // 数字小数剪切
  17. Vue.prototype.$setColor = setColor;
  18. // Vue.component('share', share)
  19. // Vue.component('reverseBack', reverseBack)
  20. }
  21. }