File tree 5 files changed +13
-13
lines changed
5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
- import { classify } from '@vue-devtools/shared-utils'
2
- import { basename } from '../util'
1
+ import { classify , basename } from '@vue-devtools/shared-utils'
3
2
import { ComponentInstance , App } from '@vue/devtools-api'
4
3
import { BackendContext } from '@vue-devtools/app-backend-api'
5
4
Original file line number Diff line number Diff line change @@ -9,15 +9,6 @@ export function flatten (items) {
9
9
} , [ ] )
10
10
}
11
11
12
- // Use a custom basename functions instead of the shimed version
13
- // because it doesn't work on Windows
14
- export function basename ( filename , ext ) {
15
- return path . basename (
16
- filename . replace ( / ^ [ a - z A - Z ] : / , '' ) . replace ( / \\ / g, '/' ) ,
17
- ext ,
18
- )
19
- }
20
-
21
12
export function returnError ( cb : ( ) => any ) {
22
13
try {
23
14
return cb ( )
Original file line number Diff line number Diff line change @@ -359,9 +359,13 @@ export function getCustomDateDetails (val: Date) {
359
359
360
360
// Use a custom basename functions instead of the shimed version
361
361
// because it doesn't work on Windows
362
- function basename ( filename , ext ) {
362
+ export function basename ( filename , ext ) {
363
+ filename = filename . replace ( / \\ / g, '/' )
364
+ if ( filename . includes ( `/index${ ext } ` ) ) {
365
+ filename = filename . replace ( `/index${ ext } ` , ext )
366
+ }
363
367
return path . basename (
364
- filename . replace ( / ^ [ a - z A - Z ] : / , '' ) . replace ( / \\ / g , '/' ) ,
368
+ filename . replace ( / ^ [ a - z A - Z ] : / , '' ) ,
365
369
ext ,
366
370
)
367
371
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import SetupScript from './SetupScript.vue'
21
21
import SetupDataLike from ' ./SetupDataLike.vue'
22
22
import SetupTSScriptProps from ' ./SetupTSScriptProps.vue'
23
23
import DomOrder from ' ./DomOrder.vue'
24
+ import IndexComponent from ' ./IndexComponent/index.vue'
24
25
25
26
import { h , createApp } from ' vue'
26
27
import SimplePlugin from ' ./devtools-plugin/simple'
@@ -51,6 +52,7 @@ export default {
51
52
SetupDataLike,
52
53
SetupTSScriptProps,
53
54
DomOrder,
55
+ IndexComponent,
54
56
inline: {
55
57
render : () => h (' h3' , ' Inline component definition' ),
56
58
},
@@ -122,6 +124,7 @@ export default {
122
124
</div >
123
125
124
126
<Child question =" Life" />
127
+ <IndexComponent />
125
128
<NestedMore />
126
129
<NativeTypes ref =" nativeTypes" />
127
130
<EventEmit
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <h2 >Index component</h2 >
3
+ </template >
You can’t perform that action at this time.
0 commit comments