customListItem.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view>
  3. <view class="custom-list-item">
  4. <view class="custom-list-item-left">
  5. <text>{{ item && item.serialContent }}</text>
  6. <text>{{ item && item.createTime }}</text>
  7. </view>
  8. <text
  9. class="custom-list-item-right"
  10. :style="{color: item.serialType == 2 ?'#363636':'#EE0808' }">{{ item.serialType == 2 ?'-':'+' }} {{ item && item.balance }}</text>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. item: {
  18. type: Object,
  19. default: () => {
  20. return {
  21. serialType: null,
  22. balance: null,
  23. serialContent: null,
  24. createTime: null
  25. }
  26. }
  27. }
  28. },
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .custom-list-item {
  33. width: 100%;
  34. border-bottom: 2rpx solid #EEEEEE;
  35. padding: 40rpx 10rpx;
  36. box-sizing: border-box;
  37. display: flex;
  38. justify-content: space-between;
  39. align-items: center;
  40. .custom-list-item-left {
  41. display: flex;
  42. flex-direction: column;
  43. font-family: SourceHanSansCN, SourceHanSansCN;
  44. >text:nth-child(1) {
  45. margin-bottom: 10rpx;
  46. font-size: 28rpx;
  47. font-weight: 400;
  48. color: #363636;
  49. }
  50. >text:nth-child(2) {
  51. font-size: 24rpx;
  52. font-weight: 400;
  53. color: #999999;
  54. }
  55. }
  56. .custom-list-item-right {
  57. font-size: 28rpx;
  58. font-family: SourceHanSansCN, SourceHanSansCN;
  59. font-weight: 400;
  60. color: #363636;
  61. white-space: nowrap;
  62. }
  63. }
  64. </style>