File tree 1 file changed +8
-4
lines changed
packages/app-backend-vue3/src/components
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ export function getInstanceName (instance) {
36
36
for ( const key in instance . appContext ?. components ) {
37
37
if ( instance . appContext . components [ key ] === instance . type ) return saveComponentName ( instance , key )
38
38
}
39
+ const fileName = getComponentFileName ( instance . type || { } )
40
+ if ( fileName ) {
41
+ return fileName
42
+ }
39
43
return 'Anonymous Component'
40
44
}
41
45
@@ -45,10 +49,10 @@ function saveComponentName (instance, key) {
45
49
}
46
50
47
51
function getComponentTypeName ( options ) {
48
- const name = options . name || options . _componentTag || options . __vdevtools_guessedName || options . __name
49
- if ( name ) {
50
- return name
51
- }
52
+ return options . name || options . _componentTag || options . __vdevtools_guessedName || options . __name
53
+ }
54
+
55
+ function getComponentFileName ( options ) {
52
56
const file = options . __file // injected by vue-loader
53
57
if ( file ) {
54
58
return classify ( basename ( file , '.vue' ) )
You can’t perform that action at this time.
0 commit comments