feat: 单页面组件拆分
This commit is contained in:
@@ -20,7 +20,12 @@ export default function Index() {
|
||||
{/* 城市封面图片 */}
|
||||
<Image
|
||||
// style="width: 100%;height: 100%;background: #fff;"
|
||||
style={{ width: "100%", height: "100%", background: " #fff",borderRadius: "10px" }}
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: " #fff",
|
||||
borderRadius: "10px",
|
||||
}}
|
||||
mode="scaleToFill"
|
||||
src={beijing}
|
||||
/>
|
||||
@@ -31,6 +36,18 @@ export default function Index() {
|
||||
});
|
||||
};
|
||||
|
||||
const ProvinceTag = () => {
|
||||
return ["北京", "上海", "广州", "深圳", "武汉"].map((item, index) => {
|
||||
return (
|
||||
<View>
|
||||
<AtTag type="primary" circle>
|
||||
{item}
|
||||
</AtTag>
|
||||
</View>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<View className="index">
|
||||
{/* 顶部 */}
|
||||
@@ -43,21 +60,7 @@ export default function Index() {
|
||||
|
||||
{/* 省份标签 */}
|
||||
<View className="provinceTag">
|
||||
<AtTag type="primary" circle>
|
||||
北京
|
||||
</AtTag>
|
||||
<AtTag type="primary" circle>
|
||||
上海
|
||||
</AtTag>
|
||||
<AtTag type="primary" circle>
|
||||
广州
|
||||
</AtTag>
|
||||
<AtTag type="primary" circle>
|
||||
深圳
|
||||
</AtTag>
|
||||
<AtTag type="primary" circle>
|
||||
武汉
|
||||
</AtTag>
|
||||
<ProvinceTag />
|
||||
</View>
|
||||
|
||||
{/* 城市列表 */}
|
||||
@@ -65,6 +68,8 @@ export default function Index() {
|
||||
<HomeCardItem />
|
||||
</View>
|
||||
|
||||
|
||||
{/* 底部tabbar */}
|
||||
<View className="tabbbar">
|
||||
<AtTabBar
|
||||
tabList={[
|
||||
|
||||
Reference in New Issue
Block a user