提交代码

This commit is contained in:
2025-06-26 11:41:12 +08:00
commit d75fb55eec
396 changed files with 42172 additions and 0 deletions

28
src/components/TabBar.tsx Normal file
View File

@@ -0,0 +1,28 @@
import { Tabbar } from '@nutui/nutui-react-taro'
import { Home, User } from '@nutui/icons-react-taro'
import Taro from '@tarojs/taro'
function TabBar(){
return (
<Tabbar
fixed
onSwitch={(index) => {
console.log(index)
if(index == 0){
Taro.switchTab({ url: '/pages/index/index' })
}
// if(index == 1){
// Taro.navigateTo({ url: '/pages/detail/detail' })
// }
if(index == 1){
Taro.switchTab({ url: '/pages/user/user' })
}
}}
>
<Tabbar.Item title="首页" icon={<Home size={18} />} />
{/*<Tabbar.Item title="分类" icon={<Date size={18} />} />*/}
<Tabbar.Item title="我的" icon={<User size={18} />} />
</Tabbar>
)
}
export default TabBar;