mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 08:50:34 +01:00
docs(ComponentExample): handle iframe container on mobile
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user