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