原生的文本框扩展
具有扩展键盘类型的文本框。
npm i --save 原生的文本框扩展

原生的文本框扩展

NPM version Downloads Twitter Follow

允许仅输入数字(1234567890)的文本框扩展。

现在您可以为 keyboardType 属性使用新的值:digits。

<TextFieldEx keyboardType="digits"></TextFieldEx>

安装

tns plugin add nativescript-textfield-ex

演示应用(核心)

查看 演示 文件夹。

使用方法

<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded" class="page"
xmlns:ui="nativescript-textfield-ex">


<StackLayout class="p-20">

<!-- Plugin -->
<ui:TextFieldEx hint="0000" class="tf-ex" keyboardType="digits"></ui:TextFieldEx>

<!-- Original -->
<TextField hint="0000" class="tf-ex" keyboardType="number"></TextField>

</StackLayout>
</Page>

许可证

Apache 许可证版本 2.0,2004 年 1 月