From de5fff311c5fe0e5748288c6ba9731bc2148bf6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 21 Sep 2023 13:29:47 +0000 Subject: [PATCH] bug: drop v-model for mutable objects --- ui/src/components/admin/DoorMapEditor.vue | 4 ++-- ui/src/components/editor/DoorChooser.vue | 9 ++------- ui/src/components/editor/DoorPlacer.vue | 5 ----- ui/src/components/editor/PreviewDoor.vue | 5 ----- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/ui/src/components/admin/DoorMapEditor.vue b/ui/src/components/admin/DoorMapEditor.vue index e1ac08c..0c26a5f 100644 --- a/ui/src/components/admin/DoorMapEditor.vue +++ b/ui/src/components/admin/DoorMapEditor.vue @@ -37,8 +37,8 @@ - - + +
diff --git a/ui/src/components/editor/DoorChooser.vue b/ui/src/components/editor/DoorChooser.vue index abe97ea..23f5df9 100644 --- a/ui/src/components/editor/DoorChooser.vue +++ b/ui/src/components/editor/DoorChooser.vue @@ -14,9 +14,9 @@ @@ -38,13 +38,8 @@ import PreviewDoor from "./PreviewDoor.vue"; props: { doors: Array, }, - emits: ["update:doors"], }) export default class extends Vue { public doors!: Door[]; - - public beforeUnmount() { - this.$emit("update:doors", this.doors); - } } diff --git a/ui/src/components/editor/DoorPlacer.vue b/ui/src/components/editor/DoorPlacer.vue index f440795..78dd503 100644 --- a/ui/src/components/editor/DoorPlacer.vue +++ b/ui/src/components/editor/DoorPlacer.vue @@ -34,7 +34,6 @@ import RectangleCanvas from "./RectangleCanvas.vue"; props: { doors: Array, }, - emits: ["update:doors"], }) export default class extends Vue { private doors!: Door[]; @@ -70,9 +69,5 @@ export default class extends Vue { this.doors.splice(idx, 1); } - - public beforeUnmount() { - this.$emit("update:doors", this.doors); - } } diff --git a/ui/src/components/editor/PreviewDoor.vue b/ui/src/components/editor/PreviewDoor.vue index 92a5136..a56e6d3 100644 --- a/ui/src/components/editor/PreviewDoor.vue +++ b/ui/src/components/editor/PreviewDoor.vue @@ -45,7 +45,6 @@ import SVGRect from "../calendar/SVGRect.vue"; props: { door: Door, }, - emits: ["update:door"], }) export default class extends Vue { public door!: Door; @@ -130,10 +129,6 @@ export default class extends Vue { this.toggle_editing(); } } - - public beforeUnmount() { - this.$emit("update:door", this.door); - } }