iview/examples/routers/carousel.vue

45 lines
1.2 KiB
Vue
Raw Normal View History

2017-01-16 02:45:11 -06:00
<template>
<div>
2018-02-28 15:38:20 +08:00
<Carousel v-model="v1" dots="outside" @on-change="hc" :autoplay="false">
<Carousel-item>
2018-02-28 15:38:20 +08:00
<div class="demo-case-img">
<img src="https://file.iviewui.com/dist/84b3cded4163febf9dae090e76129322.png">
</div>
2017-01-17 16:44:50 -06:00
</Carousel-item>
<Carousel-item>
2018-02-28 15:38:20 +08:00
<div class="demo-case-img">
<img src="https://file.iviewui.com/dist/84b3cded4163febf9dae090e76129322.png">
</div>
2017-01-17 16:44:50 -06:00
</Carousel-item>
<Carousel-item>
2018-02-28 15:38:20 +08:00
<div class="demo-case-img">
<img src="https://file.iviewui.com/dist/84b3cded4163febf9dae090e76129322.png">
</div>
2017-01-17 16:44:50 -06:00
</Carousel-item>
</Carousel>
2018-02-28 15:38:20 +08:00
<Button @click="v1 = 2">change</Button>
</div>
2017-01-16 02:45:11 -06:00
</template>
<script>
export default {
2017-01-16 04:28:34 -06:00
data () {
return {
v1: 0
2018-02-28 15:38:20 +08:00
}
2017-01-16 17:51:03 -06:00
},
methods: {
2018-02-28 15:38:20 +08:00
hc (...args) {
console.log(args);
2017-01-16 04:28:34 -06:00
}
}
2017-01-16 02:45:11 -06:00
}
</script>
2018-02-28 15:38:20 +08:00
<style lang="less">
.demo-case-img {
img{
width: 500px;
}
}
2018-02-28 15:38:20 +08:00
</style>