1
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
| <template>
| <div>
| <swiper :auto="true"
| class="home-banner-swiper"
| :show-dots="true"
| height="190px"
| :loop="true"
| dots-position="center">
| <swiper-item v-for="(item, index) in lists"
| :key="index">
| <img @click="jumpTo(item)" :src="item.context" :alt="item.name">
| </swiper-item>
| </swiper>
| </div>
| </template>
|
| <script>
| /**
| * Created by c.y on 2018/4/28.
| * 首页banner
| */
| import { Swiper, SwiperItem } from 'vux' ;
| export default {
| name: 'home-banner-swiper',
| props:{
| lists:{
| type:Array
| }
| },
| components: {
| Swiper,
| SwiperItem
| },
| methods:{
| jumpTo(item){
| this.$emit('indexJump', item);
| }
| }
| }
| </script>
|
| <style lang="less">
| @import '../style/mixin.less';
| .home-banner-swiper {
| width: 100%;
| height: 190px;
| background-color: @color-background-default;
| .vux-swiper-item {
| img {
| width: 100%;
| height: 100%;
| }
| }
| .vux-indicator{
| a{
| .active{
| background-color: #fff !important;
| }
| }
| }
| .vux-icon-dot {
| width: 5px !important;
| height: 5px !important;
| border-radius: 50% !important;
| }
| }
| </style>
|
|