Authored by 李靖

时间输入框兼容

... ... @@ -27,7 +27,8 @@ class UserInfo extends Page {
$okBtn: $('.swiper-header .ok'),
$provinceText: $('.province-text'),
$cityText: $('.city-text'),
$userPic: $('.user-pic')
$userPic: $('.user-pic'),
$noDate: $('.inp.modify[type!=date]'),
};
this.view = {
... ... @@ -59,11 +60,25 @@ class UserInfo extends Page {
bindEvents() {
this.selector.$chosenCity.on('click', this.chosenCity.bind(this));
this.selector.$modifyInp.on('blur', this.modifyInp.bind(this));
this.selector.$cancelBtn.on('click', this.cancelFun.bind(this));
this.selector.$okBtn.on('click', this.okFun.bind(this));
this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this));
this.selector.$userPic.on('click', this.userPic.bind(this));
this.selector.$modifyInp.on('click', this.closeCitySwiper.bind(this));
if (yoho.isApp) {
this.selector.$modifyInp.on('change', this.modifyInp.bind(this));
} else {
this.selector.$noDate.on('change', this.modifyInp.bind(this));
this.selector.$birthday.on('blur', this.modifyInp.bind(this));
}
}
closeCitySwiper(e) {
let $this = $(e.currentTarget);
if ($this.attr('id') !== 'chosen-city') {
this.selector.$citySwiper.hide();
}
}
userPic() {
... ...
... ... @@ -47,9 +47,10 @@ input::-webkit-calendar-picker-indicator {
.ewm {
width: 43px;
height: 43px;
background-image: url("/home/family/person-ewm.png");
background-image: resolve("home/family/person-ewm.png");
float: right;
margin-top: 12px;
background-size: 100% 100%;
}
}
... ... @@ -103,7 +104,7 @@ input::-webkit-calendar-picker-indicator {
position: absolute;
top: 10px;
right: 20px;
width: 40px;
width: 70px;
white-space: nowrap;
overflow: hidden;
direction: rtl;
... ...