还没修好吗?哥哥 [图片]
fail Cannot read property 'initScl' of undefined?errMsg: "showShareImageMenu:fail Cannot read property 'initScl' of undefined" 图片是临时路径:http://tmp/JKaknPQG1bo35ea02b5c3103557ba6f022aba1ecc7fa.png
2023-09-152023年八月了还是存在
textarea组件输入字数超出最大输入长度后超出部分不显示但会成功输入一到两个字textarea设置maxlength为100,输入到第101个字时不显示,但成功输入,导致提交的数据出现长度限制的错误,代码片段如下: <textarea v-show="textareaVisibale" @input="textareaInput($event,100,'memberDesc')" v-model="addForm.memberDesc" :show-confirm-bar="showConfirm" auto-height="true" maxlength="100" :adjust-position="inputUp" @focus="inputFocus" @blur="inputBlur"/> textareaInput(event,maxlength,propertyName){ if(event.detail.cursor==maxlength){ uni.showToast({ title:'最多只能输入'+maxlength+'个字!', icon:'none', duration:2000 }) }else if(event.detail.cursor>maxlength){ uni.showToast({ title:'最多只能输入'+maxlength+'个字!', icon:'none', duration:2000 }) console.log('event.detail.cursor:',event.detail.cursor); console.log('event.detail.value:',event.detail.value); console.log('this.addForm[propertyName]:',this.addForm[propertyName]); // this.addForm[propertyName]=this.addForm[propertyName].substring(0,maxlength) // this.$set(event.detail,'value',event.detail.value.substring(0,maxlength)) } }, 测试结果如图: [图片]
2023-08-28