tdesign-mobile-vue
Version:
tdesign-mobile-vue
1 lines • 36.3 kB
Source Map (JSON)
{"version":3,"file":"image-viewer.mjs","sources":["../../src/image-viewer/image-viewer.tsx"],"sourcesContent":["import { computed, defineComponent, reactive, h, Transition, ref, watch, nextTick, onUnmounted } from 'vue';\nimport { CloseIcon, DeleteIcon } from 'tdesign-icons-vue-next';\n\nimport config from '../config';\nimport props from './props';\nimport { useDefault, isBrowser, useGesture, DragState, PinchState } from '../shared';\nimport { useTNodeJSX } from '../hooks/tnode';\nimport { usePrefixClass } from '../hooks/useClass';\n\n// inner components\nimport { SwiperChangeSource, Swiper as TSwiper, SwiperItem as TSwiperItem } from '../swiper';\nimport { TdImageViewerProps, ImageInfo } from './type';\n\nconst { prefix } = config;\n\nconst TAP_TIME = 300;\n\nexport default defineComponent({\n name: `${prefix}-image-viewer`,\n props,\n emits: ['close', 'index-change', 'update:visible', 'update:modelValue', 'update:index', 'delete'],\n setup(props, { emit }) {\n const imageViewerClass = usePrefixClass('image-viewer');\n\n const state = reactive({\n dblTapZooming: false, // double tap zooming\n zooming: false, // pinch zooming\n scale: 1,\n touchIndex: 0,\n dragging: false,\n draggedX: 0,\n draggedY: 0,\n extraDraggedX: 0,\n });\n const [visible, setVisible] = useDefault(props, emit, 'visible', 'change');\n const [currentIndex, setIndex] = useDefault<TdImageViewerProps['index'], TdImageViewerProps>(\n props,\n emit,\n 'index',\n 'index-change',\n );\n\n // 当前图片和当前图左右两边的图片预加载,以保持预览流畅也节省资源\n const preloadImageIndex = computed(() => {\n const lastIndex = props.images.length - 1;\n // 当 currentIndex 为 0/undefined 时,预加载第一张、第二张、最后一张图片\n if ([undefined, 0].includes(currentIndex.value)) {\n return [0, 1, lastIndex];\n }\n // 当 currentIndex 为最后一张时,预加载最后一张、倒数第二张、第一张图片\n if (currentIndex.value === lastIndex) {\n return [lastIndex, lastIndex - 1, 0];\n }\n // 其他情况下,预加载当前图片、当前图片的前一张、当前图片的后一张\n const prev = currentIndex.value - 1 >= 0 ? currentIndex.value - 1 : lastIndex;\n const next = currentIndex.value + 1 <= lastIndex ? currentIndex.value + 1 : 0;\n return [currentIndex.value, prev, next];\n });\n // 图片列表信息,包含是否需要预加载标志\n const imageInfoList = computed(() => {\n return props.images.map((image, index) => {\n let imageInfo: ImageInfo;\n if (typeof image === 'string') {\n imageInfo = {\n url: image,\n align: 'center',\n };\n } else {\n imageInfo = image;\n }\n return {\n image: imageInfo,\n preload: preloadImageIndex.value.includes(index),\n };\n });\n });\n\n const disabled = ref(false);\n const rootRef = ref();\n const imagesSize: Record<number, { height: number }> = reactive({});\n const swiperRootRef = ref();\n const swiperItemRefs = ref<any[]>([]);\n const gestureRef = ref();\n\n const renderTNodeJSX = useTNodeJSX();\n\n const closeNode = computed(() => renderTNodeJSX('closeBtn', h(CloseIcon)));\n const deleteNode = computed(() => renderTNodeJSX('deleteBtn', h(DeleteIcon)));\n\n const imageTransform = computed(() => {\n const { scale, draggedX, draggedY } = state;\n return `matrix(${scale}, 0, 0, ${scale}, ${draggedX}, ${draggedY})`;\n });\n\n const imageTransitionDuration = computed(() => {\n const { zooming, dragging } = state;\n return zooming || dragging ? 'transition-duration: 0s' : 'transition-duration: 0.3s';\n });\n\n const beforeClose = () => {\n state.dblTapZooming = false;\n state.zooming = false;\n state.scale = 1;\n state.dragging = false;\n state.draggedX = 0;\n state.draggedY = 0;\n state.extraDraggedX = 0;\n };\n\n const handleClose = (e: Event, trigger: string) => {\n beforeClose();\n setVisible(false);\n emit('close', { trigger, e });\n };\n\n const handleDelete = () => {\n emit('delete', currentIndex.value ?? 0);\n };\n\n // 设置当前索引图片上一张、下一张预加载\n const setImagePreload = (index: number) => {\n const nextIndex = index >= imageInfoList.value.length - 1 ? 0 : index + 1;\n const preIndex = index <= 0 ? imageInfoList.value.length - 1 : index - 1;\n imageInfoList.value[preIndex].preload = true;\n imageInfoList.value[nextIndex].preload = true;\n };\n\n const onSwiperChange = (index: number, context: { source: SwiperChangeSource }) => {\n if (currentIndex.value !== index) {\n const trigger = currentIndex.value < index ? 'next' : 'prev';\n setIndex(index, { trigger });\n setScale(1);\n setImagePreload(index);\n }\n };\n\n const onImgLoad = (e: Event, index: number) => {\n const { height } = e.target as HTMLImageElement;\n imagesSize[index] = { height };\n };\n\n const getMaxDraggedX = () => {\n const rootOffsetWidth = rootRef.value?.offsetWidth || 0;\n const scaledWidth = state.scale * rootOffsetWidth;\n return Math.max(0, (scaledWidth - rootOffsetWidth) / 2);\n };\n\n const getMaxDraggedY = (index: number) => {\n const rootOffsetHeight = rootRef.value?.offsetHeight || 0;\n // 当前图片高度\n const currentImageHeight = imagesSize?.[index]?.height || 0;\n // 当前图片Scaled后总高度\n const currentImageScaledHeight = state.scale * currentImageHeight;\n // 当前图片Scaled后总高度与原图片高度差值的一半,作为图片Scaled后top和bottom的增量(scale是以图片中心点进行的,align为start和end时会影响)\n const halfScaleHeight = (currentImageScaledHeight - currentImageHeight) / 2;\n if (currentImageScaledHeight <= rootOffsetHeight) {\n return {\n top: 0,\n bottom: 0,\n };\n }\n // 图片和外层root元素高度差\n const diffHeight = currentImageScaledHeight - rootOffsetHeight;\n const centerDraggedY = diffHeight / 2;\n // 图片align配置对应的滚动区域\n const alignmentDraggedY = {\n start: {\n top: -diffHeight + halfScaleHeight,\n bottom: halfScaleHeight,\n },\n center: {\n top: -centerDraggedY,\n bottom: centerDraggedY,\n },\n end: {\n top: -halfScaleHeight,\n bottom: diffHeight - halfScaleHeight,\n },\n };\n // 当前图片align值\n const alignment = imageInfoList.value[index]?.image?.align || 'center';\n return alignmentDraggedY[alignment];\n };\n\n const setScale = (scale: number) => {\n scale = Math.min(scale, +props.maxZoom + 1);\n if (scale !== state.scale) {\n state.scale = scale;\n\n if (scale === 1) {\n state.draggedX = 0;\n state.draggedY = 0;\n }\n }\n };\n\n let dragStartTime: number;\n let dblTapTimer: number | null;\n\n const toggleScale = () => {\n const scale = state.scale > 1 ? 1 : 2;\n setScale(scale);\n };\n\n const onTransitionEnd = (index: number) => {\n if (index === state.touchIndex) {\n state.dblTapZooming = false;\n clearTimeout(dblTapTimer);\n dblTapTimer = null;\n }\n };\n\n const onTransitionStart = (index: number) => {\n if (index === state.touchIndex) {\n state.dblTapZooming = true;\n clearTimeout(dblTapTimer);\n }\n };\n\n const checkTap = (e: DragState) => {\n const { event } = e;\n const deltaTime = Date.now() - dragStartTime;\n if (deltaTime < TAP_TIME && isBrowser) {\n if (dblTapTimer) {\n clearTimeout(dblTapTimer);\n dblTapTimer = window.setTimeout(() => {\n clearTimeout(dblTapTimer);\n state.dragging = false;\n toggleScale();\n }, TAP_TIME);\n } else {\n dblTapTimer = window.setTimeout(() => {\n handleClose(event, 'overlay');\n dblTapTimer = null;\n }, TAP_TIME);\n }\n }\n };\n\n const onPinchChange = (scale: number, index: number) => {\n state.zooming = true;\n state.touchIndex = index;\n setScale(scale);\n };\n\n const onPinchEnd = () => {\n state.zooming = false;\n if (state.scale < 1) {\n setScale(1);\n }\n if (state.scale > props.maxZoom) {\n state.scale = +props.maxZoom;\n }\n };\n\n const handlePinch = (pinState: PinchState, index: number) => {\n const {\n last,\n offset: [d],\n } = pinState;\n // 图片未加载完毕,禁止拖拽\n if (!imagesSize?.[index]) return;\n if (state.dblTapZooming) return;\n if (!last) {\n onPinchChange(d, index);\n } else {\n onPinchEnd();\n }\n };\n\n const handleDrag = (dragState: DragState, index: number) => {\n state.touchIndex = index;\n const { setOffset } = swiperRootRef.value || {};\n\n // 图片未加载完毕,禁止拖拽\n if (!imagesSize?.[index]) return;\n const { first, movement, _movement, elapsedTime, tap, offset, overflow, _delta } = dragState;\n if (first) {\n dragStartTime = Date.now();\n }\n\n if (tap && elapsedTime > 0 && elapsedTime < 300) {\n checkTap(dragState);\n return;\n }\n\n // 双击缩放时取消拖拽事件\n if (state.dblTapZooming) {\n dragState?.cancel();\n return;\n }\n\n state.dragging = true;\n\n // 过高图片允许上下滑动\n state.draggedY = offset?.[1] || 0;\n\n if (state.scale === 1) return;\n\n state.draggedX = offset?.[0] || 0;\n\n if (movement[0] !== _movement[0] && overflow[0] !== 0) {\n state.extraDraggedX += _delta[0] / 5;\n setOffset?.(state.extraDraggedX, 'X');\n } else if (state.extraDraggedX !== 0) {\n state.extraDraggedX = 0;\n setOffset?.(state.extraDraggedX, 'X');\n }\n };\n\n const handleDragEnd = (dragState: DragState) => {\n const { overflow, last } = dragState;\n const { goPrev, goNext, swiperContainer } = swiperRootRef.value || {};\n\n state.dragging = false;\n\n if (state.extraDraggedX !== 0 && last) {\n if (Math.abs(state.extraDraggedX) > 50) {\n state.extraDraggedX = 0;\n overflow[0] < 0 ? goNext?.('touch') : goPrev?.('touch');\n return;\n }\n state.extraDraggedX = 0;\n nextTick(() => {\n swiperContainer?.style?.setProperty?.('transform', 'translateX(0)');\n swiperContainer?.style?.setProperty?.('transition', 'transform 0.3s');\n });\n }\n };\n\n const gestureOptions = reactive({\n destroyInvisible: true,\n visible: !!visible.value,\n });\n\n gestureRef.value = useGesture(gestureOptions);\n\n watch(\n () => visible.value,\n (newVal) => (gestureOptions.visible = !!newVal),\n );\n\n watch(\n () => [visible.value, swiperItemRefs.value],\n ([newVisible, newRefs]) => {\n if (!newVisible) return;\n nextTick(() => {\n (newRefs as any[]).forEach?.((item: any, index: number) => {\n const { $el } = item;\n gestureRef.value?.create(\n $el as Element,\n {\n onDrag: (dragState: DragState) => handleDrag(dragState, index),\n onDragEnd: (dragState: DragState) => handleDragEnd(dragState),\n onPinch: (pinchState: PinchState) => handlePinch(pinchState, index),\n },\n {\n drag: {\n from: () => [state.draggedX, state.draggedY],\n pointer: { touch: true },\n bounds: () => ({\n top: getMaxDraggedY(index).top,\n right: getMaxDraggedX(),\n bottom: getMaxDraggedY(index).bottom,\n left: -getMaxDraggedX(),\n }),\n },\n pinch: {\n from: () => [state.scale, 0],\n pointer: { touch: true },\n },\n },\n );\n });\n });\n },\n );\n\n watch(\n () => state.scale,\n (newVal) => (disabled.value = newVal !== 1),\n );\n\n onUnmounted(() => {\n clearTimeout(dblTapTimer);\n });\n\n return () => (\n <Transition name=\"fade\">\n {visible.value && (\n <div ref={rootRef} class={`${imageViewerClass.value}`}>\n <div class={`${imageViewerClass.value}__mask`} onClick={(e) => handleClose(e, 'overlay')} />\n <TSwiper\n ref={swiperRootRef}\n autoplay={false}\n class={`${imageViewerClass.value}__content`}\n height=\"100vh\"\n defaultCurrent={currentIndex.value}\n disabled={disabled.value}\n onChange={onSwiperChange}\n >\n {imageInfoList.value.map((info, index) => (\n <TSwiperItem\n ref={(item: any) => (swiperItemRefs.value[index] = item)}\n key={index}\n class={`${imageViewerClass.value}__swiper-item`}\n style={`touch-action: none; align-items:${info.image.align};`}\n >\n {info.preload ? (\n <img\n src={info.image.url}\n style={`\n transform: ${index === state.touchIndex ? imageTransform.value : 'matrix(1, 0, 0, 1, 0, 0)'};\n ${imageTransitionDuration.value};`}\n class={`${imageViewerClass.value}__img`}\n onLoad={(event: Event) => onImgLoad(event, index)}\n onTransitionstart={(event: TransitionEvent) => {\n if (event.target === event.currentTarget) {\n onTransitionStart(index);\n }\n }}\n onTransitionend={(event: TransitionEvent) => {\n if (event.target === event.currentTarget) {\n onTransitionEnd(index);\n }\n }}\n />\n ) : (\n <span></span>\n )}\n </TSwiperItem>\n ))}\n </TSwiper>\n <div class={`${imageViewerClass.value}__nav`}>\n <div class={`${imageViewerClass.value}__nav-close`} onClick={(e) => handleClose(e, 'close-btn')}>\n {closeNode.value}\n </div>\n\n {props.showIndex && (\n <div class={`${imageViewerClass.value}__nav-index`}>\n {`${Math.min((currentIndex.value ?? 0) + 1, props.images?.length)}/${props.images?.length}`}\n </div>\n )}\n\n <div class={`${imageViewerClass.value}__nav-delete`} onClick={handleDelete}>\n {deleteNode.value}\n </div>\n </div>\n </div>\n )}\n </Transition>\n );\n },\n});\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","prefix","config","TAP_TIME","defineComponent","name","props","emits","setup","emit","_ref","imageViewerClass","usePrefixClass","state","reactive","dblTapZooming","zooming","scale","touchIndex","dragging","draggedX","draggedY","extraDraggedX","_useDefault","useDefault","_useDefault2","_slicedToArray","visible","setVisible","_useDefault3","_useDefault4","currentIndex","setIndex","preloadImageIndex","computed","lastIndex","images","length","includes","value","prev","next","imageInfoList","map","image","index","imageInfo","url","align","preload","disabled","ref","rootRef","imagesSize","swiperRootRef","swiperItemRefs","gestureRef","renderTNodeJSX","useTNodeJSX","closeNode","h","CloseIcon","deleteNode","DeleteIcon","imageTransform","concat","imageTransitionDuration","beforeClose","handleClose","e","trigger","handleDelete","_currentIndex$value","setImagePreload","nextIndex","preIndex","onSwiperChange","context","setScale","onImgLoad","height","target","getMaxDraggedX","_rootRef$value","rootOffsetWidth","offsetWidth","scaledWidth","Math","max","getMaxDraggedY","_rootRef$value2","_imagesSize$index","_imageInfoList$value$","rootOffsetHeight","offsetHeight","currentImageHeight","currentImageScaledHeight","halfScaleHeight","top","bottom","diffHeight","centerDraggedY","alignmentDraggedY","start","center","end","alignment","min","maxZoom","dragStartTime","dblTapTimer","toggleScale","onTransitionEnd","clearTimeout","onTransitionStart","checkTap","event","deltaTime","Date","now","isBrowser","window","setTimeout","onPinchChange","onPinchEnd","handlePinch","pinState","last","_pinState$offset","offset","d","handleDrag","dragState","_ref2","setOffset","first","movement","_movement","elapsedTime","tap","overflow","_delta","cancel","handleDragEnd","_ref3","goPrev","goNext","swiperContainer","abs","nextTick","_swiperContainer$styl","_swiperContainer$styl2","_swiperContainer$styl3","_swiperContainer$styl4","style","setProperty","gestureOptions","destroyInvisible","useGesture","watch","newVal","_ref4","_ref5","newVisible","newRefs","_newRefs$forEach","forEach","item","_gestureRef$value","$el","create","onDrag","onDragEnd","onPinch","pinchState","drag","from","pointer","touch","bounds","right","left","pinch","onUnmounted","_currentIndex$value2","_props2$images","_props2$images2","_slot","_createVNode","Transition","default","_default","onClick","TSwiper","info","TSwiperItem","onLoad","onTransitionstart","currentTarget","onTransitionend","showIndex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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