import { Tabbar } from "@nutui/nutui-react-taro"; import { useEffect, useState } from "react"; import { navigateTo } from "@tarojs/taro"; const TabbarCom = () => { const [activeIndex, setActiveIndex] = useState(0); useEffect(() => { setActiveIndex(0); }, []); return ( { console.log(value); setActiveIndex(value); if (value === 2) { navigateTo({ url: "/pages/publish/index" }); } }} > ); }; export default TabbarCom;