From c24022c41cf9450c979250d4fb7216c99cf7f079 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 4 Jul 2023 19:26:05 +0800 Subject: [PATCH] Make the visibility of the Alert indirect --- src/components/AlertMessage.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/AlertMessage.vue b/src/components/AlertMessage.vue index 00fee10a..6f3ea5b1 100644 --- a/src/components/AlertMessage.vue +++ b/src/components/AlertMessage.vue @@ -18,15 +18,15 @@ import { Component, Prop, Vue } from "vue-facing-decorator"; export default class AlertMessage extends Vue { @Prop alertTitle = ""; @Prop alertMessage = ""; + isAlertVisible = this.alertMessage; public onClickClose() { - this.alertTitle = ""; - this.alertMessage = ""; + this.isAlertVisible = false; } public computedAlertClassNames() { return { - hidden: !this.alertMessage, + hidden: !this.isAlertVisible, "dismissable-alert": true, "bg-slate-100": true, "p-5": true,