Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
fix: #44
Browse files Browse the repository at this point in the history
  • Loading branch information
dwqs committed Oct 31, 2018
1 parent 812fb52 commit b5ec40e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/area-select/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
type: Object,
required: true
},
isLinkage: {
disableLinkage: {
type: Boolean,
default: false
}
Expand Down Expand Up @@ -144,7 +144,7 @@
this.citys = {
[this.curProvinceCode]: this.curProvince
};
if (this.isLinkage) {
if (!this.disableLinkage) {
this.curCity = this.curProvince;
this.curCityCode = this.curCityCode;
}
Expand All @@ -166,14 +166,15 @@
}
}
if (this.isLinkage) {
if (!this.disableLinkage) {
this.curCity = curCity;
this.curCityCode = curCityCode;
} else if (!isEqual) {
this.curCity = '';
this.curCityCode = '';
this.curArea = '';
this.curAreaCode = '';
this.selectChange();
}
}
},
Expand All @@ -188,7 +189,7 @@
this.areas = {
[this.curCityCode]: this.curCity
};
if (this.isLinkage) {
if (!this.disableLinkage) {
this.curArea = this.curCity;
this.curAreaCode = this.curCityCode;
}
Expand All @@ -210,12 +211,13 @@
}
}
if (this.isLinkage) {
if (!this.disableLinkage) {
this.curArea = curArea;
this.curAreaCode = curAreaCode;
} else if (!isEqual) {
this.curArea = '';
this.curAreaCode = '';
this.selectChange();
}
}
},
Expand Down

0 comments on commit b5ec40e

Please sign in to comment.