Commit 1fe80216 by yanju

修改日期选择器

parent 28e0aeb9
......@@ -5,7 +5,7 @@
<span class="iconfont icon-el-icon-date"></span>
<input class="date-input"
type="text"
placeholder="请填写你的生日(格式: yyyy-MM-dd)"
:placeholder="dateValue+'(点击选择生日)'"
v-model="selectedDate"
autocomplete="false"
ref="input"
......@@ -70,12 +70,29 @@
containerVisible: false,
}
},
props:{
dateValue:{
type:String,
value:''
}
},
created() {
let string = this.dateValue;
let data = new Date(string);
this.datePicker.changeDate(data)
this.selectedDate = string;
},
mounted() {
},
methods: {
// 改变月份
changeMonth(count) {
const changedDate = new Date(this.year, this.month + count - 1);
console.log(changedDate);
this.datePicker.changeDate(changedDate);
},
// 选择日期
......@@ -284,6 +301,7 @@
display: inline-block;
width: 30px;
height: 30px;
text-align:center;
}
}
}
......
......@@ -4,7 +4,7 @@
<yun-avatar size="48px" border-r="24px" :userId="userId" :src="userAvatar" :name="nickName"></yun-avatar>
<div class="right__user-item__content">
<div class="content">
<p>{{nickName}}</p>
<p @click="$router.push('/u/'+userId+'/project')">{{nickName}}</p>
<h6>人气{{statistics.visitedNum}}·粉丝{{statistics.fansNum}}</h6>
</div>
<div v-if="userId!==$store.state.userProfile.userId&&followedUser" class="follow1" @click="dataPostToCancelFollow">
......@@ -205,6 +205,11 @@
p{
@include fontStyle(14,19,500,#2F2F2F,left);
@extend %nowrap;
@extend %cursorPointer;
@extend %animate-transition;
&:hover{
color:#333;
}
}
h6{
margin-top:10*$length;
......
......@@ -34,7 +34,7 @@
<div class="select-box__wrap">
<p class="input1" v-if="!isEdit">{{birthday}}</p>
<date-picker v-if="isEdit" v-on:listenDateChange="getData2Date"></date-picker>
<date-picker :dateValue="birthday" v-if="isEdit" v-on:listenDateChange="getData2Date"></date-picker>
</div>
</div>
......
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