mirror of
https://github.com/tenrok/maska.git
synced 2026-06-17 19:21:21 +03:00
#41 Fix init value on Vue 3.x
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ export default class Maska {
|
||||
if (this._opts.mask && (!el.dataset.mask || el.dataset.mask !== this._opts.mask)) {
|
||||
el.dataset.mask = this._opts.mask
|
||||
}
|
||||
this.updateValue(el)
|
||||
setTimeout(() => this.updateValue(el), 0)
|
||||
if (!el.dataset.maskInited) {
|
||||
el.dataset.maskInited = true
|
||||
el.addEventListener('input', evt => this.updateValue(evt.target, evt))
|
||||
|
||||
Reference in New Issue
Block a user