@fle-ui/plus-address-selection 1.0.13 → 1.0.14
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/es/index.d.ts +1 -1
- package/es/index.js +7 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +7 -2
- package/package.json +2 -2
package/es/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface addressItem {
|
|
|
20
20
|
tree?: string;
|
|
21
21
|
level?: string;
|
|
22
22
|
isLeaf?: boolean;
|
|
23
|
-
hasChildren?: boolean;
|
|
23
|
+
hasChildren?: boolean | 0 | 1;
|
|
24
24
|
children?: addressItem[];
|
|
25
25
|
}
|
|
26
26
|
export interface SiteSelectProps extends Omit<CascaderProps<any>, 'options' | 'value'> {
|
package/es/index.js
CHANGED
|
@@ -74,9 +74,10 @@ var AddressSelection = function AddressSelection(props) {
|
|
|
74
74
|
case 2:
|
|
75
75
|
data = _context.sent;
|
|
76
76
|
provinceList = formatArea(data, level === 1);
|
|
77
|
+
console.log(apiUrl, provinceList);
|
|
77
78
|
setAddressList(provinceList);
|
|
78
79
|
setStateValue(val);
|
|
79
|
-
case
|
|
80
|
+
case 7:
|
|
80
81
|
case "end":
|
|
81
82
|
return _context.stop();
|
|
82
83
|
}
|
|
@@ -112,12 +113,16 @@ var AddressSelection = function AddressSelection(props) {
|
|
|
112
113
|
};
|
|
113
114
|
var formatArea = function formatArea(list, isLeaf) {
|
|
114
115
|
return list === null || list === void 0 ? void 0 : list.map(function (item) {
|
|
116
|
+
var _isLeaf = isLeaf;
|
|
117
|
+
if (item.hasChildren === 0) {
|
|
118
|
+
_isLeaf = true;
|
|
119
|
+
}
|
|
115
120
|
return {
|
|
116
121
|
value: item.code,
|
|
117
122
|
label: item.name,
|
|
118
123
|
tree: item.tree,
|
|
119
124
|
level: item.level,
|
|
120
|
-
isLeaf:
|
|
125
|
+
isLeaf: _isLeaf
|
|
121
126
|
};
|
|
122
127
|
});
|
|
123
128
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface addressItem {
|
|
|
20
20
|
tree?: string;
|
|
21
21
|
level?: string;
|
|
22
22
|
isLeaf?: boolean;
|
|
23
|
-
hasChildren?: boolean;
|
|
23
|
+
hasChildren?: boolean | 0 | 1;
|
|
24
24
|
children?: addressItem[];
|
|
25
25
|
}
|
|
26
26
|
export interface SiteSelectProps extends Omit<CascaderProps<any>, 'options' | 'value'> {
|
package/lib/index.js
CHANGED
|
@@ -82,9 +82,10 @@ var AddressSelection = function AddressSelection(props) {
|
|
|
82
82
|
case 2:
|
|
83
83
|
data = _context.sent;
|
|
84
84
|
provinceList = formatArea(data, level === 1);
|
|
85
|
+
console.log(apiUrl, provinceList);
|
|
85
86
|
setAddressList(provinceList);
|
|
86
87
|
setStateValue(val);
|
|
87
|
-
case
|
|
88
|
+
case 7:
|
|
88
89
|
case "end":
|
|
89
90
|
return _context.stop();
|
|
90
91
|
}
|
|
@@ -120,12 +121,16 @@ var AddressSelection = function AddressSelection(props) {
|
|
|
120
121
|
};
|
|
121
122
|
var formatArea = function formatArea(list, isLeaf) {
|
|
122
123
|
return list === null || list === void 0 ? void 0 : list.map(function (item) {
|
|
124
|
+
var _isLeaf = isLeaf;
|
|
125
|
+
if (item.hasChildren === 0) {
|
|
126
|
+
_isLeaf = true;
|
|
127
|
+
}
|
|
123
128
|
return {
|
|
124
129
|
value: item.code,
|
|
125
130
|
label: item.name,
|
|
126
131
|
tree: item.tree,
|
|
127
132
|
level: item.level,
|
|
128
|
-
isLeaf:
|
|
133
|
+
isLeaf: _isLeaf
|
|
129
134
|
};
|
|
130
135
|
});
|
|
131
136
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-address-selection",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "@fle-ui/plus-address-selection",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/js-cookie": "^3.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "2c212687f40c44697c835063ca68fc46ebde730a"
|
|
45
45
|
}
|