chore: add sfc playground local debug shortcut
This commit is contained in:
parent
287bd99994
commit
62e71b5320
|
@ -41,7 +41,12 @@ function resetVueVersion() {
|
||||||
expanded.value = false
|
expanded.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyLink() {
|
async function copyLink(e: MouseEvent) {
|
||||||
|
if (e.metaKey) {
|
||||||
|
// hidden logic for going to local debug from play.vuejs.org
|
||||||
|
window.location.href = 'http://localhost:5173/' + window.location.hash
|
||||||
|
return
|
||||||
|
}
|
||||||
await navigator.clipboard.writeText(location.href)
|
await navigator.clipboard.writeText(location.href)
|
||||||
alert('Sharable URL has been copied to clipboard.')
|
alert('Sharable URL has been copied to clipboard.')
|
||||||
}
|
}
|
||||||
|
@ -63,7 +68,7 @@ onMounted(async () => {
|
||||||
if (document.activeElement?.tagName === 'IFRAME') {
|
if (document.activeElement?.tagName === 'IFRAME') {
|
||||||
expanded.value = false
|
expanded.value = false
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
async function fetchVersions(): Promise<string[]> {
|
async function fetchVersions(): Promise<string[]> {
|
||||||
|
|
Loading…
Reference in New Issue