mirror of
https://github.com/tenrok/maska.git
synced 2026-05-15 11:59:38 +03:00
cd1e9f3564
- new directive format: pass options as value, bound as argument with modifiers - update and checkValue methods in MaskInput
21 lines
506 B
Vue
21 lines
506 B
Vue
<script setup lang="ts">
|
|
import { MaskInputOptions, vMaska } from '../../src'
|
|
|
|
const emit = defineEmits(['mask1', 'mask2', 'mask3'])
|
|
|
|
const options1 = <MaskInputOptions>{
|
|
onMaska: (detail) => emit('mask1', detail)
|
|
}
|
|
const options2 = <MaskInputOptions>{
|
|
onMaska: [
|
|
(detail) => emit('mask2', detail),
|
|
(detail) => emit('mask3', detail),
|
|
]
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<input id="input1" v-maska="options1" data-maska="#-#" />
|
|
<input id="input2" v-maska="options2" data-maska="#-#" />
|
|
</template>
|