[improvement] AddressList: use prop to custom radio
This commit is contained in:
@@ -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';
|
||||
@@ -61,7 +62,7 @@ function AddressItem(
|
||||
];
|
||||
|
||||
return props.switchable ? (
|
||||
<Radio name={data.id} onClick={onSelect}>
|
||||
<Radio name={data.id} iconSize={16} checkedColor={RED} onClick={onSelect}>
|
||||
{Info}
|
||||
</Radio>
|
||||
) : (
|
||||
|
||||
@@ -24,18 +24,7 @@
|
||||
padding: 15px;
|
||||
|
||||
&__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;
|
||||
}
|
||||
|
||||
&__name {
|
||||
@@ -51,12 +40,6 @@
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
&--unswitchable {
|
||||
.van-radio__label {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
.van-address-item__name,
|
||||
.van-address-item__address {
|
||||
|
||||
Reference in New Issue
Block a user