mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
42 lines
1.0 KiB
Vue
42 lines
1.0 KiB
Vue
<template>
|
|
<MicroApps :url="appUrl" :path="path" v-if="!loading" />
|
|
</template>
|
|
|
|
<script>
|
|
import MicroApps from "../../components/MicroApps.vue";
|
|
|
|
export default {
|
|
components: { MicroApps },
|
|
data() {
|
|
return {
|
|
loading: false,
|
|
appUrl: '',
|
|
path: '',
|
|
}
|
|
},
|
|
|
|
deactivated() {
|
|
this.loading = true;
|
|
},
|
|
|
|
watch: {
|
|
'$route': {
|
|
handler(to) {
|
|
if (to.name == 'manage-apps') {
|
|
this.loading = true;
|
|
this.$nextTick(() => {
|
|
this.loading = false;
|
|
let url = $A.apiUrl("/apps/okr")
|
|
if (url.indexOf('http') == -1) {
|
|
url = window.location.origin + url
|
|
}
|
|
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || url
|
|
this.path = this.$route.query.path || '';
|
|
})
|
|
}
|
|
},
|
|
immediate: true
|
|
}
|
|
}
|
|
}
|
|
</script> |