可以通过在输入框组件的onAppear调用focusControl.requestFocus(this.inputId)接口实现,键盘概率覆盖输入框问题使用setTimeout延迟调用demo:build() { RichEditor(this.option) .id(this.inputId) .height(50) .width('100%') .borderWidth(2) .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) .onAppear(() => { setTimeout(() => {focusControl.requestFocus(this.inputId);}, 20) }) }
可以通过在输入框组件的onAppear调用focusControl.requestFocus(this.inputId)接口实现,键盘概率覆盖输入框问题使用setTimeout延迟调用
demo: