mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 20:12:48 +00:00
no message
This commit is contained in:
parent
9888d9f59e
commit
04d31bd814
@ -131,11 +131,11 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
emitter.on('openMicroApp', this.openMicroApp);
|
||||
emitter.on('observeMicroApp', this.observeMicroApp);
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
emitter.off('openMicroApp', this.openMicroApp);
|
||||
emitter.off('observeMicroApp', this.observeMicroApp);
|
||||
},
|
||||
|
||||
watch: {
|
||||
@ -346,7 +346,7 @@ export default {
|
||||
},
|
||||
|
||||
/**
|
||||
* 打开微应用
|
||||
* 观察打开微应用
|
||||
* @param config
|
||||
* - name 应用名称
|
||||
* - url 应用地址
|
||||
@ -355,7 +355,7 @@ export default {
|
||||
* - keepAlive 是否开启微应用保活 (true/false),默认 true
|
||||
* - disableScopecss 是否禁用样式隔离 (true/false),默认 false
|
||||
*/
|
||||
openMicroApp(config) {
|
||||
observeMicroApp(config) {
|
||||
// 处理数据
|
||||
config.name = config.name || 'micro-app'
|
||||
config.url = config.url || null
|
||||
|
||||
@ -1184,7 +1184,11 @@ export default {
|
||||
this.settingRoute(act)
|
||||
break;
|
||||
case 'appstore':
|
||||
emitter.emit('openMicroApp', {name: 'appstore', url: $A.mainUrl('appstore/web/'), disableScopecss: true});
|
||||
this.$store.dispatch("openMicroApp", {
|
||||
name: 'appstore',
|
||||
url: $A.mainUrl('appstore/web/'),
|
||||
disableScopecss: true,
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
:xl="{ span: 6 }"
|
||||
:xxl="{ span: 3 }">
|
||||
<div class="apply-col">
|
||||
<div @click="microClick(item)">
|
||||
<div @click="applyClick({value: 'microApp'}, item)">
|
||||
<div class="logo">
|
||||
<div class="apply-icon no-dark-content" :style="{backgroundImage: `url(${item.icon})`}"></div>
|
||||
</div>
|
||||
@ -449,13 +449,12 @@ export default {
|
||||
}
|
||||
return item.value == type && num > 0
|
||||
},
|
||||
// 点击微应用
|
||||
microClick(item) {
|
||||
this.$store.dispatch("openMicroApp", item);
|
||||
},
|
||||
// 点击应用
|
||||
applyClick(item, area = '') {
|
||||
switch (item.value) {
|
||||
case 'microApp':
|
||||
this.$store.dispatch("openMicroApp", area);
|
||||
return
|
||||
case 'approve':
|
||||
case 'calendar':
|
||||
case 'file':
|
||||
|
||||
@ -21,7 +21,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
this.$refs.app.openMicroApp(app)
|
||||
this.$refs.app.observeMicroApp(app)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
7
resources/assets/js/store/actions.js
vendored
7
resources/assets/js/store/actions.js
vendored
@ -4666,14 +4666,17 @@ export default {
|
||||
return
|
||||
}
|
||||
const event = {
|
||||
name: `${item.app_name}_${item.key}`,
|
||||
name: item.app_name || item.name,
|
||||
url: $A.mainUrl(item.url),
|
||||
}
|
||||
if (item.key) {
|
||||
event.name += `_${item.key}`
|
||||
}
|
||||
for (let key in item) {
|
||||
if (['props', 'transparent', 'keepAlive', 'disableScopecss'].includes(key)) {
|
||||
event[key] = item[key]
|
||||
}
|
||||
}
|
||||
emitter.emit('openMicroApp', event);
|
||||
emitter.emit('observeMicroApp', event);
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user