Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -45,7 +45,7 @@ function Select(items) {
lis.each(function(index) {
if ($(this).attr('status') === 'false' || $(this).attr('status') === '') {
$(this).click(function(e) {
$(this).click(function() {
hide();
cb(items[index]);
});
... ...
... ... @@ -103,6 +103,8 @@
$('#li-' + id).css('transform', 'translateX(-' + width + 'px)');
delBtn.removeClass('hide');
this.pandata.id = id;
this.pandata.objX = -width;
},
hideDelBth() {
this.brandData.forEach(function(d) {
... ... @@ -137,7 +139,7 @@
},
panstart: function(id) {
event.preventDefault();
if (this.editmodel) {
if (this.editmodel && this.pandata.id !== id) {
return false;
}
... ... @@ -155,7 +157,7 @@
},
panmove: function(id) {
event.preventDefault();
if (this.editmodel) {
if (this.editmodel && this.pandata.id !== id) {
return false;
}
... ... @@ -182,7 +184,7 @@
},
panend: function(id) {
event.preventDefault();
if (this.editmodel) {
if (this.editmodel && this.pandata.id !== id) {
return false;
}
... ... @@ -197,6 +199,10 @@
this.pandata.objX = -width;
}
li.css('transform', 'translateX(' + this.pandata.objX + 'px)');
if (this.editmodel && this.pandata.id === id && this.pandata.objX === 0) {
this.pandata = {};
}
}
},
created: function() {
... ... @@ -249,6 +255,7 @@
padding-left: 20px;
list-style: none;
overflow: hidden;
border-top: 1px solid #e0e0e0;
li {
position: relative;
... ...
... ... @@ -120,6 +120,8 @@
delBtn.removeClass('hide');
$('#li-' + id).css('transform', 'translateX(-' + width + 'px)');
this.pandata.id = id;
this.pandata.objX = -width;
},
hideDelBth() {
this.productData.forEach(function(d) {
... ... @@ -154,7 +156,7 @@
},
panstart: function(id) {
event.preventDefault();
if (this.editmodel) {
if (this.editmodel && this.pandata.id !== id) {
return false;
}
... ... @@ -172,7 +174,7 @@
},
panmove: function(id) {
event.preventDefault();
if (this.editmodel) {
if (this.editmodel && this.pandata.id !== id) {
return false;
}
... ... @@ -199,7 +201,7 @@
},
panend: function(id) {
event.preventDefault();
if (this.editmodel) {
if (this.editmodel && this.pandata.id !== id) {
return false;
}
... ... @@ -214,6 +216,10 @@
this.pandata.objX = -width;
}
li.css('transform', 'translateX(' + this.pandata.objX + 'px)');
if (this.editmodel && this.pandata.id === id && this.pandata.objX === 0) {
this.pandata = {};
}
}
},
created: function() {
... ... @@ -266,6 +272,7 @@
padding-left: 20px;
list-style: none;
overflow: hidden;
border-top: 1px solid #e0e0e0;
li {
position: relative;
... ...
... ... @@ -9,7 +9,7 @@
</label>
</li>
<li>
<label>昵称<input class="nickname" v-model='nickname' @blur="setNickname"></label>
<label>昵称<input class="nickname" v-model='nickname' @input="setNickname" @change="checkNickname"></label>
</li>
<li>
<label @click="setAender">性别
... ... @@ -53,14 +53,19 @@
setAvatar: function() {
yoho.goSetAvatar();
},
setNickname: function() {
checkNickname: function() {
if (!this.nickname) {
tip('昵称不能为空');
this.nickname = this.currentval;
return false;
}
this.currentval = this.nickname;
},
setNickname: function() {
if (!this.nickname || this.currentval === this.nickname) {
return false;
}
this.saveDetails({
nickname: this.nickname
});
... ...