analysis-card.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="analysis-card">
  3. <analysis-card-item :isSubtitle="true">
  4. <template #title>
  5. <view>活跃机构</view>
  6. </template>
  7. <template #subtitle>
  8. <view>(6个月内有登录商城等行为)</view>
  9. </template>
  10. </analysis-card-item>
  11. <analysis-card-item :isSubtitle="true">
  12. <template #title>
  13. <view>不活跃机构</view>
  14. </template>
  15. <template #subtitle>
  16. <view>(6个月内未登录商城等行为)</view>
  17. </template>
  18. </analysis-card-item>
  19. <analysis-card-item :isPercentage="true">
  20. <template #title>
  21. <view>活跃机构占比</view>
  22. </template>
  23. </analysis-card-item>
  24. <analysis-card-item :isPercentage="true">
  25. <template #title>
  26. <view>不活跃机构占比</view>
  27. </template>
  28. </analysis-card-item>
  29. </view>
  30. </template>
  31. <script>
  32. import analysisCardItem from './analysis-card-item.vue'
  33. export default {
  34. components: {
  35. analysisCardItem
  36. },
  37. props: {
  38. analysisInfo: {
  39. type: Object,
  40. default: () => ({})
  41. }
  42. },
  43. data() {
  44. return {}
  45. },
  46. }
  47. </script>
  48. <style lang="scss">
  49. .analysis-card {
  50. width: 702rpx;
  51. display: grid;
  52. position: relative;
  53. grid-template-columns: repeat(2, 1fr);
  54. grid-template-rows: repeat(2, 1fr);
  55. background-color: #fff;
  56. border-radius: 16rpx;
  57. margin: 0 auto;
  58. &::before {
  59. width: 1px;
  60. height: 200rpx;
  61. content: '';
  62. position: absolute;
  63. left: 50%;
  64. top: 50%;
  65. background-color: #E5E5E5;
  66. transform: translate(-50%, -50%);
  67. }
  68. &::after {
  69. width: 660rpx;
  70. height: 1px;
  71. content: '';
  72. position: absolute;
  73. left: 50%;
  74. top: 50%;
  75. background-color: #E5E5E5;
  76. transform: translate(-50%, -50%);
  77. }
  78. }
  79. </style>