mirror of
https://github.com/tenrok/maska.git
synced 2026-05-15 11:59:38 +03:00
Replace "binded" with "bound"
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
import { reactive } from 'vue'
|
||||
import { MaskaDetail, vMaska } from '../../src'
|
||||
|
||||
const binded = reactive<Partial<MaskaDetail>>({})
|
||||
const bound = reactive<Partial<MaskaDetail>>({})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input v-maska="binded" data-maska="#-#" value="123" />
|
||||
<div>{{ binded.masked }}</div>
|
||||
<input v-maska="bound" data-maska="#-#" value="123" />
|
||||
<div>{{ bound.masked }}</div>
|
||||
</template>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import { reactive } from 'vue'
|
||||
import { MaskaDetail, vMaska } from '../../src'
|
||||
|
||||
const binded = reactive<Partial<MaskaDetail>>({})
|
||||
const bound = reactive<Partial<MaskaDetail>>({})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input v-maska="binded" data-maska="#-#" />
|
||||
<div>{{ binded.masked }}</div>
|
||||
<input v-maska="bound" data-maska="#-#" />
|
||||
<div>{{ bound.masked }}</div>
|
||||
</template>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import { reactive } from 'vue'
|
||||
import { MaskaDetail, vMaska } from '../../src'
|
||||
|
||||
const binded = reactive<Partial<MaskaDetail>>({})
|
||||
const bound = reactive<Partial<MaskaDetail>>({})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input v-maska="binded" data-maska="#-#" />
|
||||
<div>{{ binded.unmasked }}</div>
|
||||
<input v-maska="bound" data-maska="#-#" />
|
||||
<div>{{ bound.unmasked }}</div>
|
||||
</template>
|
||||
|
||||
@@ -4,8 +4,8 @@ import { MaskaDetail, vMaska } from '../../src'
|
||||
|
||||
const emit = defineEmits(['mask1', 'mask2', 'mask3'])
|
||||
|
||||
const binded1 = reactive({})
|
||||
const binded2 = reactive({})
|
||||
const bound1 = reactive({})
|
||||
const bound2 = reactive({})
|
||||
|
||||
const options1 = {
|
||||
onMaska: (detail: MaskaDetail) => emit('mask1', detail)
|
||||
@@ -19,6 +19,6 @@ const options2 = {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input id="input1" v-maska:[options1]="binded1" data-maska="#-#" />
|
||||
<input id="input2" v-maska:[options2]="binded2" data-maska="#-#" />
|
||||
<input id="input1" v-maska:[options1]="bound1" data-maska="#-#" />
|
||||
<input id="input2" v-maska:[options2]="bound2" data-maska="#-#" />
|
||||
</template>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
import { reactive } from 'vue'
|
||||
import { MaskaDetail, vMaska } from '../../src'
|
||||
|
||||
const binded = reactive<Partial<MaskaDetail>>({})
|
||||
const bound = reactive<Partial<MaskaDetail>>({})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input v-maska="binded" data-maska="#-#-#" />
|
||||
<div v-if="binded.completed">Completed</div>
|
||||
<input v-maska="bound" data-maska="#-#-#" />
|
||||
<div v-if="bound.completed">Completed</div>
|
||||
<div v-else>Uncompleted</div>
|
||||
</template>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { reactive } from 'vue'
|
||||
import { vMaska, MaskaDetail, MaskInputOptions } from '../../src'
|
||||
|
||||
const binded = reactive<Partial<MaskaDetail>>({})
|
||||
const bound = reactive<Partial<MaskaDetail>>({})
|
||||
const config = reactive<MaskInputOptions>({
|
||||
mask: 'A A',
|
||||
tokens: {
|
||||
@@ -16,6 +16,6 @@ const config = reactive<MaskInputOptions>({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input v-maska:[config]="binded" />
|
||||
<div>{{ binded.masked }}</div>
|
||||
<input v-maska:[config]="bound" />
|
||||
<div>{{ bound.masked }}</div>
|
||||
</template>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { vMaska } from '../../src'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
binded: {
|
||||
bound: {
|
||||
masked: ''
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<input v-maska="binded" data-maska="#-#" />
|
||||
<div>{{ binded.masked }}</div>
|
||||
<input v-maska="bound" data-maska="#-#" />
|
||||
<div>{{ bound.masked }}</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user