@@ -14,7 +14,7 @@ type Item = {
1414
1515const props = defineProps <{
1616 item: Item ,
17- navigateViewContent: (treePath : string ) => void ,
17+ navigateViewContent: (treePath : string , newTab : boolean ) => void ,
1818 loadChildren: (treePath : string , subPath ? : string ) => Promise <Item []>,
1919 selectedItem? : string ,
2020}>();
@@ -35,13 +35,13 @@ const doLoadChildren = async () => {
3535 }
3636};
3737
38- const doLoadDirContent = () => {
39- doLoadChildren ();
40- props .navigateViewContent (props .item .fullPath );
38+ const doLoadDirContent = (newTab : boolean ) => {
39+ if ( ! newTab ) doLoadChildren ();
40+ props .navigateViewContent (props .item .fullPath , newTab );
4141};
4242
43- const doLoadFileContent = () => {
44- props .navigateViewContent (props .item .fullPath );
43+ const doLoadFileContent = (newTab : boolean ) => {
44+ props .navigateViewContent (props .item .fullPath , newTab );
4545};
4646
4747const doGotoSubModule = () => {
@@ -67,7 +67,8 @@ const doGotoSubModule = () => {
6767 v-else-if =" item.entryMode === 'symlink'" class =" tree-item type-symlink"
6868 :class =" {'selected': selectedItem === item.fullPath}"
6969 :title =" item.entryName"
70- @click.stop =" doLoadFileContent"
70+ @click.stop =" doLoadFileContent(false)"
71+ @auxclick.stop =" doLoadFileContent(true)"
7172 >
7273 <!-- symlink -->
7374 <div class =" item-content" >
@@ -80,7 +81,8 @@ const doGotoSubModule = () => {
8081 v-else-if =" item.entryMode !== 'tree'" class =" tree-item type-file"
8182 :class =" {'selected': selectedItem === item.fullPath}"
8283 :title =" item.entryName"
83- @click.stop =" doLoadFileContent"
84+ @click.stop =" doLoadFileContent(false)"
85+ @auxclick.stop =" doLoadFileContent(true)"
8486 >
8587 <!-- file -->
8688 <div class =" item-content" >
@@ -93,7 +95,8 @@ const doGotoSubModule = () => {
9395 v-else class =" tree-item type-directory"
9496 :class =" {'selected': selectedItem === item.fullPath}"
9597 :title =" item.entryName"
96- @click.stop =" doLoadDirContent"
98+ @click.stop =" doLoadDirContent(false)"
99+ @auxclick.stop =" doLoadDirContent(true)"
97100 >
98101 <!-- directory -->
99102 <div class =" item-toggle" >
0 commit comments