added scroll for Tree

This commit is contained in:
2024-11-18 16:50:56 +00:00
parent ca4e6defb3
commit 1443fafb7b

View File

@@ -25,7 +25,7 @@
</div>
</div>
</div>
<div class="col-span-6">
<div id ="card-flow-codeviewer" class="flex-1">
<div class="card flow-codeviewer">
<h5>File Explorer</h5>
<p v-if="nodes && nodes.length">
@@ -147,6 +147,15 @@ const skeletonConfigs = [
{ width: "80%", height: "1.5rem" }
];
watch(selectedFile, () => {
if (selectedFile.value) {
const cardFlowCodeViewer = document.getElementById('card-flow-codeviewer');
if (cardFlowCodeViewer) {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
}
});
</script>