index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="box-tile" :class="className">
  3. <text class="title-wrapper">{{ title }}</text>
  4. <text class="more" @click="$emit('handlePlay')" v-if="iconName">
  5. <text>{{ buttonName }}</text>
  6. <text :class="['iconfont icon-title icon-' + iconName]" v-if="iconName"></text>
  7. </text>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. props: {
  13. title: {
  14. type: String,
  15. default: ''
  16. },
  17. iconName: {
  18. type: String,
  19. default: ''
  20. },
  21. buttonName: {
  22. type: String,
  23. default: ''
  24. },
  25. className: {
  26. type: String,
  27. default: ''
  28. }
  29. }
  30. };
  31. </script>
  32. <style lang="scss" scoped>
  33. .box-tile {
  34. box-sizing: border-box;
  35. display: flex;
  36. align-items: center;
  37. justify-content: space-between;
  38. padding-left: 3px;
  39. .title-wrapper {
  40. font-size: 18px;
  41. font-weight: 500;
  42. line-height: 18px;
  43. color: #ffffff;
  44. position: relative;
  45. text-indent: 2px;
  46. // &:before {
  47. // content: '';
  48. // width: 4px;
  49. // height: 18px;
  50. // background-image: linear-gradient(to bottom, rgb(253, 117, 102), rgb(247, 73, 79));
  51. // position: absolute;
  52. // left: 0px;
  53. // top: 3px;
  54. // }
  55. }
  56. .more {
  57. border-radius: 9px;
  58. color: rgba(22, 125, 242, 1);;
  59. padding: 3px 10px 3px 13px;
  60. font-size: 12px;
  61. border: 1px solid rgba(22, 125, 242, 1);
  62. }
  63. .icon-title {
  64. margin-left: 2px;
  65. color: rgba(22, 125, 242, 1);;
  66. font-size: 12rpx;
  67. }
  68. }
  69. </style>