Skip to content

Commit f3f88db

Browse files
committed
2.2.9
1 parent e0178ca commit f3f88db

File tree

5 files changed

+218
-235
lines changed

5 files changed

+218
-235
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ By default, when you clean the input the value is set to `0`. You can change thi
149149
|empty-value|Value when input is empty|false|Number|0|
150150
|precision|Number of decimals|false|Number|-|
151151
|separator|Thousand separator symbol (accepts `space`, `.` or `,`)|false|String|`,`|
152+
|decimal-separator|Custom decimal separator|false|String|-|
153+
|thousand-separator|Custom thousand separator|false|String|-|
152154
|read-only|Hide input field and show the value as text|false|Boolean|false|
153155
|read-only-class|Class for read-only element|false|String|''|
154156

dist/vue-numeric.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-numeric",
3-
"version": "2.2.8",
3+
"version": "2.2.9",
44
"description": "Input field component to display currency value based on Vue.",
55
"author": "Kevin Ongko",
66
"main": "dist/vue-numeric.min.js",

src/vue-numeric.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default {
179179
* Define decimal separator based on separator props.
180180
* @return {String} '.' or ','
181181
*/
182-
$decimalSeparator () {
182+
decimalSeparatorSymbol () {
183183
if (typeof this.decimalSeparator !== 'undefined') return this.decimalSeparator
184184
if (this.separator === ',') return '.'
185185
return ','
@@ -189,7 +189,7 @@ export default {
189189
* Define thousand separator based on separator props.
190190
* @return {String} '.' or ','
191191
*/
192-
$thousandSeparator () {
192+
thousandSeparatorSymbol () {
193193
if (typeof this.thousandSeparator !== 'undefined') return this.thousandSeparator
194194
if (this.separator === '.') return '.'
195195
if (this.separator === 'space') return ' '
@@ -295,7 +295,7 @@ export default {
295295
symbol: '',
296296
format: '%v',
297297
thousand: '',
298-
decimal: this.$decimalSeparator,
298+
decimal: this.decimalSeparatorSymbol,
299299
precision: Number(this.precision)
300300
})
301301
}
@@ -337,8 +337,8 @@ export default {
337337
symbol: this.currency,
338338
format: this.symbolPosition,
339339
precision: Number(this.precision),
340-
decimal: this.$decimalSeparator,
341-
thousand: this.$thousandSeparator
340+
decimal: this.decimalSeparatorSymbol,
341+
thousand: this.thousandSeparatorSymbol
342342
})
343343
},
344344
@@ -349,7 +349,7 @@ export default {
349349
*/
350350
unformat (value) {
351351
const toUnformat = typeof value === 'string' && value === '' ? this.emptyValue : value
352-
return accounting.unformat(toUnformat, this.$decimalSeparator)
352+
return accounting.unformat(toUnformat, this.decimalSeparatorSymbol)
353353
}
354354
}
355355
}

0 commit comments

Comments
 (0)