Blame view

test/routers/carousel.vue 1.17 KB
6c9acb08   Rijn   initialize carousel
1
  <template>
bfc11079   Rijn   updated autoplay ...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
      <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>
      </Row>
      <Carousel style="width: 400px"
          :current-index.sync="currentIndex"
          :autoplay="autoplay"
          :autoplay-speed="autoplaySpeed">
          <Carousel-item>
              <Alert type="warning" show-icon>
                  警告提示文案
                  <template slot="desc">
                      警告的提示描述文案警告的提示描述文案警告的提示描述文案
                  </template>
              </Alert>
          </Carousel-item>
41f83010   Rijn   update props and ...
27
28
29
          <Carousel-item>test2</Carousel-item>
          <Carousel-item>test3</Carousel-item>
      </Carousel>
6c9acb08   Rijn   initialize carousel
30
31
32
  </template>
  <script>
      export default {
bfc11079   Rijn   updated autoplay ...
33
34
35
36
37
38
39
          data () {
              return {
                  currentIndex: 0,
                  autoplay: true,
                  autoplaySpeed: 2000
              }
          }
6c9acb08   Rijn   initialize carousel
40
41
      }
  </script>