zhengyiming
1 天以前 e0cb82c8dbf83fabc0cab548abc873926366fb75
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
<template>
  <div class="order-card-item" :class="{ danger }">
    <div
      class="order-card-item-label"
      :style="{ width: Taro.pxTransform(labelWidth), textAlign: textAlign }"
    >
      <slot name="label">{{ label }}</slot>
    </div>
    <div class="order-card-item-value">
      <slot name="value">{{ value }}</slot>
    </div>
  </div>
</template>
 
<script setup lang="ts">
import Taro from '@tarojs/taro';
 
defineOptions({
  name: 'OrderCardItem',
});
 
type Props = {
  label: string;
  value: any;
  labelWidth?: any;
  textAlign?: any;
  danger?: boolean;
};
 
const props = withDefaults(defineProps<Props>(), {
  labelWidth: 140,
  textAlign: 'left',
});
</script>
 
<style lang="scss"></style>