且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用 react-native 在数字键盘上添加“完成"按钮

更新时间:2023-02-08 21:17:19

我不确定这是否正是您想要的,但您可以使用道具 returnKeyType 向键盘添加完成"按钮.

I'm not sure if this is exactly what you want, but you can add a 'done' button to the keyboard using the prop returnKeyType.

例如:returnKeyType={ 'done' }

这里有更多信息https://facebook.github.io/react-native/docs/textinput.html#returnkeytype