mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-23 00:03:07 +00:00
remove declare $refs
This commit is contained in:
parent
6d4ec2cbe7
commit
adbe740edf
2 changed files with 2 additions and 11 deletions
|
@ -65,10 +65,6 @@ export default class extends Vue {
|
||||||
public username = "";
|
public username = "";
|
||||||
public password = "";
|
public password = "";
|
||||||
|
|
||||||
declare $refs: {
|
|
||||||
username_input: HTMLInputElement | unknown;
|
|
||||||
};
|
|
||||||
|
|
||||||
private on_keydown(e: KeyboardEvent) {
|
private on_keydown(e: KeyboardEvent) {
|
||||||
if (e.key == "Enter") this.submit();
|
if (e.key == "Enter") this.submit();
|
||||||
else if (e.key == "Escape") this.cancel();
|
else if (e.key == "Escape") this.cancel();
|
||||||
|
@ -78,9 +74,8 @@ export default class extends Vue {
|
||||||
window.addEventListener("keydown", this.on_keydown);
|
window.addEventListener("keydown", this.on_keydown);
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs.username_input instanceof HTMLInputElement) {
|
if (!(this.$refs.username_input instanceof HTMLElement)) return;
|
||||||
this.$refs.username_input.focus();
|
this.$refs.username_input.focus();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,6 @@ export default class extends Vue {
|
||||||
public day_str = "";
|
public day_str = "";
|
||||||
public editing = false;
|
public editing = false;
|
||||||
|
|
||||||
declare $refs: {
|
|
||||||
day_input: HTMLInputElement | unknown;
|
|
||||||
};
|
|
||||||
|
|
||||||
private toggle_editing() {
|
private toggle_editing() {
|
||||||
this.day_str = String(this.door.day);
|
this.day_str = String(this.door.day);
|
||||||
this.editing = !this.editing;
|
this.editing = !this.editing;
|
||||||
|
|
Loading…
Reference in a new issue