🎈 perf(购物页面): 添加分页功能]
This commit is contained in:
@@ -41,7 +41,7 @@ const CustomTabBar: FC = () => {
|
||||
const handleSelectTabItem = (id: TabBarIndexMap[number]['id']) => {
|
||||
return () => {
|
||||
setSelected(id)
|
||||
Taro.switchTab({ url: tabItem.find(item=>item.id === id)?.pagePath! })
|
||||
Taro.switchTab({ url: tabItem?.find(item=>item.id === id)?.pagePath! })
|
||||
}
|
||||
}
|
||||
const setSelected = (id: TabBarIndexMap[number]['id']) => {
|
||||
@@ -51,7 +51,7 @@ const CustomTabBar: FC = () => {
|
||||
return (
|
||||
<View className={styles.customTabBar}>
|
||||
<View className={styles['customTabBar-line']}></View>
|
||||
{tabItem.map((item, index) => {
|
||||
{tabItem?.map((item, index) => {
|
||||
return (
|
||||
<View
|
||||
key={index}
|
||||
|
||||
Reference in New Issue
Block a user