UNPKG

code-monkey-ui

Version:

A Component Library for Vue 3

46 lines (43 loc) 1.4 kB
import { defineComponent, h } from 'vue'; import '../../../hooks/index.mjs'; import '../../../utils/index.mjs'; import { definePropType } from '../../../utils/vue/props/runtime.mjs'; import { useNamespace } from '../../../hooks/use-namespace/index.mjs'; var ElDshNodeContent = defineComponent({ name: "ElDshNodeContent", props: { onlyCheck: { type: definePropType(Function), default: () => { } }, node: { type: Object, required: true } }, setup() { const ns = useNamespace("dsh-cascader-node"); return { ns }; }, render(props) { var _a; const { ns } = this; const { node, panel, onlyThis } = this.$parent; const { data, label } = node; const { renderLabelFn } = panel; const value = (_a = props.node.config.value) != null ? _a : "value"; return h("span", { class: ns.e("label") }, renderLabelFn ? renderLabelFn({ node, data }) : !onlyThis ? label : [ h("div", { class: `${ns.namespace.value}-dsh-justify-between` }, [ h("span", { class: `${ns.namespace.value}-dsh-cascader-node--label` }, label), data[value] !== "cascader-all" ? h("div", { class: "select-tag", onClick: this.onlyCheck }, [ h("span", {}, "\u4EC5\u7B5B\u9009\u6B64\u9879") ]) : "" ]) ]); } }); export { ElDshNodeContent as default }; //# sourceMappingURL=dsh-node-content.mjs.map