Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-science-front
Commits
42a70496
Commit
42a70496
authored
Dec 02, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
22
parent
32f4a791
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
documentView.vue
src/views/components/common/documentView.vue
+25
-4
No files found.
src/views/components/common/documentView.vue
View file @
42a70496
<
template
>
<div>
<a-tag
:color=
"enums.fileColor[getFileExtension(fileName).toLowerCase()]"
>
{{
fileName
}}
</a-tag>
<a-button
v-show=
"isOpen"
shape=
"circle"
size=
"small"
icon=
"search"
@
click=
"FileView()"
/>
<div
class=
"file_view"
>
<a-tag
:color=
"enums.fileColor[getFileExtension(fileName).toLowerCase()]"
class=
"file_name"
:title=
" fileName"
>
{{
fileName
}}
</a-tag>
<a-button
v-show=
"isOpen"
shape=
"circle"
size=
"small"
icon=
"search"
@
click=
"FileView()"
class=
"btn"
/>
<a-modal
v-model=
"visibleFileView"
:title=
"'[' + fileName + '] 文件查看'"
width=
"1000px"
:dialog-style=
"
{ top: '10%' }" :footer="null" destroyOnClose>
<preview-file
v-model=
"fileUrl"
:fileName=
"fileName"
></preview-file>
</a-modal>
<a
class=
"ant-dropdown-link"
style=
"margin-left:6px"
:href=
"fileUrl"
:download=
"fileName"
>
<a
class=
"ant-dropdown-link
dlw
"
style=
"margin-left:6px"
:href=
"fileUrl"
:download=
"fileName"
>
<a-icon
type=
"download"
/>
</a>
</div>
...
...
@@ -64,3 +64,24 @@ export default {
}
};
</
script
>
<
style
scoped
lang=
"less"
>
.file_view {
position: relative;
.file_name {
max-width: calc(100% - 55px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
vertical-align: bottom;
}
// .btn {
// position: absolute;
// left: 26px;
// }
.dlw {
position: absolute;
right: 10px;
}
}
</
style
>
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