main.js 628 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import App from './App'
  2. import Api from '@/components/luch-request/custom/api'
  3. const Tui = {
  4. toast: function(text, duration, success) {
  5. uni.showToast({
  6. title: text,
  7. icon: success ? 'success' : 'none',
  8. duration: duration || 2000
  9. })
  10. }
  11. }
  12. Vue.prototype.tui = Tui
  13. Vue.prototype.$api = Api
  14. // #ifndef VUE3
  15. import Vue from 'vue'
  16. Vue.config.productionTip = false
  17. App.mpType = 'app'
  18. const app = new Vue({
  19. ...App
  20. })
  21. app.$mount()
  22. // #endif
  23. // #ifdef VUE3
  24. import {
  25. createSSRApp
  26. } from 'vue'
  27. export function createApp() {
  28. const app = createSSRApp(App)
  29. return {
  30. app
  31. }
  32. }
  33. // #endif