tdesign-vue-next
Version:
TDesign Component for vue-next
90 lines (86 loc) • 3.06 kB
JavaScript
/**
* tdesign v1.11.5
* (c) 2025 tdesign
* @license MIT
*/
import { createVNode } from 'vue';
import 'lodash-es';
import 'tdesign-icons-vue-next';
import '../../checkbox/index.js';
import '../../loading/index.js';
import { usePrefixClass } from '../../hooks/useConfig.js';
import '../../utils/dom.js';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/asyncToGenerator';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/defineProperty';
import '@babel/runtime/regenerator';
import { getTNode } from '../util.js';
import '../../checkbox/checkbox.js';
import '../../checkbox/props.js';
import '../../hooks/useVModel.js';
import '../../hooks/useRipple.js';
import '../../hooks/useKeepAnimation.js';
import '../../config-provider/hooks/useConfig.js';
import '../../config-provider/utils/context.js';
import '../../_chunks/dep-c75b9b8e.js';
import '@babel/runtime/helpers/typeof';
import '../../_chunks/dep-caecb55d.js';
import 'dayjs';
import '../../_chunks/dep-d60f6309.js';
import '../../_chunks/dep-7c56a7f5.js';
import '../../utils/render-tnode.js';
import '../../checkbox/consts/index.js';
import '../../checkbox/hooks/useCheckboxLazyLoad.js';
import '../../_chunks/dep-8c2d2d85.js';
import '../../checkbox/hooks/useKeyboardEvent.js';
import '../../_chunks/dep-d2f3d117.js';
import '../../hooks/useDisabled.js';
import '../../hooks/useReadonly.js';
import '../../checkbox/group.js';
import '../../checkbox/checkbox-group-props.js';
import '../../hooks/slot.js';
import '../../utils/withInstall.js';
import '../../loading/directive.js';
import '../../loading/plugin.js';
import '../../loading/loading.js';
import '../../loading/icon/gradient.js';
import '../../_chunks/dep-56c3d46e.js';
import '@babel/runtime/helpers/objectWithoutProperties';
import '../../hooks/useTeleport.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