UNPKG

tdesign-vue-next

Version:
91 lines (87 loc) 3.15 kB
/** * tdesign v1.13.2 * (c) 2025 tdesign * @license MIT */ import { createVNode } from 'vue'; import 'lodash-es'; import '@babel/runtime/helpers/toConsumableArray'; import '@babel/runtime/helpers/typeof'; 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 '@babel/runtime/helpers/defineProperty'; import 'tdesign-icons-vue-next'; import '../../checkbox/index.js'; import '../../loading/index.js'; import '@babel/runtime/helpers/asyncToGenerator'; import '@babel/runtime/helpers/classCallCheck'; import '@babel/runtime/helpers/createClass'; import '@babel/runtime/regenerator'; import { getTNode } from '../util.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 '../../checkbox/checkbox.js'; import '../../checkbox/props.js'; import '../../_chunks/dep-2b7081ce.js'; import '../../utils/render-tnode.js'; import '../../_chunks/dep-ce96cd30.js'; import '../../_chunks/dep-8d697283.js'; import '../../_chunks/dep-d5d1b50b.js'; import '../../_chunks/dep-0593311f.js'; import '../../_chunks/dep-1f560187.js'; import '../../_chunks/dep-02840c31.js'; import '../../checkbox/consts/index.js'; import '../../checkbox/hooks/useCheckboxLazyLoad.js'; import '../../_chunks/dep-02bb42d0.js'; import '../../checkbox/hooks/useKeyboardEvent.js'; import '../../_chunks/dep-7c41ebd1.js'; import '../../checkbox/group.js'; import '../../checkbox/checkbox-group-props.js'; import '../../_chunks/dep-a018f4a7.js'; import '../../utils/withInstall.js'; import '../../loading/directive.js'; import '../../loading/plugin.js'; import '../../_chunks/dep-a916af84.js'; import '../../loading/icon/gradient.js'; import '../../_chunks/dep-2c03cc07.js'; import '@babel/runtime/helpers/objectWithoutProperties'; import '../../utils/dom.js'; import '../../loading/props.js'; function useRenderOperations(state) { var componentName = usePrefixClass("tree").value; var renderOperations = function renderOperations(h) { var node = state.node, treeScope = state.treeScope; var scopedSlots = treeScope.scopedSlots; var treeProps = (treeScope === null || treeScope === void 0 ? void 0 : treeScope.treeProps) || {}; var operations = treeProps.operations; var opNode = null; if (scopedSlots !== null && scopedSlots !== void 0 && scopedSlots.operations) { opNode = scopedSlots.operations({ node: node === null || node === void 0 ? void 0 : node.getModel() }); } else { opNode = getTNode(operations, { createElement: h, node: node }); } if (opNode) { opNode = createVNode("span", { "class": "".concat(componentName, "__operations"), "ignore": "active,expand" }, [opNode]); } return opNode; }; return { renderOperations: renderOperations }; } export { useRenderOperations as default }; //# sourceMappingURL=useRenderOperations.js.map