From 52ab19e18559fff62044f11e608937316024205b Mon Sep 17 00:00:00 2001 From: Zhousg Date: Sat, 20 May 2023 18:36:06 +0800 Subject: [PATCH] docs(Address): fix props and methods (#11882) --- packages/vant/src/address-edit/README.md | 5 +++-- packages/vant/src/address-edit/README.zh-CN.md | 5 +++-- packages/vant/src/address-list/README.md | 2 +- packages/vant/src/address-list/README.zh-CN.md | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/vant/src/address-edit/README.md b/packages/vant/src/address-edit/README.md index edcfaa897..2981c39e6 100644 --- a/packages/vant/src/address-edit/README.md +++ b/packages/vant/src/address-edit/README.md @@ -91,9 +91,9 @@ export default { | detail-maxlength | Detail maxlength | _number \| string_ | `200` | | is-saving | Whether to show save button loading status | _boolean_ | `false` | | is-deleting | Whether to show delete button loading status | _boolean_ | `false` | -| tel-validator | The method to validate tel | _(tel: string) => boolean_ | - | +| tel-validator | The method to validate tel | _(val: string) => boolean_ | - | | tel-maxlength | Tel maxlength | _number \| string_ | - | -| validator | Custom validator | _(key, val) => string_ | - | +| validator | Custom validator | _(key: string, val: string) => string_ | - | ### Events @@ -121,6 +121,7 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Addres | Name | Description | Attribute | Return value | | --- | --- | --- | --- | | setAddressDetail | Set address detail | _addressDetail: string_ | - | +| setAreaCode | Set area code | _code: string_ | - | ### Types diff --git a/packages/vant/src/address-edit/README.zh-CN.md b/packages/vant/src/address-edit/README.zh-CN.md index 53965d7e0..0ac0b578e 100644 --- a/packages/vant/src/address-edit/README.zh-CN.md +++ b/packages/vant/src/address-edit/README.zh-CN.md @@ -91,9 +91,9 @@ export default { | detail-maxlength | 详细地址最大长度 | _number \| string_ | `200` | | is-saving | 是否显示保存按钮加载动画 | _boolean_ | `false` | | is-deleting | 是否显示删除按钮加载动画 | _boolean_ | `false` | -| tel-validator | 手机号格式校验函数 | _string => boolean_ | - | +| tel-validator | 手机号格式校验函数 | _(val: string) => boolean_ | - | | tel-maxlength | 手机号最大长度 | _number \| string_ | - | -| validator | 自定义校验函数 | _(key, val) => string_ | - | +| validator | 自定义校验函数 | _(key: string, val: string) => string_ | - | ### Events @@ -121,6 +121,7 @@ export default { | 方法名 | 说明 | 参数 | 返回值 | | ---------------- | ------------ | ----------------------- | ------ | | setAddressDetail | 设置详细地址 | _addressDetail: string_ | - | +| setAreaCode | 设置地区编号 | _code: string_ | - | ### 类型定义 diff --git a/packages/vant/src/address-list/README.md b/packages/vant/src/address-list/README.md index b593666eb..81eae45b9 100644 --- a/packages/vant/src/address-list/README.md +++ b/packages/vant/src/address-list/README.md @@ -83,7 +83,7 @@ export default { | Attribute | Description | Type | Default | | --- | --- | --- | --- | -| v-model | Id of chosen address | _string_ | - | +| v-model | Id of chosen address | _number \| string_ | - | | list | Address list | _Address[]_ | `[]` | | disabled-list | Disabled address list | _Address[]_ | `[]` | | disabled-text | Disabled text | _string_ | - | diff --git a/packages/vant/src/address-list/README.zh-CN.md b/packages/vant/src/address-list/README.zh-CN.md index 73ec3f882..d3dbcd863 100644 --- a/packages/vant/src/address-list/README.zh-CN.md +++ b/packages/vant/src/address-list/README.zh-CN.md @@ -83,7 +83,7 @@ export default { | 参数 | 说明 | 类型 | 默认值 | | ---------------- | ----------------- | ---------------------- | ---------- | -| v-model | 当前选中地址的 id | _string_ | - | +| v-model | 当前选中地址的 id | _number \| string_ | - | | list | 地址列表 | _AddressListAddress[]_ | `[]` | | disabled-list | 不可配送地址列表 | _AddressListAddress[]_ | `[]` | | disabled-text | 不可配送提示文案 | _string_ | - |