mirror of
https://github.com/tenrok/maska.git
synced 2026-06-08 17:22:27 +03:00
test: additional check for callbacks with binding
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { MaskInputOptions, vMaska } from '../../src'
|
||||
|
||||
const emit = defineEmits(['mask1', 'mask2', 'mask3'])
|
||||
|
||||
const bound1 = ref('')
|
||||
const bound2 = ref('')
|
||||
|
||||
const options1 = <MaskInputOptions>{
|
||||
onMaska: (detail) => emit('mask1', detail)
|
||||
}
|
||||
@@ -15,6 +19,8 @@ const options2 = <MaskInputOptions>{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input id="input1" v-maska="options1" data-maska="#-#" />
|
||||
<input id="input2" v-maska="options2" data-maska="#-#" />
|
||||
<input id="input1" v-maska:bound1="options1" data-maska="#-#" />
|
||||
<input id="input2" v-maska:bound2="options2" data-maska="#-#" />
|
||||
<div class="bound1">{{ bound1 }}</div>
|
||||
<div class="bound2">{{ bound2 }}</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user