Javascript:allow函数返回两个字符串值

时间:2019-03-18 15:57:42

标签: coffeescript decimal

我有一个JavaScript函数,可为小数输入返回逗号:

getLocalDecimalSeparator: ->
    $translate.instant( 'numbers.decimal_separator' )

翻译的定义如下:

numbers:
      decimal_separator:   ","

我希望我的输入也接受十进制数字的点字符,我考虑过添加一个regExp或在一个函数中返回两个字符。

我尝试过:

getLocalDecimalSeparator: ->
    ['.' , ',']

但是没有用!

0 个答案:

没有答案
相关问题