AngularJS xeditable号字段浮法验证字段、AngularJS、xeditable

2023-09-14 00:23:42 作者:从此你我两清

我有AnularJS问题。如果我使用xeditable

I have issue with AnularJS. If I use xeditable

<a editable-number="some.object"....

我无法输入浮点数...那么,怎么样,我可以添加浮点数,并有鉴于浮法验证???

I can't input float numbers... so, how, I can add float numbers and have float validation in view???

THX!

推荐答案

您需要设置的属性&LT;输入类型= 数字方式&gt; 标记为任何

You need to set the step attribute of the <input type="number"> tag to "any".

要解决这个问题的方法之一是利用xeditable的电子商务 - * 语法,其中任何属性可以指定一个开始ë - 将传递到底层的输入标签:

One way to solve this is to take advantage of xeditable's e-* syntax, where any attribute you specify that begins with e- will be passed through to the underlying input tag:

<a editable-number="some.object" e-step="any">{{some.object || 'Enter Number'}}</a>