mirror of
https://github.com/tenrok/maska.git
synced 2026-06-23 20:40:35 +03:00
Updated raw mask example
This commit is contained in:
+1
-7
@@ -25,7 +25,7 @@
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Phone with code: {{ phone }} (raw value: {{ phoneRaw }})</label>
|
<label class="label">Phone with code: {{ phone }} (raw value: {{ phoneRaw }})</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input v-maska="['+1 (###) ##-##-##', '+1 (###) ###-##-##']" class="input" type="tel" autocomplete="tel" v-model="phone" @maska="onMaska">
|
<input v-maska="['+1 (###) ##-##-##', '+1 (###) ###-##-##']" class="input" type="tel" autocomplete="tel" v-model="phone" @maska="phoneRaw = $event.target.dataset.maskRawValue">
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-family-code">v-maska="['+1 (###) ##-##-##', '+1 (###) ###-##-##']"</p>
|
<p class="help is-family-code">v-maska="['+1 (###) ##-##-##', '+1 (###) ###-##-##']"</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -165,12 +165,6 @@
|
|||||||
dateMask: function() {
|
dateMask: function() {
|
||||||
return this.dotFormat ? '##.##.####' : '##/##/####'
|
return this.dotFormat ? '##.##.####' : '##/##/####'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
onMaska: function(event) {
|
|
||||||
this.phoneRaw = event.target.dataset.maskRawValue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user