Skip to content

Commit 62e71b5

Browse files
committed
chore: add sfc playground local debug shortcut
1 parent 287bd99 commit 62e71b5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/sfc-playground/src/Header.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ function resetVueVersion() {
4141
expanded.value = false
4242
}
4343
44-
async function copyLink() {
44+
async function copyLink(e: MouseEvent) {
45+
if (e.metaKey) {
46+
// hidden logic for going to local debug from play.vuejs.org
47+
window.location.href = 'http://localhost:5173/' + window.location.hash
48+
return
49+
}
4550
await navigator.clipboard.writeText(location.href)
4651
alert('Sharable URL has been copied to clipboard.')
4752
}
@@ -63,7 +68,7 @@ onMounted(async () => {
6368
if (document.activeElement?.tagName === 'IFRAME') {
6469
expanded.value = false
6570
}
66-
});
71+
})
6772
})
6873
6974
async function fetchVersions(): Promise<string[]> {

0 commit comments

Comments
 (0)