feat: 设置tabbar
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { View, Text, Image } from "@tarojs/components";
|
||||
import { useLoad } from "@tarojs/taro";
|
||||
|
||||
import { AtAvatar, AtTag, AtIcon } from "taro-ui";
|
||||
import { AtAvatar, AtTag, AtIcon, AtTabBar } from "taro-ui";
|
||||
import "./index.scss";
|
||||
import beijing from "@/images/city/beijing.jpg";
|
||||
import { VIEW } from "@tarojs/runtime";
|
||||
// import beijing from "../../images/city/beijing.jpg";
|
||||
|
||||
export default function Index() {
|
||||
@@ -18,7 +19,8 @@ export default function Index() {
|
||||
<View className="homeCard">
|
||||
{/* 城市封面图片 */}
|
||||
<Image
|
||||
style="width: 100%;height: 100%;background: #fff;"
|
||||
// style="width: 100%;height: 100%;background: #fff;"
|
||||
style={{ width: "100%", height: "100%", background: " #fff",borderRadius: "10px" }}
|
||||
mode="scaleToFill"
|
||||
src={beijing}
|
||||
/>
|
||||
@@ -62,6 +64,18 @@ export default function Index() {
|
||||
<View className="homeCards">
|
||||
<HomeCardItem />
|
||||
</View>
|
||||
|
||||
<View className="tabbbar">
|
||||
<AtTabBar
|
||||
tabList={[
|
||||
{ title: "首页", iconType: "bullet-list" }, //, text: "new"
|
||||
{ title: "活动", iconType: "camera" },
|
||||
{ title: "我的", iconType: "folder" }, //, text: "100", max: 99
|
||||
]}
|
||||
// onClick={this.handleClick.bind(this)}
|
||||
// current={this.state.current}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -37,4 +37,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabbbar{
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user