SummaryCard.vue 638 B

123456789101112131415161718192021
  1. <template>
  2. <div class="flex flex-col gap-2 bg-[var(--el-bg-color-overlay)] p-6">
  3. <div class="flex items-center justify-between text-gray-500">
  4. <span>{{ title }}</span>
  5. </div>
  6. <div class="flex flex-row items-baseline justify-between">
  7. <CountTo prefix="¥" :end-val="value" :decimals="2" :duration="500" class="text-3xl" />
  8. </div>
  9. </div>
  10. </template>
  11. <script lang="ts" setup>
  12. import { propTypes } from '@/utils/propTypes'
  13. /** 价格展示 Card */
  14. defineOptions({ name: 'ErpSummaryCard' })
  15. defineProps({
  16. title: propTypes.string.def('').isRequired,
  17. value: propTypes.number.def(0).isRequired
  18. })
  19. </script>