简体   繁体   English

羊驼 forms js - 如何使货币字段反向工作?

[英]alpaca forms js - how to make currency field work with reverse?

Currently on alpaca forms documentation there is no way to start with reverse option.目前在羊驼 forms 文档中,没有办法从反向选项开始。 Whatever mask I use I'm always getting the same effect.无论我使用什么面具,我总是得到相同的效果。

Example 1: Type in currency "5", Field shows: "0,05", Expected behaviour: "5" or "5,00".示例 1:输入货币“5”,字段显示:“0,05”,预期行为:“5”或“5,00”。

Example 2: Type in currency "100", Field shows: "1,00", Expected behaviour: "100" or "100,00".示例 2:输入货币“100”,字段显示:“1,00”,预期行为:“100”或“100,00”。

Example 3 (working fine): Type in currency "1,30", Field shows: "1,30", Expected behaviour: "1,30".示例 3(工作正常):输入货币“1,30”,字段显示:“1,30”,预期行为:“1,30”。

Welcome to Stackoverflow,欢迎来到 Stackoverflow,

When it comes to third party plugins like here JQuery Price Format Alpacajs have nothing to do with what you want to achieve, the documentation you should rely on is the plugin's documentation which is in http://price-format.github.io/Jquery-Price-Format/当涉及到像这里JQuery Price Format的第三方插件时,Alpacajs 与您想要实现的目标无关,您应该依赖的文档是插件的文档,它位于http://price-format.ZBF21518181BAZ/queryJ6735447BAZ/queryJ6735213 -价格格式/

Seeing the doc myself I couldn't find what you're looking for, however in their github repo there's a pull-request that stills on validation to fix this issue.我自己看到文档时找不到您要查找的内容,但是在他们的 github 存储库中,有一个拉取请求仍在验证中以解决此问题。 (see https://github.com/price-format/Jquery-Price-Format/pull/85 ) (见https://github.com/price-format/Jquery-Price-Format/pull/85

There's anothing plugin that might be helpful check http://www.decorplanit.com/plugin/ and see if it suits you in terms of functions and options, then you can integrate it with alpaca by creating custom field and apply it to your field.有一个可能有用的插件检查http://www.decorplanit.com/plugin/看看它在功能和选项方面是否适合您,然后您可以通过创建自定义字段将其与 alpaca 集成并将其应用于您的字段.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM