Skip to content

Commit b66330b

Browse files
committed
fix vue ref
1 parent 84e2d70 commit b66330b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

web_src/js/components/ViewFileTreeItem.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ type Item = {
1212
1313
const props = defineProps<{
1414
item: Item,
15-
navigateViewContent: any;
16-
loadChildren: any;
17-
selectedItem?: any;
15+
navigateViewContent: (treePath: string) => void,
16+
loadChildren: (treePath: string, subPath?: string) => Promise<Item[]>,
17+
selectedItem?: string,
1818
}>();
1919
2020
const isLoading = ref(false);
@@ -47,8 +47,8 @@ const doGotoSubModule = () => {
4747
};
4848
</script>
4949

50+
<!--title instead of tooltip above as the tooltip needs too much work with the current methods, i.e. not being loaded or staying open for "too long"-->
5051
<template>
51-
<!--title instead of tooltip above as the tooltip needs too much work with the current methods, i.e. not being loaded or staying open for "too long"-->
5252
<div
5353
v-if="item.entryMode === 'commit'" class="tree-item type-submodule"
5454
:title="item.entryName"
@@ -62,7 +62,7 @@ const doGotoSubModule = () => {
6262
</div>
6363
<div
6464
v-else-if="item.entryMode === 'symlink'" class="tree-item type-symlink"
65-
:class="{'selected': selectedItem.value === item.fullPath}"
65+
:class="{'selected': selectedItem === item.fullPath}"
6666
:title="item.entryName"
6767
@click.stop="doLoadFileContent"
6868
>
@@ -74,7 +74,7 @@ const doGotoSubModule = () => {
7474
</div>
7575
<div
7676
v-else-if="item.entryMode !== 'tree'" class="tree-item type-file"
77-
:class="{'selected': selectedItem.value === item.fullPath}"
77+
:class="{'selected': selectedItem === item.fullPath}"
7878
:title="item.entryName"
7979
@click.stop="doLoadFileContent"
8080
>
@@ -86,7 +86,7 @@ const doGotoSubModule = () => {
8686
</div>
8787
<div
8888
v-else class="tree-item type-directory"
89-
:class="{'selected': selectedItem.value === item.fullPath}"
89+
:class="{'selected': selectedItem === item.fullPath}"
9090
:title="item.entryName"
9191
@click.stop="doLoadDirContent"
9292
>

0 commit comments

Comments
 (0)