Commit 8f4e2cf0c3cf675ac3748783203424f18994dbb9
1 parent
5e8be9b3
update pos when slot changes.
added remove test
Showing
3 changed files
with
10 additions
and
1 deletions
Show diff stats
src/components/carousel/carousel-item.vue
src/components/carousel/carousel.vue
test/routers/carousel.vue
@@ -21,6 +21,7 @@ | @@ -21,6 +21,7 @@ | ||
21 | </i-col> | 21 | </i-col> |
22 | <i-col span="4"> | 22 | <i-col span="4"> |
23 | <i-button @click="push">Push</i-button> | 23 | <i-button @click="push">Push</i-button> |
24 | + <i-button @click="remove = true">Remove</i-button> | ||
24 | </i-col> | 25 | </i-col> |
25 | </Row> | 26 | </Row> |
26 | <Carousel style="width: 50%; border: solid 1px #000" | 27 | <Carousel style="width: 50%; border: solid 1px #000" |
@@ -28,7 +29,7 @@ | @@ -28,7 +29,7 @@ | ||
28 | :autoplay="autoplay" | 29 | :autoplay="autoplay" |
29 | :autoplay-speed="autoplaySpeed" | 30 | :autoplay-speed="autoplaySpeed" |
30 | easing="linear"> | 31 | easing="linear"> |
31 | - <Carousel-item> | 32 | + <Carousel-item v-if="!remove"> |
32 | <Alert type="warning" show-icon> | 33 | <Alert type="warning" show-icon> |
33 | 警告提示文案 | 34 | 警告提示文案 |
34 | <template slot="desc"> | 35 | <template slot="desc"> |
@@ -52,6 +53,7 @@ | @@ -52,6 +53,7 @@ | ||
52 | currentIndex: 0, | 53 | currentIndex: 0, |
53 | autoplay: true, | 54 | autoplay: true, |
54 | autoplaySpeed: 2000, | 55 | autoplaySpeed: 2000, |
56 | + remove: false, | ||
55 | pushItem: [] | 57 | pushItem: [] |
56 | } | 58 | } |
57 | }, | 59 | }, |