UNPKG

tdesign-vue-next

Version:
178 lines (174 loc) 5.8 kB
/** * tdesign v1.19.2 * (c) 2026 tdesign * @license MIT */ import { defineComponent, computed, createVNode } from 'vue'; import { Dialog } from '../../dialog/index.js'; import 'lodash-es'; import '@babel/runtime/helpers/toConsumableArray'; import '@babel/runtime/helpers/typeof'; import '../../_chunks/dep-c68ea098.js'; import { u as usePrefixClass } from '../../_chunks/dep-e8dd47a9.js'; import '@babel/runtime/helpers/slicedToArray'; import '../../_chunks/dep-91fc762d.js'; import '@babel/runtime/helpers/defineProperty'; import props from '../props.js'; import TImageItem from './ImageItem.js'; import TImageViewerUtils from './ImageViewerUtils.js'; import '../../dialog/dialog.js'; import '@babel/runtime/helpers/objectWithoutProperties'; import '../../dialog/props.js'; import '../../_chunks/dep-c5db6961.js'; import '../../_chunks/dep-2a7145b5.js'; import '../../loading/icon/gradient.js'; import '../../_chunks/dep-ef7a41ce.js'; import '../../_chunks/dep-fbf70ecb.js'; import '../../_chunks/dep-d518fdfb.js'; import '../../_chunks/dep-7bdccf65.js'; import '../../_chunks/dep-8d4d971b.js'; import '../../_chunks/dep-98d89c71.js'; import '../../config-provider/hooks/useConfig.js'; import '../../config-provider/utils/context.js'; import '../../_chunks/dep-509ddbe3.js'; import '../../_chunks/dep-f0f392fb.js'; import 'dayjs'; import '../../loading/props.js'; import '../../button/index.js'; import '../../button/button.js'; import '../../loading/index.js'; import '../../loading/directive.js'; import '../../loading/plugin.js'; import '@babel/runtime/helpers/createClass'; import '@babel/runtime/helpers/classCallCheck'; import '../../_chunks/dep-ae3e94b6.js'; import '../../button/props.js'; import '../../_chunks/dep-2ba9b7d0.js'; import '../../_chunks/dep-d67d6f8a.js'; import '../../dialog/hooks/useSameTarget.js'; import '../../_chunks/dep-295b33d1.js'; import '../../dialog/utils/index.js'; import '../../dialog/dialog-card.js'; import 'tdesign-icons-vue-next'; import '../../dialog/dialog-card-props.js'; import '../../_chunks/dep-52eae58a.js'; import '../../dialog/hooks/useAction.js'; import '../../dialog/plugin.js'; import '@babel/runtime/helpers/asyncToGenerator'; import '@babel/runtime/regenerator'; import '../../_chunks/dep-f3f9d302.js'; import '../../_chunks/dep-024452cb.js'; import '../../_chunks/dep-06660d60.js'; import '../hooks/index.js'; import '../../_chunks/dep-ae97a686.js'; import '../../_chunks/dep-e57ebe10.js'; import './ImageModalIcon.js'; import '../../tooltip/index.js'; import '../../tooltip/tooltip.js'; import '../../tooltip/props.js'; import '../../popup/props.js'; import '../../popup/index.js'; import '../../popup/popup.js'; import '@popperjs/core'; import '../../_chunks/dep-e332908e.js'; import '../../popup/container.js'; import '../../_chunks/dep-d5fc4caa.js'; import '../../tooltip/utils/index.js'; var TImageViewerModal = defineComponent({ name: "TImageViewerModal", props: { zIndex: Number, visible: Boolean, index: Number, images: props.images, scale: Number, rotate: Number, mirror: Number, title: props.title, currentImage: { type: Object, "default": function _default() { return {}; } }, onRotate: Function, onZoomIn: Function, onZoomOut: Function, onMirror: Function, onReset: Function, onClose: props.onClose, onDownload: props.onDownload, draggable: { type: Boolean, "default": true }, viewerScale: { type: Object, "default": function _default() { return {}; } }, showOverlay: Boolean, closeBtn: props.closeBtn, imageReferrerpolicy: props.imageReferrerpolicy }, setup: function setup(props2) { var classPrefix = usePrefixClass(); var style = computed(function () { return { minWidth: props2.viewerScale.minWidth, minHeight: props2.viewerScale.minHeight }; }); return function () { return createVNode(Dialog, { "destroyOnClose": true, "attach": "body", "onClose": props2.onClose, "visible": props2.visible, "placement": "center", "mode": "modeless", "width": 1e3, "cancelBtn": null, "confirmBtn": null, "draggable": props2.draggable, "zIndex": props2.zIndex, "showOverlay": props2.showOverlay, "class": "".concat(classPrefix.value, "-image-viewer__dialog"), "header": props2.title, "footer": function footer() { return createVNode("div", { "class": "".concat(classPrefix.value, "-image-viewer-mini__footer") }, [createVNode(TImageViewerUtils, { "zIndex": props2.zIndex, "onZoomIn": props2.onZoomIn, "onZoomOut": props2.onZoomOut, "scale": props2.scale, "currentImage": props2.currentImage, "onRotate": props2.onRotate, "onMirror": props2.onMirror, "onReset": props2.onReset, "onDownload": props2.onDownload }, null)]); } }, { "default": function _default() { return [createVNode("div", { "class": "".concat(classPrefix.value, "-image-viewer-mini__content"), "style": style.value }, [createVNode(TImageItem, { "rotate": props2.rotate, "scale": props2.scale, "mirror": props2.mirror, "src": props2.currentImage.mainImage, "placementSrc": props2.currentImage.thumbnail, "isSvg": props2.currentImage.isSvg, "imageReferrerpolicy": props2.imageReferrerpolicy }, null)])]; } }); }; } }); export { TImageViewerModal as default }; //# sourceMappingURL=ImageViewerModal.js.map