混合应用中 iphone 的十进制小键盘
Decimal KeyPad for iphone in hybrid app
我有一个数字字段,可以输入的金额没有限制。业务需求是显示小数点键盘。我们正在使用输入类型="number"。这在 android 中工作正常。我在 Edge 中进行了测试,这非常有效。但默认键盘出现在 iphone。来这里之前我确实在互联网上搜索过。但是我找不到出路。也没有现成的自定义 cordova 插件。
仅供参考 - 我们正在使用 ionic 来构建此应用程序。
您可以使用
<input type="number" pattern="[0-9]*">
或
<input type="text" pattern="\d*">
我认为在 cordova 中甚至不可能显示十进制键盘 iOS。
i finally wrote a new plugin
https://github.com/mrchandoo/cordova-plugin-decimal-keyboard
我有一个数字字段,可以输入的金额没有限制。业务需求是显示小数点键盘。我们正在使用输入类型="number"。这在 android 中工作正常。我在 Edge 中进行了测试,这非常有效。但默认键盘出现在 iphone。来这里之前我确实在互联网上搜索过。但是我找不到出路。也没有现成的自定义 cordova 插件。 仅供参考 - 我们正在使用 ionic 来构建此应用程序。
您可以使用
<input type="number" pattern="[0-9]*">
或
<input type="text" pattern="\d*">
我认为在 cordova 中甚至不可能显示十进制键盘 iOS。
i finally wrote a new plugin https://github.com/mrchandoo/cordova-plugin-decimal-keyboard