mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-21 02:56:38 +08:00
feat(projects): 新增文档页面
This commit is contained in:
parent
2d9d5c0353
commit
7654b2adf3
@ -10,6 +10,10 @@ export enum EnumRoutePath {
|
||||
'dashboard' = '/dashboard',
|
||||
'dashboard_analysis' = '/dashboard/analysis',
|
||||
'dashboard_workbench' = '/dashboard/workbench',
|
||||
'document' = '/document',
|
||||
'document_vue' = '/document/vue',
|
||||
'document_vite' = '/document/vite',
|
||||
'document_naive' = '/document/naive',
|
||||
'multi-menu' = '/multi-menu',
|
||||
'multi-menu_first' = '/multi-menu/first',
|
||||
'multi-menu_first_second' = '/multi-menu/first/second',
|
||||
@ -31,6 +35,10 @@ export enum EnumRouteTitle {
|
||||
'dashboard' = '仪表盘',
|
||||
'dashboard_analysis' = '分析页',
|
||||
'dashboard_workbench' = '工作台',
|
||||
'document' = '文档',
|
||||
'document_vue' = 'vue文档',
|
||||
'document_vite' = 'vite文档',
|
||||
'document_naive' = 'naive文档',
|
||||
'multi-menu' = '多级菜单',
|
||||
'multi-menu_first' = '一级菜单',
|
||||
'multi-menu_first_second' = '二级菜单',
|
||||
|
@ -5,6 +5,9 @@ import NotFound from '@/views/system/exception/404.vue';
|
||||
import ServiceError from '@/views/system/exception/500.vue';
|
||||
import DashboardAnalysis from '@/views/dashboard/analysis/index.vue';
|
||||
import DashboardWorkbench from '@/views/dashboard/workbench/index.vue';
|
||||
import DocumentVue from '@/views/document/vue/index.vue';
|
||||
import DocumentVite from '@/views/document/vite/index.vue';
|
||||
import DocumentNaive from '@/views/document/naive/index.vue';
|
||||
import MultiMenuFirstSecond from '@/views/multi-menu/first/second/index.vue';
|
||||
|
||||
const Exception403 = { ...NoPermission };
|
||||
@ -17,6 +20,9 @@ setCacheName(NotFound, RouteNameMap.get('not-found'));
|
||||
setCacheName(ServiceError, RouteNameMap.get('service-error'));
|
||||
setCacheName(DashboardAnalysis, RouteNameMap.get('dashboard_analysis'));
|
||||
setCacheName(DashboardWorkbench, RouteNameMap.get('dashboard_workbench'));
|
||||
setCacheName(DocumentVue, RouteNameMap.get('document_vue'));
|
||||
setCacheName(DocumentVite, RouteNameMap.get('document_vite'));
|
||||
setCacheName(DocumentNaive, RouteNameMap.get('document_naive'));
|
||||
setCacheName(MultiMenuFirstSecond, RouteNameMap.get('multi-menu_first_second'));
|
||||
setCacheName(Exception404, RouteNameMap.get('exception_404'));
|
||||
setCacheName(Exception403, RouteNameMap.get('exception_403'));
|
||||
@ -29,6 +35,9 @@ export {
|
||||
ServiceError,
|
||||
DashboardAnalysis,
|
||||
DashboardWorkbench,
|
||||
DocumentVue,
|
||||
DocumentVite,
|
||||
DocumentNaive,
|
||||
Exception403,
|
||||
Exception404,
|
||||
Exception500,
|
||||
|
52
src/router/modules/document.ts
Normal file
52
src/router/modules/document.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import { Document } from '@vicons/carbon';
|
||||
import type { CustomRoute } from '@/interface';
|
||||
import { EnumRoutePath, EnumRouteTitle } from '@/enum';
|
||||
import { BasicLayout } from '@/layouts';
|
||||
import { RouteNameMap } from '../helpers';
|
||||
import { DocumentVue, DocumentVite, DocumentNaive } from '../components';
|
||||
|
||||
const DOCUMENT: CustomRoute = {
|
||||
name: RouteNameMap.get('document'),
|
||||
path: EnumRoutePath.document,
|
||||
component: BasicLayout,
|
||||
redirect: { name: RouteNameMap.get('document') },
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: EnumRouteTitle.document,
|
||||
icon: Document
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: RouteNameMap.get('document_vue'),
|
||||
path: EnumRoutePath.document_vue,
|
||||
component: DocumentVue,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: EnumRouteTitle.document_vue,
|
||||
fullPage: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: RouteNameMap.get('document_vite'),
|
||||
path: EnumRoutePath.document_vite,
|
||||
component: DocumentVite,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: EnumRouteTitle.document_vite,
|
||||
fullPage: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: RouteNameMap.get('document_naive'),
|
||||
path: EnumRoutePath.document_naive,
|
||||
component: DocumentNaive,
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
title: EnumRouteTitle.document_naive,
|
||||
fullPage: true
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default DOCUMENT;
|
@ -1,6 +1,7 @@
|
||||
import ROOT from './root';
|
||||
import DASHBOARD from './dashboard';
|
||||
import DOCUMENT from './document';
|
||||
import EXCEPTION from './exception';
|
||||
import MULTI_MENU from './multiMenu';
|
||||
|
||||
export default [ROOT, DASHBOARD, EXCEPTION, MULTI_MENU];
|
||||
export default [ROOT, DASHBOARD, DOCUMENT, EXCEPTION, MULTI_MENU];
|
||||
|
10
src/views/document/naive/index.vue
Normal file
10
src/views/document/naive/index.vue
Normal file
@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<iframe class="w-full h-full" :src="src"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const src = 'https://www.naiveui.com/zh-CN/os-theme/docs/introduction';
|
||||
</script>
|
||||
<style scoped></style>
|
10
src/views/document/vite/index.vue
Normal file
10
src/views/document/vite/index.vue
Normal file
@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<iframe class="w-full h-full" :src="src"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const src = 'https://cn.vitejs.dev/';
|
||||
</script>
|
||||
<style scoped></style>
|
10
src/views/document/vue/index.vue
Normal file
10
src/views/document/vue/index.vue
Normal file
@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<iframe class="w-full h-full" :src="src"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const src = 'https://v3.cn.vuejs.org/';
|
||||
</script>
|
||||
<style scoped></style>
|
Loading…
Reference in New Issue
Block a user