luswiper.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view>
  3. <view class="hlu flexc" @click="getRoad">
  4. <image :src="hcroad"></image>
  5. <swiper class="swiper" circular :autoplay="autoplay" :interval="interval" :duration="duration" vertical='true'>
  6. <swiper-item>
  7. <view class="swipera over">
  8. <text class="tit coeb">拥堵</text>
  9. <!-- <text class="tit co5c">畅通</text> -->
  10. <text class="over">黄山路与潜山路交口当前较为拥堵!</text>
  11. </view>
  12. </swiper-item>
  13. <swiper-item >
  14. <view class="swipera over">
  15. <!-- <text class="tit coeb">拥堵</text> -->
  16. <text class="tit co5c">畅通</text>
  17. <text class="over"> 黄山路与潜山路交口当前较为拥堵!</text>
  18. </view>
  19. </swiper-item>
  20. <swiper-item>
  21. <view class="swipera over">
  22. <text class="tit coeb">拥堵</text>
  23. <!-- <text class="tit co5c">畅通</text> -->
  24. <text class="over"> 黄山路与潜山路交口当前较为拥堵!</text>
  25. </view>
  26. </swiper-item>
  27. </swiper>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. props:{
  34. autoplay: {
  35. type: Boolean,
  36. default () {
  37. return false
  38. }
  39. },
  40. confdat:{}
  41. // status:{
  42. // type: String,
  43. // default () {
  44. // return 'add'
  45. // }
  46. // },
  47. // iteminfo:{},
  48. // xmjzinfo:{},
  49. },
  50. data(){
  51. return{
  52. hcroad:require('@/static/images/hcroad.png'),
  53. interval: 2000,
  54. duration: 500
  55. }
  56. },
  57. methods:{
  58. getRoad(){
  59. console.log(1)
  60. },
  61. },
  62. onLoad: function() {
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .hlu{height: 90rpx;background: #FFFFFF;border-radius: 18rpx;margin: 0 34rpx;padding: 0 25rpx;font-size: 30rpx;
  68. image{width: 70rpx;height: 40rpx;flex: 0 0 auto;margin-right: 26rpx;}
  69. .tit{
  70. font-size: 30rpx;position: relative;
  71. padding:0 32rpx 0 27rpx;font-weight: bold;flex: 0 0 auto;
  72. &::before{content: '';position: absolute;left: 0;width: 12rpx;height: 12rpx;border-radius: 50%;top: 12rpx;}
  73. &::after{content:'';position: absolute;right: 14rpx;top: 6rpx;bottom: 6rpx;width: 4rpx;background-color: #666666;}
  74. &.coeb{color: #EB5663;
  75. &::before{background-color: #EB5663;}
  76. }
  77. &.co5c{color: #5CC37D;
  78. &::before{background-color: #5CC37D;}
  79. }
  80. }
  81. .swiper{flex: 1;height: 90rpx;
  82. .swipera{height: 100%;display: flex;align-items: center;overflow: hidden;}
  83. }
  84. }
  85. </style>