ItemTpl.vue 1007B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <van-cell-group v-if="props.itemList.length != 0" title="类目信息">
  3. <div
  4. class="itembox"
  5. v-for="item in props.itemList"
  6. :key="item.invoiceItemId"
  7. >
  8. <van-cell title="开票项目">
  9. <template #value>
  10. <span style="color: #000">{{ item.name }}</span>
  11. </template>
  12. </van-cell>
  13. <van-cell title="开票金额">
  14. <template #value>
  15. <span style="color: #000">{{ item.charge }}</span>
  16. </template>
  17. </van-cell>
  18. <div class="lastLine" />
  19. </div>
  20. </van-cell-group>
  21. </template>
  22. <script setup>
  23. const props = defineProps({
  24. itemList: {
  25. type: Array,
  26. default: () => ({})
  27. }
  28. })
  29. </script>
  30. <style lang="less" scoped>
  31. .lastLine::after {
  32. position: absolute;
  33. box-sizing: border-box;
  34. content: " ";
  35. pointer-events: none;
  36. right: var(--van-padding-md);
  37. bottom: 0;
  38. left: var(--van-padding-md);
  39. border-bottom: 1px solid var(--van-cell-border-color);
  40. transform: scaleY(0.5);
  41. }
  42. </style>