Blame view

examples/routers/carousel.vue 1.08 KB
bbf4ee22   梁灏   fixed Carousel do...
1
2
3
4
5
6
7
8
9
10
  <style>
      .demo-carousel{
          height: 200px;
          line-height: 200px;
          text-align: center;
          color: #fff;
          font-size: 20px;
          background: #506b9e;
      }
  </style>
6c9acb08   Rijn   initialize carousel
11
  <template>
bbf4ee22   梁灏   fixed Carousel do...
12
      <div style="width: 400px;">
5528967c   梁灏   fixed #3506
13
          <Carousel v-model="value1" loop arrow="always" @on-change="handleChange">
bbf4ee22   梁灏   fixed Carousel do...
14
15
16
17
18
19
20
21
22
23
24
25
              <CarouselItem>
                  <div class="demo-carousel">1</div>
              </CarouselItem>
              <CarouselItem>
                  <div class="demo-carousel">2</div>
              </CarouselItem>
              <CarouselItem>
                  <div class="demo-carousel">3</div>
              </CarouselItem>
              <CarouselItem>
                  <div class="demo-carousel">4</div>
              </CarouselItem>
2171f454   Rijn   added many test
26
          </Carousel>
5528967c   梁灏   fixed #3506
27
          <Button @click="value1 = 2">change</Button>
bb71140e   梁灏   support Carousel
28
      </div>
6c9acb08   Rijn   initialize carousel
29
30
31
  </template>
  <script>
      export default {
bfc11079   Rijn   updated autoplay ...
32
33
          data () {
              return {
bbf4ee22   梁灏   fixed Carousel do...
34
                  value1: 0
2073853e   梁灏   fixed #3038
35
              }
5e8be9b3   Rijn   fixed add bug. ad...
36
37
          },
          methods: {
bbf4ee22   梁灏   fixed Carousel do...
38
39
              handleChange (old, newval) {
                  console.log(old, newval);
bfc11079   Rijn   updated autoplay ...
40
41
              }
          }
6c9acb08   Rijn   initialize carousel
42
43
      }
  </script>