File tree Expand file tree Collapse file tree 4 files changed +60
-0
lines changed
dev/components/components Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" q-pa-md" >
3+ <q-carousel
4+ swipeable
5+ animated
6+ arrows
7+ v-model =" slide"
8+ :fullscreen.sync =" fullscreen"
9+ infinite
10+ >
11+ <q-carousel-slide :name =" 1" img-src =" https://cdn.quasar-framework.org/img/mountains.jpg" />
12+ <q-carousel-slide :name =" 2" img-src =" https://cdn.quasar-framework.org/img/parallax1.jpg" />
13+ <q-carousel-slide :name =" 3" img-src =" https://cdn.quasar-framework.org/img/parallax2.jpg" />
14+ <q-carousel-slide :name =" 4" img-src =" https://cdn.quasar-framework.org/img/quasar.jpg" />
15+
16+ <template v-slot :control >
17+ <q-carousel-control
18+ position =" bottom-right"
19+ :offset =" [18, 18]"
20+ >
21+ <q-btn
22+ push round dense color =" white" text-color =" primary"
23+ :icon =" fullscreen ? 'fullscreen_exit' : 'fullscreen'"
24+ @click =" fullscreen = !fullscreen"
25+ />
26+ </q-carousel-control >
27+ </template >
28+ </q-carousel >
29+ </div >
30+ </template >
31+
32+ <script >
33+ export default {
34+ data () {
35+ return {
36+ slide: 1 ,
37+ fullscreen: false
38+ }
39+ }
40+ }
41+ </script >
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ Don't use the property `navigation` with `thumbnails` as it supercedes and thumb
4343### Controls
4444<doc-example title =" Controls " file =" QCarousel/Controls " />
4545
46+ ### Fullscreen
47+ <doc-example title =" Fullscreen " file =" QCarousel/Fullscreen " />
48+
4649## QCarousel API
4750<doc-api file =" QCarousel " />
4851
Original file line number Diff line number Diff line change 161161 arrows
162162 thumbnails
163163 infinite
164+ :fullscreen.sync =" full"
164165 >
165166 <q-carousel-slide :name =" 0" img-src =" https://cdn.quasar-framework.org/img/mountains.jpg" />
166167 <q-carousel-slide :name =" 1" img-src =" https://cdn.quasar-framework.org/img/parallax1.jpg" />
167168 <q-carousel-slide :name =" 2" img-src =" https://cdn.quasar-framework.org/img/parallax2.jpg" />
168169 <q-carousel-slide :name =" 3" img-src =" https://cdn.quasar-framework.org/img/quasar.jpg" />
170+
171+ <template v-slot :control >
172+ <q-carousel-control
173+ position =" top-right"
174+ :offset =" [38, 38]"
175+ >
176+ <q-btn
177+ push round dense color =" white" text-color =" primary"
178+ :icon =" full ? 'fullscreen_exit' : 'fullscreen'"
179+ @click =" full = !full"
180+ />
181+ </q-carousel-control >
182+ </template >
169183 </q-carousel >
170184
171185 <p class =" caption" >
203217export default {
204218 data : () => ({
205219 fullscreen: false ,
220+ full: false ,
206221 slide: 0 ,
207222 slide2: 1 ,
208223 slide3: 1 ,
Original file line number Diff line number Diff line change 11.q-carousel
2+ background-color inherit // needed for fullscreen
23 height 400px
34
45 & __slide
You can’t perform that action at this time.
0 commit comments