Blame view

examples/routers/carousel.vue 1.18 KB
6c9acb08   Rijn   initialize carousel
1
  <template>
bb71140e   梁灏   support Carousel
2
      <div>
3ea24615   梁灏   update checkbox s...
3
          <Carousel v-model="v1" dots="inside" trigger="hover" autoplay loop radius-dot easing="fade">
bb71140e   梁灏   support Carousel
4
              <Carousel-item>
ccf544dc   houyl   Merge branch 'mas...
5
                  <div class="demo-carousel">1</div>
2171f454   Rijn   added many test
6
7
              </Carousel-item>
              <Carousel-item>
bb71140e   梁灏   support Carousel
8
                  <div class="demo-carousel">2</div>
2171f454   Rijn   added many test
9
              </Carousel-item>
bb71140e   梁灏   support Carousel
10
11
12
13
14
              <Carousel-item>
                  <div class="demo-carousel">3</div>
              </Carousel-item>
              <Carousel-item>
                  <div class="demo-carousel">4</div>
2171f454   Rijn   added many test
15
16
              </Carousel-item>
          </Carousel>
bb71140e   梁灏   support Carousel
17
18
19
          {{ v1 }}
          <div @click="v1 = 0">change v1</div>
      </div>
6c9acb08   Rijn   initialize carousel
20
21
22
  </template>
  <script>
      export default {
bfc11079   Rijn   updated autoplay ...
23
24
          data () {
              return {
ccf544dc   houyl   Merge branch 'mas...
25
26
                  v1: 0
              };
5e8be9b3   Rijn   fixed add bug. ad...
27
28
29
30
          },
          methods: {
              push () {
                  this.pushItem.push('test');
c1af3fac   Rijn   added on-change e...
31
32
33
              },
              slideChange (from, to) {
                  this.log.push(`From ${from} To ${to}`);
bfc11079   Rijn   updated autoplay ...
34
35
              }
          }
6c9acb08   Rijn   initialize carousel
36
37
      }
  </script>
bb71140e   梁灏   support Carousel
38
39
40
41
42
43
44
45
46
47
  <style>
      .demo-carousel{
          height: 200px;
          line-height: 200px;
          text-align: center;
          color: #fff;
          font-size: 20px;
          background: #506b9e;
      }
  </style>