tdesign-vue-next
Version:
TDesign Component for vue-next
68 lines (64 loc) • 2.28 kB
JavaScript
/**
* tdesign v1.11.5
* (c) 2025 tdesign
* @license MIT
*/
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
import { defineComponent, createVNode, mergeProps, h, Fragment, isVNode } from 'vue';
import { usePrefixClass } from '../hooks/useConfig.js';
import props from './title-props.js';
import Ellipsis from './ellipsis.js';
import { a as useContent } 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 '@babel/runtime/helpers/defineProperty';
import './paragraph-props.js';
import '../tooltip/index.js';
import '../tooltip/tooltip.js';
import '@babel/runtime/helpers/slicedToArray';
import '../tooltip/props.js';
import '../popup/props.js';
import '../popup/index.js';
import '../popup/popup.js';
import '@popperjs/core';
import '../hooks/useKeepAnimation.js';
import '../_chunks/dep-d60f6309.js';
import '../hooks/useVModel.js';
import '../utils/dom.js';
import '../popup/container.js';
import '../hooks/useResizeObserver.js';
import '../utils/withInstall.js';
import '../utils/render-tnode.js';
import '../tooltip/utils/index.js';
function _isSlot(s) {
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
}
var _Title = defineComponent({
name: "TTypographyTitle",
props: props,
setup: function setup(props2) {
var COMPONENT_NAME = usePrefixClass("typography");
var renderContent = useContent();
return function () {
var _slot;
var Tag = props2.level;
var content = renderContent("default", "content");
return props2.ellipsis ? createVNode(Ellipsis, mergeProps(props2, {
"class": COMPONENT_NAME.value
}), _isSlot(_slot = h.apply(void 0, [Tag].concat(_toConsumableArray(content)))) ? _slot : {
"default": function _default() {
return [_slot];
}
}) : createVNode(Fragment, null, [h.apply(void 0, [Tag, {
"class": COMPONENT_NAME.value
}].concat(_toConsumableArray(content)))]);
};
}
});
export { _Title as default };
//# sourceMappingURL=title.js.map