From b737e9a69d4ba633d377ebd72ba70bde6a354ff9 Mon Sep 17 00:00:00 2001 From: marvzhang Date: Tue, 28 Jan 2020 10:01:02 +0800 Subject: [PATCH] fixed https://github.com/crawlab-team/crawlab/issues/480 --- frontend/src/views/node/NodeList.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/node/NodeList.vue b/frontend/src/views/node/NodeList.vue index 7b1c50d5..931905d8 100644 --- a/frontend/src/views/node/NodeList.vue +++ b/frontend/src/views/node/NodeList.vue @@ -115,7 +115,8 @@ - + @@ -172,7 +173,8 @@ export default { nodeFormRules: { name: [{ required: true, message: 'Required Field', trigger: 'change' }] }, - activeTab: undefined + activeTab: undefined, + isButtonClicked: false } }, computed: { @@ -235,6 +237,11 @@ export default { this.dialogVisible = true }, onRemove (row) { + this.isButtonClicked = true + setTimeout(() => { + this.isButtonClicked = false + }, 100) + this.$confirm(this.$t('Are you sure to delete this node?'), this.$t('Notification'), { confirmButtonText: this.$t('Confirm'), cancelButtonText: this.$t('Cancel'), @@ -251,6 +258,11 @@ export default { }) }, onView (row) { + this.isButtonClicked = true + setTimeout(() => { + this.isButtonClicked = false + }, 100) + this.$router.push(`/nodes/${row._id}`) this.$st.sendEv('节点列表', '查看节点') @@ -262,6 +274,7 @@ export default { this.$store.dispatch('node/getNodeSystemInfo', row._id) }, onRowClick (row) { + if (this.isButtonClicked) return this.onView(row) }, getExecutables (row) {