搜索文件相关样式调整

This commit is contained in:
xiaoqi.cxq 2022-08-17 14:12:42 +08:00
parent a85fe36105
commit c6d5ddfe3d

View File

@ -140,9 +140,15 @@ export default {
}); });
}, },
clickSearch(item) { clickSearch(item) {
const node = store.getters['explorer/nodeMap'][item.id];
if (!node) {
return;
}
store.commit('explorer/setSelectedId', item.id); store.commit('explorer/setSelectedId', item.id);
store.commit('file/setCurrentId', item.id); // Prevent from freezing the UI while loading the file
this.showSearch = false; setTimeout(() => {
store.commit('file/setCurrentId', item.id);
}, 10);
}, },
}, },
created() { created() {
@ -209,6 +215,11 @@ export default {
.app--dark & { .app--dark & {
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
} }
&:focus {
background-color: #39f;
color: #fff;
}
} }
} }
</style> </style>