remove declare $refs

This commit is contained in:
Jörn-Michael Miehe 2023-11-21 22:37:00 +00:00
parent 6d4ec2cbe7
commit adbe740edf
2 changed files with 2 additions and 11 deletions

View file

@ -65,10 +65,6 @@ export default class extends Vue {
public username = "";
public password = "";
declare $refs: {
username_input: HTMLInputElement | unknown;
};
private on_keydown(e: KeyboardEvent) {
if (e.key == "Enter") this.submit();
else if (e.key == "Escape") this.cancel();
@ -78,9 +74,8 @@ export default class extends Vue {
window.addEventListener("keydown", this.on_keydown);
this.$nextTick(() => {
if (this.$refs.username_input instanceof HTMLInputElement) {
this.$refs.username_input.focus();
}
if (!(this.$refs.username_input instanceof HTMLElement)) return;
this.$refs.username_input.focus();
});
}

View file

@ -43,10 +43,6 @@ export default class extends Vue {
public day_str = "";
public editing = false;
declare $refs: {
day_input: HTMLInputElement | unknown;
};
private toggle_editing() {
this.day_str = String(this.door.day);
this.editing = !this.editing;