vxe-table 4.11.0-beta.11 → 4.11.0-beta.3

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 (57) hide show
  1. package/README.md +13 -18
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/style.css +1 -1
  5. package/es/style.min.css +1 -1
  6. package/es/table/module/edit/hook.js +7 -1
  7. package/es/table/render/index.js +0 -10
  8. package/es/table/src/cell.js +0 -3
  9. package/es/table/src/header.js +2 -2
  10. package/es/table/src/table.js +25 -47
  11. package/es/table/style.css +1 -1
  12. package/es/table/style.min.css +1 -1
  13. package/es/ui/index.js +1 -1
  14. package/es/ui/src/log.js +1 -1
  15. package/es/vxe-table/style.css +1 -1
  16. package/es/vxe-table/style.min.css +1 -1
  17. package/lib/index.css +1 -1
  18. package/lib/index.min.css +1 -1
  19. package/lib/index.umd.js +38 -72
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/style.css +1 -1
  22. package/lib/style.min.css +1 -1
  23. package/lib/table/module/edit/hook.js +9 -1
  24. package/lib/table/module/edit/hook.min.js +1 -1
  25. package/lib/table/render/index.js +0 -10
  26. package/lib/table/render/index.min.js +1 -1
  27. package/lib/table/src/cell.js +0 -3
  28. package/lib/table/src/cell.min.js +1 -1
  29. package/lib/table/src/header.js +2 -2
  30. package/lib/table/src/header.min.js +1 -1
  31. package/lib/table/src/table.js +25 -54
  32. package/lib/table/src/table.min.js +1 -1
  33. package/lib/table/style/style.css +1 -1
  34. package/lib/table/style/style.min.css +1 -1
  35. package/lib/ui/index.js +1 -1
  36. package/lib/ui/index.min.js +1 -1
  37. package/lib/ui/src/log.js +1 -1
  38. package/lib/ui/src/log.min.js +1 -1
  39. package/lib/vxe-table/style/style.css +1 -1
  40. package/lib/vxe-table/style/style.min.css +1 -1
  41. package/package.json +2 -2
  42. package/packages/table/module/edit/hook.ts +7 -1
  43. package/packages/table/render/index.ts +0 -10
  44. package/packages/table/src/cell.ts +0 -3
  45. package/packages/table/src/header.ts +2 -2
  46. package/packages/table/src/table.ts +26 -51
  47. package/styles/components/table.scss +1 -1
  48. package/es/locale/lang/id-ID.js +0 -695
  49. package/lib/locale/lang/id-ID.js +0 -701
  50. package/lib/locale/lang/id-ID.min.js +0 -1
  51. package/packages/locale/lang/id-ID.ts +0 -695
  52. /package/es/{iconfont.1739840929802.ttf → iconfont.1739513039826.ttf} +0 -0
  53. /package/es/{iconfont.1739840929802.woff → iconfont.1739513039826.woff} +0 -0
  54. /package/es/{iconfont.1739840929802.woff2 → iconfont.1739513039826.woff2} +0 -0
  55. /package/lib/{iconfont.1739840929802.ttf → iconfont.1739513039826.ttf} +0 -0
  56. /package/lib/{iconfont.1739840929802.woff → iconfont.1739513039826.woff} +0 -0
  57. /package/lib/{iconfont.1739840929802.woff2 → iconfont.1739513039826.woff2} +0 -0
@@ -1247,7 +1247,6 @@ export default defineComponent({
1247
1247
  const fullColumnIdData: Record<string, VxeTableDefines.ColumnCacheItem> = internalData.fullColumnIdData = {}
1248
1248
  const fullColumnFieldData: Record<string, VxeTableDefines.ColumnCacheItem> = internalData.fullColumnFieldData = {}
1249
1249
  const mouseOpts = computeMouseOpts.value
1250
- const expandOpts = computeExpandOpts.value
1251
1250
  const columnOpts = computeColumnOpts.value
1252
1251
  const columnDragOpts = computeColumnDragOpts.value
1253
1252
  const { isCrossDrag, isSelfToChildDrag } = columnDragOpts
@@ -1334,8 +1333,10 @@ export default defineComponent({
1334
1333
  tableFullColumn.forEach(handleFunc)
1335
1334
  }
1336
1335
 
1337
- if ((expandColumn && expandOpts.mode !== 'fixed') && mouseOpts.area) {
1338
- errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
1336
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
1337
+ if (expandColumn && mouseOpts.area) {
1338
+ errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
1339
+ }
1339
1340
  }
1340
1341
 
1341
1342
  if (process.env.VUE_APP_VXE_ENV === 'development') {
@@ -1583,7 +1584,6 @@ export default defineComponent({
1583
1584
  }
1584
1585
 
1585
1586
  const updateAfterListIndex = () => {
1586
- const { treeConfig } = props
1587
1587
  const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData
1588
1588
  const fullMaps: Record<string, any> = {}
1589
1589
  afterFullData.forEach((row, index) => {
@@ -1591,9 +1591,7 @@ export default defineComponent({
1591
1591
  const rowRest = fullAllDataRowIdData[rowid]
1592
1592
  const seq = index + 1
1593
1593
  if (rowRest) {
1594
- if (!treeConfig) {
1595
- rowRest.seq = seq
1596
- }
1594
+ rowRest.seq = seq
1597
1595
  rowRest._index = index
1598
1596
  } else {
1599
1597
  const rest = { row, rowid, seq, index: -1, $index: -1, _index: index, treeIndex: -1, items: [], parent: null, level: 0, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 }
@@ -2609,10 +2607,7 @@ export default defineComponent({
2609
2607
  delete rExpandLazyLoadedMaps[rowid]
2610
2608
  }
2611
2609
  reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps
2612
- nextTick()
2613
- .then(() => $xeTable.recalculate())
2614
- .then(() => $xeTable.updateCellAreas())
2615
- .then(() => resolve())
2610
+ nextTick().then(() => tableMethods.recalculate()).then(() => resolve())
2616
2611
  })
2617
2612
  } else {
2618
2613
  resolve()
@@ -3094,7 +3089,6 @@ export default defineComponent({
3094
3089
  }
3095
3090
 
3096
3091
  const handleColumn = (collectColumn: VxeTableDefines.ColumnInfo[]) => {
3097
- const expandOpts = computeExpandOpts.value
3098
3092
  internalData.collectColumn = collectColumn
3099
3093
  const tableFullColumn = getColumnList(collectColumn)
3100
3094
  internalData.tableFullColumn = tableFullColumn
@@ -3104,7 +3098,6 @@ export default defineComponent({
3104
3098
  return Promise.resolve(
3105
3099
  restoreCustomStorage()
3106
3100
  ).then(() => {
3107
- const { scrollXLoad, scrollYLoad, expandColumn } = reactData
3108
3101
  cacheColumnMap()
3109
3102
  parseColumns(true).then(() => {
3110
3103
  if (reactData.scrollXLoad) {
@@ -3114,11 +3107,11 @@ export default defineComponent({
3114
3107
  $xeTable.clearMergeCells()
3115
3108
  $xeTable.clearMergeFooterItems()
3116
3109
  $xeTable.handleTableData(true)
3117
-
3118
- if ((scrollXLoad || scrollYLoad) && (expandColumn && expandOpts.mode !== 'fixed')) {
3119
- warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
3120
- }
3121
-
3110
+ // if (process.env.VUE_APP_VXE_ENV === 'development') {
3111
+ // if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
3112
+ // warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
3113
+ // }
3114
+ // }
3122
3115
  return nextTick().then(() => {
3123
3116
  if ($xeToolbar) {
3124
3117
  $xeToolbar.syncUpdate({
@@ -3502,15 +3495,6 @@ export default defineComponent({
3502
3495
  }
3503
3496
  }
3504
3497
 
3505
- const handleRowExpandScroll = () => {
3506
- const { elemStore } = internalData
3507
- const rowExpandEl = refRowExpandElem.value
3508
- const bodyScrollElem = getRefElem(elemStore['main-body-scroll'])
3509
- if (rowExpandEl && bodyScrollElem) {
3510
- rowExpandEl.scrollTop = bodyScrollElem.scrollTop
3511
- }
3512
- }
3513
-
3514
3498
  tableMethods = {
3515
3499
  dispatchEvent,
3516
3500
  /**
@@ -5227,14 +5211,14 @@ export default defineComponent({
5227
5211
  * @param {Boolean} expanded 是否展开
5228
5212
  */
5229
5213
  setRowExpand (rows, expanded) {
5230
- const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn } = reactData
5214
+ const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn: column } = reactData
5231
5215
  const { fullAllDataRowIdData } = internalData
5232
5216
  let rExpandedMaps = { ...rowExpandedMaps }
5233
5217
  const expandOpts = computeExpandOpts.value
5234
5218
  const { reserve, lazy, accordion, toggleMethod } = expandOpts
5235
5219
  const lazyRests: any[] = []
5236
- const columnIndex = $xeTable.getColumnIndex(expandColumn)
5237
- const $columnIndex = $xeTable.getVMColumnIndex(expandColumn)
5220
+ const columnIndex = tableMethods.getColumnIndex(column)
5221
+ const $columnIndex = tableMethods.getVMColumnIndex(column)
5238
5222
  if (rows) {
5239
5223
  if (!XEUtils.isArray(rows)) {
5240
5224
  rows = [rows]
@@ -5244,7 +5228,7 @@ export default defineComponent({
5244
5228
  rExpandedMaps = {}
5245
5229
  rows = rows.slice(rows.length - 1, rows.length)
5246
5230
  }
5247
- const validRows: any[] = toggleMethod ? rows.filter((row: any) => toggleMethod({ $table: $xeTable, expanded, column: expandColumn, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows
5231
+ const validRows: any[] = toggleMethod ? rows.filter((row: any) => toggleMethod({ $table: $xeTable, expanded, column, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows
5248
5232
  if (expanded) {
5249
5233
  validRows.forEach((row: any) => {
5250
5234
  const rowid = getRowid($xeTable, row)
@@ -5267,19 +5251,11 @@ export default defineComponent({
5267
5251
  })
5268
5252
  }
5269
5253
  if (reserve) {
5270
- validRows.forEach((row) => handleRowExpandReserve(row, expanded))
5254
+ validRows.forEach((row: any) => handleRowExpandReserve(row, expanded))
5271
5255
  }
5272
5256
  }
5273
5257
  reactData.rowExpandedMaps = rExpandedMaps
5274
- return Promise.all(lazyRests)
5275
- .then(() => $xeTable.recalculate())
5276
- .then(() => {
5277
- if (expandColumn) {
5278
- updateRowExpandStyle()
5279
- handleRowExpandScroll()
5280
- }
5281
- return $xeTable.updateCellAreas()
5282
- })
5258
+ return Promise.all(lazyRests).then(() => tableMethods.recalculate())
5283
5259
  },
5284
5260
  /**
5285
5261
  * 判断行是否为展开状态
@@ -5313,7 +5289,7 @@ export default defineComponent({
5313
5289
  if (expList.length) {
5314
5290
  tableMethods.recalculate()
5315
5291
  }
5316
- }).then(() => $xeTable.updateCellAreas())
5292
+ })
5317
5293
  },
5318
5294
  clearRowExpandReserve () {
5319
5295
  internalData.rowExpandedReserveRowMap = {}
@@ -5736,8 +5712,8 @@ export default defineComponent({
5736
5712
  updateCellAreas () {
5737
5713
  const { mouseConfig } = props
5738
5714
  const mouseOpts = computeMouseOpts.value
5739
- if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
5740
- return $xeTable.handleRecalculateCellAreaEvent()
5715
+ if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
5716
+ return $xeTable.handleRecalculateCellAreas()
5741
5717
  }
5742
5718
  return nextTick()
5743
5719
  },
@@ -7338,7 +7314,7 @@ export default defineComponent({
7338
7314
  const isSelected = sLen >= vLen
7339
7315
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1)
7340
7316
  if (checkField) {
7341
- XEUtils.set(row, checkField, isSelected)
7317
+ XEUtils.get(row, checkField, isSelected)
7342
7318
  }
7343
7319
  if (isSelected) {
7344
7320
  if (!checkField) {
@@ -7408,7 +7384,7 @@ export default defineComponent({
7408
7384
  vLen++
7409
7385
  })
7410
7386
 
7411
- const isSelected = rootList.length > 0 ? (vLen > 0 ? (sLen >= vLen) : (sLen >= rootList.length)) : false
7387
+ const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length
7412
7388
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1)
7413
7389
 
7414
7390
  reactData.isAllSelected = isSelected
@@ -9912,8 +9888,7 @@ export default defineComponent({
9912
9888
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)'])
9913
9889
  }
9914
9890
  loadTableData(value, true).then(() => {
9915
- const { scrollXLoad, scrollYLoad, expandColumn } = reactData
9916
- const expandOpts = computeExpandOpts.value
9891
+ // const { scrollXLoad, scrollYLoad, expandColumn } = reactData
9917
9892
  internalData.inited = true
9918
9893
  internalData.initStatus = true
9919
9894
  if (!initStatus) {
@@ -9924,9 +9899,9 @@ export default defineComponent({
9924
9899
  // if (checkboxColumn && internalData.tableFullData.length > 300 && !checkboxOpts.checkField) {
9925
9900
  // warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
9926
9901
  // }
9927
- if ((scrollXLoad || scrollYLoad) && (expandColumn && expandOpts.mode !== 'fixed')) {
9928
- warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
9929
- }
9902
+ // if ((scrollXLoad || scrollYLoad) && expandColumn) {
9903
+ // warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
9904
+ // }
9930
9905
  return tableMethods.recalculate()
9931
9906
  })
9932
9907
  })
@@ -271,7 +271,7 @@
271
271
  display: none;
272
272
  position: absolute;
273
273
  pointer-events: none;
274
- z-index: 6;
274
+ z-index: 1;
275
275
  }
276
276
 
277
277
  .vxe-table--header-wrapper {