yusijie
2 天以前 54bc7c37dacf4ce520b2cb992d6d21462db10459
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<template>
  <view class="zb-table-footer" style="height: 40px;">
    <view class="zb-table-fixed" >
      <view class="zb-table-thead" style="position: relative;" >
        <view class="item-tr">
          <view
              :class="['item-th',index <fixedLeftColumns.length&&'zb-stick-side']"
              :style="{
                                  left:`${item.left}px`,
                                  width:`${item.width?item.width:'100'}px`,
                                                              flex:index===transColumns.length-1?1:'none',
                                                              minWidth:`${item.width?item.width:'100'}px`,
                                                               borderRight:`${border?'1px solid #e8e8e8':''}`,
                                                              borderTop:`${border?'1px solid #e8e8e8':''}`,
                                                               textAlign:item.align||'left'
                                                          }"
              v-for="(item,index) in transColumns" :key="index">
            <template>
              {{ sums[index]||item.emptyString }}
            </template>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>
<script>
  import summary from '../js/summary.js'
  export default {
    mixins:[summary]
  }
</script>
<style lang="scss" scoped>
  .zb-table-footer {
    background: #fafafa;
    width: fit-content;
    min-width: 100%;
    position: sticky;
    bottom: 0;
    z-index: 2;
    .item-tr{
      display: flex;
      min-width: 100%;
    }
    .item-th{
      padding-left: 8px;
      line-height: 39px;
      height: 40px;
      //display: flex;
      //align-items: center;
      box-sizing: border-box;
      flex-shrink: 0;
      width: 100px;
      padding-right: 20px;
      word-break: keep-all;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      overflow-wrap: break-word;
      border-bottom: 1px solid #e8e8e8;
    }
    .zb-table-fixed{
      min-width: 100%;
 
    }
    .zb-stick-side{
      position: sticky;
      bottom:0 ;
      left: 0;
      z-index: 2;
      //border-right: solid 1rpx #dbdbdb;
      box-sizing: border-box;
      background: #fafafa;
      //box-shadow: 6px 0 6px -4px #ccc;
    }
  }
</style>