chore: webpack编译优化

This commit is contained in:
eric
2022-11-13 11:14:11 +08:00
parent 750a6344a7
commit f3e62862fc
40 changed files with 165 additions and 50953 deletions

View File

@@ -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>
);
};

View File

@@ -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",
});
}