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