xianniu-ui 0.8.44 → 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/lib/xianniu-ui.common.js +47 -30
- package/lib/xianniu-ui.umd.js +47 -30
- package/lib/xianniu-ui.umd.min.js +2 -2
- package/package.json +1 -1
- package/packages/city/main.vue +15 -1
package/package.json
CHANGED
package/packages/city/main.vue
CHANGED
|
@@ -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
|
|
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)
|