From 7da48b27a57015d83341070bff1aa7cd9376ed47 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 22 Feb 2023 04:29:43 +0800 Subject: [PATCH] Fix `getUniqueDefaultName` --- src/components/NotificationDialog.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 02ddce800..9631538e7 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -267,17 +267,16 @@ export default { * @return {string} */ getUniqueDefaultName(notificationKey) { - /* + let index = 1; let name = ""; do { name = this.$t("defaultNotificationName", { - notification: this.$t(notificationKey).replace(/\(.+\)/, "").trim(), + notification: this.notificationNameList[notificationKey].replace(/\(.+\)/, "").trim(), number: index++ }); } while (this.$root.notificationList.find(it => it.name === name)); - return name;*/ - return "123"; + return name; } }, };