feat: 页签排序

This commit is contained in:
eric
2022-11-13 10:16:15 +08:00
parent 29e99a0009
commit 9a55d5d3ca
19 changed files with 2577 additions and 1164 deletions

View File

View File

@@ -0,0 +1,52 @@
import { View } from "@tarojs/components";
import react from "react";
import { DropdownMenu } from "@antmjs/vantui";
import { DropdownItem } from "@antmjs/vantui";
const activityList = () => {
const [state, setState] = react.useState({
option1: [
{
text: "全部商品",
value: 0,
},
{
text: "新款商品",
value: 1,
},
{
text: "活动商品",
value: 2,
},
],
option2: [
{
text: "默认排序",
value: "a",
},
{
text: "好评排序",
value: "b",
},
{
text: "销量排序",
value: "c",
},
],
value1: 0,
value2: "a",
});
return (
<View>
{" "}
<View>
<DropdownMenu>
<DropdownItem value={state.value1} options={state.option1} />
<DropdownItem value={state.value2} options={state.option2} />
</DropdownMenu>
</View>
</View>
);
};
export default activityList;