|
@@ -75,15 +75,21 @@ export default class SelectSize extends Component { |
|
@@ -75,15 +75,21 @@ export default class SelectSize extends Component { |
75
|
sizeLength > 0 &&
|
75
|
sizeLength > 0 &&
|
76
|
<View className="size-list">
|
76
|
<View className="size-list">
|
77
|
{
|
77
|
{
|
78
|
- sizeList.map(item => {
|
78
|
+ sizeList.map((item, index) => {
|
79
|
let price;
|
79
|
let price;
|
80
|
if (item.storage_num > 0) {
|
80
|
if (item.storage_num > 0) {
|
81
|
price = `¥${item.least_price}`;
|
81
|
price = `¥${item.least_price}`;
|
82
|
} else {
|
82
|
} else {
|
83
|
price = '-';
|
83
|
price = '-';
|
84
|
}
|
84
|
}
|
|
|
85
|
+ let rightStyle = ''
|
|
|
86
|
+ if (index !== 0 && index % 5 === 0) {
|
|
|
87
|
+ rightStyle = 'right-border'
|
|
|
88
|
+ } else if (index === sizeLength - 1) {
|
|
|
89
|
+ rightStyle = 'right-border'
|
|
|
90
|
+ }
|
85
|
return (
|
91
|
return (
|
86
|
- <View key={item.size_id} className={curSelect === item.size_id ? `actived ${sizeStyle}` : sizeStyle} onClick={this.onChangeSize.bind(this, item)}>
|
92
|
+ <View key={item.size_id} className={curSelect === item.size_id ? `actived ${sizeStyle}` : `${sizeStyle} ${rightStyle}`} onClick={this.onChangeSize.bind(this, item)}>
|
87
|
<View className={item.storage_num > 0 ? 'size' : 'size gray'}>{item.size_name}</View>
|
93
|
<View className={item.storage_num > 0 ? 'size' : 'size gray'}>{item.size_name}</View>
|
88
|
{
|
94
|
{
|
89
|
curSelect !== item.size_id &&
|
95
|
curSelect !== item.size_id &&
|