From 0311359d2b04fc7176509b00a383dce057443001 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期日, 08 十二月 2024 22:30:52 +0800
Subject: [PATCH] 导入合同规则
---
src/components/FileUpload/index.vue | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue
index 1e8728c..95ae3a6 100644
--- a/src/components/FileUpload/index.vue
+++ b/src/components/FileUpload/index.vue
@@ -28,9 +28,12 @@
<!-- 鏂囦欢鍒楄〃 -->
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
- <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
+ <el-link @click="handleDownload(file.url)" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
</el-link>
+ <!-- <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
+ <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
+ </el-link> -->
<div class="ele-upload-list__item-content-action">
<el-link :underline="false" @click="handleDelete(index)" type="danger">鍒犻櫎</el-link>
</div>
@@ -55,12 +58,12 @@
// 澶у皬闄愬埗(MB)
fileSize: {
type: Number,
- default: 5,
+ default: 20,
},
// 鏂囦欢绫诲瀷, 渚嬪['png', 'jpg', 'jpeg']
fileType: {
type: Array,
- default: () => ["doc", "xls", "ppt", "txt", "pdf","png","jpg"],
+ default: () => ["docx", "xlsx", "ppt", "txt", "pdf","png","jpg"],
},
// 鏄惁鏄剧ず鎻愮ず
isShowTip: {
@@ -189,6 +192,10 @@
strs += list[i].url + separator;
}
return strs != '' ? strs.substr(0, strs.length - 1) : '';
+ },
+ /** 涓嬭浇鎸夐挳鎿嶄綔 */
+ handleDownload (data) {
+ this.$download.resource(data);
}
}
};
--
Gitblit v1.8.0