chore(sfc-playground): hide versions when click iframe & set color-scheme to dark (#6003)
This commit is contained in:
parent
bdffc143ef
commit
b4e1dfe3f8
@ -82,6 +82,10 @@ function toggleSSR() {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.dark {
|
||||||
|
color-scheme: dark;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||||
|
@ -54,6 +54,11 @@ onMounted(async () => {
|
|||||||
window.addEventListener('click', () => {
|
window.addEventListener('click', () => {
|
||||||
expanded.value = false
|
expanded.value = false
|
||||||
})
|
})
|
||||||
|
window.addEventListener('blur', () => {
|
||||||
|
if (document.activeElement?.tagName === 'IFRAME') {
|
||||||
|
expanded.value = false
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
async function fetchVersions(): Promise<string[]> {
|
async function fetchVersions(): Promise<string[]> {
|
||||||
|
Loading…
Reference in New Issue
Block a user