diff --git a/components/lib/inputotp/InputOtp.vue b/components/lib/inputotp/InputOtp.vue index 21bdda87e..6df198a45 100755 --- a/components/lib/inputotp/InputOtp.vue +++ b/components/lib/inputotp/InputOtp.vue @@ -124,6 +124,19 @@ export default { break; + case 8: + if (event.target.value.length === 0) { + this.moveToPrev(event); + event.preventDefault(); + } + + break; + + case 40: + event.preventDefault(); + + break; + case 39: this.moveToNext(event); event.preventDefault(); diff --git a/doc/inputotp/SampleDoc.vue b/doc/inputotp/SampleDoc.vue new file mode 100644 index 000000000..6d8d0eba6 --- /dev/null +++ b/doc/inputotp/SampleDoc.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/pages/inputotp/index.vue b/pages/inputotp/index.vue index 6cb5376c0..1f2c2e900 100644 --- a/pages/inputotp/index.vue +++ b/pages/inputotp/index.vue @@ -7,6 +7,7 @@ import AccessibilityDoc from '@/doc/inputotp/AccessibilityDoc.vue'; import BasicDoc from '@/doc/inputotp/BasicDoc.vue'; import ImportDoc from '@/doc/inputotp/ImportDoc.vue'; import MaskDoc from '@/doc/inputotp/MaskDoc.vue'; +import SampleDoc from '@/doc/inputotp/SampleDoc.vue'; import TemplateDoc from '@/doc/inputotp/TemplateDoc.vue'; import IntegerOnlyDoc from '@/doc/inputotp/integerOnlyDoc.vue'; import PTComponent from '@/doc/inputotp/pt/index.vue'; @@ -41,6 +42,11 @@ export default { label: 'Template', component: TemplateDoc }, + { + id: 'sample', + label: 'Sample', + component: SampleDoc + }, { id: 'accessibility', label: 'Accessibility',