File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ watch(devtoolsReady, (v) => {
5151useEventListener (' keydown' , (e ) => {
5252 if (e .code === ' KeyD' && e .altKey && e .shiftKey )
5353 rpc .value .emit (' toggle-panel' )
54+ if (e .code === ' KeyC' && e .altKey && e .shiftKey && vueInspectorDetected .value ) {
55+ rpc .value .emit (' toggle-panel' , false )
56+ rpc .value .enableVueInspector ()
57+ }
5458})
5559
5660watchEffect (() => {
Original file line number Diff line number Diff line change @@ -83,6 +83,12 @@ addEventListener('keyup', (e) => {
8383 }
8484})
8585
86+ addEventListener (' keydown' , (e ) => {
87+ if (e .code === ' KeyC' && e .altKey && e .shiftKey && vueInspectorSupported .value ) {
88+ toggleVueInspector ()
89+ }
90+ })
91+
8692const vueInspectorSupported = computed (() => {
8793 return !! (devtools .ctx .state .vitePluginDetected && vueInspector .value )
8894})
@@ -117,7 +123,7 @@ const { getIframe } = useIframe(clientUrl, async () => {
117123 <!-- panel -->
118124 <div ref =" panelEle" class =" vue-devtools__panel" :style =" panelStyle" @pointerdown =" onPointerDown" >
119125 <div
120- class =" vue-devtools__anchor-btn panel-entry-btn" title =" Toggle Vue DevTools" aria-label =" Toggle devtools panel"
126+ class =" vue-devtools__anchor-btn panel-entry-btn" title =" Toggle Vue DevTools (Alt+Shift+D) " aria-label =" Toggle devtools panel"
121127 :style =" panelVisible ? '' : 'filter:saturate(0)'" @click =" togglePanelVisible"
122128 >
123129 <svg viewBox =" 0 0 256 198" fill =" none" xmlns =" http://www.w3.org/2000/svg" >
@@ -130,7 +136,7 @@ const { getIframe } = useIframe(clientUrl, async () => {
130136 <div class =" vue-devtools__panel-content vue-devtools__panel-divider" />
131137 <div
132138 class =" vue-devtools__anchor-btn vue-devtools__panel-content vue-devtools__inspector-button"
133- title =" Toggle Component Inspector"
139+ title =" Toggle Component Inspector (Alt+Shift+C) "
134140 :class =" { active: vueInspectorEnabled }"
135141 @click =" toggleVueInspector"
136142 >
You can’t perform that action at this time.
0 commit comments