@@ -4,6 +4,7 @@ import EmptyPane from '@front/features/layout/EmptyPane.vue'
4
4
import RenderCode from ' ./RenderCode.vue'
5
5
6
6
import { defineComponent , ref , watch , computed } from ' @vue/composition-api'
7
+ import { getComponentDisplayName , SharedData } from ' @vue-devtools/shared-utils'
7
8
import { onKeyDown } from ' @front/util/keyboard'
8
9
import { useSelectedComponent } from ' ./composable'
9
10
@@ -16,8 +17,11 @@ export default defineComponent({
16
17
17
18
setup () {
18
19
const selectedComponent = useSelectedComponent ()
20
+ const displayName = computed (() => getComponentDisplayName (selectedComponent .data .value ?.name ?? ' ' , SharedData .componentNameStyle ))
21
+
19
22
const showRenderCode = ref (false )
20
23
24
+ // Auto scroll
21
25
const { selectedComponentId } = selectedComponent
22
26
const inspector = ref ()
23
27
watch (selectedComponentId , () => {
@@ -26,8 +30,8 @@ export default defineComponent({
26
30
}
27
31
})
28
32
33
+ // State filter
29
34
const stateFilterInput = ref ()
30
-
31
35
onKeyDown (event => {
32
36
if (event .key === ' d' && event .altKey ) {
33
37
stateFilterInput .value .focus ()
@@ -39,6 +43,7 @@ export default defineComponent({
39
43
40
44
return {
41
45
... selectedComponent ,
46
+ displayName ,
42
47
showRenderCode ,
43
48
inspector ,
44
49
stateFilterInput ,
@@ -57,7 +62,7 @@ export default defineComponent({
57
62
<div class =" flex items-baseline" >
58
63
<span class =" text-gray-500" >< ; </span >
59
64
<span class =" text-green-500" >
60
- {{ data.name }}
65
+ {{ displayName }}
61
66
</span >
62
67
<span class =" text-gray-500" >> ; </span >
63
68
</div >
0 commit comments