main.js 921 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // import ElementPlus from 'element-plus' //添加
  2. // import 'element-plus/dist/index.css' //添加
  3. // import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
  4. import App from './App'
  5. // import appPush from '@/js_sdk/levine-APPPush/levine-APPPush/plugins/APPPush/index.js'
  6. // import Print from 'vue3-print-nb'
  7. // #ifndef VUE3
  8. import Vue from 'vue'
  9. import './uni.promisify.adaptor'
  10. Vue.config.productionTip = false
  11. App.mpType = 'app'
  12. const app = new Vue({
  13. ...App
  14. })
  15. app.$mount()
  16. // #endif
  17. // 封装弹框的方法
  18. uni.$showMsg = (title = '数据请求失败!', duration = 1500) => {
  19. uni.showToast({
  20. title,
  21. duration,
  22. icon: 'none'
  23. })
  24. }
  25. // uni.$appPush = appPush
  26. // #ifdef VUE3
  27. import { createSSRApp } from 'vue'
  28. export function createApp() {
  29. const app = createSSRApp(App)
  30. // app.use(appPush)
  31. // app.use(ElementPlus, {
  32. // locale: zhCn,
  33. // })
  34. // app.use(qs)
  35. return {
  36. app
  37. }
  38. }
  39. // #endif