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