Blame view

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