bi-eleme 2.0.13 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/table.js CHANGED
@@ -3755,12 +3755,20 @@ var convertToRows = function convertToRows(originColumns) {
3755
3755
  if (isGroup) this.$parent.isGroup = true;
3756
3756
  return h(
3757
3757
  'table',
3758
- { 'class': 'el-table__header', attrs: { cellspacing: '0', cellpadding: '0', border: '0' }
3758
+ {
3759
+ 'class': 'el-table__header',
3760
+ attrs: { cellspacing: '0',
3761
+ cellpadding: '0',
3762
+ border: '0'
3763
+ }
3759
3764
  },
3760
3765
  [h('colgroup', [this.columns.map(function (column) {
3761
3766
  return h('col', {
3762
- attrs: { name: column.id },
3763
- key: column.id });
3767
+ attrs: {
3768
+ name: column.id
3769
+ },
3770
+ key: column.id
3771
+ });
3764
3772
  }), this.hasGutter ? h('col', {
3765
3773
  attrs: { name: 'gutter' }
3766
3774
  }) : '']), h(
@@ -3769,12 +3777,18 @@ var convertToRows = function convertToRows(originColumns) {
3769
3777
  [this._l(columnRows, function (columns, rowIndex) {
3770
3778
  return h(
3771
3779
  'tr',
3772
- { style: _this.getHeaderRowStyle(rowIndex), 'class': _this.getHeaderRowClass(rowIndex) },
3780
+ {
3781
+ style: _this.getHeaderRowStyle(rowIndex),
3782
+ 'class': _this.getHeaderRowClass(rowIndex)
3783
+ },
3773
3784
  [columns.map(function (column, cellIndex) {
3774
3785
  return h(
3775
3786
  'th',
3776
3787
  {
3777
- attrs: { colspan: column.colSpan, rowspan: column.rowSpan },
3788
+ attrs: {
3789
+ colspan: column.colSpan,
3790
+ rowspan: column.rowSpan
3791
+ },
3778
3792
  on: {
3779
3793
  'mousemove': function mousemove($event) {
3780
3794
  return _this.handleMouseMove($event, column);
@@ -3786,28 +3800,41 @@ var convertToRows = function convertToRows(originColumns) {
3786
3800
  'click': function click($event) {
3787
3801
  return _this.handleHeaderClick($event, column);
3788
3802
  },
3803
+ 'dblclick': function dblclick($event) {
3804
+ return _this.handleHeaderDblclick($event, column);
3805
+ },
3789
3806
  'contextmenu': function contextmenu($event) {
3790
3807
  return _this.handleHeaderContextMenu($event, column);
3791
3808
  }
3792
3809
  },
3793
- style: _this.getHeaderCellStyle(rowIndex, cellIndex, columns, column), 'class': _this.getHeaderCellClass(rowIndex, cellIndex, columns, column), key: column.id },
3810
+
3811
+ style: _this.getHeaderCellStyle(rowIndex, cellIndex, columns, column),
3812
+ 'class': _this.getHeaderCellClass(rowIndex, cellIndex, columns, column),
3813
+ key: column.id
3814
+ },
3794
3815
  [h(
3795
3816
  'div',
3796
3817
  { 'class': ['cell', column.filteredValue && column.filteredValue.length > 0 ? 'highlight' : '', column.labelClassName] },
3797
3818
  [column.renderHeader ? column.renderHeader.call(_this._renderProxy, h, { column: column, $index: cellIndex, store: _this.store, _self: _this.$parent.$vnode.context }) : column.label, column.sortable ? h(
3798
3819
  'span',
3799
- { 'class': 'caret-wrapper', on: {
3820
+ {
3821
+ 'class': 'caret-wrapper',
3822
+ on: {
3800
3823
  'click': function click($event) {
3801
3824
  return _this.handleSortClick($event, column);
3802
3825
  }
3803
3826
  }
3804
3827
  },
3805
- [h('i', { 'class': 'sort-caret ascending', on: {
3828
+ [h('i', {
3829
+ 'class': 'sort-caret ascending',
3830
+ on: {
3806
3831
  'click': function click($event) {
3807
3832
  return _this.handleSortClick($event, column, 'ascending');
3808
3833
  }
3809
3834
  }
3810
- }), h('i', { 'class': 'sort-caret descending', on: {
3835
+ }), h('i', {
3836
+ 'class': 'sort-caret descending',
3837
+ on: {
3811
3838
  'click': function click($event) {
3812
3839
  return _this.handleSortClick($event, column, 'descending');
3813
3840
  }
@@ -3815,7 +3842,9 @@ var convertToRows = function convertToRows(originColumns) {
3815
3842
  })]
3816
3843
  ) : '', column.filterable ? h(
3817
3844
  'span',
3818
- { 'class': 'el-table__column-filter-trigger', on: {
3845
+ {
3846
+ 'class': 'el-table__column-filter-trigger',
3847
+ on: {
3819
3848
  'click': function click($event) {
3820
3849
  return _this.handleFilterClick($event, column);
3821
3850
  }
@@ -4023,6 +4052,9 @@ var convertToRows = function convertToRows(originColumns) {
4023
4052
 
4024
4053
  this.$parent.$emit('header-click', column, event);
4025
4054
  },
4055
+ handleHeaderDblclick: function handleHeaderDblclick(event, column) {
4056
+ this.$parent.$emit('header-dblclick', column, event);
4057
+ },
4026
4058
  handleHeaderContextMenu: function handleHeaderContextMenu(event, column) {
4027
4059
  this.$parent.$emit('header-contextmenu', column, event);
4028
4060
  },