xianniu-ui 0.8.45 → 0.8.46

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": "xianniu-ui",
3
- "version": "0.8.45",
3
+ "version": "0.8.46",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -64,6 +64,13 @@ export default {
64
64
  return {};
65
65
  },
66
66
  },
67
+ /**
68
+ * 是否全国
69
+ */
70
+ isAll:{
71
+ type:Boolean,
72
+ default:false
73
+ }
67
74
  },
68
75
  data() {
69
76
  return {
@@ -160,7 +167,14 @@ export default {
160
167
  },
161
168
  // 接口获取城市联动数据
162
169
  fnGetCitys() {
163
- const _citys = this.$utils.deepClone(citys);
170
+ const cityArr = citys;
171
+ if(this.isAll){
172
+ cityArr.unshift({
173
+ cityName: '全国',
174
+ cityCode: '000000'
175
+ })
176
+ }
177
+ const _citys = this.$utils.deepClone(cityArr);
164
178
  this.cityList = this.toTreeDataLevel(_citys);
165
179
  this.flattenResult = this.flattenTreeData(
166
180
  this.addParentKey(this.cityList)