top-title.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="top-title">
  3. <view class="" style="justify-self: flex-start;">
  4. <view class="title-before"></view>
  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. width: 100%;
  46. display: flex;
  47. align-items: center;
  48. justify-content: space-between;
  49. .title-before {
  50. display: inline-block;
  51. background-color: #F0433C;
  52. width: 10rpx;
  53. height: 30rpx;
  54. margin-right: 16rpx;
  55. border-radius: 4rpx;
  56. }
  57. .title {
  58. display: inline-block;
  59. font-size: 32rpx;
  60. font-family: PingFang SC;
  61. font-weight: bold;
  62. color: #333333;
  63. }
  64. .title-after {
  65. display: inline-block;
  66. .a1 {
  67. width: 8rpx;
  68. height: 8rpx;
  69. background: #FD424B;
  70. border-radius: 50%;
  71. margin-bottom: 6rpx;
  72. margin-top: 16rpx;
  73. margin-left: 25rpx;
  74. }
  75. .a2 {
  76. width: 28rpx;
  77. height: 4rpx;
  78. background: #FD424B;
  79. opacity: 0.1;
  80. border-radius: 2rpx;
  81. margin-bottom: 6rpx;
  82. }
  83. .a3 {
  84. width: 28rpx;
  85. height: 4rpx;
  86. background: #FD424B;
  87. opacity: 0.45;
  88. border-radius: 2rpx;
  89. margin-left: 11rpx;
  90. }
  91. }
  92. }
  93. </style>