We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7628105 commit e1de434Copy full SHA for e1de434
src/directives/index.js
@@ -1,6 +1,8 @@
1
var utils = require('../utils'),
2
config = require('../config'),
3
- transition = require('../transition')
+ transition = require('../transition'),
4
+ NumberRE = /^[\d\.]+$/,
5
+ CommaRE = /\\,/g
6
7
module.exports = {
8
@@ -54,6 +56,18 @@ module.exports = {
54
56
el.removeAttribute(config.prefix + '-cloak')
55
57
})
58
}
59
+ },
60
+
61
+ data: {
62
+ bind: function () {
63
+ var val = this.key
64
+ this.vm.$set(
65
+ this.arg,
66
+ NumberRE.test(val)
67
+ ? +val
68
+ : val.replace(CommaRE, ',')
69
+ )
70
+ }
71
72
73
0 commit comments