UNPKG

tdesign-vue-next

Version:
47 lines (43 loc) 1.51 kB
/** * tdesign v1.11.5 * (c) 2025 tdesign * @license MIT */ import _defineProperty from '@babel/runtime/helpers/defineProperty'; import { defineComponent, computed, createVNode } from 'vue'; import { usePrefixClass } from '../../hooks/useConfig.js'; import { u as useTNodeJSX } from '../../_chunks/dep-7c56a7f5.js'; import '../../config-provider/hooks/useConfig.js'; import 'lodash-es'; import '../../config-provider/utils/context.js'; import '../../_chunks/dep-c75b9b8e.js'; import '@babel/runtime/helpers/typeof'; import '../../_chunks/dep-caecb55d.js'; import 'dayjs'; import '../../utils/render-tnode.js'; var TImageViewerIcon = defineComponent({ name: "TImageModalIcon", props: { disabled: Boolean, onClick: Function, label: String, icon: Function }, setup: function setup(props) { var classPrefix = usePrefixClass(); var renderTNodeJSX = useTNodeJSX(); var wrapClass = computed(function () { return ["".concat(classPrefix.value, "-image-viewer__modal-icon"), _defineProperty({}, "".concat(classPrefix.value, "-is-disabled"), props.disabled)]; }); return function () { return createVNode("div", { "class": wrapClass.value, "onClick": props.onClick }, [renderTNodeJSX("icon"), props.label && createVNode("span", { "class": "".concat(classPrefix.value, "-image-viewer__modal-icon-label") }, [props.label])]); }; } }); export { TImageViewerIcon as default }; //# sourceMappingURL=ImageModalIcon.js.map