[improvement] AddressList: use prop to custom radio

This commit is contained in:
陈嘉涵
2019-05-10 15:05:33 +08:00
parent 8cf8956294
commit 97f4c4e023
5 changed files with 5 additions and 31 deletions
-11
View File
@@ -10,18 +10,7 @@
}
&__item-value {
position: relative;
padding-right: 34px;
color: @text-color;
}
.van-radio__icon {
font-size: 16px;
}
.van-radio__icon--checked .van-icon {
background-color: @red;
border-color: @red;
}
&__group {
+2 -1
View File
@@ -1,4 +1,5 @@
import { use } from '../utils';
import { RED } from '../utils/color';
import { emit, inherit } from '../utils/functional';
import Icon from '../icon';
import Cell from '../cell';
@@ -44,7 +45,7 @@ function ContactList(
valueClass={bem('item-value')}
scopedSlots={{
default: () => (
<Radio name={item.id} onClick={onClick}>
<Radio name={item.id} iconSize={16} checkedColor={RED} onClick={onClick}>
<div class={bem('name')}>{`${item.name}${item.tel}`}</div>
</Radio>
),