| | |
| | | <template> |
| | | <div class="order-card-item" :class="{ danger }"> |
| | | <div class="order-card-item-label" :style="{ width: labelWidth, textAlign: textAlign }"> |
| | | <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"> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'OrderCardItem', |
| | | }); |
| | |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | labelWidth: '80px', |
| | | labelWidth: 140, |
| | | textAlign: 'left', |
| | | }); |
| | | </script> |