fix: complete field and OTP public contracts (HD-07)
This commit is contained in:
@@ -93,6 +93,7 @@ export default defineComponent({
|
||||
onKeydownCapture: userKeydownCapture,
|
||||
onPaste: userPaste,
|
||||
onPasteCapture: userPasteCapture,
|
||||
onInputCapture: userInputCapture,
|
||||
...rest
|
||||
} = attrs as Record<string, unknown>;
|
||||
|
||||
@@ -110,6 +111,7 @@ export default defineComponent({
|
||||
...toHandlerArray(userPasteCapture),
|
||||
...toHandlerArray(userPaste),
|
||||
stopIfPrevented,
|
||||
(event) => context?.handlePaste(event as ClipboardEvent, props.index),
|
||||
];
|
||||
|
||||
return h(
|
||||
@@ -117,6 +119,10 @@ export default defineComponent({
|
||||
{
|
||||
...rest,
|
||||
class: [slotClass, cls],
|
||||
onInputCapture: [
|
||||
...toHandlerArray(userInputCapture),
|
||||
(event: InputEvent) => context?.guardInput(event, props.index),
|
||||
],
|
||||
onKeydownCapture: keydownCapture,
|
||||
onPasteCapture: pasteCapture,
|
||||
"data-active": isActive.value || undefined,
|
||||
@@ -151,6 +157,7 @@ export default defineComponent({
|
||||
disabled: isDisabled.value,
|
||||
readonly: isReadOnly.value || undefined,
|
||||
class: inputClass,
|
||||
style: { textAlign: context?.textAlign.value },
|
||||
id: context?.inputId(props.index),
|
||||
"data-slot": "input-otp-input",
|
||||
autocomplete: "one-time-code",
|
||||
|
||||
Reference in New Issue
Block a user