Skip to content

Commit 58ec4a4

Browse files
committed
updated
1 parent 4c89c35 commit 58ec4a4

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/.vuepress/components/Example.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ export default {
101101
priceDirective: null,
102102
priceUnmasked: 1234.56,
103103
config: {
104-
decimal: '.',
105-
separator: ',',
104+
decimal: ',',
105+
separator: '.',
106106
prefix: '$',
107107
suffix: ' %',
108108
precision: 2,

src/directive.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ export default {
3636
// check decimal key and insert to current element
3737
// updated cursor position after format the value
3838
el.onkeydown = (e) => {
39-
if (([110, 190].includes(e.keyCode) || e.key === config.decimal) && !el.value.includes(config.decimal)) {
40-
e.preventDefault()
41-
el.setRangeText(config.decimal)
42-
core.updateValue(el, null, { emit: true }, e)
43-
core.updateCursor(el, el.value.indexOf(config.decimal) + 1)
44-
} else if (
39+
if (
4540
([110, 190].includes(e.keyCode) || e.key === config.decimal) && el.value.includes(config.decimal)
4641
) {
4742
e.preventDefault()

0 commit comments

Comments
 (0)