Showing
1 changed file
with
10 additions
and
6 deletions
| @@ -10,6 +10,7 @@ Page({ | @@ -10,6 +10,7 @@ Page({ | ||
| 10 | }) | 10 | }) |
| 11 | this.remark=opt.remark; | 11 | this.remark=opt.remark; |
| 12 | this.getlabellist(); | 12 | this.getlabellist(); |
| 13 | + this.blurcount=0; | ||
| 13 | }, | 14 | }, |
| 14 | inputremark(e){ | 15 | inputremark(e){ |
| 15 | this.remark=util.trim(e.detail.value) | 16 | this.remark=util.trim(e.detail.value) |
| @@ -18,6 +19,7 @@ Page({ | @@ -18,6 +19,7 @@ Page({ | ||
| 18 | selectlabel(e){ | 19 | selectlabel(e){ |
| 19 | let name=e.currentTarget.dataset.name; | 20 | let name=e.currentTarget.dataset.name; |
| 20 | if(this.remark!=''){ | 21 | if(this.remark!=''){ |
| 22 | + this.blurcount++; | ||
| 21 | let str=this.remark+','+name | 23 | let str=this.remark+','+name |
| 22 | if(str.length>25){ | 24 | if(str.length>25){ |
| 23 | console.log('rrrrrr') | 25 | console.log('rrrrrr') |
| @@ -28,18 +30,20 @@ Page({ | @@ -28,18 +30,20 @@ Page({ | ||
| 28 | duration:1500 | 30 | duration:1500 |
| 29 | }) | 31 | }) |
| 30 | } | 32 | } |
| 33 | + this.setData({ | ||
| 34 | + remark:this.remark=='' ? name : this.remark+','+name | ||
| 35 | + }) | ||
| 31 | } | 36 | } |
| 32 | - // this.setData({ | ||
| 33 | - // remark:this.data.remark=='' ? name : this.data.remark+','+name | ||
| 34 | - // }) | ||
| 35 | this.remark=this.remark=='' ? name : this.remark+','+name | 37 | this.remark=this.remark=='' ? name : this.remark+','+name |
| 36 | console.log(this.remark,this.remark.length) | 38 | console.log(this.remark,this.remark.length) |
| 37 | }, | 39 | }, |
| 38 | inputblur(e){ | 40 | inputblur(e){ |
| 39 | console.log(e) | 41 | console.log(e) |
| 40 | - this.setData({ | ||
| 41 | - remark:this.remark | ||
| 42 | - }) | 42 | + if(this.blurcount==0){ |
| 43 | + this.setData({ | ||
| 44 | + remark:this.remark | ||
| 45 | + }) | ||
| 46 | + } | ||
| 43 | }, | 47 | }, |
| 44 | getlabellist(){ | 48 | getlabellist(){ |
| 45 | App.Customer.GetUserRemarkes().then((json)=>{ | 49 | App.Customer.GetUserRemarkes().then((json)=>{ |
-
Please register or login to post a comment