docs(ComponentExample): handle iframe container on mobile

This commit is contained in:
Benjamin Canac
2024-12-18 15:52:02 +01:00
parent 7302a846a9
commit f3f4edae28
2 changed files with 13 additions and 6 deletions

View File

@@ -2,6 +2,8 @@
const route = useRoute()
const name = route.params.slug?.[0]
const width = computed(() => route.query.width && Number.parseInt(route.query.width as string) > 0 ? `${Number.parseInt(route.query.width as string) - 2}px` : '864px')
</script>
<template>
@@ -11,7 +13,9 @@ const name = route.params.slug?.[0]
</template>
<style scoped>
.example {
--ui-container: 54rem;
@media (min-width: 1024px) {
.example {
--ui-container: v-bind(width);
}
}
</style>