diff --git a/packages/vant/src/address-list/AddressList.tsx b/packages/vant/src/address-list/AddressList.tsx index 4edb55000..7aba46ecc 100644 --- a/packages/vant/src/address-list/AddressList.tsx +++ b/packages/vant/src/address-list/AddressList.tsx @@ -6,6 +6,7 @@ import { numericProp, makeArrayProp, createNamespace, + makeStringProp, } from '../utils'; // Components @@ -23,6 +24,7 @@ export const addressListProps = { disabledList: makeArrayProp(), addButtonText: String, defaultTagText: String, + rightIcon: makeStringProp('edit'), }; export type AddressListProps = ExtractPropTypes; @@ -72,6 +74,7 @@ export default defineComponent({ disabled={disabled} switchable={props.switchable} defaultTagText={props.defaultTagText} + rightIcon={props.rightIcon} onEdit={onEdit} onClick={onClick} onSelect={onSelect} diff --git a/packages/vant/src/address-list/AddressListItem.tsx b/packages/vant/src/address-list/AddressListItem.tsx index d5d40b602..25b6d05f6 100644 --- a/packages/vant/src/address-list/AddressListItem.tsx +++ b/packages/vant/src/address-list/AddressListItem.tsx @@ -6,6 +6,7 @@ import { createNamespace, makeRequiredProp, type Numeric, + makeStringProp, } from '../utils'; // Components @@ -32,6 +33,7 @@ export default defineComponent({ disabled: Boolean, switchable: Boolean, defaultTagText: String, + rightIcon: makeStringProp('edit'), }, emits: ['edit', 'click', 'select'], @@ -46,7 +48,7 @@ export default defineComponent({ const renderRightIcon = () => ( { event.stopPropagation(); diff --git a/packages/vant/src/address-list/README.md b/packages/vant/src/address-list/README.md index 81eae45b9..c78f169e7 100644 --- a/packages/vant/src/address-list/README.md +++ b/packages/vant/src/address-list/README.md @@ -90,6 +90,7 @@ export default { | switchable | Whether to allow switch address | _boolean_ | `true` | | add-button-text | Add button text | _string_ | `Add new address` | | default-tag-text | Default tag text | _string_ | - | +| right-icon `v4.4.2` | Right Icon | _string_ | `edit` | ### Events diff --git a/packages/vant/src/address-list/README.zh-CN.md b/packages/vant/src/address-list/README.zh-CN.md index d3dbcd863..37eda17ca 100644 --- a/packages/vant/src/address-list/README.zh-CN.md +++ b/packages/vant/src/address-list/README.zh-CN.md @@ -81,15 +81,16 @@ export default { ### Props -| 参数 | 说明 | 类型 | 默认值 | -| ---------------- | ----------------- | ---------------------- | ---------- | -| v-model | 当前选中地址的 id | _number \| string_ | - | -| list | 地址列表 | _AddressListAddress[]_ | `[]` | -| disabled-list | 不可配送地址列表 | _AddressListAddress[]_ | `[]` | -| disabled-text | 不可配送提示文案 | _string_ | - | -| switchable | 是否允许切换地址 | _boolean_ | `true` | -| add-button-text | 底部按钮文字 | _string_ | `新增地址` | -| default-tag-text | 默认地址标签文字 | _string_ | - | +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| v-model | 当前选中地址的 id | _number \| string_ | - | +| list | 地址列表 | _AddressListAddress[]_ | `[]` | +| disabled-list | 不可配送地址列表 | _AddressListAddress[]_ | `[]` | +| disabled-text | 不可配送提示文案 | _string_ | - | +| switchable | 是否允许切换地址 | _boolean_ | `true` | +| add-button-text | 底部按钮文字 | _string_ | `新增地址` | +| default-tag-text | 默认地址标签文字 | _string_ | - | +| right-icon `v4.4.2` | 右侧图标名称或图片链接,等同于 Icon 组件的 [name 属性](#/zh-CN/icon#props) | _string_ | `edit` | ### Events