Skip to content

Commit

Permalink
fix(config-provider): 更新 address demo 代码 #2456
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu committed Jul 27, 2023
1 parent 1cdc34d commit 66aca4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
:city="addressModule.state.city"
:country="addressModule.state.country"
:town="addressModule.state.town"
@change="addressModule.methods.onChange"
@close="addressModule.methods.onClose"
custom-address-title="请选择所在地区"
></nut-address>
</nut-form-item>
Expand Down Expand Up @@ -140,12 +140,9 @@ export default {
formData2.address = '';
}
},
onChange({ custom, next, value }: any) {
formData2.address += value.name;
const name = addressModule.state[next];
if (name.length < 1) {
addressModule.state.show = false;
}
onClose({ data }: any) {
formData2.address = data.addressStr;
addressModule.state.show = false;
}
}
});
Expand Down
11 changes: 4 additions & 7 deletions src/packages/__VUE/configprovider/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
:city="addressModule.state.city"
:country="addressModule.state.country"
:town="addressModule.state.town"
@change="addressModule.methods.onChange"
@close="addressModule.methods.onClose"
:custom-address-title="translate('addressTip2')"
></nut-address>
</nut-form-item>
Expand Down Expand Up @@ -191,12 +191,9 @@ export default defineComponent({
formData2.address = '';
}
},
onChange({ next, value }: any) {
formData2.address += value.name;
const name = addressModule.state[next];
if (name.length < 1) {
addressModule.state.show = false;
}
onClose({ data }: any) {
formData2.address = data.addressStr;
addressModule.state.show = false;
}
}
});
Expand Down

0 comments on commit 66aca4f

Please sign in to comment.