Commit e43a3a11 authored by malin's avatar malin

home

parent 528160dc
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
color: #000000; color: #000000;
} }
.fc-6 {
color: #666;
}
.fc-f { .fc-f {
color: #fff; color: #fff;
} }
.fc-sys1 {
color: #3abfff;
}
.fs-24 {
font-size: 0.24rem;
}
.fs-36 { .fs-36 {
font-size: 0.36rem; font-size: 0.36rem;
} }
......
.fw-5 { .fw-5 {
font-weight: 500; font-weight: 500;
} }
.fw-4 {
font-weight: 400;
}
\ No newline at end of file
...@@ -9,11 +9,37 @@ ...@@ -9,11 +9,37 @@
</div> </div>
<div> <div>
<span>宝宝性别</span> <span>宝宝性别</span>
<input type="text" /> <div class="gender-select">
<template v-for="item in genderInfo">
<div :key="item.id" @click="selectGender(item)">
<img
class="gender-img"
:src="item.status ? item.src_active : item.src"
alt=""
/>
<span class="fs-36 fw-4 fc-6">{{ item.gender }}</span>
</div>
</template>
</div>
</div> </div>
<div> <div>
<span>出生日期</span> <span>出生日期</span>
<input type="text" placeholder="请选择出生日期或预产期" /> <input
type="date"
v-model="date"
style="border: 1px solid #ffa3cf; border-radius: 5px"
placeholder="请选择出生日期或预产期"
@change="dateChange"
/>
</div>
</div>
<!-- 用户服务协议 -->
<div class="user-agreement fs-24">
<div>起名信息仅会用于起名及姓名析义,查看</div>
<div>
<a href="javascript:;">《用户服务协议》、</a>
<a href="javascript:;">《隐私权协议》</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -22,7 +48,54 @@ ...@@ -22,7 +48,54 @@
</template> </template>
<script> <script>
export default {}; import active from "@/assets/img/home/active.png";
import deactive from "@/assets/img/home/deactive.png";
export default {
data() {
return {
date: "",
genderInfo: [
{
src: deactive,
gender: "男",
id: 1,
status: true,
src_active: active,
},
{
src: deactive,
gender: "女",
id: 2,
status: false,
src_active: active,
},
{
src: deactive,
gender: "未出生",
id: 3,
status: false,
src_active: active,
},
],
};
},
methods: {
dateChange() {
console.log(this.date);
},
selectGender(item) {
this.genderInfo.map((option) => {
if (item.id == option.id) {
return (item.status = true);
} else {
return (option.status = false);
}
});
},
},
};
</script> </script>
<style> <style>
...@@ -54,7 +127,7 @@ export default {}; ...@@ -54,7 +127,7 @@ export default {};
.baby-form { .baby-form {
position: absolute; position: absolute;
top: 1.82rem; top: 1.28rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -91,4 +164,51 @@ export default {}; ...@@ -91,4 +164,51 @@ export default {};
line-height: 0.36rem; line-height: 0.36rem;
margin-right: -1rem; margin-right: -1rem;
} }
.gender-select {
width: 3.96rem;
height: 0.36rem;
display: flex;
justify-content: start;
flex-wrap: nowrap;
align-items: center;
}
.gender-select > div {
flex: 1;
display: flex;
justify-content: start;
align-items: center;
}
.gender-select img {
margin-right: 0.04rem;
}
.gender-img {
width: 0.3rem;
height: 0.3rem;
}
.user-agreement {
position: absolute;
top: 3.52rem;
display: flex;
width: 100%;
height: 0.6rem;
justify-content: center;
flex-wrap: wrap;
}
.user-agreement > div {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
a {
text-decoration: none;
color: #3abfff;
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment