fix: bdDoc

This commit is contained in:
xingyu4j 2022-11-23 14:13:57 +08:00
parent 7ff6db9ac7
commit 028810b201
2 changed files with 33 additions and 1 deletions

View File

@ -1,7 +1,37 @@
import { Layout } from '@/utils/routerHelper' import { Layout } from '@/utils/routerHelper'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
const { t } = useI18n() const { t } = useI18n()
/**
* redirect: noredirect noredirect
* name:'router-name' 使<keep-alive>
* meta : {
hidden: true true 404login等页面( false)
alwaysShow: true children 1
children
alwaysShow: true
( false)
title: 'title'
icon: 'svg-name'
noCache: true true <keep-alive> ( false)
breadcrumb: false falsebreadcrumb面包屑中显示( true)
affix: true truetag项中( false)
noTagsView: true truetag中( false)
activeMenu: '/dashboard'
followAuth: '/dashboard'
canTo: true true即使hidden为true( false)
}
**/
const remainingRouter: AppRouteRecordRaw[] = [ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: '/redirect', path: '/redirect',

View File

@ -44,14 +44,16 @@ const init = async () => {
} }
/** 处理导出 */ /** 处理导出 */
const handleExport = async (type: string) => { const handleExport = async (type: string) => {
const res = await DbDocApi.exportHtmlApi()
if (type === 'HTML') { if (type === 'HTML') {
const res = await DbDocApi.exportHtmlApi()
download.html(res, '数据库文档.html') download.html(res, '数据库文档.html')
} }
if (type === 'Word') { if (type === 'Word') {
const res = await DbDocApi.exportWordApi()
download.word(res, '数据库文档.doc') download.word(res, '数据库文档.doc')
} }
if (type === 'Markdown') { if (type === 'Markdown') {
const res = await DbDocApi.exportMarkdownApi()
download.markdown(res, '数据库文档.md') download.markdown(res, '数据库文档.md')
} }
} }