Commit 028810b20134cd1f1c8274365cf5e78074008a97
1 parent
7ff6db9a
fix: bdDoc
Showing
2 changed files
with
33 additions
and
1 deletions
yudao-ui-admin-vue3/src/router/modules/remaining.ts
| 1 | import { Layout } from '@/utils/routerHelper' | 1 | import { Layout } from '@/utils/routerHelper' |
| 2 | import { useI18n } from '@/hooks/web/useI18n' | 2 | import { useI18n } from '@/hooks/web/useI18n' |
| 3 | const { t } = useI18n() | 3 | const { t } = useI18n() |
| 4 | +/** | ||
| 5 | +* redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击 | ||
| 6 | +* name:'router-name' 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题 | ||
| 7 | +* meta : { | ||
| 8 | + hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false) | ||
| 4 | 9 | ||
| 10 | + alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式, | ||
| 11 | + 只有一个时,会将那个子路由当做根路由显示在侧边栏, | ||
| 12 | + 若你想不管路由下面的 children 声明的个数都显示你的根路由, | ||
| 13 | + 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则, | ||
| 14 | + 一直显示根路由(默认 false) | ||
| 15 | + | ||
| 16 | + title: 'title' 设置该路由在侧边栏和面包屑中展示的名字 | ||
| 17 | + | ||
| 18 | + icon: 'svg-name' 设置该路由的图标 | ||
| 19 | + | ||
| 20 | + noCache: true 如果设置为true,则不会被 <keep-alive> 缓存(默认 false) | ||
| 21 | + | ||
| 22 | + breadcrumb: false 如果设置为false,则不会在breadcrumb面包屑中显示(默认 true) | ||
| 23 | + | ||
| 24 | + affix: true 如果设置为true,则会一直固定在tag项中(默认 false) | ||
| 25 | + | ||
| 26 | + noTagsView: true 如果设置为true,则不会出现在tag中(默认 false) | ||
| 27 | + | ||
| 28 | + activeMenu: '/dashboard' 显示高亮的路由路径 | ||
| 29 | + | ||
| 30 | + followAuth: '/dashboard' 跟随哪个路由进行权限过滤 | ||
| 31 | + | ||
| 32 | + canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false) | ||
| 33 | + } | ||
| 34 | +**/ | ||
| 5 | const remainingRouter: AppRouteRecordRaw[] = [ | 35 | const remainingRouter: AppRouteRecordRaw[] = [ |
| 6 | { | 36 | { |
| 7 | path: '/redirect', | 37 | path: '/redirect', |
yudao-ui-admin-vue3/src/views/infra/dbDoc/index.vue
| @@ -44,14 +44,16 @@ const init = async () => { | @@ -44,14 +44,16 @@ const init = async () => { | ||
| 44 | } | 44 | } |
| 45 | /** 处理导出 */ | 45 | /** 处理导出 */ |
| 46 | const handleExport = async (type: string) => { | 46 | const handleExport = async (type: string) => { |
| 47 | - const res = await DbDocApi.exportHtmlApi() | ||
| 48 | if (type === 'HTML') { | 47 | if (type === 'HTML') { |
| 48 | + const res = await DbDocApi.exportHtmlApi() | ||
| 49 | download.html(res, '数据库文档.html') | 49 | download.html(res, '数据库文档.html') |
| 50 | } | 50 | } |
| 51 | if (type === 'Word') { | 51 | if (type === 'Word') { |
| 52 | + const res = await DbDocApi.exportWordApi() | ||
| 52 | download.word(res, '数据库文档.doc') | 53 | download.word(res, '数据库文档.doc') |
| 53 | } | 54 | } |
| 54 | if (type === 'Markdown') { | 55 | if (type === 'Markdown') { |
| 56 | + const res = await DbDocApi.exportMarkdownApi() | ||
| 55 | download.markdown(res, '数据库文档.md') | 57 | download.markdown(res, '数据库文档.md') |
| 56 | } | 58 | } |
| 57 | } | 59 | } |