Skip to content

Commit be1a4c0

Browse files
Fixed issue with modifier key and new styles for selected code
1 parent c821a84 commit be1a4c0

12 files changed

+273
-205
lines changed

web/components/QuasarImage.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<template>
2-
<figure class="q-py-md">
3-
<QImg :src :style="{ maxHeight: maxHeight }" fit="scale-down" />
4-
<figcaption class="text-caption text-center text-italic text-grey-6">
2+
<figure class="q-py-md" :class="[$q.screen.lt.sm ? 'q-mx-sm' : undefined]">
3+
<QImg
4+
:src
5+
:style="{ maxHeight: maxHeight }"
6+
fit="scale-down"
7+
class="rounded-borders"
8+
/>
9+
<figcaption class="text-caption text-center text-italic text-grey-6 q-mt-sm">
510
<slot />
611
</figcaption>
712
</figure>
@@ -12,6 +17,8 @@ defineProps<{
1217
src: string;
1318
maxHeight?: string;
1419
}>();
20+
21+
const $q = useQuasar();
1522
</script>
1623

1724
<style scoped></style>

web/components/QuasarVideo.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
2-
<figure class="q-py-md">
2+
<figure class="q-py-md" :class="[$q.screen.lt.sm ? 'q-mx-sm' : undefined]">
33
<QVideo
4-
:ratio="ratio ?? 16 / 9"
4+
:ratio="ratio ? Number.parseFloat(ratio) : 16 / 9"
55
:src
66
:style="{ maxHeight: maxHeight }"
77
fit="scale-down"
88
class="rounded-borders"
99
/>
10-
<figcaption class="text-caption text-center text-italic text-grey-6">
10+
<figcaption class="text-caption text-center text-italic text-grey-6 q-mt-sm">
1111
<slot />
1212
</figcaption>
1313
</figure>
@@ -17,8 +17,10 @@
1717
defineProps<{
1818
src: string;
1919
maxHeight?: string;
20-
ratio?: number;
20+
ratio?: string;
2121
}>();
22+
23+
const $q = useQuasar();
2224
</script>
2325

2426
<style scoped></style>

0 commit comments

Comments
 (0)