@ganwei-web/gw-base-components-plus 1.0.54 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/file-preview/filePreview.vue +11 -5
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span class="file-preview">
|
|
3
|
-
<span class="file-name">{{ filename }}</span>
|
|
3
|
+
<span class="file-name">{{ showFileName ? filename : $t("login.framePro.label.attachment") }}</span>
|
|
4
4
|
<el-button v-if="isPreview" type="primary" link @click="handlePreview">
|
|
5
|
-
|
|
5
|
+
{{$t("login.framePro.label.preview")}}
|
|
6
6
|
</el-button>
|
|
7
7
|
<el-button v-if="isDownload" type="primary" link @click="handleDownload">
|
|
8
|
-
|
|
8
|
+
{{$t("login.framePro.label.download")}}
|
|
9
9
|
</el-button>
|
|
10
10
|
</span>
|
|
11
11
|
</template>
|
|
@@ -30,12 +30,17 @@ const props = defineProps({
|
|
|
30
30
|
// 是否显示预览按钮
|
|
31
31
|
isPreview: {
|
|
32
32
|
type: Boolean,
|
|
33
|
-
default:
|
|
33
|
+
default: true
|
|
34
34
|
},
|
|
35
35
|
// 是否显示下载按钮
|
|
36
36
|
isDownload: {
|
|
37
37
|
type: Boolean,
|
|
38
|
-
default:
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
// 是否显示文件名,false 时显示“附件”
|
|
41
|
+
showFileName: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
39
44
|
}
|
|
40
45
|
})
|
|
41
46
|
|
|
@@ -101,5 +106,6 @@ function handleDownload() {
|
|
|
101
106
|
white-space: nowrap;
|
|
102
107
|
max-width: 200px;
|
|
103
108
|
margin-right: 12px;
|
|
109
|
+
line-height: 16px;
|
|
104
110
|
}
|
|
105
111
|
</style>
|