🎈 perf(优化商城):
This commit is contained in:
@@ -13,21 +13,35 @@
|
||||
color: transparent;
|
||||
}
|
||||
.sideBar_select_title {
|
||||
height: 100px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-size: $font_size;
|
||||
margin: 13px 0;
|
||||
// padding: 13px 0;
|
||||
box-sizing: border-box;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
&:nth-child(1) {
|
||||
margin: 0;
|
||||
}
|
||||
&:nth-last-child(1) {
|
||||
margin: 0;
|
||||
}
|
||||
.title_con {
|
||||
padding: 0 20px;
|
||||
text-align: center;
|
||||
// width: 74px;
|
||||
@include common_ellipsis($params: 4);
|
||||
}
|
||||
.sideBar_select_title_item {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-size: $font_size;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.sideBar_select_title_select {
|
||||
background-color: #007aff;
|
||||
|
||||
@@ -30,7 +30,7 @@ export default memo(
|
||||
height = '100vh',
|
||||
sideBarOnClick,
|
||||
children,
|
||||
heightItem = 100,
|
||||
heightItem = 108,
|
||||
refresherTriggered = false,
|
||||
selfOnRefresherRefresh,
|
||||
selfOnScrolltolower,
|
||||
@@ -121,13 +121,12 @@ export default memo(
|
||||
<ScrollView scrollWithAnimation={true} style={{ height }} className={styles.sideBar_select} scrollY scrollIntoView={`tab_${tabId}`}>
|
||||
{list?.map((item, index) => {
|
||||
return (
|
||||
<View
|
||||
className={classnames(styles.sideBar_select_title, { [styles.sideBar_select_title_select]: selected == item.id })}
|
||||
onClick={() => clickEvent({ item, index })}
|
||||
id={`tab_${item.id}`}
|
||||
key={item.id}
|
||||
style={{ height: heightItem + 'rpx' }}>
|
||||
<View className={styles.title_con}>{item.name}</View>
|
||||
<View className={styles.sideBar_select_title} id={`tab_${item.id}`} key={item.id} style={{ height: `${heightItem}rpx` }}>
|
||||
<View
|
||||
className={classnames(styles.sideBar_select_title_item, { [styles.sideBar_select_title_select]: selected == item.id })}
|
||||
onClick={() => clickEvent({ item, index })}>
|
||||
<View className={styles.title_con}>{item.name}</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user