Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ watch(devtoolsReady, (v) => {
useEventListener('keydown', (e) => {
if (e.code === 'KeyD' && e.altKey && e.shiftKey)
rpc.value.emit('toggle-panel')
// Toggle component inspector with Alt(Option) + Shift + C
if (e.code === 'KeyC' && e.altKey && e.shiftKey && vueInspectorDetected.value) {
e.preventDefault()
rpc.value.emit('toggle-panel', false)
rpc.value.enableVueInspector()
}
})

watchEffect(() => {
Expand Down
8 changes: 8 additions & 0 deletions packages/overlay/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ addEventListener('keyup', (e) => {
}
})

// Toggle component inspector with Alt(Option) + Shift + C
addEventListener('keydown', (e) => {
if (e.code === 'KeyC' && e.altKey && e.shiftKey && vueInspectorSupported.value) {
e.preventDefault()
toggleVueInspector()
}
})

const vueInspectorSupported = computed(() => {
return !!(devtools.ctx.state.vitePluginDetected && vueInspector.value)
})
Expand Down
4 changes: 4 additions & 0 deletions packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
console.log(` ${green('➜')} ${bold('Vue DevTools')}: ${green(`Open ${colorUrl(`${devtoolsUrl}`)} as a separate window`)}`)
}
console.log(` ${green('➜')} ${bold('Vue DevTools')}: ${green(`Press ${yellow(keys)} in App to toggle the Vue DevTools`)}`)
if (pluginOptions.componentInspector) {
const inspectorKeys = normalizeComboKeyPrint('option-shift-c')
console.log(` ${green('➜')} ${bold('Vue DevTools')}: ${green(`Press ${yellow(inspectorKeys)} in App to toggle the Component Inspector`)}`)
}
}
}

Expand Down