From 78e4174a3096d80217c00048e3df04a12b4161a8 Mon Sep 17 00:00:00 2001 From: xieyezi <1435398529@qq.com> Date: Fri, 15 Sep 2023 08:59:39 +0800 Subject: [PATCH] feat(Uploader): add `--van-uploader-border-radius` css variable (#12280) * feat: add --van-uploader-border-radius css variables * chore: uploader-delelte-shadow reset border-radius. --------- Co-authored-by: xieyezi <202202409@any3.com> Co-authored-by: xieyezi <143539829@qq.com> --- packages/vant/src/uploader/README.md | 1 + packages/vant/src/uploader/README.zh-CN.md | 1 + packages/vant/src/uploader/index.less | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/packages/vant/src/uploader/README.md b/packages/vant/src/uploader/README.md index 8d76fdc13..2874d41a0 100644 --- a/packages/vant/src/uploader/README.md +++ b/packages/vant/src/uploader/README.md @@ -451,3 +451,4 @@ The component provides the following CSS variables, which can be used to customi | --van-uploader-loading-icon-size | _22px_ | - | | --van-uploader-loading-icon-color | _var(--van-white)_ | - | | --van-uploader-disabled-opacity | _var(--van-disabled-opacity)_ | - | +| --van-uploader-border-radius | _0px_ | - | diff --git a/packages/vant/src/uploader/README.zh-CN.md b/packages/vant/src/uploader/README.zh-CN.md index bac6f2896..6f1422e83 100644 --- a/packages/vant/src/uploader/README.zh-CN.md +++ b/packages/vant/src/uploader/README.zh-CN.md @@ -474,6 +474,7 @@ uploaderRef.value?.chooseFile(); | --van-uploader-loading-icon-size | _22px_ | - | | --van-uploader-loading-icon-color | _var(--van-white)_ | - | | --van-uploader-disabled-opacity | _var(--van-disabled-opacity)_ | - | +| --van-uploader-border-radius | _0px_ | - | ## 常见问题 diff --git a/packages/vant/src/uploader/index.less b/packages/vant/src/uploader/index.less index 4cb4c459e..38afd7a84 100644 --- a/packages/vant/src/uploader/index.less +++ b/packages/vant/src/uploader/index.less @@ -24,6 +24,7 @@ --van-uploader-loading-icon-size: 22px; --van-uploader-loading-icon-color: var(--van-white); --van-uploader-disabled-opacity: var(--van-disabled-opacity); + --van-uploader-border-radius: 0px; } .van-uploader { @@ -69,6 +70,7 @@ height: var(--van-uploader-size); margin: 0 var(--van-padding-xs) var(--van-padding-xs) 0; background: var(--van-uploader-upload-background); + border-radius: var(--van-uploader-border-radius); &:active { background-color: var(--van-uploader-upload-active-color); @@ -100,6 +102,7 @@ width: var(--van-uploader-size); height: var(--van-uploader-size); overflow: hidden; + border-radius: var(--van-uploader-border-radius); } &-delete { @@ -145,6 +148,7 @@ justify-content: center; color: var(--van-uploader-mask-text-color); background: var(--van-uploader-mask-background); + border-radius: var(--van-uploader-border-radius); &-icon { font-size: var(--van-uploader-mask-icon-size);