fix: eslint

This commit is contained in:
xingyu4j
2022-11-23 10:41:14 +08:00
parent f20aff421b
commit 8333e9c3da
12 changed files with 39 additions and 59 deletions

View File

@ -55,8 +55,7 @@ import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { getSchemaTableListApi, createCodegenListApi } from '@/api/infra/codegen'
import { ElForm, ElFormItem, ElInput, ElSelect, ElOption } from 'element-plus'
import { getDataSourceConfigListApi } from '@/api/infra/dataSourceConfig'
import type { DataSourceConfigVO } from '@/api/infra/dataSourceConfig/types'
import { getDataSourceConfigListApi, DataSourceConfigVO } from '@/api/infra/dataSourceConfig'
import type { DatabaseTableVO } from '@/api/infra/codegen/types'
import { VxeTableInstance } from 'vxe-table'
const { t } = useI18n() // 国际化

View File

@ -2,24 +2,24 @@
<ContentWrap title="数据库文档">
<!-- 操作工具栏 -->
<div class="mb-10px">
<XButton
type="primary"
preIcon="ep:download"
:title="t('action.export') + ' HTML'"
@click="handleExport('HTML')"
/>
<XButton
type="primary"
preIcon="ep:download"
:title="t('action.export') + ' Word'"
@click="handleExport('Word')"
/>
<XButton
type="primary"
preIcon="ep:download"
:title="t('action.export') + ' Markdown'"
@click="handleExport('Markdown')"
/>
<XButton
type="primary"
preIcon="ep:download"
:title="t('action.export') + ' HTML'"
@click="handleExport('HTML')"
/>
<XButton
type="primary"
preIcon="ep:download"
:title="t('action.export') + ' Word'"
@click="handleExport('Word')"
/>
<XButton
type="primary"
preIcon="ep:download"
:title="t('action.export') + ' Markdown'"
@click="handleExport('Markdown')"
/>
</div>
<IFrame v-if="!loding" v-loading="loding" :src="src" />
</ContentWrap>
@ -45,13 +45,17 @@ const init = async () => {
/** 处理导出 */
const handleExport = async (type: string) => {
const res = await DbDocApi.exportHtmlApi()
if (type === 'HTML') { download.html(res, '数据库文档.html') }
if (type === 'Word') { download.word(res, '数据库文档.doc') }
if(type === 'Markdown') {download.markdown(res, '数据库文档.md')}
if (type === 'HTML') {
download.html(res, '数据库文档.html')
}
if (type === 'Word') {
download.word(res, '数据库文档.doc')
}
if (type === 'Markdown') {
download.markdown(res, '数据库文档.md')
}
}
onMounted(async () => {
await init()
})
</script>

View File

@ -10,4 +10,3 @@ import { IFrame } from '@/components/IFrame'
const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/druid/index.html')
</script>

View File

@ -1,4 +1,3 @@
<template>
<ContentWrap>
<IFrame :src="src" />

View File

@ -10,4 +10,3 @@ import { IFrame } from '@/components/IFrame'
const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/doc.html')
</script>