From 2fb3c40307c6f113578582c24f68dd2c43bf615c Mon Sep 17 00:00:00 2001 From: zsxeee Date: Fri, 17 Sep 2021 20:40:57 +0800 Subject: [PATCH] Variable name and key binding --- src/components/NotificationDialog.vue | 10 +++++----- src/components/notifications/index.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 707adfc0..4b1b0cc4 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -13,7 +13,7 @@
@@ -72,7 +72,7 @@ import { Modal } from "bootstrap" import { ucfirst } from "../util.ts" import Confirm from "./Confirm.vue"; -import NotificationForm from "./notifications" +import NotificationFormList from "./notifications" export default { components: { @@ -85,10 +85,10 @@ export default { model: null, processing: false, id: null, - notificationTypes: Object.keys(NotificationForm), + notificationTypes: Object.keys(NotificationFormList), notification: { name: "", - /** @type { null | keyof NotificationForm } */ + /** @type { null | keyof NotificationFormList } */ type: null, isDefault: false, // Do not set default value here, please scroll to show() @@ -101,7 +101,7 @@ export default { if (!this.notification.type) { return null } - return NotificationForm[this.notification.type] + return NotificationFormList[this.notification.type] } }, diff --git a/src/components/notifications/index.js b/src/components/notifications/index.js index 52d4d44d..e377803e 100644 --- a/src/components/notifications/index.js +++ b/src/components/notifications/index.js @@ -21,7 +21,7 @@ import Mattermost from "./Mattermost.vue"; * * @type { Record } */ -const NotificationForm = { +const NotificationFormList = { "telegram": Telegram, "webhook": Webhook, "smtp": STMP, @@ -41,4 +41,4 @@ const NotificationForm = { "mattermost": Mattermost } -export default NotificationForm +export default NotificationFormList