xianniu-ui 0.8.46 → 0.8.47
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 +30 -30
- package/lib/xianniu-ui.umd.js +30 -30
- package/lib/xianniu-ui.umd.min.js +2 -2
- package/package.json +1 -1
- package/packages/city/main.vue +4 -1
package/package.json
CHANGED
package/packages/city/main.vue
CHANGED
|
@@ -291,11 +291,14 @@ export default {
|
|
|
291
291
|
if (!val) return;
|
|
292
292
|
val = val.replace(/[^\u4e00-\u9fa5]/g, "");
|
|
293
293
|
const cityArr = val.match(this.$reg.getCity) || [];
|
|
294
|
+
console.log("🚀 ~ str2Code ~ this.$reg.getCity:", this.$reg.getCity)
|
|
295
|
+
console.log("🚀 ~ str2Code ~ cityArr:", cityArr)
|
|
294
296
|
const newarr =
|
|
295
297
|
cityArr.length &&
|
|
296
298
|
cityArr.map((item, idx, arr) => {
|
|
297
|
-
return ZXCITY.includes(item) && idx === 0 ? [item, ...arr] : arr;
|
|
299
|
+
return ZXCITY.includes(item) && idx === 0 && arr.length == 2 ? [item, ...arr] : arr;
|
|
298
300
|
})[0];
|
|
301
|
+
console.log(newarr)
|
|
299
302
|
const arr = this.getCity(this.cityList, newarr);
|
|
300
303
|
const res = this.getRes(arr);
|
|
301
304
|
return { ...res };
|