diff --git a/packages/vant/src/contact-list/ContactList.tsx b/packages/vant/src/contact-list/ContactList.tsx index 3c558111f..cebdf429f 100644 --- a/packages/vant/src/contact-list/ContactList.tsx +++ b/packages/vant/src/contact-list/ContactList.tsx @@ -44,7 +44,7 @@ export default defineComponent({ }; const renderRightIcon = () => ( - + ); const renderEditIcon = () => ( diff --git a/packages/vant/src/contact-list/README.md b/packages/vant/src/contact-list/README.md index 8116371fd..91c2f4da9 100644 --- a/packages/vant/src/contact-list/README.md +++ b/packages/vant/src/contact-list/README.md @@ -111,6 +111,7 @@ The component provides the following CSS variables, which can be used to customi | Name | Default Value | Description | | --- | --- | --- | +| --van-contact-list-padding | _var(--van-padding-sm) var(--van-padding-sm) 80px_ | - | | --van-contact-list-edit-icon-size | _16px_ | - | | --van-contact-list-add-button-z-index | _999_ | - | | --van-contact-list-radio-color | _var(--van-primary-color)_ | - | diff --git a/packages/vant/src/contact-list/README.zh-CN.md b/packages/vant/src/contact-list/README.zh-CN.md index 4fa2b104d..1844a2fe3 100644 --- a/packages/vant/src/contact-list/README.zh-CN.md +++ b/packages/vant/src/contact-list/README.zh-CN.md @@ -111,6 +111,7 @@ import type { ContactListItem, ContactListProps } from 'vant'; | 名称 | 默认值 | 描述 | | ------------------------------------- | -------------------------- | ---- | +| --van-contact-list-padding | _var(--van-padding-sm) var(--van-padding-sm) 80px_ | - | | --van-contact-list-edit-icon-size | _16px_ | - | | --van-contact-list-add-button-z-index | _999_ | - | | --van-contact-list-radio-color | _var(--van-primary-color)_ | - | diff --git a/packages/vant/src/contact-list/demo/index.vue b/packages/vant/src/contact-list/demo/index.vue index 22f23a857..d7d37f73b 100644 --- a/packages/vant/src/contact-list/demo/index.vue +++ b/packages/vant/src/contact-list/demo/index.vue @@ -72,10 +72,9 @@ const onSelect = (contact: { id: string }) => { diff --git a/packages/vant/src/contact-list/index.less b/packages/vant/src/contact-list/index.less index d7b458307..c6f984e0f 100644 --- a/packages/vant/src/contact-list/index.less +++ b/packages/vant/src/contact-list/index.less @@ -1,4 +1,5 @@ :root { + --van-contact-list-padding: var(--van-padding-sm) var(--van-padding-sm) 80px; --van-contact-list-edit-icon-size: 16px; --van-contact-list-add-button-z-index: 999; --van-contact-list-radio-color: var(--van-primary-color); @@ -8,7 +9,7 @@ .van-contact-list { box-sizing: border-box; height: 100%; - padding-bottom: 80px; + padding: var(--van-contact-list-padding); &__item { padding: var(--van-contact-list-item-padding); @@ -34,6 +35,7 @@ height: 100%; overflow-y: scroll; -webkit-overflow-scrolling: touch; + border-radius: var(--van-radius-lg); } &__edit { diff --git a/packages/vant/src/contact-list/test/__snapshots__/demo-ssr.spec.ts.snap b/packages/vant/src/contact-list/test/__snapshots__/demo-ssr.spec.ts.snap index 7d0ce222d..24d6a0b91 100644 --- a/packages/vant/src/contact-list/test/__snapshots__/demo-ssr.spec.ts.snap +++ b/packages/vant/src/contact-list/test/__snapshots__/demo-ssr.spec.ts.snap @@ -39,7 +39,7 @@ exports[`should render demo and match snapshot 1`] = ` >
@@ -52,7 +52,7 @@ exports[`should render demo and match snapshot 1`] = ` aria-checked="false" >
diff --git a/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap index e71eb2979..3c8f2af90 100644 --- a/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap @@ -29,7 +29,7 @@ exports[`should render ContactList correctly 1`] = ` aria-checked="true" >