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 | 21 | </i-col> |
| 22 | 22 | <i-col span="4"> |
| 23 | 23 | <i-button @click="push">Push</i-button> |
| 24 | + <i-button @click="remove = true">Remove</i-button> | |
| 24 | 25 | </i-col> |
| 25 | 26 | </Row> |
| 26 | 27 | <Carousel style="width: 50%; border: solid 1px #000" |
| ... | ... | @@ -28,7 +29,7 @@ |
| 28 | 29 | :autoplay="autoplay" |
| 29 | 30 | :autoplay-speed="autoplaySpeed" |
| 30 | 31 | easing="linear"> |
| 31 | - <Carousel-item> | |
| 32 | + <Carousel-item v-if="!remove"> | |
| 32 | 33 | <Alert type="warning" show-icon> |
| 33 | 34 | 警告提示文案 |
| 34 | 35 | <template slot="desc"> |
| ... | ... | @@ -52,6 +53,7 @@ |
| 52 | 53 | currentIndex: 0, |
| 53 | 54 | autoplay: true, |
| 54 | 55 | autoplaySpeed: 2000, |
| 56 | + remove: false, | |
| 55 | 57 | pushItem: [] |
| 56 | 58 | } |
| 57 | 59 | }, | ... | ... |