zy-react-library 1.0.93 → 1.0.95
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.
|
@@ -4,7 +4,7 @@ import type { BasicCascaderProps } from "../Basic";
|
|
|
4
4
|
/**
|
|
5
5
|
* 组件属性
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface DictionaryCascaderProps extends Omit<BasicCascaderProps, "options" | "nameKey" | "idKey" | "childrenKey"> {
|
|
8
8
|
/** appKey,默认 DICTIONARY_APP_KEY_ENUM.DEFAULT(0bb989ecada5470c87635018ece9f327) */
|
|
9
9
|
appKey?: string;
|
|
10
10
|
/** 要获取的字典 */
|
|
@@ -18,6 +18,6 @@ export interface DictionarySelectTreeProps extends Omit<BasicCascaderProps, "opt
|
|
|
18
18
|
/**
|
|
19
19
|
* 数据字典级联组件
|
|
20
20
|
*/
|
|
21
|
-
declare const
|
|
21
|
+
declare const DictionaryCascader: FC<DictionaryCascaderProps>;
|
|
22
22
|
|
|
23
|
-
export default
|
|
23
|
+
export default DictionaryCascader;
|
|
@@ -6,7 +6,7 @@ import BasicCascader from "../Basic";
|
|
|
6
6
|
/**
|
|
7
7
|
* 数据字典级联组件
|
|
8
8
|
*/
|
|
9
|
-
function
|
|
9
|
+
function DictionaryCascader(props) {
|
|
10
10
|
const {
|
|
11
11
|
appKey = DICTIONARY_APP_KEY_ENUM.DEFAULT,
|
|
12
12
|
dictValue = "",
|
|
@@ -35,6 +35,6 @@ function DictionarySelectTree(props) {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
DictionaryCascader.displayName = "DictionaryCascader";
|
|
39
39
|
|
|
40
|
-
export default
|
|
40
|
+
export default DictionaryCascader;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { TreeSelect } from "antd";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
+
import { getTreeNodePaths, processTreeDataByLevel, processTreeDataForOnlyLastLevel } from "../../../utils";
|
|
3
4
|
|
|
4
|
-
const getTreeNodePaths = () => {
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
const processTreeDataByLevel = () => {
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
const processTreeDataForOnlyLastLevel = ({ data }) => {
|
|
11
|
-
return data;
|
|
12
|
-
};
|
|
13
5
|
/**
|
|
14
6
|
* 基础下拉树组件(不建议直接使用此组件,二次继承使用)
|
|
15
7
|
*/
|