tdesign-vue-next
Version:
TDesign Component for vue-next
52 lines (48 loc) • 1.96 kB
JavaScript
/**
* tdesign v1.13.2
* (c) 2025 tdesign
* @license MIT
*/
import { _ as _defineProperty } from '../_chunks/dep-0bb39574.mjs';
import { defineComponent, createVNode } from 'vue';
import props from './props.mjs';
import { u as usePrefixClass, b as useContent } from '../_chunks/dep-9c4aef07.mjs';
import '../_chunks/dep-a81129ec.mjs';
import 'lodash-es';
import '../_chunks/dep-b981148e.mjs';
import '../_chunks/dep-f1895f5a.mjs';
import '../utils/render-tnode.mjs';
import '../config-provider/hooks/useConfig.mjs';
import '../config-provider/utils/context.mjs';
import '../_chunks/dep-466a0666.mjs';
import '../_chunks/dep-24ce1cec.mjs';
import '../_chunks/dep-160caab6.mjs';
import '../_chunks/dep-e497214e.mjs';
import '../_chunks/dep-98cd1e2d.mjs';
import '../_chunks/dep-23a929e8.mjs';
import '../_chunks/dep-48e13ca0.mjs';
import '../_chunks/dep-033df8e6.mjs';
import '../utils/dom.mjs';
import '../_chunks/dep-20550dcc.mjs';
var _Divider = defineComponent({
name: "TDivider",
props: props,
setup: function setup(props2) {
var COMPONENT_NAME = usePrefixClass("divider");
var renderContent = useContent();
return function () {
var layout = props2.layout,
dashed = props2.dashed,
align = props2.align;
var children = renderContent("default", "content");
var dividerClassNames = ["".concat(COMPONENT_NAME.value), ["".concat(COMPONENT_NAME.value, "--").concat(layout)], _defineProperty(_defineProperty(_defineProperty({}, "".concat(COMPONENT_NAME.value, "--dashed"), !!dashed), "".concat(COMPONENT_NAME.value, "--with-text"), !!children), "".concat(COMPONENT_NAME.value, "--with-text-").concat(align), !!children)];
return createVNode("div", {
"class": dividerClassNames
}, [children && createVNode("span", {
"class": "".concat(COMPONENT_NAME.value, "__inner-text")
}, [children])]);
};
}
});
export { _Divider as default };
//# sourceMappingURL=divider.mjs.map