File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/app-backend-vue3/src/components Expand file tree Collapse file tree 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) {
3636 for ( const key in instance . appContext ?. components ) {
3737 if ( instance . appContext . components [ key ] === instance . type ) return saveComponentName ( instance , key )
3838 }
39+ const fileName = getComponentFileName ( instance . type || { } )
40+ if ( fileName ) {
41+ return fileName
42+ }
3943 return 'Anonymous Component'
4044}
4145
@@ -45,10 +49,10 @@ function saveComponentName (instance, key) {
4549}
4650
4751function 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 ) {
5256 const file = options . __file // injected by vue-loader
5357 if ( file ) {
5458 return classify ( basename ( file , '.vue' ) )
You can’t perform that action at this time.
0 commit comments