File tree 1 file changed +5
-4
lines changed
src/devtools/views/components 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,14 @@ export default {
85
85
},
86
86
onTitleClick () {
87
87
const file = this .target .file
88
+ // Console display
89
+ const fileName = file .replace (/ \\ / g , ' \\\\ ' )
88
90
if (file) {
89
- const src = ` fetch('/__open-in-editor?file=${ file} ').then(response => {
91
+ const src = ` fetch('/__open-in-editor?file=${ encodeURI ( file) } ').then(response => {
90
92
if (response.ok) {
91
- console.log('File ${ file } opened in editor')
93
+ console.log('File ${ fileName } opened in editor')
92
94
} else {
93
- const msg = 'Opening component ${ file } failed'
95
+ const msg = 'Opening component ${ fileName } failed'
94
96
if (__VUE_DEVTOOLS_TOAST__) {
95
97
__VUE_DEVTOOLS_TOAST__(msg, 'error')
96
98
} else {
@@ -116,4 +118,3 @@ export default {
116
118
cursor pointer
117
119
white-space nowrap
118
120
</style >
119
-
You can’t perform that action at this time.
0 commit comments