鍒濆鎻愪氦锛氱墰鍙暟鎹鐞嗙郴缁?- 鍖呭惈鍚庣Spring Boot鍜屽墠绔疺ue3椤圭洰

This commit is contained in:
shenquanyi
2025-11-28 17:19:49 +08:00
commit 4de35a7e5b
9890 changed files with 1020261 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import { defineComponent, inject, h, renderSlot } from 'vue';
import { ElText } from '../../text/index.mjs';
import { NODE_INSTANCE_INJECTION_KEY, ROOT_TREE_INJECTION_KEY } from './tokens.mjs';
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
const _sfc_main = defineComponent({
name: "ElTreeNodeContent",
props: {
node: {
type: Object,
required: true
},
renderContent: Function
},
setup(props) {
const ns = useNamespace("tree");
const nodeInstance = inject(NODE_INSTANCE_INJECTION_KEY);
const tree = inject(ROOT_TREE_INJECTION_KEY);
return () => {
const node = props.node;
const { data, store } = node;
return props.renderContent ? props.renderContent(h, { _self: nodeInstance, node, data, store }) : renderSlot(tree.ctx.slots, "default", { node, data }, () => [
h(ElText, { tag: "span", truncated: true, class: ns.be("node", "label") }, () => [node.label])
]);
};
}
});
var NodeContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tree-node-content.vue"]]);
export { NodeContent as default };
//# sourceMappingURL=tree-node-content.mjs.map