From e133da05d0b1a3f4083f3f8777d21721fcc421ad Mon Sep 17 00:00:00 2001 From: xiamiao Date: Fri, 10 May 2024 16:57:33 +0800 Subject: [PATCH] =?UTF-8?q?chore(preview):=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96(#2808)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/preview/src/Preview.tsx | 7 +------ packages/ui/preview/stories/watermark.stories.tsx | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/ui/preview/src/Preview.tsx b/packages/ui/preview/src/Preview.tsx index 2f768a693..32f89a6b1 100644 --- a/packages/ui/preview/src/Preview.tsx +++ b/packages/ui/preview/src/Preview.tsx @@ -46,7 +46,6 @@ export const Preview = forwardRef( src, watermarkProps, disabledDownload = false, - disabledPortal = true, }, ref ) => { @@ -305,7 +304,7 @@ export const Preview = forwardRef( )} - {!disabledPortal && ( + {watermarkProps && ( )} @@ -337,10 +336,6 @@ export interface PreviewProps extends Omit, 'onError'> { * 当前预览图片索引 */ defaultCurrent?: number - /** - * 禁止挂载水印 - */ - disabledPortal?: boolean /** * 设置图片水印 */ diff --git a/packages/ui/preview/stories/watermark.stories.tsx b/packages/ui/preview/stories/watermark.stories.tsx index 197baf97c..a6b359efa 100644 --- a/packages/ui/preview/stories/watermark.stories.tsx +++ b/packages/ui/preview/stories/watermark.stories.tsx @@ -25,7 +25,6 @@ export const Watermark = () => { onClose={() => { setShowIndex(-1) }} - disabledPortal={false} watermarkProps={{ content: ['HiUI', '做中台,就用 HiUI'], style: {