@zat-design/sisyphus-react 3.11.14-beta.10 → 3.11.14-beta.11
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/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +3 -3
- package/coverage/lcov-report/src/.umi/core/index.html +68 -8
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +3 -3
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +6 -6
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +2 -2
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
- package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/lcov-report/src/.umi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/{src/.umi/core/pluginRegister.ts.html → lcov-report/src/.umi/plugin-antd/runtime.tsx.html} +46 -34
- package/coverage/{src/.umi/core/polyfill.ts.html → lcov-report/src/.umi/plugin-helmet/exports.ts.html} +7 -10
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/{src/.umi/core/plugin.ts.html → lcov-report/src/.umi/plugin-initial-state/exports.ts.html} +10 -13
- package/coverage/{src/.umi/core → lcov-report/src/.umi/plugin-initial-state}/index.html +30 -30
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/{src/.umi/core/history.ts.html → lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html} +32 -38
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
- package/es/ProConfigProvider/index.d.ts +4 -4
- package/es/ProDrawerForm/propsType.d.ts +1 -1
- package/es/ProEditLabel/propsType.d.ts +2 -2
- package/es/ProEditTable/propsType.d.ts +2 -2
- package/es/ProEnum/propsType.d.ts +2 -2
- package/es/ProForm/components/FormFooter/index.d.ts +1 -1
- package/es/ProForm/components/base/Checkbox/index.d.ts +1 -1
- package/es/ProForm/components/base/Input/propsType.d.ts +3 -3
- package/es/ProForm/components/base/InputNumber/index.d.ts +1 -1
- package/es/ProForm/components/base/Radio/index.d.ts +1 -1
- package/es/ProForm/components/base/RangePicker/index.d.ts +1 -1
- package/es/ProForm/components/base/Select/index.d.ts +1 -1
- package/es/ProForm/components/base/Switch/index.d.ts +1 -1
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -1
- package/es/ProForm/components/base/TextArea/index.d.ts +1 -1
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -1
- package/es/ProForm/components/combination/Container/propsType.d.ts +3 -3
- package/es/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -2
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/propsType.d.ts +2 -2
- package/es/ProForm/components/combination/Group/index.d.ts +1 -1
- package/es/ProForm/components/combination/Group/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.d.ts +3 -3
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCombination/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +3 -3
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/es/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/es/ProForm/components/render/ChangedWrapper.d.ts +1 -1
- package/es/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
- package/es/ProForm/components/render/RenderFields.d.ts +3 -3
- package/es/ProForm/components/render/propsType.d.ts +34 -35
- package/es/ProForm/index.d.ts +1 -1
- package/es/ProForm/propsType.d.ts +2 -2
- package/es/ProForm/utils/transformValue.d.ts +1 -1
- package/es/ProForm/utils/useFieldProps.d.ts +1 -1
- package/es/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProTable/components/FormatColumn/index.js +1 -2
- package/es/ProTree/components/List.d.ts +2 -2
- package/es/ProTree/components/List.js +2 -2
- package/es/ProTree/components/ProTree.d.ts +2 -2
- package/es/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +378 -33
- package/es/ProTree/components/SearchTitle.d.ts +1 -1
- package/es/ProTree/components/Tree.d.ts +3 -3
- package/es/ProTree/index.d.ts +2 -2
- package/es/ProTree/index.js +1 -1
- package/es/ProTree/propsType.d.ts +55 -42
- package/es/ProTree/utils.d.ts +7 -7
- package/es/ProTreeModal/components/Cascader.d.ts +3 -3
- package/es/ProTreeModal/components/List.d.ts +3 -3
- package/es/ProTreeModal/components/Tree.d.ts +2 -2
- package/es/ProTreeModal/index.d.ts +2 -2
- package/es/ProTreeModal/index.js +2 -2
- package/es/ProTreeModal/propsType.d.ts +259 -48
- package/es/ProTreeModal/utils.d.ts +7 -7
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/lib/ProConfigProvider/index.d.ts +4 -4
- package/lib/ProDrawerForm/propsType.d.ts +1 -1
- package/lib/ProEditLabel/propsType.d.ts +2 -2
- package/lib/ProEditTable/propsType.d.ts +2 -2
- package/lib/ProEnum/propsType.d.ts +2 -2
- package/lib/ProForm/components/FormFooter/index.d.ts +1 -1
- package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -1
- package/lib/ProForm/components/base/Input/propsType.d.ts +3 -3
- package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -1
- package/lib/ProForm/components/base/Radio/index.d.ts +1 -1
- package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -1
- package/lib/ProForm/components/base/Select/index.d.ts +1 -1
- package/lib/ProForm/components/base/Switch/index.d.ts +1 -1
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -1
- package/lib/ProForm/components/base/TextArea/index.d.ts +1 -1
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -1
- package/lib/ProForm/components/combination/Container/propsType.d.ts +3 -3
- package/lib/ProForm/components/combination/FormList/components/ActionButton.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -2
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +2 -2
- package/lib/ProForm/components/combination/Group/index.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.d.ts +3 -3
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +3 -3
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +1 -1
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +2 -2
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +1 -1
- package/lib/ProForm/components/render/ConfirmWrapper.d.ts +2 -2
- package/lib/ProForm/components/render/RenderFields.d.ts +3 -3
- package/lib/ProForm/components/render/propsType.d.ts +34 -35
- package/lib/ProForm/index.d.ts +1 -1
- package/lib/ProForm/propsType.d.ts +2 -2
- package/lib/ProForm/utils/transformValue.d.ts +1 -1
- package/lib/ProForm/utils/useFieldProps.d.ts +1 -1
- package/lib/ProForm/utils/useShouldUpdate.d.ts +3 -3
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProTable/components/FormatColumn/index.js +1 -2
- package/lib/ProTree/components/List.d.ts +2 -2
- package/lib/ProTree/components/List.js +2 -2
- package/lib/ProTree/components/ProTree.d.ts +2 -2
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +3 -3
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +378 -33
- package/lib/ProTree/components/SearchTitle.d.ts +1 -1
- package/lib/ProTree/components/Tree.d.ts +3 -3
- package/lib/ProTree/index.d.ts +2 -2
- package/lib/ProTree/index.js +1 -1
- package/lib/ProTree/propsType.d.ts +55 -42
- package/lib/ProTree/utils.d.ts +7 -7
- package/lib/ProTreeModal/components/Cascader.d.ts +3 -3
- package/lib/ProTreeModal/components/List.d.ts +3 -3
- package/lib/ProTreeModal/components/Tree.d.ts +2 -2
- package/lib/ProTreeModal/index.d.ts +2 -2
- package/lib/ProTreeModal/index.js +2 -2
- package/lib/ProTreeModal/propsType.d.ts +259 -48
- package/lib/ProTreeModal/utils.d.ts +7 -7
- package/lib/index.d.ts +4 -0
- package/lib/index.js +48 -0
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
import { Service, Options, Result } from 'ahooks/lib/useRequest/src/types';
|
3
3
|
import type { TreeSelectProps } from 'antd';
|
4
|
-
import { ProFormOtherType } from '../ProForm/propsType';
|
4
|
+
import type { ProFormOtherType } from '../ProForm/propsType';
|
5
5
|
/**
|
6
6
|
* 树数据结构
|
7
7
|
* @description 定义树节点的数据结构
|
8
8
|
*/
|
9
|
-
export interface
|
9
|
+
export interface ProTreeDataType {
|
10
10
|
/**
|
11
11
|
* 节点标签
|
12
12
|
* @description 显示的节点文本
|
@@ -24,7 +24,7 @@ export interface TreeDataProps {
|
|
24
24
|
* @description 当前节点的子节点数组
|
25
25
|
* @default undefined
|
26
26
|
*/
|
27
|
-
children?:
|
27
|
+
children?: ProTreeDataType[];
|
28
28
|
/**
|
29
29
|
* 自定义属性
|
30
30
|
* @description 可添加任意其他属性
|
@@ -32,13 +32,13 @@ export interface TreeDataProps {
|
|
32
32
|
*/
|
33
33
|
[key: string]: any;
|
34
34
|
}
|
35
|
-
type
|
36
|
-
type
|
35
|
+
type ProTreeValueType = string | number;
|
36
|
+
type ProTreeKeyType = string | number;
|
37
37
|
/**
|
38
38
|
* 字段名称映射
|
39
39
|
* @description 定义树节点字段的映射关系
|
40
40
|
*/
|
41
|
-
export interface
|
41
|
+
export interface ProTreeFieldNamesType {
|
42
42
|
/**
|
43
43
|
* 标签字段名
|
44
44
|
* @description 指定节点标签的属性名
|
@@ -62,7 +62,7 @@ export interface FieldNamesType {
|
|
62
62
|
* ProTree组件属性
|
63
63
|
* @description ProTree组件的主要配置属性
|
64
64
|
*/
|
65
|
-
export interface
|
65
|
+
export interface ProTreeType extends ProTreeSelectType {
|
66
66
|
/**
|
67
67
|
* 树标题
|
68
68
|
* @description 树组件的标题
|
@@ -74,7 +74,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
74
74
|
* @description 当前选中的节点值
|
75
75
|
* @default undefined
|
76
76
|
*/
|
77
|
-
value?:
|
77
|
+
value?: ProTreeValueType | string[];
|
78
78
|
/**
|
79
79
|
* 选中值
|
80
80
|
* @description 选中的树节点value
|
@@ -92,7 +92,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
92
92
|
* @description 自定义节点的字段名称映射
|
93
93
|
* @default { label: 'label', value: 'value', children: 'children' }
|
94
94
|
*/
|
95
|
-
fieldNames?:
|
95
|
+
fieldNames?: ProTreeFieldNamesType;
|
96
96
|
/**
|
97
97
|
* 是否展开下拉菜单
|
98
98
|
* @description 控制下拉菜单是否展开
|
@@ -140,7 +140,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
140
140
|
* @description 静态数据源
|
141
141
|
* @default []
|
142
142
|
*/
|
143
|
-
dataSource?:
|
143
|
+
dataSource?: ProTreeDataType[];
|
144
144
|
/**
|
145
145
|
* 是否禁用
|
146
146
|
* @description 禁用整个组件
|
@@ -200,19 +200,19 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
200
200
|
* @description value 改变的回调
|
201
201
|
* @default undefined
|
202
202
|
*/
|
203
|
-
onChange?: (values: string[] |
|
203
|
+
onChange?: (values: string[] | ProTreeValueType, options?: object[]) => void;
|
204
204
|
/**
|
205
205
|
* 选择回调
|
206
206
|
* @description 点击树节点触发
|
207
207
|
* @default undefined
|
208
208
|
*/
|
209
|
-
onSelect?: (values: string[] |
|
209
|
+
onSelect?: (values: string[] | ProTreeValueType, info?: any) => any;
|
210
210
|
/**
|
211
211
|
* 勾选回调
|
212
212
|
* @description 复选情况下点击checkbox触发,参照antd
|
213
213
|
* @default undefined
|
214
214
|
*/
|
215
|
-
onCheck?: (values: string[] |
|
215
|
+
onCheck?: (values: string[] | ProTreeValueType, info?: any) => any;
|
216
216
|
/**
|
217
217
|
* 展开回调
|
218
218
|
* @description 展开/收起节点时触发
|
@@ -220,7 +220,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
220
220
|
*/
|
221
221
|
onExpand?: (newExpandedKeys: React.Key[], nextPara: {
|
222
222
|
expanded: boolean;
|
223
|
-
node:
|
223
|
+
node: ProTreeDataOptionType;
|
224
224
|
nativeEvent: PointerEvent;
|
225
225
|
}) => void;
|
226
226
|
/**
|
@@ -234,7 +234,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
234
234
|
* @description 对后台返回数据进行格式化
|
235
235
|
* @default undefined
|
236
236
|
*/
|
237
|
-
transformResponse?: (data: any) =>
|
237
|
+
transformResponse?: (data: any) => ProTreeDataType[];
|
238
238
|
/**
|
239
239
|
* 标签集合
|
240
240
|
* @description 标签集合
|
@@ -261,7 +261,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
261
261
|
* @description 自定义配置操作按钮函数,返回react node节点
|
262
262
|
* @default undefined
|
263
263
|
*/
|
264
|
-
menu?: (key:
|
264
|
+
menu?: (key: ProTreeKeyType, item?: any) => ReactNode[];
|
265
265
|
/**
|
266
266
|
* 是否加载中
|
267
267
|
* @description 点击树节点是否开启loading遮罩
|
@@ -321,40 +321,40 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
321
321
|
* @description 默认展开指定的树节点
|
322
322
|
* @default []
|
323
323
|
*/
|
324
|
-
defaultExpandedKeys?:
|
324
|
+
defaultExpandedKeys?: ProTreeKeyType[];
|
325
325
|
/**
|
326
326
|
* 展开的节点
|
327
327
|
* @description (受控)展开指定的树节点
|
328
328
|
* @default undefined
|
329
329
|
*/
|
330
|
-
expandedKeys?:
|
330
|
+
expandedKeys?: ProTreeKeyType[];
|
331
331
|
/**
|
332
332
|
* 选中的节点
|
333
333
|
* @description (受控)选中复选框的树节点
|
334
334
|
* @default undefined
|
335
335
|
*/
|
336
|
-
checkedKeys?:
|
337
|
-
checked:
|
338
|
-
halfChecked:
|
336
|
+
checkedKeys?: ProTreeKeyType[] | {
|
337
|
+
checked: ProTreeKeyType[];
|
338
|
+
halfChecked: ProTreeKeyType[];
|
339
339
|
};
|
340
340
|
/**
|
341
341
|
* 默认选中的节点
|
342
342
|
* @description 默认选中复选框的树节点
|
343
343
|
* @default []
|
344
344
|
*/
|
345
|
-
defaultCheckedKeys?:
|
345
|
+
defaultCheckedKeys?: ProTreeKeyType[];
|
346
346
|
/**
|
347
347
|
* 选中的节点
|
348
348
|
* @description (受控)设置选中的树节点
|
349
349
|
* @default undefined
|
350
350
|
*/
|
351
|
-
selectedKeys?:
|
351
|
+
selectedKeys?: ProTreeKeyType[];
|
352
352
|
/**
|
353
353
|
* 默认选中的节点
|
354
354
|
* @description 默认选中的树节点
|
355
355
|
* @default []
|
356
356
|
*/
|
357
|
-
defaultSelectedKeys?:
|
357
|
+
defaultSelectedKeys?: ProTreeKeyType[];
|
358
358
|
/**
|
359
359
|
* 可选中
|
360
360
|
* @description 是否可以选中
|
@@ -366,7 +366,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
366
366
|
* @description 已经加载的节点,配合 loadData 使用
|
367
367
|
* @default []
|
368
368
|
*/
|
369
|
-
loadedKeys?:
|
369
|
+
loadedKeys?: ProTreeKeyType[];
|
370
370
|
/**
|
371
371
|
* 自定义样式
|
372
372
|
* @description 自定义内联样式
|
@@ -408,7 +408,7 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
408
408
|
* 数据属性
|
409
409
|
* @description 定义节点的基本数据属性
|
410
410
|
*/
|
411
|
-
export interface
|
411
|
+
export interface ProTreeDataPropsType {
|
412
412
|
/**
|
413
413
|
* 节点标签
|
414
414
|
* @description 显示的节点文本
|
@@ -456,7 +456,7 @@ export interface DataProps {
|
|
456
456
|
* 数据选项
|
457
457
|
* @description 扩展的数据选项接口
|
458
458
|
*/
|
459
|
-
export interface
|
459
|
+
export interface ProTreeDataOptionType {
|
460
460
|
/**
|
461
461
|
* 节点标签
|
462
462
|
* @description 显示的节点文本
|
@@ -498,7 +498,7 @@ export interface DataOption {
|
|
498
498
|
* @description 当前节点的子节点数组
|
499
499
|
* @default undefined
|
500
500
|
*/
|
501
|
-
children?:
|
501
|
+
children?: ProTreeDataPropsType[];
|
502
502
|
/**
|
503
503
|
* 标题
|
504
504
|
* @description 节点标题
|
@@ -516,7 +516,7 @@ export interface DataOption {
|
|
516
516
|
* 基础选项类型
|
517
517
|
* @description 基础选项类型定义
|
518
518
|
*/
|
519
|
-
export interface
|
519
|
+
export interface ProTreeBaseOptionType {
|
520
520
|
/**
|
521
521
|
* 是否禁用
|
522
522
|
* @description 是否禁用节点
|
@@ -540,7 +540,7 @@ export interface BaseOptionType {
|
|
540
540
|
* @description 当前节点的子节点数组
|
541
541
|
* @default undefined
|
542
542
|
*/
|
543
|
-
children?:
|
543
|
+
children?: ProTreeBaseOptionType[];
|
544
544
|
/**
|
545
545
|
* 自定义属性
|
546
546
|
* @description 可添加任意其他属性
|
@@ -552,7 +552,7 @@ export interface BaseOptionType {
|
|
552
552
|
* 默认选项类型
|
553
553
|
* @description 扩展基础选项类型的默认选项类型
|
554
554
|
*/
|
555
|
-
export interface
|
555
|
+
export interface ProTreeDefaultOptionType extends ProTreeBaseOptionType {
|
556
556
|
/**
|
557
557
|
* 节点值
|
558
558
|
* @description 节点的值
|
@@ -576,19 +576,19 @@ export interface DefaultOptionType extends BaseOptionType {
|
|
576
576
|
* @description 节点的键值
|
577
577
|
* @default undefined
|
578
578
|
*/
|
579
|
-
key?:
|
579
|
+
key?: ProTreeKeyType;
|
580
580
|
/**
|
581
581
|
* 子节点
|
582
582
|
* @description 子节点数组
|
583
583
|
* @default undefined
|
584
584
|
*/
|
585
|
-
children?:
|
585
|
+
children?: ProTreeDefaultOptionType[];
|
586
586
|
}
|
587
587
|
/**
|
588
588
|
* 树选择属性
|
589
589
|
* @description 树选择组件的配置属性
|
590
590
|
*/
|
591
|
-
export interface
|
591
|
+
export interface ProTreeSelectType extends Omit<TreeSelectProps, 'onSearch'> {
|
592
592
|
/**
|
593
593
|
* 是否查看模式
|
594
594
|
* @description 是否为查看模式
|
@@ -636,7 +636,7 @@ export interface PropTreeSelectProps extends Omit<TreeSelectProps, 'onSearch'> {
|
|
636
636
|
* @description 选择项数据源
|
637
637
|
* @default []
|
638
638
|
*/
|
639
|
-
dataSource?:
|
639
|
+
dataSource?: ProTreeDataOptionType[];
|
640
640
|
/**
|
641
641
|
* 默认禁用值
|
642
642
|
* @description 兼容2.0版本、3.0使用view模式,查看模式值
|
@@ -648,7 +648,7 @@ export interface PropTreeSelectProps extends Omit<TreeSelectProps, 'onSearch'> {
|
|
648
648
|
* @description 格式化接口响应数据
|
649
649
|
* @default undefined
|
650
650
|
*/
|
651
|
-
transformResponse?: (data: any) =>
|
651
|
+
transformResponse?: (data: any) => ProTreeDataOptionType[];
|
652
652
|
/**
|
653
653
|
* 是否显示提示
|
654
654
|
* @description 是否展示tooltip,当label特别长的时候使用
|
@@ -693,7 +693,7 @@ export interface PropTreeSelectProps extends Omit<TreeSelectProps, 'onSearch'> {
|
|
693
693
|
* ProSelect操作
|
694
694
|
* @description ProSelect组件的操作接口
|
695
695
|
*/
|
696
|
-
export interface
|
696
|
+
export interface ProTreeSelectActionType {
|
697
697
|
/**
|
698
698
|
* useRequest引用
|
699
699
|
* @description 获取发生请求的useRequest的ref
|
@@ -705,7 +705,7 @@ export interface ProSelectAction {
|
|
705
705
|
* 树节点数据
|
706
706
|
* @description 树节点的数据结构
|
707
707
|
*/
|
708
|
-
export interface
|
708
|
+
export interface ProTreeNodeDataType extends ProTreeDataOptionType {
|
709
709
|
/**
|
710
710
|
* 标题
|
711
711
|
* @description 节点的标题
|
@@ -723,7 +723,7 @@ export interface TreeNodeData extends DataOption {
|
|
723
723
|
* @description 子节点数组
|
724
724
|
* @default undefined
|
725
725
|
*/
|
726
|
-
children?:
|
726
|
+
children?: ProTreeNodeDataType[];
|
727
727
|
/**
|
728
728
|
* 图标
|
729
729
|
* @description 节点的图标
|
@@ -741,7 +741,7 @@ export interface TreeNodeData extends DataOption {
|
|
741
741
|
* 树选择表单属性
|
742
742
|
* @description 树选择表单的配置属性
|
743
743
|
*/
|
744
|
-
export interface
|
744
|
+
export interface ProTreeSelectFormType {
|
745
745
|
/**
|
746
746
|
* 类型
|
747
747
|
* @description 表单项类型
|
@@ -765,7 +765,7 @@ export interface TreeSelectFormProps {
|
|
765
765
|
* @description 树选择组件的属性配置
|
766
766
|
* @default undefined
|
767
767
|
*/
|
768
|
-
fieldProps?:
|
768
|
+
fieldProps?: ProTreeSelectType;
|
769
769
|
/**
|
770
770
|
* 自定义属性
|
771
771
|
* @description 其他自定义属性
|
@@ -777,7 +777,7 @@ export interface TreeSelectFormProps {
|
|
777
777
|
* 响应数据
|
778
778
|
* @description API响应数据结构
|
779
779
|
*/
|
780
|
-
export interface
|
780
|
+
export interface ProTreeResponseDataType {
|
781
781
|
/**
|
782
782
|
* 状态码
|
783
783
|
* @description 接口返回的状态码
|
@@ -809,4 +809,17 @@ export interface ResponseData {
|
|
809
809
|
*/
|
810
810
|
code?: number;
|
811
811
|
}
|
812
|
+
export type AllValueType = ProTreeValueType;
|
813
|
+
export type Key = ProTreeKeyType;
|
814
|
+
export type TreeDataProps = ProTreeDataType;
|
815
|
+
export type ProTreeProps = ProTreeType;
|
816
|
+
export type DataProps = ProTreeDataPropsType;
|
817
|
+
export type DataOption = ProTreeDataOptionType;
|
818
|
+
export type BaseOptionType = ProTreeBaseOptionType;
|
819
|
+
export type DefaultOptionType = ProTreeDefaultOptionType;
|
820
|
+
export type PropTreeSelectProps = ProTreeSelectType;
|
821
|
+
export type ProSelectAction = ProTreeSelectActionType;
|
822
|
+
export type TreeNodeData = ProTreeNodeDataType;
|
823
|
+
export type TreeSelectFormProps = ProTreeSelectFormType;
|
824
|
+
export type ResponseData = ProTreeResponseDataType;
|
812
825
|
export {};
|
package/es/ProTree/utils.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import {
|
1
|
+
import type { ProTreeFieldNamesType, ProTreeDataType } from './propsType';
|
2
2
|
/**
|
3
3
|
* 树转成铺平的数组
|
4
4
|
* @param originalTreeData
|
5
5
|
* @returns
|
6
6
|
*/
|
7
|
-
export declare function getFlatTreeData(originalTreeData:
|
7
|
+
export declare function getFlatTreeData(originalTreeData: ProTreeDataType[], fieldNames: ProTreeFieldNamesType): any[];
|
8
8
|
/**
|
9
9
|
* 获取 tree 所有的 keys 集合
|
10
10
|
* @param data
|
11
11
|
* @param fieldNames
|
12
12
|
* @returns
|
13
13
|
*/
|
14
|
-
export declare function getAllKeys(data:
|
14
|
+
export declare function getAllKeys(data: ProTreeDataType[], fieldNames: ProTreeFieldNamesType): string[];
|
15
15
|
/**
|
16
16
|
* 获取展开的key
|
17
17
|
* @param key
|
@@ -19,22 +19,22 @@ export declare function getAllKeys(data: TreeDataProps[], fieldNames: FieldNames
|
|
19
19
|
* @param fieldNames
|
20
20
|
* @returns
|
21
21
|
*/
|
22
|
-
export declare const getParentKey: (key: string, tree:
|
23
|
-
export declare function findTreeNodeByKey(treeData:
|
22
|
+
export declare const getParentKey: (key: string, tree: ProTreeDataType[], fieldNames: ProTreeFieldNamesType) => string;
|
23
|
+
export declare function findTreeNodeByKey(treeData: ProTreeDataType[], key: string, fieldNames: ProTreeFieldNamesType): ProTreeDataType[];
|
24
24
|
/**
|
25
25
|
* 过滤掉每一层假值(例如 false、null、0、""、undefined 等)
|
26
26
|
* @param data
|
27
27
|
* @param checkedKeys
|
28
28
|
* @returns
|
29
29
|
*/
|
30
|
-
export declare function filterCheckedNodes(data: any, checkedKeys: any, searchStr: string, fieldNames:
|
30
|
+
export declare function filterCheckedNodes(data: any, checkedKeys: any, searchStr: string, fieldNames: ProTreeFieldNamesType): any[];
|
31
31
|
/**
|
32
32
|
* 获取 tree 当前选中节点下的所有子节点的 keys
|
33
33
|
* @param node
|
34
34
|
* @param childrenKeys
|
35
35
|
* @returns
|
36
36
|
*/
|
37
|
-
export declare function getChildrenKeys(node:
|
37
|
+
export declare function getChildrenKeys(node: ProTreeDataType, childrenKeys: string[], fieldNames: ProTreeFieldNamesType, type: 'treeClose' | 'treeCheck'): void;
|
38
38
|
/**
|
39
39
|
* 如果默认全开展那么返回所有key,否则返回空[]
|
40
40
|
* @param isExpand 是否全展开
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
|
-
import {
|
2
|
+
import type { ProTreeModalFieldNamesType, ProTreeModalDataType } from '../propsType';
|
3
3
|
interface CascaderProps {
|
4
|
-
dataSource:
|
4
|
+
dataSource: ProTreeModalDataType[];
|
5
5
|
checkedValues?: any[];
|
6
6
|
showCodeName?: boolean;
|
7
|
-
fieldNames:
|
7
|
+
fieldNames: ProTreeModalFieldNamesType;
|
8
8
|
searchStr?: string;
|
9
9
|
disabled?: boolean;
|
10
10
|
handleOnChange?: (e: any, value: string) => void;
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
|
-
import {
|
2
|
+
import type { ProTreeModalFieldNamesType, ProTreeModalDataType } from '../propsType';
|
3
3
|
interface ListProps {
|
4
4
|
disabled?: boolean;
|
5
5
|
checkedValues?: any[];
|
6
6
|
treeData: any[];
|
7
7
|
searchStr?: string;
|
8
8
|
showCodeName?: boolean;
|
9
|
-
fieldNames:
|
9
|
+
fieldNames: ProTreeModalFieldNamesType;
|
10
10
|
mode?: 'render' | 'view';
|
11
11
|
modeType?: string;
|
12
12
|
span?: number;
|
13
13
|
draggable?: boolean;
|
14
|
-
flatTreeData?:
|
14
|
+
flatTreeData?: ProTreeModalDataType[];
|
15
15
|
handleOnChange?: (e: any, value: string) => void;
|
16
16
|
handleFilterClose?: (code: string) => void;
|
17
17
|
optionRender?: (item: any, searchStr?: string) => string | ReactNode;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { ReactNode } from 'react';
|
2
|
-
import {
|
2
|
+
import type { ProTreeModalFieldNamesType } from '../propsType';
|
3
3
|
interface TreeViewProps {
|
4
4
|
disabled?: boolean;
|
5
5
|
checkedValues?: any[];
|
@@ -9,7 +9,7 @@ interface TreeViewProps {
|
|
9
9
|
searchStr?: string;
|
10
10
|
showCodeName?: boolean;
|
11
11
|
checkStrictly?: boolean;
|
12
|
-
fieldNames:
|
12
|
+
fieldNames: ProTreeModalFieldNamesType;
|
13
13
|
tags?: string[];
|
14
14
|
mode?: 'render' | 'view';
|
15
15
|
draggable?: boolean;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import type { ProTreeModalType } from './propsType';
|
2
2
|
import './style/index.less';
|
3
3
|
export declare const CASCADER = "CASCADER";
|
4
|
-
declare const ProTreeModal: (props:
|
4
|
+
declare const ProTreeModal: (props: ProTreeModalType) => import("react/jsx-runtime").JSX.Element;
|
5
5
|
export default ProTreeModal;
|
package/es/ProTreeModal/index.js
CHANGED
@@ -14,8 +14,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
14
14
|
/*
|
15
15
|
* @Author: ''
|
16
16
|
* @Date: 2024-06-04 10:01:18
|
17
|
-
* @LastEditors:
|
18
|
-
* @LastEditTime:
|
17
|
+
* @LastEditors: za-xuwenli xuwenli@zhongan.io
|
18
|
+
* @LastEditTime: 2025-03-20 11:12:23
|
19
19
|
* @FilePath: /za-material-warehouse/src/ProTreeModal/index.tsx
|
20
20
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
21
21
|
*/
|