commit
ca4e136bca
1 changed files with 10 additions and 0 deletions
|
|
@ -73,6 +73,11 @@ export default {
|
||||||
resetForm,
|
resetForm,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isEnterClicked: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async validateAndEmit() {
|
async validateAndEmit() {
|
||||||
const validationResult = await this.validate();
|
const validationResult = await this.validate();
|
||||||
|
|
@ -84,9 +89,14 @@ export default {
|
||||||
},
|
},
|
||||||
async onEnter(e) {
|
async onEnter(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (this.isEnterClicked) return;
|
||||||
|
this.isEnterClicked = true;
|
||||||
document.getElementById("modalbtn")?.focus();
|
document.getElementById("modalbtn")?.focus();
|
||||||
this.$refs.modalButtonMain.clicked();
|
this.$refs.modalButtonMain.clicked();
|
||||||
document.getElementById(this.modalId)?.focus();
|
document.getElementById(this.modalId)?.focus();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.isEnterClicked = false;
|
||||||
|
}, 2000);
|
||||||
},
|
},
|
||||||
resetButtonStyle() {
|
resetButtonStyle() {
|
||||||
this.$refs.modalButtonMain?.resetButtonStyle();
|
this.$refs.modalButtonMain?.resetButtonStyle();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue