Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ff0c12c5
authored
Apr 22, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【移除】数据库文档,简化项目的复杂度
parent
5ba6c5ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
75 deletions
+0
-75
src/api/infra/dbDoc/index.ts
+0
-16
src/views/infra/dbDoc/index.vue
+0
-59
No files found.
src/api/infra/dbDoc/index.ts
deleted
100644 → 0
View file @
5ba6c5ee
import
request
from
'@/config/axios'
// 导出Html
export
const
exportHtml
=
()
=>
{
return
request
.
download
({
url
:
'/infra/db-doc/export-html'
})
}
// 导出Word
export
const
exportWord
=
()
=>
{
return
request
.
download
({
url
:
'/infra/db-doc/export-word'
})
}
// 导出Markdown
export
const
exportMarkdown
=
()
=>
{
return
request
.
download
({
url
:
'/infra/db-doc/export-markdown'
})
}
src/views/infra/dbDoc/index.vue
deleted
100644 → 0
View file @
5ba6c5ee
<
template
>
<doc-alert
title=
"数据库文档"
url=
"https://doc.iocoder.cn/db-doc/"
/>
<ContentWrap
title=
"数据库文档"
>
<div
class=
"mb-10px"
>
<el-button
type=
"primary"
plain
@
click=
"handleExport('HTML')"
>
<Icon
icon=
"ep:download"
/>
导出 HTML
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleExport('Word')"
>
<Icon
icon=
"ep:download"
/>
导出 Word
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleExport('Markdown')"
>
<Icon
icon=
"ep:download"
/>
导出 Markdown
</el-button>
</div>
<IFrame
v-if=
"!loading"
v-loading=
"loading"
:src=
"src"
/>
</ContentWrap>
</
template
>
<
script
lang=
"ts"
setup
>
import
download
from
'@/utils/download'
import
*
as
DbDocApi
from
'@/api/infra/dbDoc'
defineOptions
({
name
:
'InfraDBDoc'
})
const
loading
=
ref
(
true
)
// 是否加载中
const
src
=
ref
(
''
)
// HTML 的地址
/** 页面加载 */
const
init
=
async
()
=>
{
try
{
const
data
=
await
DbDocApi
.
exportHtml
()
const
blob
=
new
Blob
([
data
],
{
type
:
'text/html'
})
src
.
value
=
window
.
URL
.
createObjectURL
(
blob
)
}
finally
{
loading
.
value
=
false
}
}
/** 处理导出 */
const
handleExport
=
async
(
type
:
string
)
=>
{
if
(
type
===
'HTML'
)
{
const
res
=
await
DbDocApi
.
exportHtml
()
download
.
html
(
res
,
'数据库文档.html'
)
}
if
(
type
===
'Word'
)
{
const
res
=
await
DbDocApi
.
exportWord
()
download
.
word
(
res
,
'数据库文档.doc'
)
}
if
(
type
===
'Markdown'
)
{
const
res
=
await
DbDocApi
.
exportMarkdown
()
download
.
markdown
(
res
,
'数据库文档.md'
)
}
}
/** 初始化 */
onMounted
(
async
()
=>
{
await
init
()
})
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment