feat: 页签排序
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
export default {
|
||||
pages: [
|
||||
// "pages/index/index",
|
||||
"pages/home/index"
|
||||
"pages/home/index",
|
||||
"pages/activityList/index",
|
||||
|
||||
],
|
||||
|
||||
window: {
|
||||
|
||||
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;
|
||||
@@ -1,9 +1,19 @@
|
||||
import { Button, Card, Col, Divider, Grid, GridItem, Row, Tag } from "@antmjs/vantui";
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Col,
|
||||
Divider,
|
||||
Grid,
|
||||
GridItem,
|
||||
Row,
|
||||
Tag,
|
||||
} from "@antmjs/vantui";
|
||||
import { View } from "@tarojs/components";
|
||||
import React, { useCallback } from "react";
|
||||
import { Swiper, SwiperItem, Image } from "@antmjs/vantui";
|
||||
import react from "react";
|
||||
import { NoticeBar } from "@antmjs/vantui";
|
||||
import Taro from "@tarojs/taro";
|
||||
|
||||
const Home = () => {
|
||||
// const { images } = COMMON
|
||||
@@ -55,7 +65,16 @@ const Home = () => {
|
||||
|
||||
{/* 模块 */}
|
||||
<Grid>
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
<GridItem
|
||||
icon="photo-o"
|
||||
text="活动"
|
||||
onClick={() => {
|
||||
// 跳转到目的页面,打开新页面
|
||||
Taro.navigateTo({
|
||||
url: "/pages/activityList/index",
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
<GridItem icon="photo-o" text="活动" />
|
||||
|
||||
Reference in New Issue
Block a user