|
156 | 156 | :pause-on-hover="pauseOnHover"
|
157 | 157 | @autoplay-pause="internalAutoPlaying = false"
|
158 | 158 | @autoplay-resume="internalAutoPlaying = true")
|
159 |
| - v-icon(slot="pausedIcon" large color="white") pause_circle_outline |
| 159 | + v-icon(slot="pause-icon" large color="white") pause_circle_outline |
160 | 160 | vueper-slide(v-for="(slide, i) in slides1" :key="slide.id" :title="slide.title" :content="slide.content" :style="'background-color: ' + colors[i % 4]")
|
161 | 161 |
|
162 | 162 | .subtitle-1.mt-6 Basic autoplay (with pause on mouseover) source code:
|
|
167 | 167 | :title="slide.title"
|
168 | 168 | :content="slide.content"
|
169 | 169 | :style="'background-color: ' + colors[i % 4]"></vueper-slide>
|
170 |
| - <i slot="pausedIcon" class="icon pause_circle_outline"></i> |
| 170 | + <i slot="pause-icon" class="icon pause_circle_outline"></i> |
171 | 171 | </vueper-slides>
|
172 | 172 |
|
173 | 173 | .subtitle-1 This example full source code:
|
|
190 | 190 | :title="slide.title"
|
191 | 191 | :content="slide.content"
|
192 | 192 | :style="'background-color: ' + colors[i % 4]"></vueper-slide>
|
193 |
| - <i slot="pausedIcon" class="icon pause_circle_outline"></i> |
| 193 | + <i slot="pause-icon" class="icon pause_circle_outline"></i> |
194 | 194 | </vueper-slides>
|
195 | 195 | ssh-pre(language="js" label="Vue JS component").
|
196 | 196 | data: () => ({
|
|
215 | 215 | The bullets are showing slide indexes which is disabled by default.#[br]
|
216 | 216 | You can also disable arrows and/or bullets. E.g. #[span.code :arrows="false"], #[span.code :bullets="false"]
|
217 | 217 | vueper-slides.ex--arrows-and-bullets(:infinite="false" :bullets-outside="true")
|
218 |
| - v-icon(slot="arrowLeft" color="white" x-large) undo |
219 |
| - v-icon(slot="arrowRight" color="white" x-large) redo |
| 218 | + v-icon(slot="arrow-left" color="white" x-large) undo |
| 219 | + v-icon(slot="arrow-right" color="white" x-large) redo |
220 | 220 | vueper-slide(v-for="(slide, i) in slides1" :key="slide.id" :title="slide.title" :content="slide.content" :style="'background-color: ' + colors[(i + 1) % 4]")
|
221 | 221 | ssh-pre(language="html-vue" label="HTML Vue Template").
|
222 | 222 | <vueper-slides :infinite="false" :bullets-outside="true">
|
223 |
| - <v-icon slot="arrowLeft" color="white" large>arrow_left</v-icon> |
224 |
| - <v-icon slot="arrowRight" color="white" large>arrow_right</v-icon> |
| 223 | + <v-icon slot="arrow-left" color="white" large>arrow_left</v-icon> |
| 224 | + <v-icon slot="arrow-right" color="white" large>arrow_right</v-icon> |
225 | 225 | <vueper-slide
|
226 | 226 | v-for="(slide, i) in slides"
|
227 | 227 | :key="slide.id"
|
|
328 | 328 | p.
|
329 | 329 | This example (and the next one #[a(href="#ex--updating-content") Updating Content]) shows how to use a complex html content with interpreted VueJS keywords inside your slides.#[br]
|
330 | 330 | The #[span.code <vueper-slide>] tag accepts 2 slots called #[span.code slide-title] & #[span.code slide-content]
|
331 |
| - if using the html attribute way (#[span.code <vueper-slide :title="..." :content="...">]) is too restrictive for your content. |
| 331 | + if using the html attributes #[span.code :title="..."] & #[span.code :content="..."] is too restrictive for your content. |
332 | 332 |
|
333 | 333 | vueper-slides
|
334 | 334 | vueper-slide(v-for="i in 4" :key="i" :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]")
|
335 | 335 | template(v-slot:slide-content)
|
336 | 336 | v-icon(color="white") check
|
337 |
| - | Complex content {{ i.toString() }} with vueJS |
338 |
| - | {{ 1 === 1 ? 'interpreted' : 'non-interpreted' }} compilable content like |
339 |
| - | components & #[span(v-pre) {{ mustaches }}]. |
340 |
| - vueper-slides |
341 |
| - vueper-slide(v-for="i in 4" :key="i" :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]") |
342 |
| - div(slot="slide-content") |
343 |
| - v-icon(color="white") check |
344 |
| - | Complex content {{ i.toString() }} with vueJS |
| 337 | + | Complex content {{ i.toString() }} with Vue.js |
345 | 338 | | {{ 1 === 1 ? 'interpreted' : 'non-interpreted' }} compilable content like
|
346 | 339 | | components & #[span(v-pre) {{ mustaches }}].
|
347 | 340 | ssh-pre(language="html-vue" label="HTML Vue Template").
|
|
350 | 343 | v-for="i in 4"
|
351 | 344 | :key="i"
|
352 | 345 | :style="'background-color: ' + ['#ff5252', '#42b983'][i % 2]">
|
353 |
| - <div slot="slide-content"> |
| 346 | + <template v-slot:slide-content> |
354 | 347 | <v-icon color="white">check</v-icon>
|
355 |
| - Complex content with vueJS {{ "\{\{ 1 === 1 ? 'interpreted' : 'non-interpreted' \}\}" }} compilable content & <span v-pre>{{ '\{\{ mustaches \}\}' }}</span>. |
356 |
| - </div> |
| 348 | + Complex content with Vue.js {{ "\{\{ 1 === 1 ? 'interpreted' : 'non-interpreted' \}\}" }} compilable content & <span v-pre>{{ '\{\{ mustaches \}\}' }}</span>. |
| 349 | + </template> |
357 | 350 | </vueper-slide>
|
358 | 351 | </vueper-slides>
|
359 | 352 | highlight(type="info")
|
360 | 353 | ul.my-0
|
361 |
| - li if both #[span.code :title="Some title"] and #[span.code slot="slide-title"] are provided, only the title from the attribute will be displayed. |
362 |
| - li if both #[span.code :content="Some content"] and #[span.code slot="slide-content"] are provided, only the content from the attribute will be displayed. |
363 |
| - highlight(type="warning") |
364 |
| - strong Caution if you use the slide slots with the infinite sliding mode |
365 |
| - | #[br]At each end of the slideshow, slide clones mirror the original slides. |
366 |
| - | For them to display exactly like the original slide, the element with the |
367 |
| - | #[span.code slot="slide-content"] attribute should wrap |
368 |
| - | #[strong everything you want to keep]. E.g. (with Vuetify component)#[br] |
369 |
| - v-layout |
370 |
| - ssh-pre.flex.xs6.my-2.ml-0.mr-2(language="html-vue"). |
371 |
| - <!-- Wrong way. The v-layout class will be lost. --> |
372 |
| - <v-layout slot="slide-content"> |
373 |
| - Some content. |
374 |
| - </v-layout> |
375 |
| - ssh-pre.flex.xs6.my-2.ml-2.mr-0(language="html-vue"). |
376 |
| - <!-- Right way. --> |
377 |
| - <div slot="slide-content"> |
378 |
| - <v-layout> |
379 |
| - Some content. |
380 |
| - </v-layout> |
381 |
| - </div> |
| 354 | + li if both #[span.code :title="..."] and #[span.code slot="slide-title"] are provided, the title slot will be displayed. |
| 355 | + li if both #[span.code :content="..."] and #[span.code slot="slide-content"] are provided, the content slot will be displayed. |
382 | 356 |
|
383 | 357 | h3
|
384 | 358 | a(href="#ex--updating-content") Updating Content Inside/Outside
|
|
410 | 384 | slide-content-outside-class="text-center py-4"
|
411 | 385 | :refresh-clones-on-drag="true")
|
412 | 386 | vueper-slide(v-for="(slide, i) in slides4" :key="i" :style="'background-color: ' + ['#42b983', '#ff5252'][i % 2]")
|
413 |
| - div(slot="slide-content") |
| 387 | + template(v-slot:slide-content) |
414 | 388 | v-layout(align-center justify-center)
|
415 | 389 | v-icon.pr-3(color="white" size="5em") access_time
|
416 | 390 | div.text-xs-left
|
|
1185 | 1159 |
|
1186 | 1160 | p See this setting live in the #[a(href="#ex--show-multiple-slides") Show Multiple Slides] example.
|
1187 | 1161 |
|
1188 |
| - highlight. |
1189 |
| - In some cases like in the first 3 examples bellow, you will not want the default |
1190 |
| - inner top and bottom shadow (the fourth example has it). To remove it, add the class |
1191 |
| - #[span.code no-shadow] on the #[span.code <vueper-slides>] tag.#[br] |
1192 |
| - Refer to the example source code. |
1193 |
| - highlight. |
1194 |
| - In most cases you will want to have the arrows and bullets outside, so if |
1195 |
| - #[span.code.black--text visible-slides] is set, arrows and bullets will be outside |
1196 |
| - by default.#[br] |
1197 |
| - You can override this by explicitly setting #[span.code :arrows-outside="false"], |
1198 |
| - or #[span.code :bullets-outside="false"]. |
| 1162 | + highlight(type="warning") |
| 1163 | + strong.black--text. |
| 1164 | + WARNING#[br] |
| 1165 | + The #[span.code infinite] mode is not supported with the #[span.code visible-slides] option for now. |
| 1166 | + highlight |
| 1167 | + ul.pl-3 |
| 1168 | + li |
| 1169 | + strong CSS class #[span.code no-shadow]: |
| 1170 | + div. |
| 1171 | + In some cases like in the #[a(href="#ex--show-multiple-slides") first 3 examples], you will not want the default |
| 1172 | + inner top and bottom shadow (the fourth example has it). To remove it, add the class |
| 1173 | + #[span.code no-shadow] on the #[span.code <vueper-slides>] tag.#[br] |
| 1174 | + Refer to the example source code. |
| 1175 | + li |
| 1176 | + strong Arrows & bullets outside by default: |
| 1177 | + div. |
| 1178 | + In most cases you will want to have the arrows and bullets outside, so if |
| 1179 | + #[span.code.black--text visible-slides] is set, arrows and bullets will be outside |
| 1180 | + by default.#[br] |
| 1181 | + You can override this by explicitly setting #[span.code :arrows-outside="false"], |
| 1182 | + or #[span.code :bullets-outside="false"]. |
| 1183 | + li |
| 1184 | + strong Slide 1 by 1 with fading: |
| 1185 | + div. |
| 1186 | + The #[span.code fade] transition is designed for all the visible slides to change at once (#[span.code :slide-multiple="true"]).#[br] |
| 1187 | + If you try to change slides 1 by 1 #[span.code :slide-multiple="false"] with multiple visible slides, you should use the #[span.code slide] transition instead. |
1199 | 1188 | highlight(type="success")
|
1200 | 1189 | p.mb-2.
|
1201 | 1190 | When the #[span.code.black--text infinite] & #[span.code.black--text slide-multiple]
|
|
1206 | 1195 | li With 3 items, active slide will be at position 2
|
1207 | 1196 | li With 5 items, active slide will be at position 3
|
1208 | 1197 | li With even numbers of items, active slide will be at position #[span.code visibleItemsCount / 2]
|
1209 |
| - highlight(type="warning") |
1210 |
| - strong.black--text. |
1211 |
| - WARNING#[br] |
1212 |
| - The #[span.code infinite] mode is not supported with the #[span.code visible-slides] option for now. |
1213 |
| - highlight(type="info"). |
1214 |
| - The #[span.code fade] transition is designed for all the visible slides to change at once (#[span.code :slide-multiple="true"]).#[br] |
1215 |
| - If you try to change slides 1 by 1 #[span.code :slide-multiple="false"] with multiple visible slides, you should use the #[span.code slide] transition instead. |
1216 | 1198 |
|
1217 | 1199 | li
|
1218 |
| - a(name="vueper-slides-settings--3d") 3D Rotation |
| 1200 | + a(name="vueper-slides-settings--3d") |
1219 | 1201 | | #[code 3d], #[strong.mr-1 Type:] #[span.code.mr-1 [Boolean]], #[strong.mr-1 Default:] #[span.code false]
|
1220 | 1202 | p.
|
1221 | 1203 | Allows you to slide one slide at a time with a 3D effect transition.#[br]
|
|
1241 | 1223 | Here is the list of all the available events. To see them in action you can check
|
1242 | 1224 | the #[a(href="#ex--events") Events example].
|
1243 | 1225 | ul.max-widthed
|
1244 |
| - li |
1245 |
| - h4 |
1246 |
| - code before-init |
1247 |
| - p. |
1248 |
| - Fired in the first place before the initialization of the slideshow.#[br] |
1249 |
| - No parameter available. |
1250 | 1226 | li
|
1251 | 1227 | h4
|
1252 | 1228 | code ready
|
|
1386 | 1362 | h2
|
1387 | 1363 | a(href="#notable-version-changes") Notable Version Changes
|
1388 | 1364 | a(name="notable-version-changes")
|
1389 |
| - highlight. |
| 1365 | + p. |
1390 | 1366 | Vueper Slides is constantly evolving and some changes might affect the way you use it sometimes.#[br]
|
1391 | 1367 | Here is a list of the releases with their changes that might have an impact in your project.
|
1392 | 1368 | highlight(type="tips").
|
|
1396 | 1372 | ul.max-widthed
|
1397 | 1373 | li
|
1398 | 1374 | strong Version 2.0
|
1399 |
| - p Breaking changes |
1400 |
| - ul |
1401 |
| - li Remove #[span.code before-init] emitted event |
1402 |
| - li Can now use new slot syntax |
1403 |
| - li Renamed slots to kebab-case |
1404 |
| - li If both slot and attribute are provided now use the attribute source. |
| 1375 | + highlight(type="warning") |
| 1376 | + strong Breaking changes |
| 1377 | + ul |
| 1378 | + li Can now use new Vue.js 2.6+ slots syntax |
| 1379 | + li Removed the #[span.code before-init] emitted event |
| 1380 | + li |
| 1381 | + span Renamed slots to kebab-case: |
| 1382 | + ul.pl-4.mt-1.mb-3 |
| 1383 | + li #[span.code slideTitle] to #[span.code slide-title] |
| 1384 | + li #[span.code slideContent] to #[span.code slide-content] |
| 1385 | + li #[span.code arrowLeft] to #[span.code arrow-left] |
| 1386 | + li #[span.code arrowRight] to #[span.code arrow-right] |
| 1387 | + li #[span.code pausedIcon] to #[span.code pause-icon] |
| 1388 | + li |
| 1389 | + span Renamed events to kebab-case: |
| 1390 | + ul.pl-4.mt-1.mb-3 |
| 1391 | + li #[span.code mouseover] to #[span.code mouse-enter] |
| 1392 | + li #[span.code mouseout] to #[span.code mouse-leave] |
| 1393 | + li If both slide-title slot and title attribute are provided now use the slot. |
| 1394 | + li If both slide-content slot and content attribute are provided now use the slot. |
| 1395 | + li Improved autoplay pause & resume - manual slide does not resume if paused. |
| 1396 | + li TODO: update clones on content/title slots update |
| 1397 | + li TODO: update all examples with new slots syntax |
1405 | 1398 |
|
1406 | 1399 | li.mt-6
|
1407 | 1400 | strong Version 1.16.0
|
|
0 commit comments