org-item.vue 843 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="content">
  3. <!-- 名字区域 -->
  4. <view class="msg">
  5. <view class="msg_name">{{ item.categoryName }}</view>
  6. ({{ item.count }})
  7. </view>
  8. <!-- 图标区域 -->
  9. <img class="img" src="@/static/images/2.png" />
  10. <!-- 背景图区域 插槽 -->
  11. <slot name="bg"></slot>
  12. </view>
  13. </template>
  14. <script setup>
  15. defineProps(['item'])
  16. </script>
  17. <style lang="scss" scoped>
  18. .content {
  19. position: relative;
  20. width: 347rpx;
  21. height: 177rpx;
  22. font-size: 28rpx;
  23. font-weight: bold;
  24. border-radius: 12rpx;
  25. background-color: #f0f7ff;
  26. border: 2rpx solid #e6e6e6;
  27. .msg {
  28. display: flex;
  29. margin: 27rpx 0 0 24rpx;
  30. .msg_name {
  31. max-width: 180rpx;
  32. white-space: nowrap;
  33. overflow: hidden;
  34. text-overflow: ellipsis;
  35. }
  36. }
  37. .img {
  38. margin: 30rpx 0 0 66rpx;
  39. width: 70rpx;
  40. height: 47rpx;
  41. }
  42. }
  43. </style>