✨ 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,
|
||||
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
|
||||
|
||||
|
@ -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)
|
||||
})
|
||||
|
||||
|
@ -4,6 +4,6 @@ export interface ImageViewerProps {
|
||||
initialIndex?: number
|
||||
infinite?: boolean
|
||||
hideOnClickModal?: boolean
|
||||
appendToBody?: boolean
|
||||
teleported?: boolean
|
||||
show?: boolean
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user