feat: 页签排序
This commit is contained in:
0
src/pages/activityList/index.scss
Normal file
0
src/pages/activityList/index.scss
Normal file
52
src/pages/activityList/index.tsx
Normal file
52
src/pages/activityList/index.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user