mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 05:12:49 +00:00
feat:微应用调整
This commit is contained in:
parent
a101feff21
commit
6cc20ce23f
@ -61,6 +61,7 @@ export default {
|
|||||||
deactivated() {
|
deactivated() {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.appData = this.getAppData
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
url(val) {
|
url(val) {
|
||||||
@ -92,20 +93,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
'userInfo',
|
'userInfo',
|
||||||
'themeMode',
|
'themeMode',
|
||||||
])
|
]),
|
||||||
},
|
getAppData(){
|
||||||
methods: {
|
return {
|
||||||
handleCreate(e) {
|
|
||||||
window.eventCenterForAppNameVite = new EventCenterForMicroApp(this.name)
|
|
||||||
},
|
|
||||||
handleBeforeMount(e) {
|
|
||||||
this.appData = {
|
|
||||||
type: 'init',
|
type: 'init',
|
||||||
vues: {
|
vues: {
|
||||||
Vue,
|
Vue,
|
||||||
@ -123,14 +119,26 @@ export default {
|
|||||||
userInfo: this.userInfo,
|
userInfo: this.userInfo,
|
||||||
path: this.path
|
path: this.path
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleCreate(e) {
|
||||||
|
// 创建前
|
||||||
|
window.eventCenterForAppNameVite = new EventCenterForMicroApp(this.name)
|
||||||
|
this.appData = this.getAppData
|
||||||
|
},
|
||||||
|
handleBeforeMount(e) {
|
||||||
|
// 加载前
|
||||||
},
|
},
|
||||||
handleMount(e) {
|
handleMount(e) {
|
||||||
|
// 加载完成
|
||||||
this.appData = this.data;
|
this.appData = this.data;
|
||||||
if(this.path){
|
if(this.path){
|
||||||
this.appData.path = this.path
|
this.appData.path = this.path
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUnmount(e) {
|
handleUnmount(e) {
|
||||||
|
// 卸载
|
||||||
window.dispatchEvent(new Event('apps-unmount'));
|
window.dispatchEvent(new Event('apps-unmount'));
|
||||||
},
|
},
|
||||||
handleError(e) {
|
handleError(e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user