From fe61119735b992918fe03cd9af26a8e7b4daa217 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 29 Feb 2024 19:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=202023-06-25=EF=BC=9Aperf:=20ImageVie?= =?UTF-8?q?wer=E7=BB=84=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ImageViewer/index.ts | 4 ++-- src/components/ImageViewer/src/ImageViewer.vue | 2 +- src/components/ImageViewer/src/types.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ImageViewer/index.ts b/src/components/ImageViewer/index.ts index 38681356..35764d6b 100644 --- a/src/components/ImageViewer/index.ts +++ b/src/components/ImageViewer/index.ts @@ -12,7 +12,7 @@ export function createImageViewer(options: ImageViewerProps) { initialIndex = 0, infinite = true, hideOnClickModal = false, - appendToBody = false, + teleported = false, zIndex = 2000, show = true } = options @@ -23,7 +23,7 @@ export function createImageViewer(options: ImageViewerProps) { propsData.initialIndex = initialIndex propsData.infinite = infinite propsData.hideOnClickModal = hideOnClickModal - propsData.appendToBody = appendToBody + propsData.teleported = teleported propsData.zIndex = zIndex propsData.show = show diff --git a/src/components/ImageViewer/src/ImageViewer.vue b/src/components/ImageViewer/src/ImageViewer.vue index 5c4921ed..c84d06be 100644 --- a/src/components/ImageViewer/src/ImageViewer.vue +++ b/src/components/ImageViewer/src/ImageViewer.vue @@ -13,7 +13,7 @@ const props = defineProps({ initialIndex: propTypes.number.def(0), infinite: propTypes.bool.def(true), hideOnClickModal: propTypes.bool.def(false), - appendToBody: propTypes.bool.def(false), + teleported: propTypes.bool.def(false), show: propTypes.bool.def(false) }) diff --git a/src/components/ImageViewer/src/types.ts b/src/components/ImageViewer/src/types.ts index 1932d74d..2fff4c0a 100644 --- a/src/components/ImageViewer/src/types.ts +++ b/src/components/ImageViewer/src/types.ts @@ -4,6 +4,6 @@ export interface ImageViewerProps { initialIndex?: number infinite?: boolean hideOnClickModal?: boolean - appendToBody?: boolean + teleported?: boolean show?: boolean }