update
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
export default {
|
export default {
|
||||||
navigationBarTitleText: '数字游民工具箱'
|
navigationBarTitleText: '数字游民CNA'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,19 +42,39 @@ const Index = () => {
|
|||||||
<View className="items">
|
<View className="items">
|
||||||
{/* 数组尽量是4的倍数 */}
|
{/* 数组尽量是4的倍数 */}
|
||||||
{[
|
{[
|
||||||
{ img: beijing, type: "item", dom: "" },
|
{ cityName: "北京", img: beijing, type: "item", dom: "" },
|
||||||
{ img: shanghai, type: "item", dom: "" },
|
{ cityName: "上海", img: shanghai, type: "item", dom: "" },
|
||||||
{ img: shenzhen, type: "custom", dom: custDom() },
|
{
|
||||||
{ img: shenzhen, type: "item", dom: "" },
|
cityName: "custDom",
|
||||||
|
img: shenzhen,
|
||||||
|
type: "custom",
|
||||||
|
dom: custDom(),
|
||||||
|
},
|
||||||
|
{ cityName: "深圳", img: shenzhen, type: "item", dom: "" },
|
||||||
|
{ cityName: "广州", img: shenzhen, type: "item", dom: "" },
|
||||||
|
{ cityName: "武汉", img: shenzhen, type: "item", dom: "" },
|
||||||
|
{ cityName: "杭州", img: shenzhen, type: "item", dom: "" },
|
||||||
].map((item, index) => {
|
].map((item, index) => {
|
||||||
if (item.type === "custom") {
|
if (item.type === "custom") {
|
||||||
return <View className="item"> {item.dom}</View>;
|
// 根据屏幕变化,添加自定义组件
|
||||||
|
// return <View className="item"> {item.dom}</View>;
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<View className="item">
|
<View className="item">
|
||||||
<View className="itemUp"> itemUp</View>
|
<View className="itemUp">
|
||||||
<View className="itemiddle"> itemiddle</View>
|
{/* 序列号 */}
|
||||||
<View className="itemDown">itemDown </View>
|
<View className="itemUpleft">{index + 1}</View>
|
||||||
|
{/* 网速 */}
|
||||||
|
<View className="itemUpright">70mps</View>
|
||||||
|
</View>
|
||||||
|
{/* 城市名 */}
|
||||||
|
<View className="itemiddle"> {item.cityName}</View>
|
||||||
|
<View className="itemDown">
|
||||||
|
{/* 温度 */}
|
||||||
|
<View className="itemDownleft">29度</View>
|
||||||
|
{/* 消费 */}
|
||||||
|
<View className="itemDownright">$1545/月</View>
|
||||||
|
</View>
|
||||||
<Image
|
<Image
|
||||||
style="width: 100%;height: 100%;background: #fff;border-radius: 5%;z-index:0"
|
style="width: 100%;height: 100%;background: #fff;border-radius: 5%;z-index:0"
|
||||||
// mode="heightFix"
|
// mode="heightFix"
|
||||||
|
|||||||
@@ -32,14 +32,30 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
color: white;
|
color: white;
|
||||||
.itemUp {
|
.itemUp {
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background-color: burlywood;
|
// background-color: burlywood;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
|
.itemUpleft{
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.itemUpright{
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.itemiddle {
|
.itemiddle {
|
||||||
|
font-size: 30px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
@@ -48,12 +64,23 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
}
|
}
|
||||||
.itemDown {
|
.itemDown {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
.itemDownleft{
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.itemDownright{
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user