UNPKG

tdesign-vue-next

Version:
91 lines (87 loc) 3.17 kB
/** * tdesign v1.20.5 * (c) 2026 tdesign * @license MIT */ import { createVNode } from 'vue'; import 'lodash-es'; import '@babel/runtime/helpers/toConsumableArray'; import '@babel/runtime/helpers/typeof'; import '../../_chunks/dep-f6650a20.js'; import { u as usePrefixClass } from '../../_chunks/dep-eff63d83.js'; import '@babel/runtime/helpers/slicedToArray'; import '../../_chunks/dep-a4f7f1a6.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 '../utils/index.js'; import '../../_chunks/dep-19eba232.js'; import '../../config-provider/hooks/useConfig.js'; import '../../config-provider/utils/context.js'; import '../../_chunks/dep-9218c7b1.js'; import 'dayjs'; import '../../checkbox/checkbox.js'; import '../../checkbox/props.js'; import '../../_chunks/dep-4cf1cec7.js'; import '../../_chunks/dep-76d3c0e7.js'; import '../../_chunks/dep-93b6f0b1.js'; import '../../_chunks/dep-2c6923f0.js'; import '../../_chunks/dep-d0d7d2de.js'; import '../../_chunks/dep-dd7bedc3.js'; import '../../_chunks/dep-7a4a1453.js'; import '../../_chunks/dep-c7e652b6.js'; import '../../_chunks/dep-a22671e7.js'; import '../../checkbox/constants/index.js'; import '../../checkbox/hooks/useCheckboxLazyLoad.js'; import '../../_chunks/dep-8c3b1ab1.js'; import '../../checkbox/hooks/useKeyboardEvent.js'; import '../../_chunks/dep-332e867e.js'; import '../../checkbox/group.js'; import '../../checkbox/checkbox-group-props.js'; import '../../_chunks/dep-c50bd500.js'; import '../../_chunks/dep-fe555241.js'; import '../../loading/directive.js'; import '../../loading/plugin.js'; import '../../_chunks/dep-d3ec4377.js'; import '../../loading/icon/gradient.js'; import '../../_chunks/dep-03480242.js'; import '@babel/runtime/helpers/objectWithoutProperties'; 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