|
|
@@ -47,6 +47,10 @@
|
|
|
county: {
|
|
|
type: [String, Number],
|
|
|
default: ''
|
|
|
+ },
|
|
|
+ street: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: ''
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -104,19 +108,18 @@
|
|
|
|
|
|
for (const province of this.addressData) {
|
|
|
for (const city of province.children || []) {
|
|
|
- if (city.code == this.city || city.name.indexOf(this.city) !== -1) {
|
|
|
+ if (this.city!=''&&(city.code == this.city || city.name.indexOf(this.city) !== -1)) {
|
|
|
this.selectedProvince = province
|
|
|
this.selectedCity = city
|
|
|
-
|
|
|
for (const area of city.children || []) {
|
|
|
- if (area.code == this.county || area.name.indexOf(this.county) !== -1) {
|
|
|
+ if (this.county!=''&&(area.code == this.county || area.name.indexOf(this.county) !== -1)) {
|
|
|
this.selectedArea=area
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- this.selectedStreet = {
|
|
|
- code: 'all',
|
|
|
- name: '全部'
|
|
|
+ for (const street of area.children || []) {
|
|
|
+ if (this.street!=''&&(street.code == this.street || street.name.indexOf(this.street) !== -1)) {
|
|
|
+ this.selectedStreet=street
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
@@ -160,7 +163,7 @@
|
|
|
|
|
|
/** 街道选择 */
|
|
|
selectStreet(street) {
|
|
|
- return this.$queue.showToast('街道选择暂未开放,')
|
|
|
+ return this.$queue.showToast('街道选择暂未开放')
|
|
|
this.selectedStreet = street
|
|
|
},
|
|
|
|