table-h5-summary.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="table-h5-footer top-header-uni" :style="{paddingRight:`${scrollbarSize}rpx`}">
  3. <scroll-view class="zb-table-headers"
  4. @scroll="handleFooterTableScrollLeft"
  5. scroll-x="true"
  6. scroll-y="false"
  7. id="tableFooterHeaders"
  8. scroll-anchoring="true"
  9. :scroll-left="headerFooterTableLeft"
  10. style="padding-bottom: 0px;
  11. background: #fafafa;height: 100%">
  12. <view class="zb-table-fixed" >
  13. <view class="zb-table-thead" style="position: relative;" >
  14. <view class="item-tr">
  15. <view
  16. class="item-th"
  17. :style="{
  18. width:`${item.width?item.width:'200'}rpx`,
  19. flex:index===transColumns.length-1?1:'none',
  20. minWidth:`${item.width?item.width:'200'}rpx`,
  21. borderRight:`${border?'2rpx solid #e8e8e8':''}`,
  22. borderTop:`${border?'2rpx solid #e8e8e8':''}`,
  23. textAlign:item.align||'left'
  24. }"
  25. v-for="(item,index) in transColumns" :key="index">
  26. {{ sums[index] }}
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </scroll-view>
  32. </view>
  33. </template>
  34. <script>
  35. import summary from '../js/summary.js'
  36. export default {
  37. name:'table-footer',
  38. mixins:[summary],
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .table-h5-footer {
  43. background: #fafafa;
  44. /*每个页面公共css */
  45. scroll-view ::-webkit-scrollbar {
  46. display: none !important;
  47. width: 0 !important;
  48. height: 0 !important;
  49. -webkit-appearance: none;
  50. background: transparent;
  51. }
  52. //第二种
  53. ::-webkit-scrollbar{
  54. display: none;
  55. }
  56. .item-tr{
  57. display: flex;
  58. }
  59. .item-th{
  60. padding-left: 8rpx;
  61. line-height: 78rpx;
  62. height: 80rpx;
  63. //display: flex;
  64. //align-items: center;
  65. box-sizing: border-box;
  66. flex-shrink: 0;
  67. width: 200rpx;
  68. padding-right: 8rpx;
  69. word-break: keep-all;
  70. white-space: nowrap;
  71. overflow: hidden;
  72. text-overflow: ellipsis;
  73. overflow-wrap: break-word;
  74. border-bottom: 2rpx solid #e8e8e8;
  75. }
  76. }
  77. </style>