diff --git a/packages/nutui-taro-demo/src/basic/pages/configprovider/index.vue b/packages/nutui-taro-demo/src/basic/pages/configprovider/index.vue index d1f02dab38..f4a73170a6 100644 --- a/packages/nutui-taro-demo/src/basic/pages/configprovider/index.vue +++ b/packages/nutui-taro-demo/src/basic/pages/configprovider/index.vue @@ -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="请选择所在地区" > @@ -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; } } }); diff --git a/src/packages/__VUE/configprovider/demo.vue b/src/packages/__VUE/configprovider/demo.vue index 9aac647200..0bb5022696 100644 --- a/src/packages/__VUE/configprovider/demo.vue +++ b/src/packages/__VUE/configprovider/demo.vue @@ -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')" > @@ -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; } } });