vxe-table 3.20.3 → 3.20.5

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.
Files changed (44) hide show
  1. package/es/grid/style.css +4 -0
  2. package/es/grid/style.min.css +1 -1
  3. package/es/index.css +1 -1
  4. package/es/index.min.css +1 -1
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/table/module/custom/mixin.js +3 -1
  8. package/es/table/module/custom/panel.js +3 -1
  9. package/es/table/src/methods.js +31 -22
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-grid/style.css +4 -0
  13. package/es/vxe-grid/style.min.css +1 -1
  14. package/lib/grid/style/style.css +4 -0
  15. package/lib/grid/style/style.min.css +1 -1
  16. package/lib/index.css +1 -1
  17. package/lib/index.min.css +1 -1
  18. package/lib/index.umd.js +10 -6
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/style.css +1 -1
  21. package/lib/style.min.css +1 -1
  22. package/lib/table/module/custom/mixin.js +3 -1
  23. package/lib/table/module/custom/mixin.min.js +1 -1
  24. package/lib/table/module/custom/panel.js +3 -1
  25. package/lib/table/module/custom/panel.min.js +1 -1
  26. package/lib/table/src/methods.js +2 -2
  27. package/lib/table/src/methods.min.js +1 -1
  28. package/lib/ui/index.js +1 -1
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/lib/vxe-grid/style/style.css +4 -0
  33. package/lib/vxe-grid/style/style.min.css +1 -1
  34. package/package.json +1 -1
  35. package/packages/table/module/custom/mixin.ts +3 -1
  36. package/packages/table/module/custom/panel.ts +3 -1
  37. package/packages/table/src/methods.ts +31 -23
  38. package/styles/components/grid.scss +4 -0
  39. /package/es/{iconfont.1773640262712.ttf → iconfont.1773710661615.ttf} +0 -0
  40. /package/es/{iconfont.1773640262712.woff → iconfont.1773710661615.woff} +0 -0
  41. /package/es/{iconfont.1773640262712.woff2 → iconfont.1773710661615.woff2} +0 -0
  42. /package/lib/{iconfont.1773640262712.ttf → iconfont.1773710661615.ttf} +0 -0
  43. /package/lib/{iconfont.1773640262712.woff → iconfont.1773710661615.woff} +0 -0
  44. /package/lib/{iconfont.1773640262712.woff2 → iconfont.1773710661615.woff2} +0 -0
@@ -1,7 +1,9 @@
1
1
  import XEUtils from 'xe-utils';
2
2
  import { getColumnList } from '../../src/util';
3
3
  function updatePopupStyle($xeTable) {
4
+ const $xeGrid = $xeTable.$xeGrid;
4
5
  const $xeGantt = $xeTable.$xeGantt;
6
+ const $xeGGWrapper = $xeGrid || $xeGantt;
5
7
  const reactData = $xeTable;
6
8
  const { customStore } = reactData;
7
9
  const customOpts = $xeTable.computeCustomOpts;
@@ -19,7 +21,7 @@ function updatePopupStyle($xeTable) {
19
21
  }
20
22
  }
