top-title.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="top-title">
  3. <view class="" style="justify-self: flex-start;">
  4. <image src="../../static/icon/gsjj.png" mode="" class="title-before"></image>
  5. <view class="title">{{title}}</view>
  6. </view>
  7. <view class="gd" @click="navTo" v-if="show_more">
  8. 更多 >
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. name: "top-title",
  15. data() {
  16. return {
  17. };
  18. },
  19. props: {
  20. title: {
  21. type: String,
  22. default: ''
  23. },
  24. navurl: {
  25. type: String,
  26. default: ''
  27. },
  28. show_more: {
  29. type: Boolean,
  30. default: false
  31. }
  32. },
  33. methods: {
  34. navTo() {
  35. console.log('dianji')
  36. uni.navigateTo({
  37. url: this.navurl
  38. })
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. .top-title {
  45. padding-left: 25rpx;
  46. width: 100%;
  47. display: flex;
  48. align-items: center;
  49. justify-content: space-between;
  50. // line-height: 50rpx;
  51. align-items: flex-start;
  52. .title-before {
  53. // display: inline-block;
  54. // background-color: #F0433C;
  55. width: 45rpx;
  56. height: 50rpx;
  57. margin-right: 16rpx;
  58. // border-radius: 4rpx;
  59. border-radius: 50%;
  60. }
  61. .title {
  62. display: inline-block;
  63. font-size: 32rpx;
  64. font-family: PingFang SC;
  65. font-weight: bold;
  66. color: #333333;
  67. }
  68. .title-after {
  69. display: inline-block;
  70. .a1 {
  71. width: 8rpx;
  72. height: 8rpx;
  73. background: #FD424B;
  74. border-radius: 50%;
  75. margin-bottom: 6rpx;
  76. margin-top: 16rpx;
  77. margin-left: 25rpx;
  78. }
  79. .a2 {
  80. width: 28rpx;
  81. height: 4rpx;
  82. background: #FD424B;
  83. opacity: 0.1;
  84. border-radius: 2rpx;
  85. margin-bottom: 6rpx;
  86. }
  87. .a3 {
  88. width: 28rpx;
  89. height: 4rpx;
  90. background: #FD424B;
  91. opacity: 0.45;
  92. border-radius: 2rpx;
  93. margin-left: 11rpx;
  94. }
  95. }
  96. }
  97. </style>