This commit is contained in:
prefert 2020-09-03 15:53:31 +08:00
parent 8f9d3604e6
commit 5bb83ff8e5
258 changed files with 12974 additions and 7838 deletions

View file

@ -1,9 +1,18 @@
<style>
.demo-carousel{
height: 200px;
line-height: 200px;
text-align: center;
color: #fff;
font-size: 20px;
background: #506b9e;
}
</style>
<template>
<div>
<!--#6076-->
<Carousel loop @on-change="onChange">
<div style="width: 400px;">
<Carousel v-model="value1" loop arrow="always" @on-change="handleChange">
<CarouselItem>
<div class="demo-carousel">111111111111</div>
<div class="demo-carousel">1</div>
</CarouselItem>
<CarouselItem>
<div class="demo-carousel">2</div>
@ -15,67 +24,20 @@
<div class="demo-carousel">4</div>
</CarouselItem>
</Carousel>
<Button @click="value1 = 2">change</Button>
</div>
</template>
<script>
export default {
data () {
return {
value1: 0
}
},
methods: {
onChange(oldIndex,newIndex){
console.log(oldIndex,newIndex,'------')
handleChange (old, newval) {
console.log(old, newval);
}
},
mounted () {
}
}
</script>
<style>
.demo-carousel{
height: 100px;
}
</style>
<!--<style>-->
<!-- .demo-carousel{-->
<!-- height: 200px;-->
<!-- line-height: 200px;-->
<!-- text-align: center;-->
<!-- font-size: 20px;-->
<!-- }-->
<!--</style>-->
<!--<template>-->
<!-- <div>-->
<!-- <Carousel v-model="value1" loop @on-change="handleChange" @on-click="handlerClick">-->
<!-- <CarouselItem v-for="it in 4" :key="it">-->
<!-- <div class="demo-carousel">-->
<!-- {{it}}<Button @click="handlerIndexClick(it)">点击事件</Button>-->
<!-- </div>-->
<!-- </CarouselItem>-->
<!-- </Carousel>-->
<!-- <Button @click="value1 = 2">change</Button>-->
<!-- </div>-->
<!--</template>-->
<!--<script>-->
<!-- export default {-->
<!-- data () {-->
<!-- return {-->
<!-- value1: 0-->
<!-- }-->
<!-- },-->
<!-- methods: {-->
<!-- handleChange (old, newval) {-->
<!-- console.log(old, newval,'-&#45;&#45;on-change');-->
<!-- },-->
<!-- handlerClick(index){-->
<!-- console.log(index,'&#45;&#45;&#45;&#45;&#45;&#45;on-click');-->
<!-- },-->
<!-- handlerIndexClick(it){-->
<!-- console.log(it,'&#45;&#45;&#45;&#45;&#45;&#45;it')-->
<!-- }-->
<!-- },-->
<!-- }-->
<!--</script>-->