普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.7 KiB

  1. <template>
  2. <view class="flex card cols">
  3. <view class="flex flex-column col" v-for="item in list" :key="item.id">
  4. <view class="icon">
  5. <image class="icon-img" :src="item.icon" mode="scaleToFill"></image>
  6. <view class="flex sup" v-if="item.value">{{ item.value }}</view>
  7. </view>
  8. <view class="label">{{ item.label }}</view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. list: [],
  17. }
  18. },
  19. mounted() {
  20. this.list = [
  21. { id: '001', label: '待支付', value: 2, icon: '/pages_order/static/center/order-1.png' },
  22. { id: '002', label: '待发货', value: 2, icon: '/pages_order/static/center/order-2.png' },
  23. { id: '003', label: '待收货', value: 0, icon: '/pages_order/static/center/order-3.png' },
  24. { id: '004', label: '售后', value: 0, icon: '/pages_order/static/center/order-4.png' },
  25. { id: '005', label: '全部', icon: '/pages_order/static/center/order-5.png' },
  26. ]
  27. },
  28. }
  29. </script>
  30. <style scoped lang="scss">
  31. @import './styles/card.scss';
  32. .card {
  33. padding: 32rpx;
  34. column-gap: 16rpx;
  35. }
  36. .icon {
  37. position: relative;
  38. width: 48rpx;
  39. height: 48rpx;
  40. &-img {
  41. width: 100%;
  42. height: 100%;
  43. }
  44. .sup {
  45. position: absolute;
  46. top: 0;
  47. right: 0;
  48. transform: translate(50%, -50%);
  49. min-width: 32rpx;
  50. height: 32rpx;
  51. font-family: PingFang SC;
  52. font-weight: 500;
  53. font-size: 24rpx;
  54. line-height: 1.3;
  55. color: #FFFFFF;
  56. background: #F53F3F;
  57. border-radius: 32rpx;
  58. }
  59. }
  60. .label {
  61. margin-top: 12rpx;
  62. font-family: PingFang SC;
  63. font-weight: 400;
  64. font-size: 28rpx;
  65. line-height: 1;
  66. color: #252545;
  67. }
  68. </style>