From ef6433d81c576db8b55715a14a574a6d392478df Mon Sep 17 00:00:00 2001 From: 810505339 <810505339@qq.com> Date: Mon, 23 Sep 2024 11:26:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E2=9C=A8=20Upload=E6=96=B0?= =?UTF-8?q?=E5=A2=9Epreview-cover=E6=8F=92=E6=A7=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/component/upload.md | 20 ++++++++++++++++++ src/pages/upload/Index.vue | 21 ++++++++++++++++++- .../components/wd-upload/wd-upload.vue | 2 ++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/component/upload.md b/docs/component/upload.md index e7b884e9b..e0acb7e59 100644 --- a/docs/component/upload.md +++ b/docs/component/upload.md @@ -567,6 +567,25 @@ const customUpload: UploadMethod = (file, formData, options) => { } ``` + +## 自定义预览样式 + +使用 `preview-cover` 插槽可以自定义覆盖在预览区域上方的内容 + +```html + + + + +``` + ## Attributes | 参数 | 说明 | 类型 | 可选值 | 默认值 | 最低版本 | @@ -630,6 +649,7 @@ const customUpload: UploadMethod = (file, formData, options) => { | name | 说明 | 最低版本 | | ------- | ---------------- | -------- | | default | 上传唤起插槽样式 | - | +| preview-cover | 自定义覆盖在预览区域上方的内容 | - | ## Events diff --git a/src/pages/upload/Index.vue b/src/pages/upload/Index.vue index 0245a5863..19ef9ae9b 100644 --- a/src/pages/upload/Index.vue +++ b/src/pages/upload/Index.vue @@ -73,6 +73,14 @@ + + + + + + - + diff --git a/src/uni_modules/wot-design-uni/components/wd-upload/wd-upload.vue b/src/uni_modules/wot-design-uni/components/wd-upload/wd-upload.vue index 0950fc17f..e4bc1f4ee 100644 --- a/src/uni_modules/wot-design-uni/components/wd-upload/wd-upload.vue +++ b/src/uni_modules/wot-design-uni/components/wd-upload/wd-upload.vue @@ -64,6 +64,8 @@ custom-class="wd-upload__close" @click="removeFile(index)" > + + From c13e6058a2c665c174806aebd353294113c4007e Mon Sep 17 00:00:00 2001 From: 810505339 <810505339@qq.com> Date: Mon, 23 Sep 2024 15:32:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8DUpl?= =?UTF-8?q?oad=E6=96=87=E4=BB=B6=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=89=BE?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E6=96=87=E4=BB=B6,=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/component/upload.md | 12 +++++++++--- src/pages/upload/Index.vue | 7 ++++--- .../components/wd-upload/wd-upload.vue | 3 +-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/component/upload.md b/docs/component/upload.md index e0acb7e59..e70fe2ce7 100644 --- a/docs/component/upload.md +++ b/docs/component/upload.md @@ -573,9 +573,10 @@ const customUpload: UploadMethod = (file, formData, options) => { 使用 `preview-cover` 插槽可以自定义覆盖在预览区域上方的内容 ```html - -