File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
templates/vue/application/src Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1414 @initialized =" handleMenuInitialized"
1515 @item-click =" handleItemClick"
1616 @selection-changed =" handleSelectionChange"
17+ @content-ready =" handleSelectionChange"
1718 />
1819 </div >
1920 </div >
@@ -82,12 +83,19 @@ export default {
8283 },
8384
8485 updateSelection () {
86+ if (! this .treeView ) {
87+ return ;
88+ }
89+
8590 this .treeView .selectItem (this .$route .path );
8691 }
8792 },
8893 mounted () {
8994 this .treeView = this .$refs [treeViewRef] && this .$refs [treeViewRef].instance ;
9095 this .updateSelection ();
96+ if (this .compactMode ) {
97+ this .treeView .collapseAll ();
98+ }
9199 },
92100 watch: {
93101 $route () {
Original file line number Diff line number Diff line change @@ -110,7 +110,9 @@ export default {
110110 },
111111 watch: {
112112 isLarge () {
113- this .menuOpened = this .isLarge ;
113+ if (! this .menuTemporaryOpened ) {
114+ this .menuOpened = this .isLarge ;
115+ }
114116 },
115117 $route () {
116118 if (this .menuTemporaryOpened || ! this .isLarge ) {
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ export default {
8989 },
9090 watch: {
9191 isLarge () {
92- this .menuOpened = this .isLarge ;
92+ if (! this .menuTemporaryOpened ) {
93+ this .menuOpened = this .isLarge ;
94+ }
9395 },
9496 $route () {
9597 if (this .menuTemporaryOpened || ! this .isLarge ) {
You can’t perform that action at this time.
0 commit comments