From 67ca5ac11fac1a1244a36330d0954240403b595d Mon Sep 17 00:00:00 2001 From: timongh <46739861+timongh@users.noreply.github.com> Date: Fri, 10 Mar 2023 21:09:55 +0800 Subject: [PATCH] Fix UserItem.vue `removeConfirmTemplate` and `removeIcon` are only present when `this.config.isUserItem`. So need to restrict the display conditions of the Toast to avoid passing in `null`. --- .../settings-panel/sub-pages/manage-panel/UserItem.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/settings-panel/sub-pages/manage-panel/UserItem.vue b/src/components/settings-panel/sub-pages/manage-panel/UserItem.vue index 23c99f6c7..1d9a4a4c5 100644 --- a/src/components/settings-panel/sub-pages/manage-panel/UserItem.vue +++ b/src/components/settings-panel/sub-pages/manage-panel/UserItem.vue @@ -50,10 +50,12 @@ export default Vue.extend({ if (this.config.getSettings) { this.settings = this.config.getSettings(this.config.item) } - Toast.mini(this.$refs.removeConfirmTemplate, this.$refs.removeIcon, { - trigger: 'click', - hideOnClick: true, - }) + if (this.config.isUserItem) { + Toast.mini(this.$refs.removeConfirmTemplate, this.$refs.removeIcon, { + trigger: 'click', + hideOnClick: true, + }) + } }, methods: { async removeItem() {