fix(ContactList): increase right icon size and optimize styles (#11873)

* 优化 ContactList 边距和圆角边框样式

* 优化 ContactList 的 Demo 标题样式

* 优化 ContactList 的单选框尺寸

* Update README.zh-CN.md

* Update README.md

* Update index.spec.ts.snap

* Update demo.spec.ts.snap

* Update demo-ssr.spec.ts.snap
This commit is contained in:
Mikasa33 2023-05-17 22:17:27 +08:00 committed by GitHub
parent 3867017d3a
commit ee0a332e8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 11 deletions

View File

@ -44,7 +44,7 @@ export default defineComponent({
}; };
const renderRightIcon = () => ( const renderRightIcon = () => (
<Radio class={bem('radio')} name={item.id} iconSize={16} /> <Radio class={bem('radio')} name={item.id} iconSize={18} />
); );
const renderEditIcon = () => ( const renderEditIcon = () => (

View File

@ -111,6 +111,7 @@ The component provides the following CSS variables, which can be used to customi
| Name | Default Value | Description | | 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-edit-icon-size | _16px_ | - |
| --van-contact-list-add-button-z-index | _999_ | - | | --van-contact-list-add-button-z-index | _999_ | - |
| --van-contact-list-radio-color | _var(--van-primary-color)_ | - | | --van-contact-list-radio-color | _var(--van-primary-color)_ | - |

View File

@ -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-edit-icon-size | _16px_ | - |
| --van-contact-list-add-button-z-index | _999_ | - | | --van-contact-list-add-button-z-index | _999_ | - |
| --van-contact-list-radio-color | _var(--van-primary-color)_ | - | | --van-contact-list-radio-color | _var(--van-primary-color)_ | - |

View File

@ -72,10 +72,9 @@ const onSelect = (contact: { id: string }) => {
</template> </template>
<style lang="less"> <style lang="less">
.demo-contact-card { .demo-contact-list {
.van-popup { .van-doc-demo-block__title {
height: 100%; padding-bottom: 0;
background-color: var(--van-background);
} }
} }
</style> </style>

View File

@ -1,4 +1,5 @@
:root { :root {
--van-contact-list-padding: var(--van-padding-sm) var(--van-padding-sm) 80px;
--van-contact-list-edit-icon-size: 16px; --van-contact-list-edit-icon-size: 16px;
--van-contact-list-add-button-z-index: 999; --van-contact-list-add-button-z-index: 999;
--van-contact-list-radio-color: var(--van-primary-color); --van-contact-list-radio-color: var(--van-primary-color);
@ -8,7 +9,7 @@
.van-contact-list { .van-contact-list {
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
padding-bottom: 80px; padding: var(--van-contact-list-padding);
&__item { &__item {
padding: var(--van-contact-list-item-padding); padding: var(--van-contact-list-item-padding);
@ -34,6 +35,7 @@
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
border-radius: var(--van-radius-lg);
} }
&__edit { &__edit {

View File

@ -39,7 +39,7 @@ exports[`should render demo and match snapshot 1`] = `
> >
<!--[--> <!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked" <div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style="font-size:16px;" style="font-size:18px;"
> >
<i class="van-badge__wrapper van-icon van-icon-success" <i class="van-badge__wrapper van-icon van-icon-success"
style style
@ -73,7 +73,7 @@ exports[`should render demo and match snapshot 1`] = `
> >
<!--[--> <!--[-->
<div class="van-radio__icon van-radio__icon--round" <div class="van-radio__icon van-radio__icon--round"
style="font-size:16px;" style="font-size:18px;"
> >
<i class="van-badge__wrapper van-icon van-icon-success" <i class="van-badge__wrapper van-icon van-icon-success"
style style

View File

@ -30,7 +30,7 @@ exports[`should render demo and match snapshot 1`] = `
aria-checked="true" aria-checked="true"
> >
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked" <div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style="font-size: 16px;" style="font-size: 18px;"
> >
<i class="van-badge__wrapper van-icon van-icon-success"> <i class="van-badge__wrapper van-icon van-icon-success">
</i> </i>
@ -52,7 +52,7 @@ exports[`should render demo and match snapshot 1`] = `
aria-checked="false" aria-checked="false"
> >
<div class="van-radio__icon van-radio__icon--round" <div class="van-radio__icon van-radio__icon--round"
style="font-size: 16px;" style="font-size: 18px;"
> >
<i class="van-badge__wrapper van-icon van-icon-success"> <i class="van-badge__wrapper van-icon van-icon-success">
</i> </i>

View File

@ -29,7 +29,7 @@ exports[`should render ContactList correctly 1`] = `
aria-checked="true" aria-checked="true"
> >
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked" <div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style="font-size: 16px;" style="font-size: 18px;"
> >
<i class="van-badge__wrapper van-icon van-icon-success"> <i class="van-badge__wrapper van-icon van-icon-success">
</i> </i>