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' + } } }