🎈 perf(购物页面): 添加分页功能]

This commit is contained in:
xuan
2022-11-18 17:12:28 +08:00
parent 0ab2b22be5
commit 8deb8e56f0
5 changed files with 61 additions and 26 deletions
+2 -2
View File
@@ -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}