update 征求意见
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
<div>
|
||||
<template v-if="fileList && fileList.length > 0">
|
||||
<div class="file" :class="{'operate-right': operateFixedRight}" v-for="file in fileList" :key="file.id">
|
||||
<div class="file-info">
|
||||
<div class="file-info" :class="{'can-download-file-info': canDownload}">
|
||||
<a-icon type="link" />
|
||||
<div class="file-name" @click="handlePreview(file)">{{ file.fileName }}</div>
|
||||
</div>
|
||||
<div class="file-operate">
|
||||
<!-- 下载-->
|
||||
<a-button type="link" icon="download" @click="handleDownload(file)">{{ $t('download') }}</a-button>
|
||||
<a-button type="link" icon="download" @click="handleDownload(file)" v-if="canDownload">{{ $t('download') }}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -50,6 +50,12 @@ export default {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
// 是否可以下载
|
||||
canDownload: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -147,6 +153,7 @@ export default {
|
||||
.file {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.file:last-child {
|
||||
@@ -158,13 +165,17 @@ export default {
|
||||
align-items: center;
|
||||
color: @primary-color;
|
||||
cursor: pointer;
|
||||
max-width: calc(100% - 97px);
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.file-info > .anticon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.can-download-file-info {
|
||||
max-width: calc(100% - 97px);
|
||||
}
|
||||
|
||||
.file-name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user