发布于 2021-05-26 02:46:22
通过检查你分享的链接,有一个似乎在你的stackblitz上有效的答案:https://github.com/ionic-team/ionic-framework/pull/19776#issuecomment-549735550
在您的html中:
<ion-textarea auto-grow="true" (ionInput)="onTextInput($event)"> </ion-textarea>在.ts文件中:
onTextInput(event) { event.target.getInputElement().then((textArea: HTMLTextAreaElement) => { console.log(textArea.textLength + " : " + textArea.value); textArea.scroll({top: textArea.scrollHeight}); }); }https://stackoverflow.com/questions/67630104
复制相似问题