diff --git a/src/layouts/default/sidebar/components/Menu.vue b/src/layouts/default/sidebar/components/Menu.vue index 27cf543..f6afa80 100644 --- a/src/layouts/default/sidebar/components/Menu.vue +++ b/src/layouts/default/sidebar/components/Menu.vue @@ -22,6 +22,8 @@ diff --git a/src/layouts/default/sidebar/components/MenuWithChildren.vue b/src/layouts/default/sidebar/components/MenuWithChildren.vue index 4413300..7c77070 100644 --- a/src/layouts/default/sidebar/components/MenuWithChildren.vue +++ b/src/layouts/default/sidebar/components/MenuWithChildren.vue @@ -29,21 +29,23 @@ diff --git a/src/router/routes/modules/about.ts b/src/router/routes/modules/about.ts index 768f2cc..0db32f3 100644 --- a/src/router/routes/modules/about.ts +++ b/src/router/routes/modules/about.ts @@ -11,7 +11,7 @@ const route: RouteRecordRaw = { title: '关于', icon: SettingOutlined, single: true, - sort: 3 + sort: 4 }, children: [ { diff --git a/src/router/routes/modules/docs.ts b/src/router/routes/modules/docs.ts new file mode 100644 index 0000000..1830515 --- /dev/null +++ b/src/router/routes/modules/docs.ts @@ -0,0 +1,53 @@ +import type { RouteRecordRaw } from 'vue-router' +import { + CompassOutlined +} from '@ant-design/icons-vue' +import { DefaultLayout } from '~/layouts' + +const route: RouteRecordRaw = { + path: '/docs', + name: 'docs', + component: DefaultLayout, + redirect: '/docs/project/inline', + meta: { + title: '外部页面', + icon: CompassOutlined, + sort: 3 + }, + children: [ + { + path: 'inline/project', + name: 'projectInline', + component: () => import('~/views/docs/inline/index.vue'), + props: true, + meta: { + title: '项目文档 (内嵌)', + frameSrc: 'https://vue-hbs-admin-docs.netlify.app', + sort: 1 + } + }, + { + path: 'inline/ant', + name: 'antInline', + component: () => import('~/views/docs/inline/index.vue'), + props: true, + meta: { + title: 'antVue文档 (内嵌)', + frameSrc: 'https://antdv.com/components/overview-cn', + sort: 2 + } + }, + { + path: 'https://vue-hbs-admin-docs.netlify.app/', + name: 'projectInline', + component: () => import('~/views/demo/excel/import.vue'), + meta: { + title: '项目文档 (外链)', + external: true, + sort: 3 + } + } + ] +} + +export default route diff --git a/src/views/docs/inline/index.vue b/src/views/docs/inline/index.vue new file mode 100644 index 0000000..f89afff --- /dev/null +++ b/src/views/docs/inline/index.vue @@ -0,0 +1,12 @@ +