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

Commit

Permalink
fix: #32
Browse files Browse the repository at this point in the history
  • Loading branch information
dwqs committed Apr 9, 2018
1 parent ade0a57 commit 933f135
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions components/area-cascader/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@
this.isSetDefault = true;
let res = [];
if (this.type === 'code') {
// fix #32
if (selected[0] === '710000') {
selected[1] = selected[0];
}
res = selected;
} else if (this.type === 'text') {
res = this.getAreaText(selected);
Expand Down
3 changes: 2 additions & 1 deletion components/area-select/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@
selected = [this.curProvince];
break;
case 1:
selected = [this.curProvince, this.curCity];
// fix #32
selected = [this.curProvince, this.curProvince === '710000' ? this.curProvince : this.curCity];
break;
case 2:
selected = [this.curProvince, this.curCity, this.curAreaCode];
Expand Down

0 comments on commit 933f135

Please sign in to comment.