|
@@ -24,7 +24,7 @@ export default {
|
|
|
return {
|
|
|
text:'',
|
|
|
textlength:0,
|
|
|
- maxlength:50,
|
|
|
+ maxlength:10,
|
|
|
hintShow:false
|
|
|
};
|
|
|
},
|
|
@@ -47,7 +47,14 @@ export default {
|
|
|
},
|
|
|
//计算字数
|
|
|
calcWord(e){
|
|
|
+ console.log('text1',this.text)
|
|
|
this.textlength = e.detail.value.length
|
|
|
+ //真机,一次性输入字数大于maxlength时数据和显示错误
|
|
|
+ if(this.textlength>=this.maxlength){
|
|
|
+ this.textlength=this.maxlength
|
|
|
+ this.text = this.text.slice(0,this.maxlength)
|
|
|
+ }
|
|
|
+ console.log('text2',this.text)
|
|
|
},
|
|
|
//展示提示
|
|
|
showHint(){
|