wupengfei
2 天以前 ea408eac6343066edcd8ca18117794442b64b545
packages/components/src/components/Card/OrderCardItem.vue
@@ -1,6 +1,9 @@
<template>
  <div class="order-card-item">
    <div class="order-card-item-label" :style="{ width: labelWidth, textAlign: textAlign }">
  <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">
@@ -10,38 +13,24 @@
</template>
<script setup lang="ts">
import Taro from '@tarojs/taro';
defineOptions({
  name: 'OrderCardItem',
});
type Props = {
  label: string;
  value: string;
  value: any;
  labelWidth?: any;
  textAlign?: any;
  danger?: boolean;
};
const props = withDefaults(defineProps<Props>(), {
  labelWidth: '80px',
  labelWidth: 140,
  textAlign: 'left',
});
</script>
<style lang="scss">
.order-card-item {
  display: flex;
  font-size: 28px;
  line-height: 40px;
  margin-bottom: 15px;
  .order-card-item-label {
    color: #333333;
  }
  .order-card-item-value {
    color: #666666;
    flex: 1;
    min-width: 0;
  }
}
</style>
<style lang="scss"></style>