code-monkey-ui
Version:
A Component Library for Vue 3
50 lines (45 loc) • 1.49 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
require('../../../hooks/index.js');
require('../../../utils/index.js');
var runtime = require('../../../utils/vue/props/runtime.js');
var index = require('../../../hooks/use-namespace/index.js');
var ElDshNodeContent = vue.defineComponent({
name: "ElDshNodeContent",
props: {
onlyCheck: {
type: runtime.definePropType(Function),
default: () => {
}
},
node: {
type: Object,
required: true
}
},
setup() {
const ns = index.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 vue.h("span", { class: ns.e("label") }, renderLabelFn ? renderLabelFn({ node, data }) : !onlyThis ? label : [
vue.h("div", { class: `${ns.namespace.value}-dsh-justify-between` }, [
vue.h("span", { class: `${ns.namespace.value}-dsh-cascader-node--label` }, label),
data[value] !== "cascader-all" ? vue.h("div", { class: "select-tag", onClick: this.onlyCheck }, [
vue.h("span", {}, "\u4EC5\u7B5B\u9009\u6B64\u9879")
]) : ""
])
]);
}
});
exports["default"] = ElDshNodeContent;
//# sourceMappingURL=dsh-node-content.js.map