chore: webpack编译优化
This commit is contained in:
@@ -2,6 +2,7 @@ import { View } from "@tarojs/components";
|
||||
import react from "react";
|
||||
import { DropdownMenu } from "@antmjs/vantui";
|
||||
import { DropdownItem } from "@antmjs/vantui";
|
||||
import TabbarCom from "../components/TabbarCom";
|
||||
|
||||
const activityList = () => {
|
||||
const [state, setState] = react.useState({
|
||||
@@ -45,6 +46,7 @@ const activityList = () => {
|
||||
<DropdownItem value={state.value2} options={state.option2} />
|
||||
</DropdownMenu>
|
||||
</View>
|
||||
<TabbarCom active={1} />;
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -7,14 +7,24 @@ const TabbarCom = (props: any) => {
|
||||
const [active, setActive] = react.useState(props?.active ?? 0);
|
||||
|
||||
return (
|
||||
<View>
|
||||
<View style={{marginTop:'40px'}}>
|
||||
<Tabbar
|
||||
active={active}
|
||||
onChange={(e: any) => {
|
||||
console.log("e", e);
|
||||
setActive(e?.detail);
|
||||
if(e?.detail===0){
|
||||
Taro.redirectTo({
|
||||
url: "/pages/home/index",
|
||||
});
|
||||
}
|
||||
if(e?.detail===1){
|
||||
Taro.redirectTo({
|
||||
url: "/pages/activityList/index",
|
||||
});
|
||||
}
|
||||
if(e?.detail===2){
|
||||
Taro.navigateTo({
|
||||
Taro.redirectTo({
|
||||
url: "/pages/my/index",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user