tdesign-vue
Version:
65 lines (61 loc) • 1.95 kB
JavaScript
/**
* tdesign v1.12.1
* (c) 2025 tdesign
* @license MIT
*/
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { defineComponent, computed } from '@vue/composition-api';
import { usePrefixClass } from '../../hooks/useConfig.js';
import { useTNodeJSX } from '../../hooks/tnode.js';
import '../../config-provider/useConfig.js';
import '../../config-provider/context.js';
import 'lodash-es';
import '../../_common/js/global-config/default-config.js';
import '../../_common/js/global-config/locale/zh_CN.js';
import '../../_chunks/dep-b0659553.js';
import '@babel/runtime/helpers/typeof';
import '../../_chunks/dep-79359026.js';
import 'dayjs';
import '../../_common/js/global-config/t.js';
import '@babel/runtime/helpers/slicedToArray';
import '../../hooks/render-tnode.js';
var propHandler = {
type: Function,
"default": function _default() {
return function () {};
}
};
var TImageViewerIcon = defineComponent({
name: "TImageModalIcon",
props: {
disabled: Boolean,
clickHandler: propHandler,
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 {
wrapClass: wrapClass,
classPrefix: classPrefix,
renderTNodeJSX: renderTNodeJSX
};
},
render: function render() {
var h = arguments[0];
return h("div", {
"class": this.wrapClass,
"on": {
"click": this.clickHandler
}
}, [this.renderTNodeJSX("icon"), this.label && h("span", {
"class": "".concat(this.classPrefix, "-image-viewer__modal-icon-label")
}, [this.label])]);
}
});
export { TImageViewerIcon as default };
//# sourceMappingURL=ImageModalIcon.js.map