From 6081b5522b5c67b28ecff0bb60143309dbc81e23 Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期三, 13 十二月 2023 10:33:19 +0800
Subject: [PATCH] 项目表
---
web/packages/components/zt-uploader/src/zt-uploader.vue | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/web/packages/components/zt-uploader/src/zt-uploader.vue b/web/packages/components/zt-uploader/src/zt-uploader.vue
index a8f22b3..05edc3b 100644
--- a/web/packages/components/zt-uploader/src/zt-uploader.vue
+++ b/web/packages/components/zt-uploader/src/zt-uploader.vue
@@ -1,5 +1,5 @@
<template>
- <div class="zt-upload">
+ <div class="zt-upload" :class="[{'lineHeight':lineHeight}]">
<!-- 鏂囦欢涓婁紶 -->
<el-upload
ref="upload"
@@ -206,6 +206,10 @@
}
},
dataForm: Object,
+ lineHeight:{
+ type: Boolean,
+ default: false
+ },
action: {
type: String,
default: '/sys/oss/uploadNew'
@@ -335,8 +339,8 @@
cropData: {},
isShowCrop: false,
uploading: false,
- fileList: this.getUploadList(this.value),
- uploadList: this.getUploadList(this.value),
+ fileList: this.getUploadList(this.value) || [],
+ uploadList: this.getUploadList(this.value) || [],
progressFlag: false
}
},
@@ -420,10 +424,8 @@
if (val) {
if (val.length > 0) {
if (!this.multiple) { // 鍗曢��
- console.log(val, 'getUploadList val')
return val
} else {
- console.log([...val], 'getUploadList [...val]')
return [...val]
}
} else {
@@ -549,7 +551,7 @@
},
async handleRemove(index) {
let file = this.uploadList[index]
- if (file.status === 1) { // 璇佷功鏂囦欢锛岀洿鎺ヤ粠鍒楄〃鍒犻櫎锛屼笉淇濆瓨鏁版嵁搴�
+ if (file.status === 2) { // 璇佷功鏂囦欢锛岀洿鎺ヤ粠鍒楄〃鍒犻櫎锛屼笉淇濆瓨鏁版嵁搴�
this.handRemoveAndSetValue(index)
} else {
if (await this.$tip.confirm(this.$t('prompt.info', {'handle': this.$t('delete')}))) {
@@ -956,7 +958,9 @@
.zt-upload {
line-height: 1;
}
-
+ .zt-upload.lineHeight{
+ line-height: 0;
+ }
.zt .upload-input .upload-btn {
padding: 8px 12px;
}
--
Gitblit v1.9.1