From c6d5ddfe3df673ab36a6e3b3c39e6c76b3ea274f Mon Sep 17 00:00:00 2001 From: "xiaoqi.cxq" Date: Wed, 17 Aug 2022 14:12:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=96=87=E4=BB=B6=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Explorer.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/Explorer.vue b/src/components/Explorer.vue index dd8e1627..bb2d95ea 100644 --- a/src/components/Explorer.vue +++ b/src/components/Explorer.vue @@ -140,9 +140,15 @@ export default { }); }, clickSearch(item) { + const node = store.getters['explorer/nodeMap'][item.id]; + if (!node) { + return; + } store.commit('explorer/setSelectedId', item.id); - store.commit('file/setCurrentId', item.id); - this.showSearch = false; + // Prevent from freezing the UI while loading the file + setTimeout(() => { + store.commit('file/setCurrentId', item.id); + }, 10); }, }, created() { @@ -209,6 +215,11 @@ export default { .app--dark & { background-color: rgba(0, 0, 0, 0.4); } + + &:focus { + background-color: #39f; + color: #fff; + } } }