Skip to content

Commit

Permalink
docs(Form): fix form docs code (youzan#11178)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangKBweb authored Oct 26, 2022
1 parent 22f8323 commit 73b4210
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/vant/src/form/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export default {
{ text: 'Maine', value: 'Maine' },
];

const onConfirm = (value) => {
const onConfirm = ({ selectedOptions }) => {
result.value = selectedOptions[0]?.text;
showPicker.value = false;
};
Expand Down
4 changes: 2 additions & 2 deletions packages/vant/src/form/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export default {
{ text: '湖州', value: 'Huzhou' },
];

const onConfirm = (value) => {
const onConfirm = ({ selectedOptions }) => {
result.value = selectedOptions[0]?.text;
showPicker.value = false;
};
Expand Down Expand Up @@ -419,7 +419,7 @@ export default {
setup() {
const result = ref('');
const showPicker = ref(false);
const onConfirm = (value) => {
const onConfirm = ({ selectedValues }) => {
result.value = selectedValues.join('/');
showPicker.value = false;
};
Expand Down

0 comments on commit 73b4210

Please sign in to comment.