trim "get classes"

This commit is contained in:
Jörn-Michael Miehe 2023-01-20 23:48:33 +00:00
parent a715e761a9
commit 641492339a

View file

@ -1,6 +1,6 @@
<template>
<rect
:class="classes"
:class="focused ? 'focus' : ''"
:x="rectangle.left"
:y="rectangle.top"
:width="rectangle.width"
@ -24,16 +24,6 @@ import { Rectangle } from "./rectangles";
export default class Rect extends Vue {
private focused!: boolean;
private rectangle!: Rectangle;
private get classes(): string {
let result: string[] = [];
if (this.focused) {
result.push("focus");
}
return result.join(" ");
}
}
</script>