File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/devtools/views/components Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 26
26
<span >Inspect DOM</span >
27
27
</a >
28
28
<a
29
- v-if =" target.file "
30
- v-tooltip =" target.file && $t('ComponentInspector.openInEditor.tooltip', { file: target.file })"
29
+ v-if =" fileIsPath "
30
+ v-tooltip =" $t('ComponentInspector.openInEditor.tooltip', { file: target.file })"
31
31
class =" button"
32
32
@click =" openInEditor"
33
33
>
@@ -100,6 +100,12 @@ export default {
100
100
[el .key ]: el .value
101
101
}, this .filter )
102
102
})), ' type' )
103
+ },
104
+
105
+ // Checks if the file is actually a path (e.g. '/path/to/file.vue'), or
106
+ // only the basename of a pre-compiled 3rd-party component (e.g. 'file.vue')
107
+ fileIsPath () {
108
+ return this .target .file && / [/\\ ] / .test (this .target .file )
103
109
}
104
110
},
105
111
You can’t perform that action at this time.
0 commit comments