feat: 新增列表

This commit is contained in:
hackrobot
2024-03-19 20:07:31 +08:00
parent 719d78d17c
commit 672f788e26

View File

@@ -1,7 +1,16 @@
import { View, Text, Image } from "@tarojs/components";
import { useLoad } from "@tarojs/taro";
import Taro from "@tarojs/taro";
import { AtAvatar, AtTag, AtIcon, AtTabBar, AtButton } from "taro-ui";
import {
AtAvatar,
AtTag,
AtIcon,
AtTabBar,
AtButton,
AtAccordion,
AtList,
AtListItem,
} from "taro-ui";
import "./index.scss";
import beijing from "@/images/city/beijing.jpg";
import guangzhou from "@/images/city/guangzhou.jpg";
@@ -11,6 +20,11 @@ import touxiang from "@/images/index/touxiang.jpg";
import { useEffect, useState } from "react";
const my = () => {
const [open, setopen] = useState(false);
const handleClick = (value) => {
setopen(true);
};
return (
<View className="my">
<View className="myContent">
@@ -22,25 +36,48 @@ const my = () => {
<AtTag size="small"></AtTag>
</View>
</View>
{/* 底部tabbar */}
<View className="tabbbar">
<AtTabBar
tabList={[
{ title: "首页", iconType: "home" }, //, text: "new"
// { title: "活动", iconType: "camera" },
{ title: "我的", iconType: "user" }, //, text: "100", max: 99
]}
onClick={(current) => {
console.log("current", current);
if (current !== 1) {
Taro.redirectTo({
url: "/pages/index/index",
});
}
}}
current={1}
/>
</View>
<View></View>
{/* 列表 */}
<AtListItem
title="标题文字1"
arrow="right"
thumb="https://img12.360buyimg.com/jdphoto/s72x72_jfs/t6160/14/2008729947/2754/7d512a86/595c3aeeNa89ddf71.png"
/>
<AtListItem
title="标题文字2"
note="描述信息"
arrow="right"
thumb="http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png"
/>
<AtListItem
title="标题文字3"
note="描述信息"
extraText="详细信息"
arrow="right"
thumb="http://img12.360buyimg.com/jdphoto/s72x72_jfs/t10660/330/203667368/1672/801735d7/59c85643N31e68303.png"
/>
</View>
{/* 底部tabbar */}
<View className="tabbbar">
<AtTabBar
tabList={[
{ title: "首页", iconType: "home" }, //, text: "new"
// { title: "活动", iconType: "camera" },
{ title: "我的", iconType: "user" }, //, text: "100", max: 99
]}
onClick={(current) => {
console.log("current", current);
if (current !== 1) {
Taro.redirectTo({
url: "/pages/index/index",
});
}
}}
current={1}
/>
</View>
</View>
);