🐳 chore(eslint): 修正所有文件的eslint 错误❌
This commit is contained in:
@@ -35,16 +35,15 @@ const CustomTabBar: FC = () => {
|
||||
console.log('selectedId', selectedId)
|
||||
|
||||
const dispatch = useDispatch<Dispatch<TabBarAction>>()
|
||||
|
||||
const setSelected = (id: TabBarIndexMap[number]['id']) => {
|
||||
dispatch({ type: TabBarType.SET_SELECTED, data: { tabItem, selectedId: id } })
|
||||
}
|
||||
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 as string })
|
||||
}
|
||||
}
|
||||
const setSelected = (id: TabBarIndexMap[number]['id']) => {
|
||||
dispatch({ type: TabBarType.SET_SELECTED, data: { tabItem, selectedId: id } })
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.customTabBar}>
|
||||
|
||||
Reference in New Issue
Block a user