notice.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view v-if="noticelist.length">
  3. <view class="hswip" >
  4. <!-- -->
  5. <swiper class="swiper" indicator-dots="true" :indicator-color="nactiveColor" :indicator-active-color="activeColor" circular :autoplay="autoplay" :interval="interval" :duration="duration" vertical='true'>
  6. <swiper-item v-for="(ite,idx) in noticelist" :key="">
  7. <view class="flexc swipers" @click="getDetail(ite.noticeId)">
  8. <view class="cir"></view>
  9. <!-- <view class="tit over">您的孩子 <text>{{ite.tit}}</text> 疑似在河中游泳,请尽快确认是…</view> -->
  10. <view class="tit over">{{ite.noticeTitle}}</view>
  11. <!-- <view class="time">{{ite.publishTime}}</view> -->
  12. </view>
  13. </swiper-item>
  14. </swiper>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. props:{
  21. autoplay: {
  22. type: Boolean,
  23. default () {
  24. return false
  25. }
  26. },
  27. confdat:{},
  28. activeColor:{
  29. type:String,
  30. default () {
  31. return '#90BFFF'
  32. }
  33. },
  34. nactiveColor:{
  35. type:String,
  36. default () {
  37. return '#F0F0F0'
  38. }
  39. },
  40. noticelist:{
  41. type: Array,
  42. default () {
  43. return []
  44. }
  45. }
  46. },
  47. data(){
  48. return{
  49. interval: 2000,
  50. duration: 500
  51. }
  52. },
  53. methods:{
  54. getRoad(){
  55. console.log(1)
  56. },
  57. getDetail(e){
  58. this.$emit('getNoticeDet',e)
  59. }
  60. },
  61. onLoad: function() {
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .hswip /deep/ .uni-swiper-dots-vertical{right: 14rpx;}
  67. .hswip /deep/ .uni-swiper-dot{width: 10rpx; height: 10rpx;margin-bottom: 14rpx;}
  68. // width: 100%;background: #ffffff;border-radius: 20rpx;
  69. .hswip{position: relative;width: 100%;padding: 0 12rpx;
  70. .swiper{flex: 1;height: 88rpx;z-index: 1;
  71. .swipers{height: 88rpx;padding: 0 60rpx 0 12rpx;box-sizing: border-box;}
  72. .tit{flex: 1;font-weight: 500;font-size: 26rpx;color: #000000;
  73. text{color: #3575FD;padding: 0 6rpx;}
  74. }
  75. .time{font-weight: 500;font-size: 22rpx;color: #AAAAAA;}
  76. .cir{width: 10rpx;height: 10rpx;background: #EE474B;border-radius: 50%;margin-right: 16rpx;}
  77. }
  78. }
  79. </style>