mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 03:52:50 +00:00
feat: okr1.1 兼容开发
This commit is contained in:
parent
6bed109f97
commit
66b9e7e9b3
@ -5,18 +5,18 @@
|
||||
<Loading/>
|
||||
</div>
|
||||
</transition>
|
||||
<micro-app v-if="url && !loading"
|
||||
:name='name'
|
||||
:url='url'
|
||||
inline
|
||||
<micro-app v-if="url && !loading"
|
||||
:name='name'
|
||||
:url='url'
|
||||
inline
|
||||
keep-alive
|
||||
disableSandbox
|
||||
disableSandbox
|
||||
:data='appData'
|
||||
@created='handleCreate'
|
||||
@beforemount='handleBeforeMount'
|
||||
@mounted='handleMount'
|
||||
@created='handleCreate'
|
||||
@beforemount='handleBeforeMount'
|
||||
@mounted='handleMount'
|
||||
@unmount='handleUnmount'
|
||||
@error='handleError'
|
||||
@error='handleError'
|
||||
@datachange='handleDataChange'
|
||||
></micro-app>
|
||||
</div>
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
},
|
||||
'$route': {
|
||||
handler(to) {
|
||||
if(to.name == 'manage-apps'){
|
||||
if(to.name == 'manage-apps' || to.name == 'single-apps'){
|
||||
this.appData = {
|
||||
path: to.hash || to.fullPath
|
||||
}
|
||||
@ -136,7 +136,8 @@ export default {
|
||||
languageType,
|
||||
},
|
||||
userInfo: this.userInfo,
|
||||
path: this.path
|
||||
path: this.path,
|
||||
electron: this.$Electron
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -172,4 +173,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@ -37,4 +37,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
42
resources/assets/js/pages/single/apps.vue
Normal file
42
resources/assets/js/pages/single/apps.vue
Normal file
@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div class="electron-single-micro-apps">
|
||||
<MicroApps :url="appUrl" :path="path" v-if="!loading && $route.name == 'single-apps'" />
|
||||
</div>
|
||||
</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) {
|
||||
this.loading = true;
|
||||
if (to.name == 'single-apps') {
|
||||
this.$nextTick(() => {
|
||||
this.loading = false;
|
||||
this.appUrl = import.meta.env.VITE_OKR_WEB_URL || $A.apiUrl("../apps/okr")
|
||||
this.path = this.$route.query.path || '';
|
||||
})
|
||||
}else{
|
||||
this.appUrl = '';
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
5
resources/assets/js/routes.js
vendored
5
resources/assets/js/routes.js
vendored
@ -148,6 +148,11 @@ export default [
|
||||
path: '/single/task/:taskId',
|
||||
component: () => import('./pages/single/task.vue'),
|
||||
},
|
||||
{
|
||||
name: 'single-apps',
|
||||
path: '/single/apps/*',
|
||||
component: () => import('./pages/single/apps.vue')
|
||||
},
|
||||
{
|
||||
name: 'valid-email',
|
||||
path: '/single/valid/email',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user