曹睿
2025-04-23 8a09b751a8be8c4ed376f42e7f64e0794001e06a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<template>
  <wd-row>
    <wd-col v-for="(item, index) in data" :key="index" :span="item.span ?? 12" class="my-1">
      <view class="flex justify-between w-full h-[20px]">
        <view class="text-[#646874] pl-1">{{ item.label }}</view>
        <view class="font-medium pr-1" :style="{ color: item.color ?? color }">
          {{ value[item.prop] }} {{ value[item.unitProp] }} {{ item.unit }}
        </view>
      </view>
    </wd-col>
  </wd-row>
</template>
 
<script lang="ts" setup>
defineProps({
  data: {
    type: Array as any,
    default: () => {
      return [];
    },
  },
  value: {
    type: Object,
    default: () => {
      return {};
    },
  },
  color: {
    type: String,
    default: "#333333",
  },
  unit: {
    type: String,
    default: "",
  },
});
</script>