primevue-mirror/doc/inputotp/BasicDoc.vue

55 lines
1.0 KiB
Vue
Raw Normal View History

2024-02-21 18:38:16 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Two-way value binding is defined using <i>v-model</i>. The number of characters is defined with the <i>length</i> property, which is set to 4 by default.</p>
</DocSectionText>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-02-21 18:38:16 +00:00
<InputOtp v-model="value" />
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
value: null,
code: {
basic: `
<InputOtp v-model="value" />
`,
options: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-02-21 18:38:16 +00:00
<InputOtp v-model="value" />
</div>
</template>
<script>
export default {
data() {
return {
value: null
}
}
};
<\/script>
`,
composition: `
<template>
2024-05-20 12:14:38 +00:00
<div class="card flex justify-center">
2024-02-21 18:38:16 +00:00
<InputOtp v-model="value" />
</div>
</template>
<script setup>
import { ref } from 'vue';
const value = ref(null);
<\/script>
`
}
};
}
};
</script>