xianniu-ui 0.8.49 → 0.8.50
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/lib/xianniu-ui.common.js +33 -36
- package/lib/xianniu-ui.umd.js +33 -36
- package/lib/xianniu-ui.umd.min.js +2 -2
- package/package.json +1 -1
- package/packages/city/main.vue +7 -6
package/package.json
CHANGED
package/packages/city/main.vue
CHANGED
|
@@ -120,7 +120,7 @@ export default {
|
|
|
120
120
|
const res = this.findParent(_value, this.flattenResult).map(
|
|
121
121
|
(item) => item.cityCode
|
|
122
122
|
);
|
|
123
|
-
console.log(
|
|
123
|
+
console.log("123", res);
|
|
124
124
|
return res;
|
|
125
125
|
}
|
|
126
126
|
},
|
|
@@ -212,14 +212,15 @@ export default {
|
|
|
212
212
|
return data.map((item) => {
|
|
213
213
|
item.level = level;
|
|
214
214
|
const child = item.subCitys;
|
|
215
|
-
|
|
215
|
+
|
|
216
|
+
// 根据dataLevel判断是否删除subCitys
|
|
217
|
+
if (level >= this.dataLevel) {
|
|
216
218
|
delete item.subCitys;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
+
} else if (child && child.length) {
|
|
220
|
+
// 递归调用子节点
|
|
219
221
|
recursive(child, level);
|
|
220
|
-
} else {
|
|
221
|
-
delete item.subCitys;
|
|
222
222
|
}
|
|
223
|
+
|
|
223
224
|
return item;
|
|
224
225
|
});
|
|
225
226
|
};
|