index.js 824 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import auth from './auth'
  2. import modal from './modal'
  3. import rule from './rule'
  4. import plat from './plat'
  5. import {getImages} from './images'
  6. import {renderItem,isNull,copyProps,clearProps} from '@/utils/gdtq.js'
  7. import env from '@/env.js'
  8. export default {
  9. install(Vue) {
  10. // 认证对象
  11. for(let i in auth) {
  12. Vue.prototype[`$${i}`] = auth[i]
  13. }
  14. for(let i in env) {
  15. Vue.prototype[`$${i}`] = env[i]
  16. }
  17. for(let i in plat) {
  18. Vue.prototype[`${i}`] = plat[i]
  19. }
  20. // 模态框对象
  21. Vue.prototype.$modal = modal
  22. // 获取图片URL方法
  23. Vue.prototype.$getImages = getImages
  24. // 正则
  25. Vue.prototype.$rule = rule
  26. // 渲染值
  27. Vue.prototype.renderItem = renderItem
  28. Vue.prototype.isNull = isNull
  29. Vue.prototype.copyProps = copyProps
  30. Vue.prototype.clearProps = clearProps
  31. }
  32. }