@gm-pc/business 1.24.9-beta.9 → 1.25.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-pc/business",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"description": "观麦科技业务组件库",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-pc#readme",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@gm-common/hooks": "^2.10.0",
|
|
30
30
|
"@gm-common/tool": "^2.10.0",
|
|
31
|
-
"@gm-pc/react": "^1.
|
|
32
|
-
"@gm-pc/table-x": "^1.
|
|
31
|
+
"@gm-pc/react": "^1.25.0",
|
|
32
|
+
"@gm-pc/table-x": "^1.25.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "807f3c85b9645ce15d6ee00818c04aea936a5880"
|
|
35
35
|
}
|
|
@@ -24,7 +24,7 @@ async function fetchCityDistrictStreetTree(params: {
|
|
|
24
24
|
const cityItem = {
|
|
25
25
|
value: city.city_id,
|
|
26
26
|
text: city.local_name,
|
|
27
|
-
children: [],
|
|
27
|
+
// children: [], // 不一定有下一级
|
|
28
28
|
original: city,
|
|
29
29
|
}
|
|
30
30
|
cityDistrictTree.push(cityItem)
|
|
@@ -36,13 +36,17 @@ async function fetchCityDistrictStreetTree(params: {
|
|
|
36
36
|
original: district,
|
|
37
37
|
value: district.district_id,
|
|
38
38
|
text: district.local_name,
|
|
39
|
-
children: [],
|
|
39
|
+
// children: [], // 不一定有下一级
|
|
40
40
|
}
|
|
41
41
|
districtMap[district.district_id] = districtItem
|
|
42
42
|
|
|
43
43
|
const p = cityMap[district.city_id]
|
|
44
44
|
if (p) {
|
|
45
|
-
p.children
|
|
45
|
+
if (Array.isArray(p.children)) {
|
|
46
|
+
p.children.push(districtItem)
|
|
47
|
+
} else {
|
|
48
|
+
p.children = [districtItem]
|
|
49
|
+
}
|
|
46
50
|
}
|
|
47
51
|
})
|
|
48
52
|
|
|
@@ -63,7 +67,11 @@ async function fetchCityDistrictStreetTree(params: {
|
|
|
63
67
|
|
|
64
68
|
const p = districtMap[street.district_id]
|
|
65
69
|
if (p) {
|
|
66
|
-
p.children
|
|
70
|
+
if (Array.isArray(p.children)) {
|
|
71
|
+
p.children.push(streetItem)
|
|
72
|
+
} else {
|
|
73
|
+
p.children = [streetItem]
|
|
74
|
+
}
|
|
67
75
|
}
|
|
68
76
|
})
|
|
69
77
|
|