vxe-table 3.18.4 → 3.18.6

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.
@@ -201,12 +201,12 @@ const renderSimplePanel = (h, _vm) => {
201
201
  }, [
202
202
  h('span', {
203
203
  class: ['vxe-table-custom--sort-btn', {
204
- 'is--disabled': isDisabled || isHidden || column.renderFixed
204
+ 'is--disabled': isDisabled || isHidden
205
205
  }],
206
206
  attrs: {
207
207
  title: getI18n('vxe.custom.setting.sortHelpTip')
208
208
  },
209
- on: isDisabled || isHidden || column.renderFixed
209
+ on: isDisabled || isHidden
210
210
  ? {}
211
211
  : {
212
212
  mousedown: _vm.sortMousedownEvent,
@@ -545,12 +545,12 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
545
545
  ? ((isCrossDrag ? immediate : false) || column.level === 1
546
546
  ? h('div', {
547
547
  class: ['vxe-table-custom-popup--column-sort-btn', {
548
- 'is--disabled': isDisabled || isHidden || column.renderFixed
548
+ 'is--disabled': isDisabled || isHidden
549
549
  }],
550
550
  attrs: {
551
551
  title: getI18n('vxe.custom.setting.sortHelpTip')
552
552
  },
553
- on: (isDisabled || isHidden || column.renderFixed
553
+ on: (isDisabled || isHidden
554
554
  ? {}
555
555
  : {
556
556
  mousedown: _vm.sortMousedownEvent,
@@ -1373,8 +1373,7 @@ export default {
1373
1373
  if (!dragCol ||
1374
1374
  (dragCol && dragCol.id === column.id) ||
1375
1375
  (!isCrossDrag && column.level > 1) ||
1376
- (!immediate && column.level > 1) ||
1377
- column.renderFixed) {
1376
+ (!immediate && column.level > 1)) {
1378
1377
  showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
1379
1378
  return;
1380
1379
  }
@@ -4,6 +4,20 @@ import { getClass } from '../../ui/src/utils';
4
4
  import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from './util';
5
5
  const { renderer, renderEmptyElement } = VxeUI;
6
6
  const cellType = 'header';
7
+ function getColumnFirstChild(column) {
8
+ const { children } = column;
9
+ if (children && children.length) {
10
+ return getColumnFirstChild(children[0]);
11
+ }
12
+ return column;
13
+ }
14
+ function getColumnLastChild(column) {
15
+ const { children } = column;
16
+ if (children && children.length) {
17
+ return getColumnLastChild(children[children.length - 1]);
18
+ }
19
+ return column;
20
+ }
7
21
  function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, cols) {
8
22
  const props = _vm;
9
23
  const $xeTable = _vm.$parent;
@@ -130,6 +144,17 @@ function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, co
130
144
  else {
131
145
  tcStyle.minHeight = `${currCellHeight}px`;
132
146
  }
147
+ if (isColGroup && !isLastRow) {
148
+ const firstCol = getColumnFirstChild(column);
149
+ const lastCol = getColumnLastChild(column);
150
+ if (firstCol && lastCol && firstCol.id !== lastCol.id) {
151
+ const firstColRest = fullColumnIdData[firstCol.id];
152
+ const lastColRest = fullColumnIdData[lastCol.id];
153
+ if (firstColRest && lastColRest) {
154
+ tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`;
155
+ }
156
+ }
157
+ }
133
158
  return h('th', {
134
159
  class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
135
160
  [`col--${headAlign}`]: headAlign,
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.18.4";
3
+ export const version = "3.18.6";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.18.4"}`;
3
+ const version = `table v${"3.18.6"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/grid/index.js CHANGED
@@ -7,14 +7,18 @@ exports.default = exports.VxeGrid = exports.Grid = void 0;
7
7
  var _ui = require("../ui");
8
8
  var _grid = _interopRequireDefault(require("./src/grid"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ let isReg = false;
10
11
  const VxeGrid = exports.VxeGrid = Object.assign({}, _grid.default, {
11
12
  install(app) {
13
+ if (!isReg) {
14
+ isReg = true;
15
+ if (_ui.VxeUI.dynamicApp) {
16
+ _ui.VxeUI.dynamicApp.component(_grid.default.name, _grid.default);
17
+ }
18
+ }
12
19
  app.component(_grid.default.name, _grid.default);
13
20
  }
14
21
  });
15
- if (_ui.VxeUI.dynamicApp) {
16
- _ui.VxeUI.dynamicApp.component(_grid.default.name, _grid.default);
17
- }
18
22
  _ui.VxeUI.component(_grid.default);
19
23
  const Grid = exports.Grid = VxeGrid;
20
24
  var _default = exports.default = VxeGrid;
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VxeGrid=exports.Grid=void 0;var _ui=require("../ui"),_grid=_interopRequireDefault(require("./src/grid"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let VxeGrid=exports.VxeGrid=Object.assign({},_grid.default,{install(e){e.component(_grid.default.name,_grid.default)}}),Grid=(_ui.VxeUI.dynamicApp&&_ui.VxeUI.dynamicApp.component(_grid.default.name,_grid.default),_ui.VxeUI.component(_grid.default),exports.Grid=VxeGrid);var _default=exports.default=VxeGrid;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.VxeGrid=exports.Grid=void 0;var _ui=require("../ui"),_grid=_interopRequireDefault(require("./src/grid"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let isReg=!1,VxeGrid=exports.VxeGrid=Object.assign({},_grid.default,{install(e){isReg||(isReg=!0,_ui.VxeUI.dynamicApp&&_ui.VxeUI.dynamicApp.component(_grid.default.name,_grid.default)),e.component(_grid.default.name,_grid.default)}}),Grid=(_ui.VxeUI.component(_grid.default),exports.Grid=VxeGrid);var _default=exports.default=VxeGrid;
package/lib/index.umd.js CHANGED
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
2002
2002
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2003
2003
 
2004
2004
 
2005
- const version = "3.18.4";
2005
+ const version = "3.18.6";
2006
2006
  core_.VxeUI.version = version;
2007
2007
  core_.VxeUI.tableVersion = version;
2008
2008
  core_.VxeUI.setConfig({
@@ -2678,7 +2678,7 @@ function isNodeElement(elem) {
2678
2678
  const {
2679
2679
  log: log_log
2680
2680
  } = core_.VxeUI;
2681
- const log_version = `table v${"3.18.4"}`;
2681
+ const log_version = `table v${"3.18.6"}`;
2682
2682
  const warnLog = log_log.create('warn', log_version);
2683
2683
  const errLog = log_log.create('error', log_version);
2684
2684
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -20348,6 +20348,24 @@ const {
20348
20348
  renderEmptyElement: header_renderEmptyElement
20349
20349
  } = core_.VxeUI;
20350
20350
  const cellType = 'header';
20351
+ function getColumnFirstChild(column) {
20352
+ const {
20353
+ children
20354
+ } = column;
20355
+ if (children && children.length) {
20356
+ return getColumnFirstChild(children[0]);
20357
+ }
20358
+ return column;
20359
+ }
20360
+ function getColumnLastChild(column) {
20361
+ const {
20362
+ children
20363
+ } = column;
20364
+ if (children && children.length) {
20365
+ return getColumnLastChild(children[children.length - 1]);
20366
+ }
20367
+ return column;
20368
+ }
20351
20369
  function header_renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, cols) {
20352
20370
  const props = _vm;
20353
20371
  const $xeTable = _vm.$parent;
@@ -20514,6 +20532,17 @@ function header_renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIn
20514
20532
  } else {
20515
20533
  tcStyle.minHeight = `${currCellHeight}px`;
20516
20534
  }
20535
+ if (isColGroup && !isLastRow) {
20536
+ const firstCol = getColumnFirstChild(column);
20537
+ const lastCol = getColumnLastChild(column);
20538
+ if (firstCol && lastCol && firstCol.id !== lastCol.id) {
20539
+ const firstColRest = fullColumnIdData[firstCol.id];
20540
+ const lastColRest = fullColumnIdData[lastCol.id];
20541
+ if (firstColRest && lastColRest) {
20542
+ tcStyle.width = `${lastColRest.oLeft - firstColRest.oLeft + lastCol.renderWidth}px`;
20543
+ }
20544
+ }
20545
+ }
20517
20546
  return h('th', {
20518
20547
  class: ['vxe-table--column vxe-header--column', colid, fixedHiddenColumn ? 'fixed--hidden' : 'fixed--visible', {
20519
20548
  [`col--${headAlign}`]: headAlign,
@@ -21494,12 +21523,12 @@ const renderSimplePanel = (h, _vm) => {
21494
21523
  class: 'vxe-table-custom--sort-option'
21495
21524
  }, [h('span', {
21496
21525
  class: ['vxe-table-custom--sort-btn', {
21497
- 'is--disabled': isDisabled || isHidden || column.renderFixed
21526
+ 'is--disabled': isDisabled || isHidden
21498
21527
  }],
21499
21528
  attrs: {
21500
21529
  title: panel_getI18n('vxe.custom.setting.sortHelpTip')
21501
21530
  },
21502
- on: isDisabled || isHidden || column.renderFixed ? {} : {
21531
+ on: isDisabled || isHidden ? {} : {
21503
21532
  mousedown: _vm.sortMousedownEvent,
21504
21533
  mouseup: _vm.sortMouseupEvent
21505
21534
  }
@@ -21795,12 +21824,12 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
21795
21824
  class: 'vxe-table-custom-popup--name'
21796
21825
  }, [allowSort ? (isCrossDrag ? immediate : false) || column.level === 1 ? h('div', {
21797
21826
  class: ['vxe-table-custom-popup--column-sort-btn', {
21798
- 'is--disabled': isDisabled || isHidden || column.renderFixed
21827
+ 'is--disabled': isDisabled || isHidden
21799
21828
  }],
21800
21829
  attrs: {
21801
21830
  title: panel_getI18n('vxe.custom.setting.sortHelpTip')
21802
21831
  },
21803
- on: isDisabled || isHidden || column.renderFixed ? {} : {
21832
+ on: isDisabled || isHidden ? {} : {
21804
21833
  mousedown: _vm.sortMousedownEvent,
21805
21834
  mouseup: _vm.sortMouseupEvent
21806
21835
  }
@@ -22594,7 +22623,7 @@ const renderPopupPanel = (h, $xeTableCustomPanel) => {
22594
22623
  evnt.preventDefault();
22595
22624
  const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
22596
22625
  const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
22597
- if (!dragCol || dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1 || column.renderFixed) {
22626
+ if (!dragCol || dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1) {
22598
22627
  panel_showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
22599
22628
  return;
22600
22629
  }
@@ -34581,14 +34610,18 @@ function grid_createInternalData() {
34581
34610
  ;// CONCATENATED MODULE: ./packages/grid/index.ts
34582
34611
 
34583
34612
 
34613
+ let isReg = false;
34584
34614
  const VxeGrid = Object.assign({}, grid, {
34585
34615
  install(app) {
34616
+ if (!isReg) {
34617
+ isReg = true;
34618
+ if (core_.VxeUI.dynamicApp) {
34619
+ core_.VxeUI.dynamicApp.component(grid.name, grid);
34620
+ }
34621
+ }
34586
34622
  app.component(grid.name, grid);
34587
34623
  }
34588
34624
  });
34589
- if (core_.VxeUI.dynamicApp) {
34590
- core_.VxeUI.dynamicApp.component(grid.name, grid);
34591
- }
34592
34625
  core_.VxeUI.component(grid);
34593
34626
  const Grid = VxeGrid;
34594
34627
  /* harmony default export */ var packages_grid = ((/* unused pure expression or super */ null && (VxeGrid)));
@@ -35963,7 +35996,7 @@ render_renderer.mixin({
35963
35996
 
35964
35997
 
35965
35998
 
35966
- let isReg = false;
35999
+ let table_isReg = false;
35967
36000
  const VxeTable = Object.assign({}, table, {
35968
36001
  install(app) {
35969
36002
  if (typeof window !== 'undefined') {
@@ -35995,8 +36028,8 @@ const VxeTable = Object.assign({}, table, {
35995
36028
  (external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype.$vxe.t = core_.VxeUI.t;
35996
36029
  (external_commonjs_vue_commonjs2_vue_root_Vue_default()).prototype.$vxe._t = core_.VxeUI._t;
35997
36030
  }
35998
- if (!isReg) {
35999
- isReg = true;
36031
+ if (!table_isReg) {
36032
+ table_isReg = true;
36000
36033
  if (core_.VxeUI.dynamicApp) {
36001
36034
  core_.VxeUI.dynamicApp.component(table.name, table);
36002
36035
  }