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
| <template>
| <div class="home-notice">
| <swiper auto
| :loop="true"
| height="44px"
| direction="vertical"
| :interval=2000
| :show-dots="false">
| <i class="iconfont icon-notificationfill"></i>
| <swiper-item v-for="(i,index) in lists" :key="index">
| <p @click="jumpTo(i)">{{i.context}}</p>
| </swiper-item>
| </swiper>
| </div>
| </template>
|
| <script>
| /**
| * Created by 吴彦祖 on 2018/3/16.
| * 通知列表,用于我的公共通知
| */
| import { Swiper, SwiperItem } from 'vux' ;
| export default {
| name: 'home-notice',
| props:{
| lists:{
| type:Array,
| default:()=>{
| return [{context:'测试测试测试'},{context:'测试测试测试'},]
| }
| }
| },
| components: {
| Swiper,
| SwiperItem
| },
| methods:{
| jumpTo(item){
| this.$emit('indexJump',item);
| }
| }
| }
| </script>
|
| <style lang="less">
| @import '../style/mixin.less';
| .home-notice {
| padding: 0 12px;
| font-size: @font-size-small;
| line-height: 44px;
| color: @color-text-third;
| background: @color-white;
| .iconfont {
| color: @color-primary;
| }
| p {
| padding-left: 24px;
| }
| }
| </style>
|
|