[InputOtp] select input content when clicking on a box (#6354)
parent
6ddc571f48
commit
9939185b5d
|
@ -18,6 +18,7 @@
|
|||
@blur="onBlur($event)"
|
||||
@paste="onPaste($event)"
|
||||
@keydown="onKeyDown($event)"
|
||||
@click="onClick($event)"
|
||||
:pt="ptm('pcInputText')"
|
||||
/>
|
||||
</slot>
|
||||
|
@ -128,6 +129,9 @@ export default {
|
|||
onBlur(event) {
|
||||
this.$emit('blur', event);
|
||||
},
|
||||
onClick(event) {
|
||||
setTimeout(() => event.target.select(), 1);
|
||||
},
|
||||
onKeyDown(event) {
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue