UNPKG

@cainiaofe/cn-ui-m

Version:
14 lines (13 loc) 836 B
import { __assign } from "tslib"; import React from 'react'; import { CnDepartmentSelect as UICnDepartmentSelect } from './department-select'; import { HocBaseComponents, useCreatePluginInstance } from "../../utils/plugin"; export var CnDepartmentSelect = React.forwardRef(function (props, ref) { var _a; var pluginIns = useCreatePluginInstance('CnDepartmentSelect', props === null || props === void 0 ? void 0 : props.usePlugin); var plugins = ((_a = pluginIns === null || pluginIns === void 0 ? void 0 : pluginIns.getPlugin) === null || _a === void 0 ? void 0 : _a.call(pluginIns)) || []; if (plugins.length === 0) { return React.createElement(UICnDepartmentSelect, __assign({}, props, { ref: ref })); } return HocBaseComponents(UICnDepartmentSelect, { props: props, plugins: plugins, ref: ref }); });