From 3a3e4e1786cb843294f7dc823048cce0e40215a8 Mon Sep 17 00:00:00 2001
From: jlzhou <12020042@qq.com>
Date: Wed, 16 Apr 2025 10:54:08 +0800
Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=92=8C=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6max=3D1=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF,?=
=?UTF-8?q?=E5=B9=B6=E5=A2=9E=E5=8A=A0list=E5=B1=9E=E6=80=A7=E6=8E=A7?=
=?UTF-8?q?=E5=88=B6=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
admin-ui/src/auto/components/WFileUploader.vue | 10 +++++++---
admin-ui/src/auto/components/WImageUploader.vue | 6 +++++-
admin-ui/src/views/test/uploader.vue | 2 ++
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/admin-ui/src/auto/components/WFileUploader.vue b/admin-ui/src/auto/components/WFileUploader.vue
index 3243b89..3367e05 100644
--- a/admin-ui/src/auto/components/WFileUploader.vue
+++ b/admin-ui/src/auto/components/WFileUploader.vue
@@ -6,7 +6,7 @@
-
+
{
for (let i = 0; i < props.threadNum; i++) {
a.push(doOne())
}
- Promise.all(a).then(() => {
+ Promise.all(a).then((r) => {
if (props.max == 1) {
- mv.value = r.data
+ mv.value = data.value.filter(a => 'url' in a).map(a => a.url)[0]
} else {
mv.value = data.value.filter(a => 'url' in a).map(a => a.url)
}
diff --git a/admin-ui/src/auto/components/WImageUploader.vue b/admin-ui/src/auto/components/WImageUploader.vue
index 1a89cb0..9e4eef9 100644
--- a/admin-ui/src/auto/components/WImageUploader.vue
+++ b/admin-ui/src/auto/components/WImageUploader.vue
@@ -6,7 +6,7 @@
-
+
{
属性(saveMin):是否保存缩略图,如果true,则列表时显示缩略图,否则显示大图,默认:true
属性(watermark):是否添加水印,默认:true
属性(noEffect):是否无效果,本质设置css属性,默认:false
+ 属性(list):是否显示列表,默认:true
css属性(--image-size):图片显示大小,默认: 10em
css属性(--image-border-radius):图片显示圆角,默认: .4em
css属性(--image-margin):图片外边距,默认: .5em .5em 0 0
@@ -113,6 +114,7 @@ const getUploadKey =async () => {
属性(threadNum):并行上传数量:默认:2
属性(retry):重试次数,默认:3
属性(chunksize):分片大小,默认:5Mb,不建议修改
+ 属性(list):是否显示列表,默认:true
属性(border):文件项是否显示边框,默认:true
插槽(button):上传按钮插槽
插槽(default):文件列表,作用域:list,不建议定义