table-side-summary.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view class="zb-table-header" style="display: flex;" >
  3. <view class="item-tr" >
  4. <view class='item-td'
  5. :style="{
  6. width:`${item.width?item.width:'200'}rpx`,
  7. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  8. textAlign:item.align||'left'
  9. }"
  10. :key="`${index}`"
  11. v-for="(item,index) in fixedLeftColumns">
  12. <template >
  13. {{sums[index]}}
  14. </template>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import summary from '../js/summary.js'
  21. export default {
  22. mixins:[summary]
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .zb-table-header {
  27. overflow: hidden;
  28. background: #fafafa;
  29. .item-th{
  30. padding-left: 8rpx;
  31. line-height: 78rpx;
  32. height: 80rpx;
  33. //display: flex;
  34. //align-items: center;
  35. box-sizing: border-box;
  36. }
  37. }
  38. .item-tr{
  39. display: flex;
  40. box-sizing: border-box;
  41. }
  42. .item-td{
  43. flex-shrink: 0;
  44. width: 200rpx;
  45. padding-left:8rpx;
  46. height: 80rpx;
  47. line-height: 80rpx;
  48. padding-right: 8rpx;
  49. box-sizing: border-box;
  50. word-break: keep-all;
  51. white-space: nowrap;
  52. overflow: hidden;
  53. text-overflow: ellipsis;
  54. overflow-wrap: break-word;
  55. border-bottom: 2rpx solid #e8e8e8;
  56. background: rgb(250, 250, 250);
  57. }
  58. </style>