|
@@ -1,6 +1,6 @@
|
|
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
|
|
|
|
-import { createApp, type App as AppType } from 'vue'
|
|
|
+import { createApp, type App as AppType, type Component } from 'vue'
|
|
|
|
|
|
import './main.css'
|
|
|
import App from './App.vue'
|
|
@@ -13,23 +13,24 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
|
|
|
|
//封装弹窗方法
|
|
|
import setupComponent from './components'
|
|
|
+import No_found from './components/404/no_found.vue'
|
|
|
|
|
|
let app: AppType | null = null
|
|
|
//导入方法
|
|
|
|
|
|
//导入方法
|
|
|
-async function bootstrapVue3(container: HTMLElement) {
|
|
|
+async function bootstrapVue3(component: Component) {
|
|
|
if (qiankunWindow.__POWERED_BY_QIANKUN__) {
|
|
|
console.log('处于独立运行模式...')
|
|
|
}
|
|
|
- app = createApp(App)
|
|
|
+ app = createApp(component)
|
|
|
await setupComponent(app)
|
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
app.component(key, component)
|
|
|
}
|
|
|
app.use(ELEMENT)
|
|
|
app.use(FcDesigner.formCreate)
|
|
|
- app.mount(container)
|
|
|
+ app.mount(document.getElementById('app') as HTMLElement)
|
|
|
}
|
|
|
|
|
|
// bootstrapVue3()
|
|
@@ -39,7 +40,7 @@ const initQianKun = () => {
|
|
|
// 当前应用在主应用中的生命周期
|
|
|
// 文档 https://qiankun.umijs.org/zh/guide/getting-started#
|
|
|
mount(props) {
|
|
|
- bootstrapVue3(props.container?.querySelector('#app') as HTMLElement)
|
|
|
+ bootstrapVue3(App)
|
|
|
// 可以通过props读取主应用的参数:msg
|
|
|
// 监听主应用传值以及我本身的一些业务逻辑
|
|
|
props.setLoading(false)
|
|
@@ -66,5 +67,5 @@ if (qiankunWindow.__POWERED_BY_QIANKUN__) {
|
|
|
initQianKun()
|
|
|
} else {
|
|
|
// 独立运行时,直接挂载应用
|
|
|
- bootstrapVue3(document.getElementById('app') as HTMLElement)
|
|
|
+ bootstrapVue3(No_found)
|
|
|
}
|