From ca17dd6c981456e6fb94021509b18b31f785cd13 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 6 Aug 2021 19:38:11 +0800 Subject: [PATCH] fix issue --- spug_web/src/pages/deploy/request/index.js | 1 + spug_web/src/pages/deploy/request/store.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/spug_web/src/pages/deploy/request/index.js b/spug_web/src/pages/deploy/request/index.js index cb20cac..b33794d 100644 --- a/spug_web/src/pages/deploy/request/index.js +++ b/spug_web/src/pages/deploy/request/index.js @@ -26,6 +26,7 @@ function Index() { store.fetchRecords() if (envStore.records.length === 0) envStore.fetchRecords() if (appStore.records.length === 0) appStore.fetchRecords() + return () => store.leaveConsole() }, []) function handleBatchDel() { diff --git a/spug_web/src/pages/deploy/request/store.js b/spug_web/src/pages/deploy/request/store.js index 75eba56..3b823fc 100644 --- a/spug_web/src/pages/deploy/request/store.js +++ b/spug_web/src/pages/deploy/request/store.js @@ -142,6 +142,12 @@ class Store { info = Object.assign({}, info, {mode: 'read'}) this.tabs.push(info) } + }; + + leaveConsole = () => { + for (let item of this.tabs) { + item.mode = 'read' + } } }