File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
packages/router/src/unplugin/core Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,13 @@ class _TreeNodeValueBase {
9999 return this . overrides . path ?? this . pathSegment
100100 }
101101
102+ /**
103+ * Aliases of the node if any.
104+ */
105+ get alias ( ) : string [ ] {
106+ return this . overrides . alias ?? [ ]
107+ }
108+
102109 /**
103110 * Full path of the node including parent nodes.
104111 */
@@ -156,13 +163,20 @@ class _TreeNodeValueBase {
156163 }
157164
158165 toString ( ) : string {
166+ let value = ''
159167 // index.vue (home).vue
160168 if ( ! this . pathSegment ) {
161- return (
169+ value +=
162170 '<index>' + ( this . rawSegment === 'index' ? '' : ' ' + this . rawSegment )
163- )
171+ } else {
172+ value += this . pathSegment
173+ }
174+
175+ if ( this . alias . length ) {
176+ value += ` alias(${ this . alias . join ( ', ' ) } )`
164177 }
165- return this . pathSegment
178+
179+ return value
166180 }
167181
168182 isParam ( ) : this is TreeNodeValueParam {
You can’t perform that action at this time.
0 commit comments