You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 regels
642 B

  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import './uni.promisify.adaptor'
  5. Vue.config.productionTip = false
  6. App.mpType = 'app'
  7. const app = new Vue({
  8. ...App
  9. })
  10. app.$mount()
  11. // #endif
  12. // #ifdef VUE3
  13. import { createSSRApp } from 'vue'
  14. import * as Pinia from 'pinia'
  15. import uviewPlus from 'uview-plus'
  16. import { initRequest } from './utils/request.js'
  17. export function createApp() {
  18. const app = createSSRApp(App)
  19. app.use(uviewPlus, () => {
  20. return {
  21. httpIns: initRequest,
  22. options: {
  23. config: {
  24. unit: 'rpx'
  25. }
  26. }
  27. }
  28. })
  29. return {
  30. app,
  31. Pinia
  32. }
  33. }
  34. // #endif