tdesign-vue-next
Version:
TDesign Component for vue-next
50 lines (46 loc) • 1.91 kB
JavaScript
/**
* tdesign v1.13.2
* (c) 2025 tdesign
* @license MIT
*/
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { defineComponent, createVNode } from 'vue';
import props from './props.js';
import 'lodash-es';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/typeof';
import { a as useContent } from '../_chunks/dep-2b7081ce.js';
import { u as usePrefixClass } from '../_chunks/dep-8da4c7ba.js';
import '@babel/runtime/helpers/slicedToArray';
import '../_chunks/dep-17e50b35.js';
import '../_chunks/dep-cedcb3d0.js';
import '../utils/render-tnode.js';
import '../config-provider/hooks/useConfig.js';
import '../config-provider/utils/context.js';
import '../_chunks/dep-78c14980.js';
import '../_chunks/dep-09955460.js';
import 'dayjs';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/classCallCheck';
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.js.map