chore: 子应用独立运行测试
This commit is contained in:
@@ -1,43 +1,29 @@
|
||||
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';
|
||||
|
||||
// 微前端路由
|
||||
const moduleName = 'static-file';
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/static-file',
|
||||
name: moduleName,
|
||||
name: 'StaticFile',
|
||||
meta: {
|
||||
title: '静态文件管理',
|
||||
icon: 'ant-design:file',
|
||||
order: 2,
|
||||
title: '静态文件管理',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
name: `${moduleName}-list`,
|
||||
path: '/static-file/list',
|
||||
name: 'StaticFileList',
|
||||
component: RendererAdapter,
|
||||
meta: {
|
||||
icon: 'ant-design:file-text',
|
||||
title: '静态文件列表',
|
||||
keepAlive: false,
|
||||
icon: 'ant-design:file',
|
||||
},
|
||||
component: () =>
|
||||
h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-application-list',
|
||||
applicationId: LOW_CODE_APPLICATION_ID,
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
fileId: '7pfr394d6',
|
||||
}),
|
||||
props: {
|
||||
url: 'https://localhost:10012/?fileId=7pfr394d6&projectId=4',
|
||||
accessToken: localStorage.getItem('y-code-access-token'),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user