Blame view

src/components/table/mixin.js 1.16 KB
0d136465   梁灏   update Table
1
2
3
  export default {
      methods: {
          alignCls (column) {
5d0499ce   梁灏   update Table
4
5
6
7
8
9
10
11
12
              return [
                  {
                      [`${this.prefixCls}-column-${column.align}`]: column.align,
                      [`${this.prefixCls}-hidden`]: (this.fixed === 'left' && column.fixed !== 'left') || (this.fixed === 'right' && column.fixed !== 'right') || (!this.fixed && column.fixed && (column.fixed === 'left' || column.fixed === 'right'))
                  }
              ]
          },
          isPopperShow (column) {
              return column.filters && ((!this.fixed && !column.fixed) || (this.fixed === 'left' && column.fixed === 'left') || (this.fixed === 'right' && column.fixed === 'right'));
5e7a3b29   梁灏   publish 0.9.9-rc-2
13
          },
224a3ae5   梁灏   publish 0.9.9-rc-3
14
15
16
17
18
19
20
21
22
23
          setCellWidth (column, index) {
              // return column.width ? column.width : this.columnsWidth[index];
              let width = '';
              if (column.width) {
                  width = column.width;
              } else if (this.columnsWidth[column._index]) {
                  width = this.columnsWidth[column._index].width
              }
              // return this.columnsWidth[column._index] ? this.columnsWidth[column._index].width : '';
              return width;
0d136465   梁灏   update Table
24
25
26
          }
      }
  }