File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
packages/@vue/cli-ui/src/components Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 88
88
/>
89
89
</div >
90
90
91
- <div class =" folders" >
91
+ <div ref = " folders " class =" folders" >
92
92
<template v-if =" folderCurrent .children " >
93
93
<FolderExplorerItem
94
94
v-for =" folder of folderCurrent.children"
95
95
:key =" folder.name"
96
96
:folder =" folder"
97
- @click.native =" openFolder(folder.path)"
97
+ @select =" openFolder(folder.path)"
98
98
/>
99
99
</template >
100
100
</div >
@@ -123,7 +123,11 @@ export default {
123
123
apollo: {
124
124
folderCurrent: {
125
125
query: FOLDER_CURRENT ,
126
- fetchPolicy: ' network-only'
126
+ fetchPolicy: ' network-only' ,
127
+ async result () {
128
+ await this .$nextTick ()
129
+ this .$refs .folders .scrollTop = 0
130
+ }
127
131
},
128
132
129
133
foldersFavorite: FOLDERS_FAVORITE
Original file line number Diff line number Diff line change 1
- <template >
2
- <div class =" folder-explorer-item" >
3
- <VueIcon :icon =" folder.isPackage ? 'folder' : 'folder_open'" class =" folder-icon big" />
1
+ <template functional>
2
+ <div
3
+ class =" folder-explorer-item"
4
+ @click =" listeners.select()"
5
+ >
6
+ <VueIcon :icon =" props.folder.isPackage ? 'folder' : 'folder_open'" class =" folder-icon big" />
4
7
<div class =" folder-name" >
5
- {{ folder.name }}
8
+ {{ props. folder.name }}
6
9
<img
7
- v-if =" folder.isVueProject"
10
+ v-if =" props. folder.isVueProject"
8
11
class =" vue-ui-project-icon"
9
12
src =" ~@/assets/logo.png"
10
13
>
You can’t perform that action at this time.
0 commit comments