可构造一个宽高都为0的自定义键盘,使用customKeyboard绑定,参考示例如下:TextInput({ placeholder: 'wait input…', text: this.inputValue, controller: this.controller }) .type(InputType.PhoneNumber) .backgroundColor(Color.Orange) .width('80%')//.textAlign(TextAlign.Center) .onChange((value: string) => { }) .customKeyboard(this.CustomKeyboardBuilderEmpty()) .enableKeyboardOnFocus(false) .selectionMenuHidden(false) @Builder CustomKeyboardBuilderEmpty() { Column() { } .width(0) .height(0) }
可构造一个宽高都为0的自定义键盘,使用customKeyboard绑定,参考示例如下: