45 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import type { RouteRecordRaw } from 'vue-router';
 | |
| 
 | |
| import Renderer from '#/components/renderer/index.vue';
 | |
| import { LOW_CODE_PROJECT_ID, VITE_RENDERER_URL } from '#/constants';
 | |
| import { router } from '#/router';
 | |
| 
 | |
| const routes: Array<RouteRecordRaw> = [
 | |
|   {
 | |
|     path: '/application',
 | |
|     name: 'Application',
 | |
|     meta: {
 | |
|       title: '应用管理',
 | |
|       icon: 'ant-design:appstore-outlined',
 | |
|       hideInMenu: true,
 | |
|     },
 | |
|     children: [
 | |
|       {
 | |
|         path: 'list',
 | |
|         name: 'ApplicationList',
 | |
|         meta: {
 | |
|           title: '应用列表',
 | |
|           keepAlive: false,
 | |
|           icon: 'ant-design:list',
 | |
|         },
 | |
|         component: Renderer,
 | |
|         props: (route) => {
 | |
|           return {
 | |
|             url: `${VITE_RENDERER_URL}`,
 | |
|             accessToken: localStorage.getItem('y-code-access-token'),
 | |
|             fileId: 'b91n1y9yr',
 | |
|             projectId: LOW_CODE_PROJECT_ID,
 | |
|             router,
 | |
|             getRouter: () => router,
 | |
|             route,
 | |
|             degrade: false,
 | |
|             height: '100%',
 | |
|           };
 | |
|         },
 | |
|       },
 | |
|     ],
 | |
|   },
 | |
| ];
 | |
| 
 | |
| export default routes;
 | 
