chartItem.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <view class="container-chart-item">
  3. <text class="chart-title text_twoLine">{{ list.Title }}</text>
  4. <view class="item-content-img">
  5. <image :src="list.BodyHtml" mode=""></image>
  6. </view>
  7. <view class="chart-tag">
  8. <text class="tag-item" v-if="list.PtagName">{{ list.PtagName }}</text>
  9. <text class="tag-item" v-if="list.CtagName">{{ list.CtagName }}</text>
  10. </view>
  11. <!-- <view class="chart-collect" v-if="topTabsActive == 3 && secondActive == 0">
  12. <text class="cancel" @click.stop="myChartIsTop(list.ChartId)">{{ list.IsTop ? "取消置顶" : "置顶" }}</text>
  13. <text class="remove" @click.stop="myChartCollect(list.ChartId)">移除</text>
  14. </view>
  15. <view class="my-chart-collect" v-if="topTabsActive == 3 && secondActive == 0 && list.IsTop"></view> -->
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: "",
  21. components: {},
  22. props: {
  23. list: {
  24. type: Object,
  25. default: {},
  26. required: true,
  27. },
  28. },
  29. data() {
  30. return {};
  31. },
  32. computed: {},
  33. watch: {},
  34. created() {},
  35. mounted() {},
  36. methods: {},
  37. };
  38. </script>
  39. <style scoped lang="scss">
  40. .container-chart-item {
  41. width: 350rpx;
  42. padding: 20rpx 20rpx 0 ;
  43. background: #ffffff;
  44. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  45. border-radius: 8rpx;
  46. margin-bottom: 20rpx;
  47. .chart-title {
  48. height: 90rpx;
  49. font-size: 32rpx;
  50. font-weight: 500;
  51. color: #333333;
  52. line-height: 42rpx;
  53. border-bottom: 1rpx solid #dcdfe6;
  54. }
  55. .item-content-img {
  56. width: 330rpx;
  57. height: 286rpx;
  58. image {
  59. width: 100%;
  60. height: 100%;
  61. }
  62. }
  63. .chart-collect {
  64. margin-top: 20rpx;
  65. padding-top: 20rpx;
  66. padding: 20rpx 0 0 20rpx;
  67. border-top: 1rpx solid #dcdfe6;
  68. display: flex;
  69. align-items: center;
  70. .cancel {
  71. background: #3385ff;
  72. margin-right: 20rpx;
  73. color: #ffffff;
  74. }
  75. .remove {
  76. border: 1px solid #3385ff;
  77. color: #3385ff;
  78. }
  79. text {
  80. width: 130rpx;
  81. height: 46rpx;
  82. line-height: 46rpx;
  83. border-radius: 4rpx;
  84. text-align: center;
  85. font-size: 24rpx;
  86. }
  87. }
  88. .my-chart-collect {
  89. content: "";
  90. display: block;
  91. position: absolute;
  92. top: 0;
  93. left: 0;
  94. width: 0;
  95. height: 0;
  96. border-top: 60rpx solid #3385ff;
  97. border-right: 60rpx solid transparent;
  98. }
  99. .chart-tag {
  100. display: flex;
  101. align-items: center;
  102. justify-content: space-between;
  103. height: 78rpx;
  104. border-top: 1rpx solid #dcdfe6;
  105. .tag-item {
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. width: 150rpx;
  110. height: 38rpx;
  111. border-radius: 28rpx;
  112. border: 2rpx solid #3189ff;
  113. color: #3385ff;
  114. font-size: 24rpx;
  115. }
  116. }
  117. }
  118. </style>