ItemTitle.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <div class="item-title">
  3. <div class="title moren">{{ title }}</div>
  4. <div class="more hand" v-if="isShow === '1'" @click="loadMore">
  5. 更多
  6. <span>>></span>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. props: {
  13. title: {
  14. type: String,
  15. default: ''
  16. },
  17. isShow: {
  18. type: String,
  19. default: '1'
  20. },
  21. topath: {
  22. type: String,
  23. default: '/home'
  24. }
  25. },
  26. methods: {
  27. loadMore() {
  28. this.$router.push(this.topath);
  29. }
  30. }
  31. };
  32. </script>
  33. <style lang="scss" scoped>
  34. .item-title {
  35. height: 54px;
  36. display: flex;
  37. justify-content: space-between;
  38. align-items: center;
  39. border-bottom: #e5e5e5 1px solid;
  40. .title {
  41. // width: 100px;
  42. padding-left: 20px;
  43. padding-right: 20px;
  44. height: 54px;
  45. font-size: 22px;
  46. font-family: PingFang SC;
  47. font-weight: 500;
  48. color: #ffffff;
  49. line-height: 54px;
  50. text-align: center;
  51. background-color: var(--m-color);
  52. position: relative;
  53. z-index: 1;
  54. &::after {
  55. content: '';
  56. border: solid 9px var(--m-color);
  57. position: absolute;
  58. height: 0;
  59. width: 0;
  60. right: 0;
  61. left: 0;
  62. bottom: -18px;
  63. margin: 0 auto;
  64. border-color: var(--m-color) transparent transparent;
  65. }
  66. }
  67. .more {
  68. width: 71px;
  69. height: 26px;
  70. border: 1px solid #fdb813;
  71. font-size: 16px;
  72. font-family: PingFang SC;
  73. font-weight: bold;
  74. color: #fdb813;
  75. text-align: center;
  76. line-height: 26px;
  77. // line-height: 40px;
  78. span {
  79. font-size: 12px;
  80. }
  81. }
  82. }
  83. </style>