initialize.js 781 B

123456789101112131415161718192021222324
  1. import config from "./config.js"
  2. import { decimalNum , setStorageSync , getStorageSync , setColor , getData_ } 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.$getData_ = getData_;
  14. Vue.prototype.$setColor = setColor;
  15. // Vue.component('share', share)
  16. // Vue.component('reverseBack', reverseBack)
  17. }
  18. }