feat:微应用调整

This commit is contained in:
weifashi 2023-07-25 16:01:53 +08:00
parent b8eab81ad2
commit 46967f1e00

View File

@ -10,7 +10,6 @@
inline inline
destroy destroy
disableSandbox disableSandbox
keep-alive
:data='appData' :data='appData'
@created='handleCreate' @created='handleCreate'
@beforemount='handleBeforeMount' @beforemount='handleBeforeMount'
@ -72,12 +71,9 @@ export default {
methods: { methods: {
handleCreate(e) { handleCreate(e) {
console.log("子应用创建了",e) // console.log("",e)
}, },
handleBeforeMount(e) { handleBeforeMount(e) {
// console.log("",e)
},
handleMount(e) {
this.appData = { this.appData = {
type: 'init', type: 'init',
vues:{ vues:{
@ -94,10 +90,14 @@ export default {
}, },
userInfo: this.userInfo, userInfo: this.userInfo,
} }
},
handleMount(e) {
}, },
handleUnmount(e) { handleUnmount(e) {
this.loading = true; this.loading = true;
console.log("子应用卸载了",e) window.dispatchEvent(new Event('apps-unmount'));
// console.log("",e)
}, },
handleError(e) { handleError(e) {
// console.log("",e.detail.error) // console.log("",e.detail.error)