vxe-table 4.7.16-beta.0 → 4.7.17-beta.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.
@@ -2541,6 +2541,22 @@ export default defineComponent({
2541
2541
  return tableMethods.recalculate();
2542
2542
  });
2543
2543
  };
2544
+ const handleCheckAllEvent = (evnt, value) => {
2545
+ const checkboxOpts = computeCheckboxOpts.value;
2546
+ const { trigger } = checkboxOpts;
2547
+ if (trigger === 'manual') {
2548
+ return;
2549
+ }
2550
+ handleCheckedAllCheckboxRow(value);
2551
+ if (evnt) {
2552
+ tableMethods.dispatchEvent('checkbox-all', {
2553
+ records: tableMethods.getCheckboxRecords(),
2554
+ reserves: tableMethods.getCheckboxReserveRecords(),
2555
+ indeterminates: tableMethods.getCheckboxIndeterminateRecords(),
2556
+ checked: value
2557
+ }, evnt);
2558
+ }
2559
+ };
2544
2560
  /**
2545
2561
  * 纵向 Y 可视渲染处理
2546
2562
  */
@@ -3506,7 +3522,7 @@ export default defineComponent({
3506
3522
  * 多选,切换所有行的选中状态
3507
3523
  */
3508
3524
  toggleAllCheckboxRow() {
3509
- tablePrivateMethods.triggerCheckAllEvent(null, !reactData.isAllSelected);
3525
+ handleCheckAllEvent(null, !reactData.isAllSelected);
3510
3526
  return nextTick();
3511
3527
  },
3512
3528
  /**
@@ -5881,7 +5897,10 @@ export default defineComponent({
5881
5897
  const checkboxOpts = computeCheckboxOpts.value;
5882
5898
  const { row } = params;
5883
5899
  const { afterFullData } = internalData;
5884
- const { checkMethod } = checkboxOpts;
5900
+ const { checkMethod, trigger } = checkboxOpts;
5901
+ if (trigger === 'manual') {
5902
+ return;
5903
+ }
5885
5904
  if (checkboxOpts.isShiftKey && evnt.shiftKey && !props.treeConfig) {
5886
5905
  const checkboxRecords = tableMethods.getCheckboxRecords();
5887
5906
  if (checkboxRecords.length) {
@@ -5911,15 +5930,12 @@ export default defineComponent({
5911
5930
  * 多选,选中所有事件
5912
5931
  */
5913
5932
  triggerCheckAllEvent(evnt, value) {
5914
- handleCheckedAllCheckboxRow(value);
5915
- if (evnt) {
5916
- tableMethods.dispatchEvent('checkbox-all', {
5917
- records: tableMethods.getCheckboxRecords(),
5918
- reserves: tableMethods.getCheckboxReserveRecords(),
5919
- indeterminates: tableMethods.getCheckboxIndeterminateRecords(),
5920
- checked: value
5921
- }, evnt);
5933
+ const checkboxOpts = computeCheckboxOpts.value;
5934
+ const { trigger } = checkboxOpts;
5935
+ if (trigger === 'manual') {
5936
+ return;
5922
5937
  }
5938
+ handleCheckAllEvent(evnt, value);
5923
5939
  },
5924
5940
  /**
5925
5941
  * 单选,行选中事件
@@ -5928,6 +5944,10 @@ export default defineComponent({
5928
5944
  const { selectRadioRow: oldValue } = reactData;
5929
5945
  const { row } = params;
5930
5946
  const radioOpts = computeRadioOpts.value;
5947
+ const { trigger } = radioOpts;
5948
+ if (trigger === 'manual') {
5949
+ return;
5950
+ }
5931
5951
  let newValue = row;
5932
5952
  let isChange = oldValue !== newValue;
5933
5953
  if (isChange) {
@@ -5960,7 +5980,10 @@ export default defineComponent({
5960
5980
  const { rowExpandLazyLoadedMaps, expandColumn: column } = reactData;
5961
5981
  const expandOpts = computeExpandOpts.value;
5962
5982
  const { row } = params;
5963
- const { lazy } = expandOpts;
5983
+ const { lazy, trigger } = expandOpts;
5984
+ if (trigger === 'manual') {
5985
+ return;
5986
+ }
5964
5987
  const rowid = getRowid($xeTable, row);
5965
5988
  if (!lazy || !rowExpandLazyLoadedMaps[rowid]) {
5966
5989
  const expanded = !tableMethods.isRowExpandByRow(row);
@@ -5985,7 +6008,10 @@ export default defineComponent({
5985
6008
  const { treeExpandLazyLoadedMaps } = reactData;
5986
6009
  const treeOpts = computeTreeOpts.value;
5987
6010
  const { row, column } = params;
5988
- const { lazy } = treeOpts;
6011
+ const { lazy, trigger } = treeOpts;
6012
+ if (trigger === 'manual') {
6013
+ return;
6014
+ }
5989
6015
  const rowid = getRowid($xeTable, row);
5990
6016
  if (!lazy || !treeExpandLazyLoadedMaps[rowid]) {
5991
6017
  const expanded = !tableMethods.isTreeExpandByRow(row);
package/es/ui/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- VxeUI.version = "4.7.16-beta.0";
4
- VxeUI.tableVersion = "4.7.16-beta.0";
3
+ VxeUI.version = "4.7.17-beta.0";
4
+ VxeUI.tableVersion = "4.7.17-beta.0";
5
5
  VxeUI.setConfig({
6
6
  emptyCell: ' ',
7
7
  table: {
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${"4.7.16-beta.0"}`;
3
+ const version = `table v${"4.7.17-beta.0"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -1949,8 +1949,8 @@ function eqEmptyValue(cellValue) {
1949
1949
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
1950
1950
 
1951
1951
 
1952
- core_.VxeUI.version = "4.7.16-beta.0";
1953
- core_.VxeUI.tableVersion = "4.7.16-beta.0";
1952
+ core_.VxeUI.version = "4.7.17-beta.0";
1953
+ core_.VxeUI.tableVersion = "4.7.17-beta.0";
1954
1954
  core_.VxeUI.setConfig({
1955
1955
  emptyCell: ' ',
1956
1956
  table: {
@@ -2253,7 +2253,7 @@ var es_array_push = __webpack_require__(4114);
2253
2253
  const {
2254
2254
  log: log_log
2255
2255
  } = core_.VxeUI;
2256
- const version = `table v${"4.7.16-beta.0"}`;
2256
+ const version = `table v${"4.7.17-beta.0"}`;
2257
2257
  const warnLog = log_log.create('warn', version);
2258
2258
  const errLog = log_log.create('error', version);
2259
2259
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -10987,6 +10987,24 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
10987
10987
  return tableMethods.recalculate();
10988
10988
  });
10989
10989
  };
10990
+ const handleCheckAllEvent = (evnt, value) => {
10991
+ const checkboxOpts = computeCheckboxOpts.value;
10992
+ const {
10993
+ trigger
10994
+ } = checkboxOpts;
10995
+ if (trigger === 'manual') {
10996
+ return;
10997
+ }
10998
+ handleCheckedAllCheckboxRow(value);
10999
+ if (evnt) {
11000
+ tableMethods.dispatchEvent('checkbox-all', {
11001
+ records: tableMethods.getCheckboxRecords(),
11002
+ reserves: tableMethods.getCheckboxReserveRecords(),
11003
+ indeterminates: tableMethods.getCheckboxIndeterminateRecords(),
11004
+ checked: value
11005
+ }, evnt);
11006
+ }
11007
+ };
10990
11008
  /**
10991
11009
  * 纵向 Y 可视渲染处理
10992
11010
  */
@@ -12111,7 +12129,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
12111
12129
  * 多选,切换所有行的选中状态
12112
12130
  */
12113
12131
  toggleAllCheckboxRow() {
12114
- tablePrivateMethods.triggerCheckAllEvent(null, !reactData.isAllSelected);
12132
+ handleCheckAllEvent(null, !reactData.isAllSelected);
12115
12133
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
12116
12134
  },
12117
12135
  /**
@@ -14842,8 +14860,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14842
14860
  afterFullData
14843
14861
  } = internalData;
14844
14862
  const {
14845
- checkMethod
14863
+ checkMethod,
14864
+ trigger
14846
14865
  } = checkboxOpts;
14866
+ if (trigger === 'manual') {
14867
+ return;
14868
+ }
14847
14869
  if (checkboxOpts.isShiftKey && evnt.shiftKey && !props.treeConfig) {
14848
14870
  const checkboxRecords = tableMethods.getCheckboxRecords();
14849
14871
  if (checkboxRecords.length) {
@@ -14877,15 +14899,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14877
14899
  * 多选,选中所有事件
14878
14900
  */
14879
14901
  triggerCheckAllEvent(evnt, value) {
14880
- handleCheckedAllCheckboxRow(value);
14881
- if (evnt) {
14882
- tableMethods.dispatchEvent('checkbox-all', {
14883
- records: tableMethods.getCheckboxRecords(),
14884
- reserves: tableMethods.getCheckboxReserveRecords(),
14885
- indeterminates: tableMethods.getCheckboxIndeterminateRecords(),
14886
- checked: value
14887
- }, evnt);
14902
+ const checkboxOpts = computeCheckboxOpts.value;
14903
+ const {
14904
+ trigger
14905
+ } = checkboxOpts;
14906
+ if (trigger === 'manual') {
14907
+ return;
14888
14908
  }
14909
+ handleCheckAllEvent(evnt, value);
14889
14910
  },
14890
14911
  /**
14891
14912
  * 单选,行选中事件
@@ -14898,6 +14919,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14898
14919
  row
14899
14920
  } = params;
14900
14921
  const radioOpts = computeRadioOpts.value;
14922
+ const {
14923
+ trigger
14924
+ } = radioOpts;
14925
+ if (trigger === 'manual') {
14926
+ return;
14927
+ }
14901
14928
  let newValue = row;
14902
14929
  let isChange = oldValue !== newValue;
14903
14930
  if (isChange) {
@@ -14947,8 +14974,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14947
14974
  row
14948
14975
  } = params;
14949
14976
  const {
14950
- lazy
14977
+ lazy,
14978
+ trigger
14951
14979
  } = expandOpts;
14980
+ if (trigger === 'manual') {
14981
+ return;
14982
+ }
14952
14983
  const rowid = getRowid($xeTable, row);
14953
14984
  if (!lazy || !rowExpandLazyLoadedMaps[rowid]) {
14954
14985
  const expanded = !tableMethods.isRowExpandByRow(row);
@@ -14979,8 +15010,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14979
15010
  column
14980
15011
  } = params;
14981
15012
  const {
14982
- lazy
15013
+ lazy,
15014
+ trigger
14983
15015
  } = treeOpts;
15016
+ if (trigger === 'manual') {
15017
+ return;
15018
+ }
14984
15019
  const rowid = getRowid($xeTable, row);
14985
15020
  if (!lazy || !treeExpandLazyLoadedMaps[rowid]) {
14986
15021
  const expanded = !tableMethods.isTreeExpandByRow(row);