chore: 调整子应用加载方式
This commit is contained in:
parent
ba6616fe4d
commit
26c08e0974
@ -1,15 +1,8 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
import RendererAdapter from '@sy/vue3-renderer-adapter';
|
||||
|
||||
import { VITE_RENDERER_URL } from '#/constants';
|
||||
import {
|
||||
LOW_CODE_APPLICATION_ID,
|
||||
LOW_CODE_PROJECT_ID,
|
||||
} from '#/constants/low-code';
|
||||
import { useUserStore } from '#/store/user';
|
||||
|
||||
const moduleName = 'acl';
|
||||
|
||||
@ -31,16 +24,12 @@ const routes: Array<RouteRecordRaw> = [
|
||||
keepAlive: true,
|
||||
icon: 'ant-design:list',
|
||||
},
|
||||
component: () => {
|
||||
const userStore = useUserStore();
|
||||
return h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-project-list',
|
||||
accessToken: userStore.token,
|
||||
applicationId: LOW_CODE_APPLICATION_ID,
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
fileId: '1hsd0407hf',
|
||||
});
|
||||
component: RendererAdapter,
|
||||
props: {
|
||||
url: `${VITE_RENDERER_URL}`,
|
||||
accessToken: localStorage.getItem('y-code-access-token'),
|
||||
fileId: '1hsd0407hf',
|
||||
projectId: '4',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -51,16 +40,12 @@ const routes: Array<RouteRecordRaw> = [
|
||||
keepAlive: false,
|
||||
icon: 'ant-design:list',
|
||||
},
|
||||
component: () => {
|
||||
const userStore = useUserStore();
|
||||
return h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-user-list',
|
||||
accessToken: userStore.token,
|
||||
applicationId: LOW_CODE_APPLICATION_ID,
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
fileId: '7pfu5radx',
|
||||
});
|
||||
component: RendererAdapter,
|
||||
props: {
|
||||
url: `${VITE_RENDERER_URL}`,
|
||||
accessToken: localStorage.getItem('y-code-access-token'),
|
||||
fileId: '7pfu5radx',
|
||||
projectId: '4',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
import RendererAdapter from '@sy/vue3-renderer-adapter';
|
||||
|
||||
import { VITE_RENDERER_URL } from '#/constants';
|
||||
@ -26,14 +24,13 @@ const routes: Array<RouteRecordRaw> = [
|
||||
keepAlive: false,
|
||||
icon: 'ant-design:list',
|
||||
},
|
||||
component: () =>
|
||||
h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-application-list',
|
||||
applicationId: 0,
|
||||
projectId: 4,
|
||||
fileId: 'b91n1y9yr',
|
||||
}),
|
||||
component: RendererAdapter,
|
||||
props: {
|
||||
url: `${VITE_RENDERER_URL}`,
|
||||
accessToken: localStorage.getItem('y-code-access-token'),
|
||||
fileId: 'b91n1y9yr',
|
||||
projectId: '4',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@ -43,8 +43,6 @@ const routes: RouteRecordRaw[] = [
|
||||
props: {
|
||||
url: `${VITE_V1_URL}`,
|
||||
accessToken: localStorage.getItem('y-code-access-token'),
|
||||
fileId: '4g4mz6qi8u',
|
||||
projectId: '4',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user