21
23
  if (showCustomSimpleOutside) {
22
- if (wrapperEl) {
24
+ if ($xeGGWrapper && wrapperEl) {
23
25
  popupTop = wrapperEl.offsetTop;
24
26
  }
25
27
  popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight;
@@ -811,7 +811,9 @@ export default {
811
811
  });
812
812
  const popupStys = {};
813
813
  if (maxHeight && !['left', 'right'].includes(placement || '')) {
814
- popupStys.top = toCssUnit(popupTop);
814
+ if (popupTop) {
815
+ popupStys.top = toCssUnit(popupTop);
816
+ }
815
817
  popupStys.maxHeight = toCssUnit(maxHeight);
816
818
  }
817
819
  return h('div', {
@@ -8331,19 +8331,24 @@ const tableMethods = {
8331
8331
  if (!checkMethod || checkMethod({ $table: $xeTable, row })) {
8332
8332
  let newValue = row;
8333
8333
  let isChange = oldValue !== newValue;
8334
- const selected = !isChange;
8335
- if (isChange) {
8334
+ if (strict) {
8336
8335
  handleCheckedRadioRow($xeTable, newValue);
8337
8336
  }
8338
- else if (!strict) {
8339
- isChange = oldValue === newValue;
8340
- if (isChange) {
8337
+ else {
8338
+ if (oldValue === newValue) {
8339
+ newValue = null;
8340
+ }
8341
+ isChange = oldValue !== newValue;
8342
+ if (isChange && newValue) {
8343
+ handleCheckedRadioRow($xeTable, newValue);
8344
+ }
8345
+ else {
8341
8346
  newValue = null;
8342
8347
  $xeTable.clearRadioRow();
8343
8348
  }
8344
8349
  }
8345
8350
  if (isChange) {
8346
- $xeTable.dispatchEvent('radio-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
8351
+ $xeTable.dispatchEvent('radio-change', Object.assign({ oldValue, newValue, selected: !!newValue }, params), evnt);
8347
8352
  }
8348
8353
  }
8349
8354
  },
@@ -8354,29 +8359,31 @@ const tableMethods = {
8354
8359
  const columnOpts = $xeTable.computeColumnOpts;
8355
8360
  const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
8356
8361
  const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod;
8357
- let { column: newValue } = params;
8362
+ let newValue = params.column;
8358
8363
  const { trigger, strict } = currentColumnOpts;
8359
8364
  if (trigger === 'manual') {
8360
8365
  return;
8361
8366
  }
8362
8367
  let isChange = oldValue !== newValue;
8363
- const selected = !isChange;
8364
- if (!beforeRowMethod || beforeRowMethod({ column: newValue, selected, $table: $xeTable })) {
8368
+ if (!beforeRowMethod || beforeRowMethod({ column: newValue, $table: $xeTable })) {
8365
8369
  if (strict) {
8366
8370
  $xeTable.setCurrentColumn(newValue);
8367
8371
  }
8368
8372
  else {
8369
- isChange = oldValue === newValue;
8370
- if (isChange) {
8373
+ if (oldValue === newValue) {
8371
8374
  newValue = null;
8372
- $xeTable.clearCurrentColumn();
8373
8375
  }
8374
- else {
8376
+ isChange = oldValue !== newValue;
8377
+ if (isChange && newValue) {
8375
8378
  $xeTable.setCurrentColumn(newValue);
8376
8379
  }
8380
+ else {
8381
+ newValue = null;
8382
+ $xeTable.clearCurrentColumn();
8383
+ }
8377
8384
  }
8378
8385
  if (isChange) {
8379
- $xeTable.dispatchEvent('current-column-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
8386
+ $xeTable.dispatchEvent('current-column-change', Object.assign({ oldValue, newValue, selected: !!newValue }, params), evnt);
8380
8387
  }
8381
8388
  }
8382
8389
  else {
@@ -8396,25 +8403,27 @@ const tableMethods = {
8396
8403
  return;
8397
8404
  }
8398
8405
  let isChange = oldValue !== newValue;
8399
- const selected = !isChange;
8400
- if (!beforeRowMethod || beforeRowMethod({ row: newValue, selected, $table: $xeTable })) {
8406
+ if (!beforeRowMethod || beforeRowMethod({ row: newValue, $table: $xeTable })) {
8401
8407
  if (strict) {
8402
8408
  $xeTable.setCurrentRow(newValue);
8403
8409
  }
8404
8410
  else {
8405
- isChange = oldValue === newValue;
8406
- if (isChange) {
8411
+ if (oldValue === newValue) {
8407
8412
  newValue = null;
8408
- $xeTable.clearCurrentRow();
8409
8413
  }
8410
- else {
8414
+ isChange = oldValue !== newValue;
8415
+ if (isChange && newValue) {
8411
8416
  $xeTable.setCurrentRow(newValue);
8412
8417
  }
8418
+ else {
8419
+ newValue = null;
8420
+ $xeTable.clearCurrentRow();
8421
+ }
8413
8422
  }
8414
8423
  if (isChange) {
8415
- $xeTable.dispatchEvent('current-row-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
8424
+ $xeTable.dispatchEvent('current-row-change', Object.assign({ oldValue, newValue, selected: !!newValue }, params), evnt);
8416
8425
  // 已废弃
8417
- $xeTable.dispatchEvent('current-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
8426
+ $xeTable.dispatchEvent('current-change', Object.assign({ oldValue, newValue }, params), evnt);
8418
8427
  }
8419
8428
  }
8420
8429
  else {
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.20.3";
3
+ export const version = "3.20.5";
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.20.3"}`;
3
+ const version = `table v${"3.20.5"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
@@ -36,6 +36,8 @@
36
36
  .vxe-grid .vxe-grid--table-container {
37
37
  display: flex;
38
38
  flex-direction: row;
39
+ flex-grow: 1;
40
+ overflow: hidden;
39
41
  }
40
42
  .vxe-grid .vxe-grid--left-wrapper,
41
43
  .vxe-grid .vxe-grid--right-wrapper {
@@ -56,6 +58,8 @@
56
58
  }
57
59
 
58
60
  .vxe-grid--layout-body-content-wrapper {
61
+ display: flex;
62
+ flex-direction: column;
59
63
  flex-grow: 1;
60
64
  overflow: auto;
61
65
  }
@@ -1 +1 @@
1
- .vxe-grid{position:relative;display:flex;flex-direction:column}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid--layout-body-wrapper{display:flex;flex-direction:row;overflow:auto;flex-grow:1}.vxe-grid--layout-body-content-wrapper{flex-grow:1;overflow:auto}.vxe-grid--layout-aside-left-wrapper,.vxe-grid--layout-footer-wrapper,.vxe-grid--layout-header-wrapper{flex-shrink:0}.vxe-grid--layout-aside-left-wrapper{overflow:auto}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}
1
+ .vxe-grid{position:relative;display:flex;flex-direction:column}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row;flex-grow:1;overflow:hidden}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid--layout-body-wrapper{display:flex;flex-direction:row;overflow:auto;flex-grow:1}.vxe-grid--layout-body-content-wrapper{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.vxe-grid--layout-aside-left-wrapper,.vxe-grid--layout-footer-wrapper,.vxe-grid--layout-header-wrapper{flex-shrink:0}.vxe-grid--layout-aside-left-wrapper{overflow:auto}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}
@@ -36,6 +36,8 @@
36
36
  .vxe-grid .vxe-grid--table-container {
37
37
  display: flex;
38
38
  flex-direction: row;
39
+ flex-grow: 1;
40
+ overflow: hidden;
39
41
  }
40
42
  .vxe-grid .vxe-grid--left-wrapper,
41
43
  .vxe-grid .vxe-grid--right-wrapper {
@@ -56,6 +58,8 @@
56
58
  }
57
59
 
58
60
  .vxe-grid--layout-body-content-wrapper {
61
+ display: flex;
62
+ flex-direction: column;
59
63
  flex-grow: 1;
60
64
  overflow: auto;
61
65
  }
@@ -1 +1 @@
1
- .vxe-grid{position:relative;display:flex;flex-direction:column}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid--layout-body-wrapper{display:flex;flex-direction:row;overflow:auto;flex-grow:1}.vxe-grid--layout-body-content-wrapper{flex-grow:1;overflow:auto}.vxe-grid--layout-aside-left-wrapper,.vxe-grid--layout-footer-wrapper,.vxe-grid--layout-header-wrapper{flex-shrink:0}.vxe-grid--layout-aside-left-wrapper{overflow:auto}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}
1
+ .vxe-grid{position:relative;display:flex;flex-direction:column}.vxe-grid.is--loading:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:99;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vxe-ui-loading-background-color)}.vxe-grid.is--loading>.vxe-table .vxe-loading{background-color:transparent}.vxe-grid.is--maximize{position:fixed;top:0;left:0;width:100%;height:100%;padding:.5em 1em;background-color:var(--vxe-ui-layout-background-color)}.vxe-grid .vxe-grid--bottom-wrapper,.vxe-grid .vxe-grid--form-wrapper,.vxe-grid .vxe-grid--top-wrapper{position:relative}.vxe-grid .vxe-grid--table-container{display:flex;flex-direction:row;flex-grow:1;overflow:hidden}.vxe-grid .vxe-grid--left-wrapper,.vxe-grid .vxe-grid--right-wrapper{flex-shrink:0;overflow:auto;outline:0}.vxe-grid .vxe-grid--table-wrapper{flex-grow:1;overflow:hidden}.vxe-grid--layout-body-wrapper{display:flex;flex-direction:row;overflow:auto;flex-grow:1}.vxe-grid--layout-body-content-wrapper{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.vxe-grid--layout-aside-left-wrapper,.vxe-grid--layout-footer-wrapper,.vxe-grid--layout-header-wrapper{flex-shrink:0}.vxe-grid--layout-aside-left-wrapper{overflow:auto}.vxe-grid{font-size:var(--vxe-ui-font-size-default)}.vxe-grid.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-grid.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-grid.size--mini{font-size:var(--vxe-ui-font-size-mini)}