|
1 | | -<template> |
| 1 | +<template functional> |
2 | 2 | <div class="wrapper"> |
3 | 3 | <div class="animated fadeIn"> |
4 | 4 | <CRow> |
5 | 5 | <CCol md="12" lg="9" > |
6 | 6 | <CCard> |
7 | 7 | <CCardHeader slot="header"> |
8 | | - <i class="fa fa-align-justify"></i><strong> Bootstrap Carousel</strong> |
| 8 | + <i class="fa fa-align-justify"></i> |
| 9 | + <strong> Bootstrap Carousel</strong> |
9 | 10 | <div class="card-header-actions"> |
10 | | - <a href="https://bootstrap-vue.js.org/docs/components/carousel" class="card-header-action" rel="noreferrer noopener" target="_blank"> |
| 11 | + <a |
| 12 | + href="https://bootstrap-vue.js.org/docs/components/carousel" |
| 13 | + class="card-header-action" |
| 14 | + rel="noreferrer noopener" |
| 15 | + target="_blank" |
| 16 | + > |
11 | 17 | <small class="text-muted">docs</small> |
12 | 18 | </a> |
13 | 19 | </div> |
14 | 20 | </CCardHeader> |
15 | | - <div> |
16 | | - <CCarousel/> |
17 | | - <br> |
18 | | - <b-carousel id="carousel1" |
19 | | - style="text-shadow: 1px 1px 2px #333;" |
20 | | - controls |
21 | | - indicators |
22 | | - background="#ababab" |
23 | | - :interval="400000" |
24 | | - img-width="1024" |
25 | | - img-height="480" |
26 | | - v-model="slide" |
27 | | - @sliding-start="onSlideStart" |
28 | | - @sliding-end="onSlideEnd" |
29 | | - > |
30 | | - |
31 | | - <!-- Text slides with image --> |
32 | | - <b-carousel-slide caption="First slide" |
33 | | - text="Nulla vitae elit libero, a pharetra augue mollis interdum." |
34 | | - img-src="https://lorempixel.com/1024/480/technics/2/" |
35 | | - ></b-carousel-slide> |
36 | | - |
37 | | - <!-- Slides with custom text --> |
38 | | - <b-carousel-slide img-src="https://lorempixel.com/1024/480/technics/4/"> |
39 | | - <h1>Hello world!</h1> |
40 | | - </b-carousel-slide> |
41 | | - |
42 | | - <!-- Slides with image only --> |
43 | | - <b-carousel-slide img-src="https://lorempixel.com/1024/480/technics/8/"> |
44 | | - </b-carousel-slide> |
45 | | - |
46 | | - <!-- Slides with img slot --> |
47 | | - <!-- Note the classes .d-block and .img-fluid to prevent browser default image alignment --> |
48 | | - <b-carousel-slide> |
49 | | - <img slot="img" class="d-block img-fluid w-100" width="1024" height="480" |
50 | | - src="https://lorempixel.com/1024/480/technics/5/" alt="image slot"> |
51 | | - </b-carousel-slide> |
52 | | - |
53 | | - <!-- Slide with blank fluid image to maintain slide aspect ratio --> |
54 | | - <b-carousel-slide caption="Blank Image" img-blank img-alt="Blank image"> |
55 | | - <p> |
56 | | - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse |
57 | | - eros felis, tincidunt a tincidunt eget, convallis vel est. Ut pellentesque |
58 | | - ut lacus vel interdum. |
59 | | - </p> |
60 | | - </b-carousel-slide> |
61 | | - |
62 | | - </b-carousel> |
63 | | - |
64 | | - <p class="mt-4"> |
65 | | - Slide #: {{ slide }}<br> |
66 | | - Sliding: {{ sliding }} |
67 | | - </p> |
68 | | - |
69 | | - </div> |
| 21 | + <CCarousel> |
| 22 | + <CCarouselItem |
| 23 | + caption="First Slide" |
| 24 | + imgSrc="https://lorempixel.com/1024/480/technics/2/" |
| 25 | + text="Nulla vitae elit libero, a pharetra augue mollis interdum." |
| 26 | + /> |
| 27 | + <CCarouselItem |
| 28 | + active |
| 29 | + imgSrc="https://lorempixel.com/1024/480/technics/4/" |
| 30 | + /> |
| 31 | + <CCarouselItem |
| 32 | + imgSrc="https://lorempixel.com/1024/480/technics/8/" |
| 33 | + /> |
| 34 | + </CCarousel> |
70 | 35 | </CCard> |
71 | 36 | </CCol> |
72 | 37 | </CRow> |
|
76 | 41 |
|
77 | 42 | <script> |
78 | 43 | export default { |
79 | | - name: 'carousels', |
80 | | - data () { |
81 | | - return { |
82 | | - slide: 0, |
83 | | - sliding: null |
84 | | - } |
85 | | - }, |
86 | | - methods: { |
87 | | - onSlideStart (slide) { |
88 | | - console.log('onSlideStart', slide) |
89 | | - this.sliding = true |
90 | | - }, |
91 | | - onSlideEnd (slide) { |
92 | | - console.log('onSlideEnd', slide) |
93 | | - this.sliding = false |
94 | | - } |
95 | | - } |
| 44 | + name: 'carousels' |
96 | 45 | } |
97 | 46 | </script> |
0 commit comments