Skip to content

Commit 1e33b2d

Browse files
committed
fix(overlay): toggle component inspector
1 parent 770216c commit 1e33b2d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/overlay/src/App.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ const vueInspectorEnabled = computed(() => {
8484
return !!vueInspector.value
8585
})
8686
87-
function enableVueInspector() {
87+
function toggleVueInspector() {
88+
if(vueInspectorEnabled.value) {
89+
vueInspector.value?.disable()
90+
return
91+
}
92+
8893
vueInspector.value.enable()
8994
}
9095
@@ -129,7 +134,7 @@ const { iframe, getIframe } = useIframe(clientUrl, async () => {
129134
class="vue-devtools__anchor-btn vue-devtools__panel-content vue-devtools__inspector-button"
130135
title="Toggle Component Inspector"
131136
:class="{ active: vueInspectorEnabled }"
132-
@click="enableVueInspector"
137+
@click="toggleVueInspector"
133138
>
134139
<svg
135140
xmlns="http://www.w3.org/2000/svg" style="height: 1.1em; width: 1.1em; opacity:0.5;"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy