vxe-table 4.17.0-beta.5 → 4.17.0-beta.7

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.
@@ -533,13 +533,25 @@ function oldSelectEditRender(renderOpts, params) {
533
533
  ];
534
534
  }
535
535
  function getSelectCellValue(renderOpts, { row, column }) {
536
- const { options, optionGroups, optionProps = {}, optionGroupProps = {} } = renderOpts;
536
+ const { options, optionGroups, optionProps = {}, optionGroupProps = {}, props = {} } = renderOpts;
537
537
  const cellValue = XEUtils.get(row, column.field);
538
538
  let selectItem;
539
539
  const labelProp = optionProps.label || 'label';
540
540
  const valueProp = optionProps.value || 'value';
541
541
  if (!(cellValue === null || cellValue === undefined)) {
542
- return XEUtils.map(XEUtils.isArray(cellValue) ? cellValue : [cellValue], optionGroups
542
+ let vals = [];
543
+ if (XEUtils.isArray(cellValue)) {
544
+ vals = cellValue;
545
+ }
546
+ else {
547
+ if (props.multiple && `${cellValue}`.indexOf(',') > -1) {
548
+ vals = `${cellValue}`.split(',');
549
+ }
550
+ else {
551
+ vals = [cellValue];
552
+ }
553
+ }
554
+ return XEUtils.map(vals, optionGroups
543
555
  ? (value) => {
544
556
  const groupOptions = optionGroupProps.options || 'options';
545
557
  for (let index = 0; index < optionGroups.length; index++) {
@@ -301,7 +301,6 @@ export default defineVxeComponent({
301
301
  else {
302
302
  tcStyle.minHeight = `${cellHeight}px`;
303
303
  }
304
- // console.log(lastScrollTime)
305
304
  const tdVNs = [];
306
305
  if (fixedHiddenColumn && isAllOverflow) {
307
306
  tdVNs.push(h('div', {
@@ -470,7 +469,18 @@ export default defineVxeComponent({
470
469
  seq = rowRest._tIndex + 1;
471
470
  }
472
471
  }
473
- const params = { $table: $xeTable, seq, rowid, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex, _rowIndex };
472
+ const params = {
473
+ $table: $xeTable,
474
+ seq,
475
+ rowid,
476
+ fixed: fixedType,
477
+ type: renderType,
478
+ level: rowLevel,
479
+ row,
480
+ rowIndex,
481
+ $rowIndex,
482
+ _rowIndex
483
+ };
474
484
  // 行是否被展开
475
485
  const isExpandRow = expandColumn && !!rowExpandedFlag && !!rowExpandedMaps[rowid];
476
486
  // 树节点是否被展开
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 = "4.17.0-beta.5";
3
+ export const version = "4.17.0-beta.7";
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${"4.17.0-beta.5"}`;
3
+ const version = `table v${"4.17.0-beta.7"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.17.0-beta.5";
3141
+ const version = "4.17.0-beta.7";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3650,7 +3650,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3650
3650
  const {
3651
3651
  log: log_log
3652
3652
  } = core_.VxeUI;
3653
- const log_version = `table v${"4.17.0-beta.5"}`;
3653
+ const log_version = `table v${"4.17.0-beta.7"}`;
3654
3654
  const warnLog = log_log.create('warn', log_version);
3655
3655
  const errLog = log_log.create('error', log_version);
3656
3656
  ;// ./packages/table/src/columnInfo.ts
@@ -7655,7 +7655,6 @@ const renderType = 'body';
7655
7655
  } else {
7656
7656
  tcStyle.minHeight = `${cellHeight}px`;
7657
7657
  }
7658
- // console.log(lastScrollTime)
7659
7658
  const tdVNs = [];
7660
7659
  if (fixedHiddenColumn && isAllOverflow) {
7661
7660
  tdVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
@@ -18188,14 +18187,25 @@ function getSelectCellValue(renderOpts, {
18188
18187
  options,
18189
18188
  optionGroups,
18190
18189
  optionProps = {},
18191
- optionGroupProps = {}
18190
+ optionGroupProps = {},
18191
+ props = {}
18192
18192
  } = renderOpts;
18193
18193
  const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
18194
18194
  let selectItem;
18195
18195
  const labelProp = optionProps.label || 'label';
18196
18196
  const valueProp = optionProps.value || 'value';
18197
18197
  if (!(cellValue === null || cellValue === undefined)) {
18198
- return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().map(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(cellValue) ? cellValue : [cellValue], optionGroups ? value => {
18198
+ let vals = [];
18199
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(cellValue)) {
18200
+ vals = cellValue;
18201
+ } else {
18202
+ if (props.multiple && `${cellValue}`.indexOf(',') > -1) {
18203
+ vals = `${cellValue}`.split(',');
18204
+ } else {
18205
+ vals = [cellValue];
18206
+ }
18207
+ }
18208
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().map(vals, optionGroups ? value => {
18199
18209
  const groupOptions = optionGroupProps.options || 'options';
18200
18210
  for (let index = 0; index < optionGroups.length; index++) {
18201
18211
  /* eslint-disable eqeqeq */