vxe-table 4.7.93 → 4.7.94

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/index.umd.js CHANGED
@@ -1998,9 +1998,9 @@ function eqEmptyValue(cellValue) {
1998
1998
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
1999
1999
 
2000
2000
 
2001
- const version = "4.7.93";
2001
+ const version = "4.7.94";
2002
2002
  core_.VxeUI.version = version;
2003
- core_.VxeUI.tableVersion = "4.7.93";
2003
+ core_.VxeUI.tableVersion = "4.7.94";
2004
2004
  core_.VxeUI.setConfig({
2005
2005
  emptyCell: ' ',
2006
2006
  table: {
@@ -2384,7 +2384,7 @@ var es_array_push = __webpack_require__(4114);
2384
2384
  const {
2385
2385
  log: log_log
2386
2386
  } = core_.VxeUI;
2387
- const log_version = `table v${"4.7.93"}`;
2387
+ const log_version = `table v${"4.7.94"}`;
2388
2388
  const warnLog = log_log.create('warn', log_version);
2389
2389
  const errLog = log_log.create('error', log_version);
2390
2390
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -6924,30 +6924,43 @@ const {
6924
6924
  } = reactData;
6925
6925
  const customOpts = computeCustomOpts.value;
6926
6926
  const {
6927
- checkMethod
6927
+ checkMethod,
6928
+ visibleMethod
6928
6929
  } = customOpts;
6929
6930
  const isAll = !customStore.isAll;
6930
6931
  if (customOpts.immediate) {
6931
6932
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
6932
- if (!checkMethod || checkMethod({
6933
+ if (visibleMethod && !visibleMethod({
6933
6934
  column
6934
6935
  })) {
6935
- column.visible = isAll;
6936
- column.renderVisible = isAll;
6937
- column.halfVisible = false;
6936
+ return;
6938
6937
  }
6938
+ if (checkMethod && !checkMethod({
6939
+ column
6940
+ })) {
6941
+ return;
6942
+ }
6943
+ column.visible = isAll;
6944
+ column.renderVisible = isAll;
6945
+ column.halfVisible = false;
6939
6946
  });
6940
6947
  customStore.isAll = isAll;
6941
6948
  $xeTable.handleCustom();
6942
6949
  $xeTable.saveCustomStore('update:visible');
6943
6950
  } else {
6944
6951
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
6945
- if (!checkMethod || checkMethod({
6952
+ if (visibleMethod && !visibleMethod({
6946
6953
  column
6947
6954
  })) {
6948
- column.renderVisible = isAll;
6949
- column.halfVisible = false;
6955
+ return;
6956
+ }
6957
+ if (checkMethod && !checkMethod({
6958
+ column
6959
+ })) {
6960
+ return;
6950
6961
  }
6962
+ column.renderVisible = isAll;
6963
+ column.halfVisible = false;
6951
6964
  });
6952
6965
  customStore.isAll = isAll;
6953
6966
  }
@@ -7109,6 +7122,7 @@ const {
7109
7122
  key: column.id,
7110
7123
  colid: column.id,
7111
7124
  class: ['vxe-table-custom--option', `level--${column.level}`, {
7125
+ 'is--hidden': isDisabled || isHidden,
7112
7126
  'is--group': isColGroup
7113
7127
  }],
7114
7128
  onDragstart: sortDragstartEvent,
@@ -7132,10 +7146,10 @@ const {
7132
7146
  class: 'vxe-table-custom--sort-option'
7133
7147
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
7134
7148
  class: ['vxe-table-custom--sort-btn', {
7135
- 'is--disabled': isHidden
7149
+ 'is--disabled': isDisabled || isHidden
7136
7150
  }],
7137
7151
  title: panel_getI18n('vxe.custom.setting.sortHelpTip'),
7138
- ...(isHidden ? {} : {
7152
+ ...(isDisabled || isHidden ? {} : {
7139
7153
  onMousedown: sortMousedownEvent,
7140
7154
  onMouseup: sortMouseupEvent
7141
7155
  })
@@ -7154,7 +7168,7 @@ const {
7154
7168
  mode: 'text',
7155
7169
  icon: column.renderFixed === 'left' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
7156
7170
  status: column.renderFixed === 'left' ? 'primary' : '',
7157
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
7171
+ disabled: isDisabled || isHidden || isMaxFixedColumn && !column.renderFixed,
7158
7172
  title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
7159
7173
  onClick: () => {
7160
7174
  changeFixedOption(column, 'left');
@@ -7163,7 +7177,7 @@ const {
7163
7177
  mode: 'text',
7164
7178
  icon: column.renderFixed === 'right' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
7165
7179
  status: column.renderFixed === 'right' ? 'primary' : '',
7166
- disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
7180
+ disabled: isDisabled || isHidden || isMaxFixedColumn && !column.renderFixed,
7167
7181
  title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
7168
7182
  onClick: () => {
7169
7183
  changeFixedOption(column, 'right');
@@ -7305,10 +7319,10 @@ const {
7305
7319
  class: 'vxe-table-custom-popup--column-item col--sort'
7306
7320
  }, [column.level === 1 ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
7307
7321
  class: ['vxe-table-custom-popup--column-sort-btn', {
7308
- 'is--disabled': isHidden
7322
+ 'is--disabled': isDisabled || isHidden
7309
7323
  }],
7310
7324
  title: panel_getI18n('vxe.custom.setting.sortHelpTip'),
7311
- ...(isHidden ? {} : {
7325
+ ...(isDisabled || isHidden ? {} : {
7312
7326
  onMousedown: sortMousedownEvent,
7313
7327
  onMouseup: sortMouseupEvent
7314
7328
  })
@@ -7328,7 +7342,7 @@ const {
7328
7342
  class: 'vxe-table-custom-popup--column-item col--resizable'
7329
7343
  }, [column.children && column.children.length ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', '-') : VxeUIInputComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIInputComponent, {
7330
7344
  type: 'integer',
7331
- disabled: isHidden,
7345
+ disabled: isDisabled || isHidden,
7332
7346
  modelValue: column.renderResizeWidth,
7333
7347
  'onUpdate:modelValue'(value) {
7334
7348
  column.renderResizeWidth = Math.max(0, Number(value));
@@ -7339,19 +7353,19 @@ const {
7339
7353
  modelValue: column.renderFixed || '',
7340
7354
  type: 'button',
7341
7355
  size: 'mini',
7342
- disabled: isHidden,
7356
+ disabled: isDisabled || isHidden,
7343
7357
  options: [{
7344
7358
  label: panel_getI18n('vxe.custom.setting.fixedLeft'),
7345
7359
  value: 'left',
7346
- disabled: isHidden || isMaxFixedColumn
7360
+ disabled: isDisabled || isHidden || isMaxFixedColumn
7347
7361
  }, {
7348
7362
  label: panel_getI18n('vxe.custom.setting.fixedUnset'),
7349
7363
  value: '',
7350
- disabled: isHidden
7364
+ disabled: isDisabled || isHidden
7351
7365
  }, {
7352
7366
  label: panel_getI18n('vxe.custom.setting.fixedRight'),
7353
7367
  value: 'right',
7354
- disabled: isHidden || isMaxFixedColumn
7368
+ disabled: isDisabled || isHidden || isMaxFixedColumn
7355
7369
  }],
7356
7370
  'onUpdate:modelValue'(value) {
7357
7371
  column.renderFixed = value;