✨ 2023-06-25:perf: ImageViewer组件优化
(cherry picked from commit fe61119735
)
This commit is contained in:
parent
6a3a215768
commit
c468d77fb9
@ -12,7 +12,7 @@ export function createImageViewer(options: ImageViewerProps) {
|
|||||||
initialIndex = 0,
|
initialIndex = 0,
|
||||||
infinite = true,
|
infinite = true,
|
||||||
hideOnClickModal = false,
|
hideOnClickModal = false,
|
||||||
appendToBody = false,
|
teleported = false,
|
||||||
zIndex = 2000,
|
zIndex = 2000,
|
||||||
show = true
|
show = true
|
||||||
} = options
|
} = options
|
||||||
@ -23,7 +23,7 @@ export function createImageViewer(options: ImageViewerProps) {
|
|||||||
propsData.initialIndex = initialIndex
|
propsData.initialIndex = initialIndex
|
||||||
propsData.infinite = infinite
|
propsData.infinite = infinite
|
||||||
propsData.hideOnClickModal = hideOnClickModal
|
propsData.hideOnClickModal = hideOnClickModal
|
||||||
propsData.appendToBody = appendToBody
|
propsData.teleported = teleported
|
||||||
propsData.zIndex = zIndex
|
propsData.zIndex = zIndex
|
||||||
propsData.show = show
|
propsData.show = show
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ const props = defineProps({
|
|||||||
initialIndex: propTypes.number.def(0),
|
initialIndex: propTypes.number.def(0),
|
||||||
infinite: propTypes.bool.def(true),
|
infinite: propTypes.bool.def(true),
|
||||||
hideOnClickModal: propTypes.bool.def(false),
|
hideOnClickModal: propTypes.bool.def(false),
|
||||||
appendToBody: propTypes.bool.def(false),
|
teleported: propTypes.bool.def(false),
|
||||||
show: propTypes.bool.def(false)
|
show: propTypes.bool.def(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@ export interface ImageViewerProps {
|
|||||||
initialIndex?: number
|
initialIndex?: number
|
||||||
infinite?: boolean
|
infinite?: boolean
|
||||||
hideOnClickModal?: boolean
|
hideOnClickModal?: boolean
|
||||||
appendToBody?: boolean
|
teleported?: boolean
|
||||||
show?: boolean
|
show?: boolean
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user