We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87b9087 commit a3c9db3Copy full SHA for a3c9db3
src/devtools/views/components/ComponentInspector.vue
@@ -26,8 +26,8 @@
26
<span>Inspect DOM</span>
27
</a>
28
<a
29
- v-if="target.file"
30
- v-tooltip="target.file && $t('ComponentInspector.openInEditor.tooltip', { file: target.file })"
+ v-if="fileIsPath"
+ v-tooltip="$t('ComponentInspector.openInEditor.tooltip', { file: target.file })"
31
class="button"
32
@click="openInEditor"
33
>
@@ -100,6 +100,12 @@ export default {
100
[el.key]: el.value
101
}, this.filter)
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)
109
}
110
},
111
0 commit comments