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.

34 lines
679 B

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import './uni.promisify.adaptor'
  5. // 导入需要全局注册的组件
  6. import LoginPrompt from './components/login-prompt.vue'
  7. // 全局注册组件
  8. Vue.component('LoginPrompt', LoginPrompt)
  9. Vue.config.productionTip = false
  10. App.mpType = 'app'
  11. const app = new Vue({
  12. ...App
  13. })
  14. app.$mount()
  15. // #endif
  16. // #ifdef VUE3
  17. import { createSSRApp } from 'vue'
  18. // 导入需要全局注册的组件
  19. import LoginPrompt from './components/login-prompt.vue'
  20. export function createApp() {
  21. const app = createSSRApp(App)
  22. // 全局注册组件
  23. app.component('LoginPrompt', LoginPrompt)
  24. return {
  25. app
  26. }
  27. }
  28. // #endif