main.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * @Author: liuzhenlin 461480418@qq.ocm
  3. * @Date: 2023-01-12 11:57:48
  4. * @LastEditors: liuzhenlin
  5. * @LastEditTime: 2023-01-19 16:53:09
  6. * @Description: file content
  7. * @FilePath: \crm\main.js
  8. */
  9. import Vue from 'vue'
  10. // //引用并设置环境变量
  11. import '.env.js'
  12. import App from './App'
  13. import store from './store'
  14. import uView from 'uview-ui'
  15. import { parseTime, translateDataToTree, formatPrice, selectDictLabel } from './utils'
  16. import dictApi from '@/api/system/dict'
  17. import WaterMark from '@/components/WaterMark/index.vue'
  18. Vue.component('WaterMark', WaterMark)
  19. Vue.prototype.parseTime = parseTime
  20. Vue.prototype.translateDataToTree = translateDataToTree
  21. Vue.prototype.formatPrice = formatPrice
  22. Vue.prototype.selectDictLabel = selectDictLabel
  23. Vue.prototype.getDicts = dictApi.getDictDataByType
  24. Vue.use(uView)
  25. Vue.config.productionTip = false
  26. Vue.prototype.$store = store
  27. App.mpType = 'app'
  28. uni.$u.setConfig({
  29. // 修改$u.props对象的属性
  30. props: {
  31. // 修改radio组件的size参数的默认值,相当于执行 uni.$u.props.radio.size = 30
  32. input: {
  33. placeholderStyle: 'color:#969696;font-size:32rpx',
  34. },
  35. },
  36. })
  37. const app = new Vue({
  38. ...App,
  39. })
  40. app.$mount()