vap1 0.4.7 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.json +30 -0
- package/basetype.d.ts +0 -1
- package/cems/admin/AsyncSelect.d.ts +45 -0
- package/cems/admin/AsyncSelect.js +2 -0
- package/cems/admin/CardTable.d.ts +207 -0
- package/cems/admin/CardTable.js +2 -0
- package/cems/admin/EasyuiTree.d.ts +131 -0
- package/cems/admin/EasyuiTree.js +2 -0
- package/cems/admin/utils.d.ts +5 -0
- package/cems/admin/utils.js +3 -0
- package/cems/admin/validator.d.ts +137 -0
- package/cems/admin/validator.js +2 -0
- package/cems/assets/CUpload.d.ts +23 -0
- package/cems/assets/CUpload.js +2 -0
- package/cems/assets/Charts.d.ts +37 -0
- package/cems/assets/Charts.js +2 -0
- package/cems/assets/DInfo.d.ts +38 -0
- package/cems/assets/DInfo.js +2 -0
- package/cems/assets/DModal.d.ts +84 -0
- package/cems/assets/DModal.js +2 -0
- package/cems/assets/DTable.d.ts +128 -0
- package/cems/assets/DTable.js +2 -0
- package/cems/assets/DivWidth.d.ts +14 -0
- package/cems/assets/DivWidth.js +2 -0
- package/cems/assets/Patch.d.ts +9 -0
- package/cems/assets/Patch.js +2 -0
- package/cems/assets/Sensitive.d.ts +33 -0
- package/cems/assets/Sensitive.js +2 -0
- package/cems/assets/types.d.ts +200 -0
- package/cems/assets/types.js +2 -0
- package/cems/assets/utils.d.ts +61 -0
- package/cems/assets/utils.js +2 -0
- package/cems/define.d.ts +9 -0
- package/cems/define.js +18 -0
- package/cems/index.d.ts +228 -0
- package/cems/index.js +81 -0
- package/cems/policy/CForm.d.ts +133 -0
- package/cems/policy/CForm.js +2 -0
- package/cems/policy/DApiTable.d.ts +78 -0
- package/cems/policy/DApiTable.js +2 -0
- package/cems/policy/DButton.d.ts +17 -0
- package/cems/policy/DButton.js +2 -0
- package/cems/policy/DCheckbox.d.ts +50 -0
- package/cems/policy/DCheckbox.js +2 -0
- package/cems/policy/DCheckboxGroup.d.ts +34 -0
- package/cems/policy/DCheckboxGroup.js +2 -0
- package/cems/policy/DCol.d.ts +33 -0
- package/cems/policy/DCol.js +2 -0
- package/cems/policy/DColorPicker.d.ts +9 -0
- package/cems/policy/DColorPicker.js +2 -0
- package/cems/policy/DDatePicker.d.ts +41 -0
- package/cems/policy/DDatePicker.js +2 -0
- package/cems/policy/DDiv.d.ts +65 -0
- package/cems/policy/DDiv.js +2 -0
- package/cems/policy/DDrawer.d.ts +6 -0
- package/cems/policy/DDrawer.js +2 -0
- package/cems/policy/DDynamicSelect.d.ts +50 -0
- package/cems/policy/DDynamicSelect.js +2 -0
- package/cems/policy/DDynamicTreeSelect.d.ts +45 -0
- package/cems/policy/DDynamicTreeSelect.js +2 -0
- package/cems/policy/DForm.d.ts +248 -0
- package/cems/policy/DForm.js +2 -0
- package/cems/policy/DIcon.d.ts +33 -0
- package/cems/policy/DIcon.js +2 -0
- package/cems/policy/DInput.d.ts +41 -0
- package/cems/policy/DInput.js +2 -0
- package/cems/policy/DLabel.d.ts +17 -0
- package/cems/policy/DLabel.js +2 -0
- package/cems/policy/DPTable.d.ts +86 -0
- package/cems/policy/DPTable.js +2 -0
- package/cems/policy/DRadio.d.ts +34 -0
- package/cems/policy/DRadio.js +2 -0
- package/cems/policy/DSCTable.d.ts +33 -0
- package/cems/policy/DSCTable.js +2 -0
- package/cems/policy/DSelect.d.ts +42 -0
- package/cems/policy/DSelect.js +2 -0
- package/cems/policy/DSlider.d.ts +21 -0
- package/cems/policy/DSlider.js +2 -0
- package/cems/policy/DSwitch.d.ts +21 -0
- package/cems/policy/DSwitch.js +2 -0
- package/cems/policy/DTab.d.ts +30 -0
- package/cems/policy/DTab.js +2 -0
- package/cems/policy/DTimePicker.d.ts +37 -0
- package/cems/policy/DTimePicker.js +2 -0
- package/cems/policy/DTree.d.ts +98 -0
- package/cems/policy/DTree.js +2 -0
- package/cems/policy/DUpload.d.ts +33 -0
- package/cems/policy/DUpload.js +2 -0
- package/cems/policy/types.d.ts +200 -0
- package/cems/policy/types.js +2 -0
- package/cems/policy/utils.d.ts +13 -0
- package/cems/policy/utils.js +2 -0
- package/components/Box/Box.d.ts +42 -6
- package/components/Box/Box.js +66 -16
- package/components/Box/SelectBar.d.ts +1 -1
- package/components/Box/SelectBar.js +19 -9
- package/components/Lists/BaseList.d.ts +5 -0
- package/components/Lists/BaseList.js +111 -0
- package/components/Lists/Fields/IconRender.d.ts +53 -0
- package/components/Lists/Fields/IconRender.js +174 -0
- package/components/Lists/Fields/ItemRender.d.ts +2 -0
- package/components/Lists/Fields/ItemRender.js +127 -0
- package/components/Lists/Fields/_utils.d.ts +3 -0
- package/components/Lists/Fields/_utils.js +80 -0
- package/components/Lists/Fields/index.d.ts +3 -0
- package/components/Lists/Fields/index.js +47 -0
- package/components/Lists/Grid/grid.d.ts +7 -0
- package/components/Lists/Grid/grid.js +18 -0
- package/components/Lists/Grid/index.d.ts +3 -0
- package/components/Lists/Grid/index.js +50 -0
- package/components/Lists/Row/index.d.ts +3 -0
- package/components/Lists/Row/index.js +14 -0
- package/components/Lists/SList.js +17 -7
- package/components/Lists/Timeline/index.d.ts +3 -0
- package/components/Lists/Timeline/index.js +117 -0
- package/components/Lists/VList.d.ts +3 -0
- package/components/Lists/VList.js +92 -0
- package/components/Lists/components/LayoutSwitcher.d.ts +13 -0
- package/components/Lists/components/LayoutSwitcher.js +121 -0
- package/components/Lists/components/SearchTool.d.ts +13 -0
- package/components/Lists/components/SearchTool.js +34 -0
- package/components/Lists/index.d.ts +129 -0
- package/components/Lists/index.js +2 -0
- package/components/SearchTool/SearchBand/BandInput.d.ts +3 -0
- package/components/SearchTool/SearchBand/BandInput.js +54 -0
- package/components/SearchTool/SearchBand/BandTag.d.ts +7 -0
- package/components/SearchTool/SearchBand/BandTag.js +82 -0
- package/components/SearchTool/SearchBand/_SearchBandAction.d.ts +3 -0
- package/components/SearchTool/SearchBand/_SearchBandAction.js +23 -0
- package/components/SearchTool/SearchBand/_SearchBandFix.d.ts +3 -0
- package/components/SearchTool/SearchBand/_SearchBandFix.js +72 -0
- package/components/SearchTool/SearchBand/_SearchBandTag.d.ts +3 -0
- package/components/SearchTool/SearchBand/_SearchBandTag.js +75 -0
- package/components/SearchTool/SearchBand/_register.d.ts +47 -0
- package/components/SearchTool/SearchBand/_register.js +15 -0
- package/components/SearchTool/SearchBand/hooks.d.ts +12 -0
- package/components/SearchTool/SearchBand/hooks.js +181 -0
- package/components/SearchTool/SearchBand/index.d.ts +3 -0
- package/components/SearchTool/SearchBand/index.js +66 -0
- package/components/SearchTool/SearchBand/type.d.ts +71 -0
- package/components/SearchTool/SearchBand/type.js +3 -0
- package/components/SearchTool/SearchBar/ActionButtons.js +17 -7
- package/components/SearchTool/SearchBar/ByField.d.ts +1 -1
- package/components/SearchTool/SearchBar/ByField.js +17 -7
- package/components/SearchTool/SearchBar/ByKeyword.d.ts +1 -1
- package/components/SearchTool/SearchBar/ByKeyword.js +17 -7
- package/components/SearchTool/SearchBar/SearchField.d.ts +1 -1
- package/components/SearchTool/SearchBar/_register.d.ts +1 -1
- package/components/SearchTool/SearchBar/index.d.ts +1 -65
- package/components/SearchTool/SearchBar/type.d.ts +133 -0
- package/components/SearchTool/SearchBar/type.js +35 -0
- package/components/SearchTool/index.d.ts +5 -63
- package/components/SearchTool/index.js +5 -0
- package/components/Tables/ApiTable.d.ts +5 -7
- package/components/Tables/ApiTable.js +17 -7
- package/components/Tables/ApiTableModal.d.ts +5 -7
- package/components/Tables/ApiTableModal.js +17 -7
- package/components/Tables/Components/ActionBar.d.ts +7 -10
- package/components/Tables/Components/ActionBar.js +73 -40
- package/components/Tables/Components/Actions.d.ts +3 -1
- package/components/Tables/Components/Actions.js +40 -3
- package/components/Tables/Components/index.d.ts +3 -1
- package/components/Tables/Components/useTableContext.d.ts +16 -0
- package/components/Tables/Components/useTableContext.js +116 -0
- package/components/Tables/STable.js +17 -7
- package/components/Tables/TopTable.js +17 -7
- package/components/Tables/Util.d.ts +2 -2
- package/components/Tables/Util.js +0 -1
- package/components/Tables/VTable.d.ts +9 -11
- package/components/Tables/VTable.js +119 -172
- package/components/Tables/VTableBack.d.ts +0 -0
- package/components/Tables/VTableBack.js +269 -0
- package/components/Tables/index.d.ts +11 -22
- package/components/TreeSelect/BaseTreeSelect.js +17 -7
- package/components/TreeSelect/DTreeSelect.js +19 -9
- package/components/TreeSelect/FTreeSelect.js +2 -2
- package/components/Trees/ActionTree.d.ts +3 -5
- package/components/Trees/ActionTree.js +19 -9
- package/components/Trees/BaseTree.js +17 -7
- package/components/Trees/COTree/COButton.js +17 -7
- package/components/Trees/COTree/COSelect.js +17 -7
- package/components/Trees/COTree/COTree.js +19 -9
- package/components/Trees/DTree.d.ts +0 -7
- package/components/Trees/DTree.js +19 -9
- package/components/Trees/FTree.js +19 -9
- package/components/Trees/STree.js +17 -7
- package/components/UForm/FormWrapper.js +17 -7
- package/components/UForm/UDescriptions.d.ts +2 -3
- package/components/UForm/UDescriptions.js +17 -7
- package/components/UForm/UForm.d.ts +1 -1
- package/components/UForm/UForm.js +24 -11
- package/components/UForm/UFormModal.js +19 -9
- package/components/UForm/_input.d.ts +5 -1
- package/components/UForm/_input.js +25 -8
- package/components/Upload/UploadImage.js +17 -7
- package/components/Upload/UploadModal.js +19 -9
- package/components/Upload/useUpload.js +2 -2
- package/components/_adapt/Alert.js +17 -7
- package/components/_adapt/ColorPicker.js +17 -7
- package/components/_adapt/Drawer.js +17 -7
- package/components/_adapt/Dropdown.js +17 -7
- package/components/_adapt/FloatButton.js +17 -7
- package/components/_adapt/Input.js +17 -7
- package/components/_adapt/InputNumber.js +17 -7
- package/components/_adapt/Layout.js +17 -7
- package/components/_adapt/Menu.js +17 -7
- package/components/_adapt/Modal.js +17 -7
- package/components/_adapt/Popconfirm.js +17 -7
- package/components/_adapt/Popover.js +17 -7
- package/components/_adapt/Progress.js +17 -7
- package/components/_adapt/Select.js +17 -7
- package/components/_adapt/Table.js +17 -7
- package/components/_adapt/Tabs.js +17 -7
- package/components/_adapt/Tag.js +17 -7
- package/components/_adapt/TreeSelect.js +17 -7
- package/components/_adapt/todo/Image.d.ts +0 -1
- package/components/_adapt/todo/Segmented.d.ts +0 -1
- package/components/_common/AutoComplete.js +35 -12
- package/components/_common/CountUp.js +17 -7
- package/components/_common/DateRange.d.ts +5 -2
- package/components/_common/DateRange.js +43 -40
- package/components/_common/HighLight.d.ts +1 -1
- package/components/_common/HighLight.js +26 -24
- package/components/_common/Loading.js +17 -7
- package/components/_common/MonthRange.js +17 -7
- package/components/_common/PromiseLabel.js +2 -2
- package/components/_common/UTitle.js +17 -7
- package/components/_common/Upagination.d.ts +1 -0
- package/components/_common/Upagination.js +5 -1
- package/components/_i18n.d.ts +1 -102
- package/components/index.js +4 -0
- package/deps/JsonView.js +17 -7
- package/deps/app-audit/LookUp.js +19 -9
- package/deps/app-data/useSource.js +19 -9
- package/deps/echarts.d.ts +3 -0
- package/deps/echarts.js +20 -10
- package/deps/editor/Article.js +17 -7
- package/deps/editor/Editor.js +17 -7
- package/deps/editor/EditorModal.js +17 -7
- package/deps/editor/support/buttons/ImageButton.js +17 -7
- package/deps/editor/tools/Button.js +0 -2
- package/deps/editor/tools/_TxtButton.js +17 -7
- package/deps/vapc/_basic.d.ts +1 -0
- package/deps/vapc/_basic.js +15 -0
- package/deps/vapc/index.d.ts +10 -0
- package/deps/vapc/index.js +70 -0
- package/hooks/useAjaxAction.js +2 -2
- package/hooks/useAjaxQuery.js +2 -2
- package/hooks/useApiBase.js +2 -2
- package/hooks/useApiGlobal.js +1 -1
- package/hooks/useArray.js +2 -2
- package/hooks/useDefault.d.ts +0 -1
- package/hooks/useDoLoad.d.ts +1 -1
- package/hooks/useError.d.ts +1 -1
- package/hooks/useMemoPromise.js +2 -2
- package/index.d.ts +2 -1
- package/login/Base65.d.ts +7 -1
- package/login/Base65.js +49 -22
- package/login/Password.d.ts +8 -5
- package/login/Password.js +68 -102
- package/package.json +1 -1
- package/screen/Page.js +17 -7
- package/screen/vapc-schema/dark.d.ts +1 -0
- package/screen/vapc-schema/dark.js +50 -0
- package/screen/vapc-schema/insight.d.ts +1 -0
- package/screen/vapc-schema/insight.js +49 -0
- package/uform/FormEditor.js +17 -7
- package/uform/FormViewer.js +17 -7
- package/uform/hooks/useEditor.d.ts +0 -1
- package/uform/hooks/useForm.d.ts +0 -1
- package/uform/inputs/index.d.ts +0 -1
- package/uform/panel/Editor/_GroupDefault.js +17 -7
- package/uform/panel/Editor/_GroupStep.js +17 -7
- package/uform/panel/Editor/_GroupTab.js +17 -7
- package/uform/panel/Editor/index.js +17 -7
- package/uform/panel/Items/Fields.js +17 -7
- package/uform/panel/Items/InputSelector.js +17 -7
- package/uform/panel/Items/Inputs.js +17 -7
- package/uform/panel/Items/index.d.ts +1 -1
- package/uform/panel/Propreties/CanvasProperties.js +17 -7
- package/uform/panel/Propreties/Component/FieldPlugin.js +17 -7
- package/uform/panel/Propreties/Component/LinkAsyncFunction.js +17 -7
- package/uform/panel/Propreties/Component/LinkSyncFunction.js +17 -7
- package/uform/panel/Propreties/Component/Links.js +17 -7
- package/uform/panel/Propreties/Component/OptionTable.js +17 -7
- package/uform/panel/Propreties/Component/RegexpModal.js +17 -7
- package/uform/panel/Propreties/Component/Validate.js +17 -7
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.js +17 -7
- package/uform/panel/Propreties/Component/ValidateSyncFunction.js +17 -7
- package/uform/panel/Propreties/FieldOptions.js +17 -7
- package/uform/panel/Propreties/FieldProperties.js +17 -7
- package/uform/panel/Propreties/_ItemAdvance.js +17 -7
- package/uform/panel/Propreties/_ItemBase.js +17 -7
- package/uform/panel/Propreties/_ItemLink.js +17 -7
- package/uform/panel/Propreties/_ItemValidate.js +17 -7
- package/uform/schema.d.ts +1 -1
- package/uform/utils/Convert.js +2 -2
- package/utils/Ajax.d.ts +3 -0
- package/utils/Ajax.js +10 -7
- package/utils/CacheUtil.d.ts +1 -1
- package/utils/Const.js +17 -7
- package/utils/Format.d.ts +138 -14
- package/utils/Format.js +127 -13
- package/utils/Global.d.ts +12 -0
- package/utils/Global.js +7 -1
- package/utils/PageUtil.d.ts +111 -23
- package/utils/PageUtil.js +163 -28
- package/utils/Renders/ApiGetRender.js +20 -10
- package/utils/Renders/ApiPostRender.js +3 -3
- package/utils/Renders/CondictionRender.js +17 -7
- package/utils/Renders/DateRender.js +20 -2
- package/utils/Renders/ListRender.js +1 -1
- package/utils/Renders/NumberRender.js +24 -5
- package/utils/Renders/StringRender.js +81 -11
- package/utils/Renders/_define.d.ts +8 -7
- package/utils/Renders/_define.js +76 -17
- package/utils/StringUtil.d.ts +292 -62
- package/utils/StringUtil.js +310 -63
- package/utils/TreeUtil.js +14 -10
- package/utils/VAP.d.ts +26 -1
- package/utils/VAP.js +57 -0
- package/utils/_AjaxUtil.d.ts +1 -0
- package/utils/_AjaxUtil.js +70 -3
- package/utils/_Support.d.ts +2 -2
- package/utils/_Support.js +4 -2
- package/utils/crontab/crontabRender.js +0 -1
- package/utils/i18n.d.ts +13 -2
- package/utils/i18n.js +13 -2
- package/utils/index.d.ts +4 -0
- package/utils/index.js +19 -9
- package/components/SearchTool/_FieldType.d.ts +0 -8
- package/components/SearchTool/_FieldType.js +0 -51
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
// import _ from 'lodash';
|
|
2
|
+
// import React, { useEffect, useRef, useMemo, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
|
|
3
|
+
// import { Table } from '../_adapt/Table'
|
|
4
|
+
// import { Empty } from "antd";
|
|
5
|
+
// import { ActionBar } from './Components/ActionBar';
|
|
6
|
+
// import { PageUtil, GLOBAL, StringUtil, i18n } from '../../utils';
|
|
7
|
+
// import { convertColumns } from './Util';
|
|
8
|
+
// // import { HighLight } from '../_common/HighLight';
|
|
9
|
+
// import { useUpdate, useFirstMountState } from '../../hooks';
|
|
10
|
+
// import { Box, useBox } from '../Box/Box';
|
|
11
|
+
// import type { MutableRefObject } from 'react';
|
|
12
|
+
// import type { BaseTableProps, TableColumn, TableColumnGroup } from './index';
|
|
13
|
+
// import type { TableProps, } from 'antd/es/table'
|
|
14
|
+
// import type { SorterResult, ColumnProps as ColumnsType } from 'antd/es/table/interface';
|
|
15
|
+
// import type { ListModel } from '../../hooks/_list';
|
|
16
|
+
// import type { PlainObject, Key } from '../../basetype';
|
|
17
|
+
// import type { BoxProps } from '../Box/Box'
|
|
18
|
+
// import type { SelectFunction } from './Components/ActionBar';;
|
|
19
|
+
// export type VTableRef = {
|
|
20
|
+
// getSelected: () => [Key[], PlainObject[]]
|
|
21
|
+
// getParams: () => PlainObject;
|
|
22
|
+
// clearSelected: () => void;
|
|
23
|
+
// }
|
|
24
|
+
// export const getHeightByTagName = (root: HTMLElement, tagName: string): number => {
|
|
25
|
+
// if (root == null) return 0;
|
|
26
|
+
// let els = root.getElementsByTagName(tagName);
|
|
27
|
+
// if (els.length) {
|
|
28
|
+
// return els[0].getBoundingClientRect().height;
|
|
29
|
+
// }
|
|
30
|
+
// return 0
|
|
31
|
+
// }
|
|
32
|
+
// /**
|
|
33
|
+
// * VTable 支持多种模型,内置模型有 API/DATA/STATIC,也支持模型规范的自定义模型
|
|
34
|
+
// */
|
|
35
|
+
// export type VTableProps = BaseTableProps & {
|
|
36
|
+
// /**
|
|
37
|
+
// * 列表模型,可以使用系统提供的 useApi/useArray 等,也可自行实现列表模型
|
|
38
|
+
// */
|
|
39
|
+
// model: ListModel
|
|
40
|
+
// /**
|
|
41
|
+
// * 默认选中的列,用于部分场景,可能会无效
|
|
42
|
+
// */
|
|
43
|
+
// defaultSelectedKeys?: (string | number)[]
|
|
44
|
+
// /**
|
|
45
|
+
// * 选中后变化
|
|
46
|
+
// */
|
|
47
|
+
// onSelectedChange?: (selectedRowKeys: Key[], selectedRows?: any[]) => void;
|
|
48
|
+
// }
|
|
49
|
+
// const _VTable = forwardRef((props: VTableProps, ref: MutableRefObject<SelectFunction>) => {
|
|
50
|
+
// const update = useUpdate();
|
|
51
|
+
// const { state, root, resize } = useBox();
|
|
52
|
+
// const inModal = useMemo(() => {
|
|
53
|
+
// if (root.current == null) return false;
|
|
54
|
+
// return root.current.parentElement.parentElement.classList.contains('ant-modal-body')
|
|
55
|
+
// || root.current.parentElement.parentElement.parentElement.classList.contains('ant-modal-body')
|
|
56
|
+
// || root.current.parentElement.parentElement.parentElement.parentElement.classList.contains('ant-modal-body');
|
|
57
|
+
// }, [])
|
|
58
|
+
// // const [scroll, setScroll] = useState<TableProps<PlainObject>['scroll']>(undefined);
|
|
59
|
+
// const { rowKey, list, isQuerying, pageNo, pageSize, orderBy, query, total } = props.model;
|
|
60
|
+
// let start = useRef(0);
|
|
61
|
+
// const tableProps: TableProps<PlainObject> = {}
|
|
62
|
+
// useEffect(() => {
|
|
63
|
+
// if (state.selected == null) return;
|
|
64
|
+
// if (_.isFunction(props.selectBar?.onSelect)) {
|
|
65
|
+
// let param = props.selectBar.onSelect(...state.selected);
|
|
66
|
+
// query({ ...props.default, ...param })
|
|
67
|
+
// }
|
|
68
|
+
// }, [state.selected]);
|
|
69
|
+
// // 更新页数
|
|
70
|
+
// useLayoutEffect(() => {
|
|
71
|
+
// start.current = pageSize * (pageNo - 1)
|
|
72
|
+
// // @ts-ignore
|
|
73
|
+
// if (props.model.mode == 'static') update();
|
|
74
|
+
// }, [pageSize, pageNo]);
|
|
75
|
+
// // 更新选中
|
|
76
|
+
// useLayoutEffect(() => {
|
|
77
|
+
// const diff = _.xor(ref.current.selected[0], list.map(item => item[rowKey]));
|
|
78
|
+
// if (diff.length > 0) {
|
|
79
|
+
// let toRemove = new Set(diff);
|
|
80
|
+
// ref.current.selected[0] = ref.current.selected[0].filter(key => !toRemove.has(key))
|
|
81
|
+
// ref.current.selected[1] = ref.current.selected[1].filter(item => !toRemove.has(item[rowKey]))
|
|
82
|
+
// ref.current.onSelected();
|
|
83
|
+
// }
|
|
84
|
+
// }, [list]);
|
|
85
|
+
// useLayoutEffect(() => {
|
|
86
|
+
// if (!isQuerying || !GLOBAL.CONFIG.TABLE.UNSELECT_ON_QUERY) return;
|
|
87
|
+
// if (ref.current.selected[0].length > 0) {
|
|
88
|
+
// ref.current.selected = [[], []];
|
|
89
|
+
// ref.current.onSelected();
|
|
90
|
+
// }
|
|
91
|
+
// }, [isQuerying])
|
|
92
|
+
// // 初始选中
|
|
93
|
+
// const isFristMounted = useFirstMountState();
|
|
94
|
+
// useLayoutEffect(() => {
|
|
95
|
+
// if (!isFristMounted) return;
|
|
96
|
+
// if (!_.isArray(props.defaultSelectedKeys) || props.defaultSelectedKeys.length == 0 || list.length == 0) return;
|
|
97
|
+
// const selectKeys = [];
|
|
98
|
+
// const selectObjs = [];
|
|
99
|
+
// for (let key of props.defaultSelectedKeys) {
|
|
100
|
+
// let obj = _.find(list, { [rowKey]: key });
|
|
101
|
+
// if (obj == null) continue;
|
|
102
|
+
// selectKeys.push(key)
|
|
103
|
+
// selectObjs.push(obj)
|
|
104
|
+
// }
|
|
105
|
+
// if (selectKeys.length > 0) {
|
|
106
|
+
// ref.current.selected[0] = selectKeys
|
|
107
|
+
// ref.current.selected[1] = selectObjs;
|
|
108
|
+
// ref.current.onSelected();
|
|
109
|
+
// update();
|
|
110
|
+
// }
|
|
111
|
+
// }, [isFristMounted])
|
|
112
|
+
// // 计算 clolum 及 高亮keyword
|
|
113
|
+
// const columns = useMemo<Array<ColumnsType<any>>>(() => convertColumns(props, { ref: start, isRank: false }), [props.columns])
|
|
114
|
+
// useLayoutEffect(() => {
|
|
115
|
+
// resize();
|
|
116
|
+
// }, [columns])
|
|
117
|
+
// useEffect(() => {
|
|
118
|
+
// if (props.autoLoad === false) return;
|
|
119
|
+
// // @ts-ignore
|
|
120
|
+
// if (props.model.mode == 'api-global' && total > 0) return;
|
|
121
|
+
// if (_.has(props.selectBar, 'config.mustSelect') && props.selectBar.config.mustSelect == true) return;
|
|
122
|
+
// query(props.default || {});
|
|
123
|
+
// }, []);
|
|
124
|
+
// // 更新高度 table 需要把 head 排除设置滚动
|
|
125
|
+
// // useEffect(() => {
|
|
126
|
+
// // if (inModal) {
|
|
127
|
+
// // setScroll({ x: true })
|
|
128
|
+
// // return;
|
|
129
|
+
// // }
|
|
130
|
+
// // if (props.scroll === null) return;
|
|
131
|
+
// // if (props.mode == undefined || props.mode == 'common') return;
|
|
132
|
+
// // let height = state?.height;
|
|
133
|
+
// // if (!height) return;
|
|
134
|
+
// // // VAP1.5 scroll table bug
|
|
135
|
+
// // root.current.style.height = height + 'px';
|
|
136
|
+
// // // setTimeout(() => {
|
|
137
|
+
// // // height -= getHeightByTagName(root.current, 'thead');
|
|
138
|
+
// // // setScroll({ y: Math.ceil(height), x: true })
|
|
139
|
+
// // // }, 2);
|
|
140
|
+
// // }, [state?.height]);
|
|
141
|
+
// // @ts-ignore
|
|
142
|
+
// const effectKey = props.model.effect;
|
|
143
|
+
// useEffect(() => {
|
|
144
|
+
// if (effectKey == null) return;
|
|
145
|
+
// let effectRow = effectKey;
|
|
146
|
+
// if (_.isString(effectKey) && _.startsWith(effectKey, '_')) effectRow = effectRow.substring(1);
|
|
147
|
+
// const trs = root.current.getElementsByClassName('ant-table-row');
|
|
148
|
+
// let size = trs.length;
|
|
149
|
+
// if (size <= 0) return;
|
|
150
|
+
// for (let i = 0; i < size; i++) {
|
|
151
|
+
// let tr = trs.item(i);
|
|
152
|
+
// let key = tr.getAttribute('data-row-key');
|
|
153
|
+
// if (key == effectRow) {
|
|
154
|
+
// if (tr.classList.contains('c-table-high')) {
|
|
155
|
+
// tr.classList.remove('c-table-high')
|
|
156
|
+
// }
|
|
157
|
+
// setTimeout(() => tr.classList.add('c-table-high'), 2)
|
|
158
|
+
// }
|
|
159
|
+
// }
|
|
160
|
+
// }, [effectKey]);
|
|
161
|
+
// if (props.select) {
|
|
162
|
+
// tableProps.rowSelection = {
|
|
163
|
+
// selectedRowKeys: ref.current.selected[0] as any[],
|
|
164
|
+
// onChange: (selectedRowKeys, selectedObjects) => {
|
|
165
|
+
// ref.current.selected = [selectedRowKeys, selectedObjects];
|
|
166
|
+
// ref.current.onSelected();
|
|
167
|
+
// update();
|
|
168
|
+
// if (props.onSelectedChange && _.isFunction(props.onSelectedChange)) {
|
|
169
|
+
// props.onSelectedChange(selectedRowKeys, selectedObjects)
|
|
170
|
+
// }
|
|
171
|
+
// },
|
|
172
|
+
// getCheckboxProps: record => {
|
|
173
|
+
// if (_.isFunction(props.selectDisabled)) return { disabled: props.selectDisabled(record) }
|
|
174
|
+
// if (!_.has(record, rowKey)) return { disabled: true }
|
|
175
|
+
// return { disabled: false };
|
|
176
|
+
// },
|
|
177
|
+
// }
|
|
178
|
+
// }
|
|
179
|
+
// return <Table
|
|
180
|
+
// rowKey={props.rowKey || rowKey}
|
|
181
|
+
// // scroll={scroll}
|
|
182
|
+
// // tableLayout="fixed"
|
|
183
|
+
// // showSorterTooltip={false}
|
|
184
|
+
// size={GLOBAL.CONFIG.TABLE.SIZE}
|
|
185
|
+
// locale={{ emptyText: <Empty style={{ marginTop: 24 }} /> }}
|
|
186
|
+
// {..._.omit(props, ['children'])}
|
|
187
|
+
// {...tableProps}
|
|
188
|
+
// className={StringUtil.className(['c-table'], props.className)}
|
|
189
|
+
// pagination={false}
|
|
190
|
+
// columns={columns}
|
|
191
|
+
// dataSource={list}
|
|
192
|
+
// loading={isQuerying}
|
|
193
|
+
// onChange={(x, y, field: SorterResult<any>) => {
|
|
194
|
+
// if (field.column) {
|
|
195
|
+
// orderBy(field.field as string, field.order == 'ascend' ? 'asc' : 'desc');
|
|
196
|
+
// } else {
|
|
197
|
+
// orderBy(null, 'desc');
|
|
198
|
+
// }
|
|
199
|
+
// }}
|
|
200
|
+
// />
|
|
201
|
+
// });
|
|
202
|
+
// export const VTable = forwardRef((props: VTableProps, ref: MutableRefObject<VTableRef>) => {
|
|
203
|
+
// const { isQuerying, pageNo, pageSize, total, totalAcc, param, pageTo, query, cost } = props.model;
|
|
204
|
+
// const update = useUpdate();
|
|
205
|
+
// // 通过 ref 方式交互,后续扩展方法实现定制联页选择
|
|
206
|
+
// const selectedRef = useRef<SelectFunction>({ selected: [props.defaultSelectedKeys || [], []], onSelected: update });
|
|
207
|
+
// // 对外提供getSelected方法获取当前选择的数据
|
|
208
|
+
// useImperativeHandle(ref, () => {
|
|
209
|
+
// return {
|
|
210
|
+
// clearSelected() {
|
|
211
|
+
// selectedRef.current.selected = [[], []];
|
|
212
|
+
// selectedRef.current.onSelected();
|
|
213
|
+
// },
|
|
214
|
+
// getSelected() {
|
|
215
|
+
// return selectedRef.current.selected;
|
|
216
|
+
// },
|
|
217
|
+
// getParams: () => {
|
|
218
|
+
// return props.model.param;
|
|
219
|
+
// }
|
|
220
|
+
// }
|
|
221
|
+
// }, [param]);
|
|
222
|
+
// let boxProps: BoxProps = _.pick(props, ['selectBar', 'style', 'className', 'default', 'mode']);
|
|
223
|
+
// if (props.searchBar) {
|
|
224
|
+
// boxProps.searchBar = {
|
|
225
|
+
// ...props.searchBar, disabled: isQuerying,
|
|
226
|
+
// onSearch: (data) => {
|
|
227
|
+
// let queryParam = _.extend({}, param, data)
|
|
228
|
+
// query(queryParam, true);
|
|
229
|
+
// selectedRef.current.selected = [[], []];
|
|
230
|
+
// selectedRef.current.onSelected();
|
|
231
|
+
// },
|
|
232
|
+
// }
|
|
233
|
+
// }
|
|
234
|
+
// if (props.actionBar) {
|
|
235
|
+
// if (_.isArray(props.actionBar)) {
|
|
236
|
+
// if (props.actionBar.length) {
|
|
237
|
+
// boxProps.actionBar = <ActionBar
|
|
238
|
+
// buttons={props.actionBar as any}
|
|
239
|
+
// queryParam={param}
|
|
240
|
+
// selectedRef={selectedRef}
|
|
241
|
+
// />
|
|
242
|
+
// }
|
|
243
|
+
// } else {
|
|
244
|
+
// boxProps.actionBar = props.actionBar;
|
|
245
|
+
// }
|
|
246
|
+
// }
|
|
247
|
+
// if (props.pagination !== false) {
|
|
248
|
+
// boxProps.pagination = {
|
|
249
|
+
// disabled: isQuerying,
|
|
250
|
+
// current: pageNo,
|
|
251
|
+
// pageSize: pageSize,
|
|
252
|
+
// total: total,
|
|
253
|
+
// cost: cost,
|
|
254
|
+
// totalAcc: totalAcc,
|
|
255
|
+
// onChange: pageTo,
|
|
256
|
+
// }
|
|
257
|
+
// if (props.pagination) {
|
|
258
|
+
// if (props.pagination.hideOnSinglePage) {
|
|
259
|
+
// boxProps.pagination.hideOnSinglePage = true;
|
|
260
|
+
// }
|
|
261
|
+
// if (props.pagination.className) {
|
|
262
|
+
// boxProps.pagination.className = props.pagination.className;
|
|
263
|
+
// }
|
|
264
|
+
// }
|
|
265
|
+
// }
|
|
266
|
+
// return <Box {...boxProps}>
|
|
267
|
+
// {/* <_VTable {..._.omit(props, ['className', 'style'])} ref={selectedRef} /> */}
|
|
268
|
+
// </Box>
|
|
269
|
+
// });
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { TableDefined } from './Components';
|
|
2
2
|
import type { ReactNode, ForwardRefExoticComponent, ExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
import type { TableProps } from '../_adapt/Table';
|
|
4
|
-
import type { ColumnProps } from 'antd/es/table/interface';
|
|
5
|
-
import type { SearchBarProps } from '../SearchTool/SearchBar/
|
|
4
|
+
import type { ColumnProps as ColumnType } from 'antd/es/table/interface';
|
|
5
|
+
import type { SearchBarProps } from '../SearchTool/SearchBar/type';
|
|
6
6
|
import type { TableActionButton } from './Components/ActionBar';
|
|
7
7
|
import type { PlainObject, BaseItem, ApiModel } from '../../basetype';
|
|
8
|
-
import type {
|
|
9
|
-
|
|
10
|
-
export type TableColumn = BaseItem & Omit<ColumnProps<any>, 'children'> & {
|
|
8
|
+
import type { BoxProps } from '../Box/Box';
|
|
9
|
+
export type TableColumn = BaseItem & Omit<ColumnType<any>, 'children'> & {
|
|
11
10
|
wrap?: boolean;
|
|
12
11
|
};
|
|
13
12
|
export type TableColumnGroup = Pick<TableColumn, 'className' | 'width' | 'align'> & {
|
|
@@ -15,13 +14,15 @@ export type TableColumnGroup = Pick<TableColumn, 'className' | 'width' | 'align'
|
|
|
15
14
|
children: TableColumn[];
|
|
16
15
|
};
|
|
17
16
|
export type TableCol = TableColumn | TableColumnGroup;
|
|
17
|
+
type SearchToolProps = {
|
|
18
|
+
searchBar?: Omit<SearchBarProps, 'onChange' | 'onSearch'>;
|
|
19
|
+
};
|
|
18
20
|
/**
|
|
19
21
|
* 说明:为保持各应用 一致性 与 简单性
|
|
20
22
|
* 所有VAP组装 Table 排除一些自定义属性
|
|
21
23
|
*/
|
|
22
24
|
export type TableDefine = Omit<TableProps<PlainObject>, 'size' | 'columns' | 'dataSource' | 'bordered' | 'rowKey' | 'title' | 'loading' | 'onChange' | 'rowSelection' | 'getPopupContainer' | 'sortDirections' | 'showSorterTooltip' | 'internalHooks' | 'transformColumns' | 'internalRefs'>;
|
|
23
|
-
export type BaseTableProps = TableDefine & {
|
|
24
|
-
mode?: BoxMode;
|
|
25
|
+
export type BaseTableProps = TableDefine & Pick<BoxProps, 'mode' | 'selectBar' | 'default'> & SearchToolProps & {
|
|
25
26
|
/**
|
|
26
27
|
* 列
|
|
27
28
|
*/
|
|
@@ -51,21 +52,9 @@ export type BaseTableProps = TableDefine & {
|
|
|
51
52
|
*/
|
|
52
53
|
selectDisabled?: (record: any) => boolean;
|
|
53
54
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
actionBar?:
|
|
57
|
-
/**
|
|
58
|
-
* 表格选择区域
|
|
59
|
-
*/
|
|
60
|
-
selectBar?: SelectBarProps;
|
|
61
|
-
/**
|
|
62
|
-
* 表格搜索区域
|
|
63
|
-
*/
|
|
64
|
-
searchBar?: Omit<SearchBarProps, 'onChange' | 'onSearch'>;
|
|
65
|
-
/**
|
|
66
|
-
* 默认查询参数
|
|
67
|
-
*/
|
|
68
|
-
default?: PlainObject;
|
|
55
|
+
* 表格操作区域
|
|
56
|
+
*/
|
|
57
|
+
actionBar?: Array<TableActionButton[]> | ReactNode;
|
|
69
58
|
/**
|
|
70
59
|
* 是否自动查询,默认为TRUE
|
|
71
60
|
*/
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __read = (this && this.__read) || function (o, n) {
|
|
37
47
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
48
|
if (!m) return o;
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
47
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
48
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
53
|
});
|
|
44
54
|
};
|
|
45
55
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g =
|
|
56
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
58
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
59
|
function step(op) {
|
|
50
60
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g =
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -35,14 +35,12 @@ export declare const useActionTree: () => ActionTreeContext;
|
|
|
35
35
|
* ActionTree 可让一个树具备CRUD的能力
|
|
36
36
|
*/
|
|
37
37
|
export declare const ActionTree: React.ForwardRefExoticComponent<import("../../utils/TreeUtil").BaseTreeOpts & Pick<import("antd/es/tree/Tree").TreeProps, "className" | "disabled" | "defaultExpandAll"> & {
|
|
38
|
-
iconField?: string | ((item: any) =>
|
|
38
|
+
iconField?: string | ((item: any) => ReactNode);
|
|
39
39
|
titleField: string | import("./index").LanguageField;
|
|
40
|
-
titleRender?: (node: PlainObject) =>
|
|
40
|
+
titleRender?: (node: PlainObject) => ReactNode;
|
|
41
41
|
mustSelect?: boolean;
|
|
42
42
|
disabledNode?: (node: PlainObject) => boolean;
|
|
43
|
-
onSelect?: (key: Key, node: PlainObject, parentNode: PlainObject, crumb: PlainObject[], pos: number[]) => void;
|
|
44
|
-
* 获取子节点方法
|
|
45
|
-
*/
|
|
43
|
+
onSelect?: (key: Key, node: PlainObject, parentNode: PlainObject, crumb: PlainObject[], pos: number[]) => void;
|
|
46
44
|
searchValue?: string;
|
|
47
45
|
} & BaseActionTreeProps & CacheTree & React.RefAttributes<ActionTreeRef>>;
|
|
48
46
|
export declare const renderRoot: (props: ActionTreeProps, state: BaseTreeState, context: ActionTreeContext) => ReactNode;
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
47
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
48
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
53
|
});
|
|
44
54
|
};
|
|
45
55
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g =
|
|
56
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
58
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
59
|
function step(op) {
|
|
50
60
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __read = (this && this.__read) || function (o, n) {
|
|
26
36
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27
37
|
if (!m) return o;
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __read = (this && this.__read) || function (o, n) {
|
|
37
47
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
48
|
if (!m) return o;
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
47
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
48
|
};
|
|
@@ -26,13 +26,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
26
26
|
}) : function(o, v) {
|
|
27
27
|
o["default"] = v;
|
|
28
28
|
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
36
46
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
47
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
48
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -43,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
53
|
});
|
|
44
54
|
};
|
|
45
55
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
-
return g =
|
|
56
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
57
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
58
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
59
|
function step(op) {
|
|
50
60
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -34,13 +34,6 @@ export type DTreeProps = BaseTreeProps & BaseActionTreeProps & DTreeData;
|
|
|
34
34
|
*/
|
|
35
35
|
export declare const DTree: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("../../utils/TreeUtil").BaseTreeOpts & Pick<TreeProps, "className" | "disabled" | "defaultExpandAll"> & {
|
|
36
36
|
iconField?: string | ((item: any) => React.ReactNode);
|
|
37
|
-
/**
|
|
38
|
-
* 展开子节点:
|
|
39
|
-
*
|
|
40
|
-
* 方式一:传一个 api 接口地址,必须返回 VData<Array<Object>> 格式
|
|
41
|
-
*
|
|
42
|
-
* 方式二:传一个方法 ,接收一个父节点参数,必须返回 Promise<TreeNodeData[]> (不要返回 children, 仅返回一级)
|
|
43
|
-
*/
|
|
44
37
|
titleField: string | import("./index").LanguageField;
|
|
45
38
|
titleRender?: (node: PlainObject) => React.ReactNode;
|
|
46
39
|
mustSelect?: boolean;
|