Blame view

test/routers/carousel.vue 1.62 KB
6c9acb08   Rijn   initialize carousel
1
  <template>
bfc11079   Rijn   updated autoplay ...
2
3
4
5
6
7
8
9
10
11
12
13
      <Row>
          <i-col span="2">
              Current Index
              <p>{{ currentIndex }}</p>
          </i-col>
          <i-col span="2">
              <p>Autoplay</p>
              <Switch :checked.sync="autoplay" size="small"></Switch>
          </i-col>
          <i-col span="4">
              Speed <Slider :value.sync="autoplaySpeed" :min="300" :max="5000"></Slider>
          </i-col>
77d460e8   Rijn   added offset func...
14
15
16
17
18
19
20
21
          <i-col span="4">
              Switch To
              <Button-group>
                  <i-button @click="currentIndex = 0">0</i-button>
                  <i-button @click="currentIndex = 1">1</i-button>
                  <i-button @click="currentIndex = 2">2</i-button>
              </Button-group>
          </i-col>
bfc11079   Rijn   updated autoplay ...
22
      </Row>
90f77e40   Rijn   updated carousel ...
23
      <Carousel style="width: 50%; border: solid 1px #000"
bfc11079   Rijn   updated autoplay ...
24
25
          :current-index.sync="currentIndex"
          :autoplay="autoplay"
90f77e40   Rijn   updated carousel ...
26
27
          :autoplay-speed="autoplaySpeed"
          easing="linear">
bfc11079   Rijn   updated autoplay ...
28
29
30
31
32
33
34
35
          <Carousel-item>
              <Alert type="warning" show-icon>
                  警告提示文案
                  <template slot="desc">
                      警告的提示描述文案警告的提示描述文案警告的提示描述文案
                  </template>
              </Alert>
          </Carousel-item>
90f77e40   Rijn   updated carousel ...
36
37
38
          <Carousel-item style="text-align: center">
              <Icon type="checkmark" style="font-size: 5em"></Icon>
          </Carousel-item>
41f83010   Rijn   update props and ...
39
40
          <Carousel-item>test3</Carousel-item>
      </Carousel>
6c9acb08   Rijn   initialize carousel
41
42
43
  </template>
  <script>
      export default {
bfc11079   Rijn   updated autoplay ...
44
45
46
47
48
49
50
          data () {
              return {
                  currentIndex: 0,
                  autoplay: true,
                  autoplaySpeed: 2000
              }
          }
6c9acb08   Rijn   initialize carousel
51
52
      }
  </script>