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
2a0b3295
authored
Dec 01, 2023
by
Marvin
Committed by
YunaiV
Dec 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增文件内容项,图片时展示,pdf时跳转到预览,其他文件下载
parent
19e32976
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
src/views/infra/file/index.vue
+14
-9
No files found.
src/views/infra/file/index.vue
View file @
2a0b3295
...
...
@@ -50,26 +50,31 @@
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"文件名"
align=
"center"
prop=
"name"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"文件路径"
align=
"center"
prop=
"path"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"URL"
align=
"center"
prop=
"url"
width=
"110px"
>
<el-table-column
label=
"URL"
align=
"center"
prop=
"url"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"文件大小"
align=
"center"
prop=
"size"
width=
"120"
:formatter=
"fileSizeFormatter"
/>
<el-table-column
label=
"文件类型"
align=
"center"
prop=
"type"
width=
"180px"
/>
<el-table-column
label=
"文件内容"
align=
"center"
prop=
"url"
width=
"110px"
>
<template
#
default=
"
{ row }">
<el-image
v-if=
"row.type.includes('image')"
class=
"h-80px w-80px"
lazy
:src=
"row.url"
:preview-src-list=
"[row.url]"
preview-teleported
fit=
"cover"
/>
<el-link
v-else-if=
"row.type.includes('pdf')"
type=
"primary"
:href=
"row.url"
:underline=
"false"
>
预览
</el-link>
<el-link
v-else
type=
"primary"
download
:href=
"row.url"
:underline=
"false"
target=
"_blank"
>
下载
</el-link>
</
template
>
</el-table-column>
<el-table-column
label=
"文件大小"
align=
"center"
prop=
"size"
width=
"120"
:formatter=
"fileSizeFormatter"
/>
<el-table-column
label=
"文件类型"
align=
"center"
prop=
"type"
width=
"180px"
/>
<el-table-column
label=
"上传时间"
align=
"center"
prop=
"createTime"
...
...
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