From ebc571e13f03b6ede7cd03b5051f1e56a42066be Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Mon, 31 Mar 2025 15:14:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20list-type:=20picture-card=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E6=95=88=E6=9E=9C=E5=85=B3=E9=97=AD=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/upload/src/image-upload.vue | 15 +++++++++++++++ .../src/views/演示使用自行删除/upload/index.vue | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/apps/web-antd/src/components/upload/src/image-upload.vue b/apps/web-antd/src/components/upload/src/image-upload.vue index 445dcfe8..56584ae4 100644 --- a/apps/web-antd/src/components/upload/src/image-upload.vue +++ b/apps/web-antd/src/components/upload/src/image-upload.vue @@ -27,6 +27,12 @@ interface ImageUploadProps extends BaseUploadProps { * @default picture-card */ listType?: UploadListType; + /** + * 使用list-type: picture-card时 是否显示动画 + * 会有一个`弹跳`的效果 默认关闭 + * @default false + */ + withAnimation?: boolean; } const props = withDefaults(defineProps(), { @@ -43,6 +49,7 @@ const props = withDefaults(defineProps(), { helpMessage: true, enableDragUpload: false, abortOnUnmounted: true, + withAnimation: false, }); const emit = defineEmits(); @@ -78,6 +85,7 @@ function currentPreview(file: UploadFile) {
diff --git a/apps/web-antd/src/views/演示使用自行删除/upload/index.vue b/apps/web-antd/src/views/演示使用自行删除/upload/index.vue index 5b433d65..29860163 100644 --- a/apps/web-antd/src/views/演示使用自行删除/upload/index.vue +++ b/apps/web-antd/src/views/演示使用自行删除/upload/index.vue @@ -51,6 +51,8 @@ const customThumbnailUrl: CustomGetter = () => { }; const { copy } = useClipboard({ legacy: true }); + +const animationEnable = ref(false);