vxe-table 3.8.8-beta.6 → 3.8.8-beta.8

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 (110) hide show
  1. package/lib/custom/src/panel.js +10 -7
  2. package/lib/custom/src/panel.min.js +1 -1
  3. package/lib/custom/style/style.css +4 -4
  4. package/lib/custom/style/style.min.css +1 -1
  5. package/lib/edit/src/mixin.js +6 -6
  6. package/lib/edit/src/mixin.min.js +1 -1
  7. package/lib/export/src/mixin.js +29 -23
  8. package/lib/export/src/mixin.min.js +1 -1
  9. package/lib/filter/src/mixin.js +2 -2
  10. package/lib/filter/src/mixin.min.js +1 -1
  11. package/lib/filter/src/panel.js +5 -5
  12. package/lib/filter/src/panel.min.js +1 -1
  13. package/lib/form/src/form-config-item.js +9 -8
  14. package/lib/form/src/form-config-item.min.js +1 -1
  15. package/lib/form/src/form-item.js +9 -8
  16. package/lib/form/src/form-item.min.js +1 -1
  17. package/lib/form/src/form.js +3 -2
  18. package/lib/form/src/form.min.js +1 -1
  19. package/lib/form/src/render.js +2 -1
  20. package/lib/form/src/render.min.js +1 -1
  21. package/lib/form/src/util.js +5 -4
  22. package/lib/form/src/util.min.js +1 -1
  23. package/lib/icon/style/style.css +1 -1
  24. package/lib/icon/style/style.min.css +1 -1
  25. package/lib/index.css +1 -1
  26. package/lib/index.umd.js +253 -170
  27. package/lib/index.umd.min.js +1 -1
  28. package/lib/keyboard/src/mixin.js +2 -2
  29. package/lib/keyboard/src/mixin.min.js +1 -1
  30. package/lib/locale/lang/en-US.js +1 -1
  31. package/lib/locale/lang/en-US.min.js +1 -1
  32. package/lib/locale/lang/en-US.umd.js +1 -1
  33. package/lib/locale/lang/es-ES.js +1 -1
  34. package/lib/locale/lang/es-ES.min.js +1 -1
  35. package/lib/locale/lang/es-ES.umd.js +1 -1
  36. package/lib/locale/lang/ja-JP.js +1 -1
  37. package/lib/locale/lang/ja-JP.min.js +1 -1
  38. package/lib/locale/lang/ja-JP.umd.js +1 -1
  39. package/lib/locale/lang/pt-BR.js +1 -1
  40. package/lib/locale/lang/pt-BR.min.js +1 -1
  41. package/lib/locale/lang/pt-BR.umd.js +1 -1
  42. package/lib/locale/lang/zh-CN.js +1 -1
  43. package/lib/locale/lang/zh-CN.min.js +1 -1
  44. package/lib/locale/lang/zh-CN.umd.js +1 -1
  45. package/lib/locale/lang/zh-HK.min.js +1 -1
  46. package/lib/locale/lang/zh-HK.umd.js +1 -1
  47. package/lib/locale/lang/zh-MO.min.js +1 -1
  48. package/lib/locale/lang/zh-MO.umd.js +1 -1
  49. package/lib/locale/lang/zh-TC.js +1 -1
  50. package/lib/locale/lang/zh-TC.min.js +1 -1
  51. package/lib/locale/lang/zh-TC.umd.js +1 -1
  52. package/lib/locale/lang/zh-TW.min.js +1 -1
  53. package/lib/locale/lang/zh-TW.umd.js +1 -1
  54. package/lib/menu/src/mixin.js +1 -1
  55. package/lib/menu/src/mixin.min.js +1 -1
  56. package/lib/style.css +1 -1
  57. package/lib/style.min.css +1 -1
  58. package/lib/table/src/body.js +7 -4
  59. package/lib/table/src/body.min.js +1 -1
  60. package/lib/table/src/cell.js +17 -17
  61. package/lib/table/src/cell.min.js +1 -1
  62. package/lib/table/src/methods.js +147 -83
  63. package/lib/table/src/methods.min.js +1 -1
  64. package/lib/table/style/style.css +3 -0
  65. package/lib/table/style/style.min.css +1 -1
  66. package/lib/tools/log.js +1 -1
  67. package/lib/tools/log.min.js +1 -1
  68. package/lib/v-x-e-table/index.js +1 -1
  69. package/lib/v-x-e-table/index.min.js +1 -1
  70. package/lib/validator/src/mixin.js +1 -1
  71. package/lib/validator/src/mixin.min.js +1 -1
  72. package/lib/vxe-table/style/style.css +3 -0
  73. package/lib/vxe-table/style/style.min.css +1 -1
  74. package/lib/vxe-table-custom-module/style/style.css +4 -4
  75. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  76. package/package.json +1 -1
  77. package/packages/custom/src/panel.js +9 -7
  78. package/packages/edit/src/mixin.js +6 -6
  79. package/packages/export/src/mixin.js +21 -15
  80. package/packages/filter/src/mixin.js +2 -2
  81. package/packages/filter/src/panel.js +5 -5
  82. package/packages/form/src/form-config-item.js +9 -8
  83. package/packages/form/src/form-item.js +9 -8
  84. package/packages/form/src/form.js +3 -2
  85. package/packages/form/src/render.js +2 -1
  86. package/packages/form/src/util.js +5 -4
  87. package/packages/keyboard/src/mixin.js +2 -2
  88. package/packages/locale/lang/en-US.js +1 -1
  89. package/packages/locale/lang/es-ES.js +1 -1
  90. package/packages/locale/lang/ja-JP.js +1 -1
  91. package/packages/locale/lang/pt-BR.js +1 -1
  92. package/packages/locale/lang/zh-CN.js +1 -1
  93. package/packages/locale/lang/zh-TC.js +1 -1
  94. package/packages/menu/src/mixin.js +1 -1
  95. package/packages/table/src/body.js +7 -5
  96. package/packages/table/src/cell.js +17 -17
  97. package/packages/table/src/methods.js +124 -64
  98. package/packages/table/src/table.js +1 -1
  99. package/packages/validator/src/mixin.js +1 -1
  100. package/styles/custom.scss +4 -4
  101. package/styles/table.scss +9 -0
  102. package/styles/variable.scss +2 -0
  103. package/types/table.d.ts +4 -0
  104. package/types/v-x-e-table/renderer.d.ts +158 -9
  105. /package/lib/icon/style/{iconfont.1717772226455.ttf → iconfont.1719059955747.ttf} +0 -0
  106. /package/lib/icon/style/{iconfont.1717772226455.woff → iconfont.1719059955747.woff} +0 -0
  107. /package/lib/icon/style/{iconfont.1717772226455.woff2 → iconfont.1719059955747.woff2} +0 -0
  108. /package/lib/{iconfont.1717772226455.ttf → iconfont.1719059955747.ttf} +0 -0
  109. /package/lib/{iconfont.1717772226455.woff → iconfont.1719059955747.woff} +0 -0
  110. /package/lib/{iconfont.1717772226455.woff2 → iconfont.1719059955747.woff2} +0 -0
@@ -1103,6 +1103,63 @@ const Methods = {
1103
1103
  }
1104
1104
  return this.$nextTick()
1105
1105
  },
1106
+ getCellElement (row, fieldOrColumn) {
1107
+ const column = handleFieldOrColumn(this, fieldOrColumn)
1108
+ if (!column) {
1109
+ return null
1110
+ }
1111
+ const { $refs } = this
1112
+ const rowid = getRowid(this, row)
1113
+ let bodyElem = null
1114
+ if (column) {
1115
+ bodyElem = $refs[`${column.fixed || 'table'}Body`] || $refs.tableBody
1116
+ }
1117
+ if (bodyElem && bodyElem.$el) {
1118
+ return bodyElem.$el.querySelector(`.vxe-body--row[rowid="${rowid}"] .${column.id}`)
1119
+ }
1120
+ return null
1121
+ },
1122
+ getCellLabel (row, fieldOrColumn) {
1123
+ const column = handleFieldOrColumn(this, fieldOrColumn)
1124
+ if (!column) {
1125
+ return null
1126
+ }
1127
+ const formatter = column.formatter
1128
+ const cellValue = UtilTools.getCellValue(row, column)
1129
+ let cellLabel = cellValue
1130
+ if (formatter) {
1131
+ let rest, formatData
1132
+ const { fullAllDataRowMap } = this
1133
+ const colid = column.id
1134
+ const cacheFormat = fullAllDataRowMap.has(row)
1135
+ if (cacheFormat) {
1136
+ rest = fullAllDataRowMap.get(row)
1137
+ formatData = rest.formatData
1138
+ if (!formatData) {
1139
+ formatData = fullAllDataRowMap.get(row).formatData = {}
1140
+ }
1141
+ if (rest && formatData[colid]) {
1142
+ if (formatData[colid].value === cellValue) {
1143
+ return formatData[colid].label
1144
+ }
1145
+ }
1146
+ }
1147
+ const formatParams = { cellValue, row, rowIndex: this.getRowIndex(row), column, columnIndex: this.getColumnIndex(column) }
1148
+ if (XEUtils.isString(formatter)) {
1149
+ const gFormatOpts = formats.get(formatter)
1150
+ cellLabel = gFormatOpts && gFormatOpts.cellFormatMethod ? gFormatOpts.cellFormatMethod(formatParams) : ''
1151
+ } else if (XEUtils.isArray(formatter)) {
1152
+ const gFormatOpts = formats.get(formatter[0])
1153
+ cellLabel = gFormatOpts && gFormatOpts.cellFormatMethod ? gFormatOpts.cellFormatMethod(formatParams, ...formatter.slice(1)) : ''
1154
+ } else {
1155
+ cellLabel = formatter(formatParams)
1156
+ }
1157
+ if (formatData) {
1158
+ formatData[colid] = { value: cellValue, label: cellLabel }
1159
+ }
1160
+ }
1161
+ return cellLabel
1162
+ },
1106
1163
  /**
1107
1164
  * 检查是否为临时行数据
1108
1165
  * @param {Row} row 行对象
@@ -1156,6 +1213,13 @@ const Methods = {
1156
1213
  const columns = this.visibleColumn
1157
1214
  return XEUtils.isUndefined(columnIndex) ? columns.slice(0) : columns[columnIndex]
1158
1215
  },
1216
+ /**
1217
+ * 根据列获取列的唯一主键
1218
+ */
1219
+ getColid (fieldOrColumn) {
1220
+ const column = handleFieldOrColumn(this, fieldOrColumn)
1221
+ return column ? column.id : null
1222
+ },
1159
1223
  /**
1160
1224
  * 根据列的唯一主键获取列
1161
1225
  * @param {String} colid 列主键
@@ -1287,8 +1351,8 @@ const Methods = {
1287
1351
  if (valueList.length && !allRemoteFilter) {
1288
1352
  const { filterMethod, filterRender, field } = column
1289
1353
  const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
1290
- const compFilterMethod = compConf && compConf.renderFilter ? compConf.filterMethod : null
1291
- const defaultFilterMethod = compConf ? compConf.defaultFilterMethod : null
1354
+ const compFilterMethod = compConf && compConf.renderFilter ? (compConf.tableFilterMethod || compConf.filterMethod) : null
1355
+ const defaultFilterMethod = compConf ? (compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null
1292
1356
  const cellValue = UtilTools.getCellValue(row, column)
1293
1357
  if (filterMethod) {
1294
1358
  return itemList.some((item) => filterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
@@ -1620,8 +1684,7 @@ const Methods = {
1620
1684
  this.clearCopyCellArea()
1621
1685
  }
1622
1686
  }
1623
- this.saveCustomVisible()
1624
- this.saveCustomSort()
1687
+ this.saveCustomStore()
1625
1688
  this.analyColumnWidth()
1626
1689
  return this.refreshColumn(true)
1627
1690
  },
@@ -1854,6 +1917,12 @@ const Methods = {
1854
1917
  })
1855
1918
  return storeData
1856
1919
  },
1920
+ saveCustomStore () {
1921
+ this.saveCustomVisible()
1922
+ this.saveCustomSort()
1923
+ this.saveCustomFixed()
1924
+ this.saveCustomResizable()
1925
+ },
1857
1926
  saveCustomResizable (isReset) {
1858
1927
  const { id, collectColumn, customConfig, customOpts } = this
1859
1928
  const { storage } = customOpts
@@ -2729,7 +2798,7 @@ const Methods = {
2729
2798
  const { filterStore, isCtxMenu, ctxMenuStore, editStore, editOpts, editConfig, mouseConfig, mouseOpts, keyboardConfig, keyboardOpts, treeConfig, treeOpts, highlightCurrentRow, currentRow, bodyCtxMenu, rowOpts } = this
2730
2799
  const { selected, actived } = editStore
2731
2800
  const { keyCode } = evnt
2732
- const isBack = keyCode === 8
2801
+ const hasBackspaceKey = keyCode === 8
2733
2802
  const isTab = keyCode === 9
2734
2803
  const isEnter = keyCode === 13
2735
2804
  const isEsc = keyCode === 27
@@ -2849,11 +2918,11 @@ const Methods = {
2849
2918
  } else if (actived.row || actived.column) {
2850
2919
  this.moveTabSelected(actived.args, hasShiftKey, evnt)
2851
2920
  }
2852
- } else if (keyboardConfig && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? isBack && keyboardOpts.isArrow : isBack))) {
2921
+ } else if (keyboardConfig && (treeConfig || isEnableConf(editConfig)) && (isDel || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow ? hasBackspaceKey && keyboardOpts.isArrow : hasBackspaceKey))) {
2853
2922
  if (!isEditStatus) {
2854
2923
  const { delMethod, backMethod } = keyboardOpts
2855
2924
  // 如果是删除键
2856
- if (keyboardOpts.isDel && (selected.row || selected.column)) {
2925
+ if (keyboardOpts.isDel && isEnableConf(editConfig) && (selected.row || selected.column)) {
2857
2926
  const delPaqrams = {
2858
2927
  row: selected.row,
2859
2928
  rowIndex: this.getRowIndex(selected.row),
@@ -2866,7 +2935,7 @@ const Methods = {
2866
2935
  } else {
2867
2936
  setCellValue(selected.row, selected.column, null)
2868
2937
  }
2869
- if (isBack) {
2938
+ if (hasBackspaceKey) {
2870
2939
  if (backMethod) {
2871
2940
  backMethod({
2872
2941
  row: selected.row,
@@ -2883,7 +2952,7 @@ const Methods = {
2883
2952
  this.updateFooter()
2884
2953
  }
2885
2954
  this.emitEvent('cell-delete-value', delPaqrams, evnt)
2886
- } else if (isBack && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
2955
+ } else if (hasBackspaceKey && keyboardOpts.isArrow && treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
2887
2956
  // 如果树形表格回退键关闭当前行返回父节点
2888
2957
  const { parent: parentRow } = XEUtils.findTree(this.afterFullData, item => item === currentRow, { children: childrenField })
2889
2958
  if (parentRow) {
@@ -3394,8 +3463,11 @@ const Methods = {
3394
3463
  },
3395
3464
  handleToggleCheckRowEvent (evnt, params) {
3396
3465
  const { selectCheckboxMaps, checkboxOpts } = this
3397
- const { checkField } = checkboxOpts
3466
+ const { checkField, trigger } = checkboxOpts
3398
3467
  const { row } = params
3468
+ if (trigger === 'manual') {
3469
+ return
3470
+ }
3399
3471
  let value = false
3400
3472
  if (checkField) {
3401
3473
  value = !XEUtils.get(row, checkField)
@@ -3410,8 +3482,12 @@ const Methods = {
3410
3482
  },
3411
3483
  triggerCheckRowEvent (evnt, params, value) {
3412
3484
  const { checkboxOpts, afterFullData } = this
3413
- const { checkMethod } = checkboxOpts
3485
+ const { checkMethod, trigger } = checkboxOpts
3414
3486
  const { row } = params
3487
+ if (trigger === 'manual') {
3488
+ return
3489
+ }
3490
+ evnt.stopPropagation()
3415
3491
  if (checkboxOpts.isShiftKey && evnt.shiftKey && !this.treeConfig) {
3416
3492
  const checkboxRecords = this.getCheckboxRecords()
3417
3493
  if (checkboxRecords.length) {
@@ -3771,18 +3847,31 @@ const Methods = {
3771
3847
  }
3772
3848
  }
3773
3849
  },
3850
+ handleCheckAllEvent (evnt, value) {
3851
+ this.handleCheckedAllCheckboxRow(value)
3852
+ if (evnt) {
3853
+ this.emitEvent('checkbox-all', { records: this.getCheckboxRecords(), reserves: this.getCheckboxReserveRecords(), indeterminates: this.getCheckboxIndeterminateRecords(), checked: value }, evnt)
3854
+ }
3855
+ },
3774
3856
  /**
3775
3857
  * 多选,选中所有事件
3776
3858
  */
3777
3859
  triggerCheckAllEvent (evnt, value) {
3778
- this.handleCheckedAllCheckboxRow(value)
3779
- this.emitEvent('checkbox-all', { records: this.getCheckboxRecords(), reserves: this.getCheckboxReserveRecords(), indeterminates: this.getCheckboxIndeterminateRecords(), checked: value }, evnt)
3860
+ const { checkboxOpts } = this
3861
+ const { trigger } = checkboxOpts
3862
+ if (trigger === 'manual') {
3863
+ return
3864
+ }
3865
+ if (evnt) {
3866
+ evnt.stopPropagation()
3867
+ }
3868
+ this.handleCheckAllEvent(evnt, value)
3780
3869
  },
3781
3870
  /**
3782
3871
  * 多选,切换所有行的选中状态
3783
3872
  */
3784
3873
  toggleAllCheckboxRow () {
3785
- this.triggerCheckAllEvent(null, !this.isAllSelected)
3874
+ this.handleCheckAllEvent(null, !this.isAllSelected)
3786
3875
  return this.$nextTick()
3787
3876
  },
3788
3877
  /**
@@ -3838,6 +3927,11 @@ const Methods = {
3838
3927
  triggerRadioRowEvent (evnt, params) {
3839
3928
  const { selectRadioRow: oldValue, radioOpts } = this
3840
3929
  const { row } = params
3930
+ const { trigger } = radioOpts
3931
+ if (trigger === 'manual') {
3932
+ return
3933
+ }
3934
+ evnt.stopPropagation()
3841
3935
  let newValue = row
3842
3936
  let isChange = oldValue !== newValue
3843
3937
  if (isChange) {
@@ -4413,7 +4507,11 @@ const Methods = {
4413
4507
  triggerRowExpandEvent (evnt, params) {
4414
4508
  const { expandOpts, rowExpandLazyLoadedMaps, expandColumn: column } = this
4415
4509
  const { row } = params
4416
- const { lazy } = expandOpts
4510
+ const { lazy, trigger } = expandOpts
4511
+ if (trigger === 'manual') {
4512
+ return
4513
+ }
4514
+ evnt.stopPropagation()
4417
4515
  const rowid = getRowid(this, row)
4418
4516
  if (!lazy || !rowExpandLazyLoadedMaps[rowid]) {
4419
4517
  const expanded = !this.isRowExpandByRow(row)
@@ -4688,7 +4786,11 @@ const Methods = {
4688
4786
  triggerTreeExpandEvent (evnt, params) {
4689
4787
  const { treeOpts, treeExpandLazyLoadedMaps } = this
4690
4788
  const { row, column } = params
4691
- const { lazy } = treeOpts
4789
+ const { lazy, trigger } = treeOpts
4790
+ if (trigger === 'manual') {
4791
+ return
4792
+ }
4793
+ evnt.stopPropagation()
4692
4794
  const rowid = getRowid(this, row)
4693
4795
  if (!lazy || !treeExpandLazyLoadedMaps[rowid]) {
4694
4796
  const expanded = !this.isTreeExpandByRow(row)
@@ -5259,7 +5361,7 @@ const Methods = {
5259
5361
  const type = 'change'
5260
5362
  if (this.hasCellRules) {
5261
5363
  if (this.hasCellRules(type, row, column)) {
5262
- const cell = this.getCell(row, column)
5364
+ const cell = this.getCellElement(row, column)
5263
5365
  if (cell) {
5264
5366
  return this.validCellRules(type, row, column, cellValue)
5265
5367
  .then(() => {
@@ -5404,54 +5506,12 @@ const Methods = {
5404
5506
  /*************************
5405
5507
  * Publish methods
5406
5508
  *************************/
5509
+ /**
5510
+ * 已废弃,被 getCellElement 替换
5511
+ * @deprecated
5512
+ */
5407
5513
  getCell (row, column) {
5408
- const { $refs } = this
5409
- const rowid = getRowid(this, row)
5410
- let bodyElem = null
5411
- if (column) {
5412
- bodyElem = $refs[`${column.fixed || 'table'}Body`] || $refs.tableBody
5413
- }
5414
- if (bodyElem && bodyElem.$el) {
5415
- return bodyElem.$el.querySelector(`.vxe-body--row[rowid="${rowid}"] .${column.id}`)
5416
- }
5417
- return null
5418
- },
5419
- getCellLabel (row, column) {
5420
- const formatter = column.formatter
5421
- const cellValue = UtilTools.getCellValue(row, column)
5422
- let cellLabel = cellValue
5423
- if (formatter) {
5424
- let rest, formatData
5425
- const { fullAllDataRowMap } = this
5426
- const colid = column.id
5427
- const cacheFormat = fullAllDataRowMap.has(row)
5428
- if (cacheFormat) {
5429
- rest = fullAllDataRowMap.get(row)
5430
- formatData = rest.formatData
5431
- if (!formatData) {
5432
- formatData = fullAllDataRowMap.get(row).formatData = {}
5433
- }
5434
- if (rest && formatData[colid]) {
5435
- if (formatData[colid].value === cellValue) {
5436
- return formatData[colid].label
5437
- }
5438
- }
5439
- }
5440
- const formatParams = { cellValue, row, rowIndex: this.getRowIndex(row), column, columnIndex: this.getColumnIndex(column) }
5441
- if (XEUtils.isString(formatter)) {
5442
- const gFormatOpts = formats.get(formatter)
5443
- cellLabel = gFormatOpts && gFormatOpts.cellFormatMethod ? gFormatOpts.cellFormatMethod(formatParams) : ''
5444
- } else if (XEUtils.isArray(formatter)) {
5445
- const gFormatOpts = formats.get(formatter[0])
5446
- cellLabel = gFormatOpts && gFormatOpts.cellFormatMethod ? gFormatOpts.cellFormatMethod(formatParams, ...formatter.slice(1)) : ''
5447
- } else {
5448
- cellLabel = formatter(formatParams)
5449
- }
5450
- if (formatData) {
5451
- formatData[colid] = { value: cellValue, label: cellLabel }
5452
- }
5453
- }
5454
- return cellLabel
5514
+ return this.getCellElement(row, column)
5455
5515
  },
5456
5516
  findRowIndexOf (list, row) {
5457
5517
  return row ? XEUtils.findIndexOf(list, item => this.eqRow(item, row)) : -1
@@ -70,7 +70,7 @@ function renderEmptyContenet (h, _vm) {
70
70
  emptyContent = $scopedSlots.empty.call(_vm, params, h)
71
71
  } else {
72
72
  const compConf = emptyOpts.name ? VXETable.renderer.get(emptyOpts.name) : null
73
- const renderTableEmptyView = compConf ? compConf.renderTableEmptyView || compConf.renderEmpty : null
73
+ const renderTableEmptyView = compConf ? (compConf.renderTableEmptyView || compConf.renderEmpty) : null
74
74
  if (renderTableEmptyView) {
75
75
  emptyContent = getSlotVNs(renderTableEmptyView.call(_vm, h, emptyOpts, params))
76
76
  } else {
@@ -221,7 +221,7 @@ export default {
221
221
  })
222
222
  }
223
223
  const posAndFinish = () => {
224
- firstErrParams.cell = this.getCell(firstErrParams.row, firstErrParams.column)
224
+ firstErrParams.cell = this.getCellElement(firstErrParams.row, firstErrParams.column)
225
225
  DomTools.scrollToView(firstErrParams.cell)
226
226
  this.handleValidError(firstErrParams).then(finish)
227
227
  }
@@ -63,19 +63,19 @@
63
63
  border: 1px solid $vxe-table-border-color;
64
64
  border-radius: $vxe-border-radius;
65
65
  box-shadow: $vxe-base-popup-box-shadow;
66
- &.placement--topLeft {
66
+ &.placement--top-left {
67
67
  top: 2px;
68
68
  left: 2px;
69
69
  }
70
- &.placement--topRight {
70
+ &.placement--top-right {
71
71
  top: 2px;
72
72
  right: 2px;
73
73
  }
74
- &.placement--bottomLeft {
74
+ &.placement--bottom-left {
75
75
  bottom: 2px;
76
76
  left: 2px;
77
77
  }
78
- &.placement--bottomRight {
78
+ &.placement--bottom-right {
79
79
  bottom: 2px;
80
80
  right: 2px;
81
81
  }
package/styles/table.scss CHANGED
@@ -1032,6 +1032,15 @@
1032
1032
  padding-left: 0.5em;
1033
1033
  }
1034
1034
  }
1035
+ .vxe-body--expanded-row {
1036
+ &.is--padding {
1037
+ & > .vxe-body--expanded-column {
1038
+ & > .vxe-body--expanded-cell {
1039
+ padding: $vxe-table-expand-padding-default;
1040
+ }
1041
+ }
1042
+ }
1043
+ }
1035
1044
  .vxe-body--expanded-column {
1036
1045
  border-bottom: $vxe-table-border-width solid $vxe-table-border-color;
1037
1046
  border-right: $vxe-table-border-width solid $vxe-table-border-color;
@@ -113,6 +113,8 @@ $vxe-table-cell-extend-area-border-color: $vxe-table-cell-area-border-color !def
113
113
  $vxe-table-cell-active-area-border-color: $vxe-table-cell-area-border-color !default;
114
114
  $vxe-table-cell-area-background-color: rgba(64,158,255,0.2) !default;
115
115
 
116
+ $vxe-table-expand-padding-default: 16px !default;
117
+
116
118
  $vxe-table-checkbox-range-border-width: 1px !default;
117
119
  $vxe-table-checkbox-range-border-color: #006af1 !default;
118
120
  $vxe-table-checkbox-range-background-color: rgba(50,128,252,0.2) !default;
package/types/table.d.ts CHANGED
@@ -1558,6 +1558,10 @@ export interface TableKeyboardConfig {
1558
1558
  * 是否开启删除键功能
1559
1559
  */
1560
1560
  isDel?: boolean;
1561
+ /**
1562
+ * 是否开启回退键功能
1563
+ */
1564
+ isBack?: boolean
1561
1565
  /**
1562
1566
  * 是否开启回车移动上下行移动
1563
1567
  */
@@ -33,31 +33,124 @@ export interface RendererMapOptions {
33
33
  */
34
34
  isFooter?: boolean;
35
35
 
36
- // 筛选渲染
36
+ /**
37
+ * 请使用 tableFilterClassName
38
+ * @deprecated
39
+ */
37
40
  filterClassName?: string | ((params: ColumnFilterRenderParams) => string | VNodeClassName)
41
+ tableFilterClassName?: string | ((params: ColumnFilterRenderParams) => string | VNodeClassName)
42
+
43
+ /**
44
+ * 请使用 showTableFilterFooter
45
+ * @deprecated
46
+ */
38
47
  showFilterFooter?: boolean;
48
+ showTableFilterFooter?: boolean;
49
+
50
+ /**
51
+ * 已废弃,请使用 renderTableFilter
52
+ * @deprecated
53
+ */
39
54
  renderFilter?(h: CreateElement, renderOpts: ColumnFilterRenderOptions, params: ColumnFilterRenderParams): SlotVNodeType | SlotVNodeType[];
55
+ renderTableFilter?(h: CreateElement, renderOpts: ColumnFilterRenderOptions, params: ColumnFilterRenderParams): SlotVNodeType | SlotVNodeType[];
56
+
57
+ /**
58
+ * 已废弃,请使用 tableFilterMethod
59
+ * @deprecated
60
+ */
40
61
  filterMethod?(params: ColumnFilterMethodParams): boolean;
62
+ tableFilterMethod?(params: ColumnFilterMethodParams): boolean;
63
+
64
+ /**
65
+ * 已废弃,请使用 tableFilterResetMethod
66
+ * @deprecated
67
+ */
41
68
  filterResetMethod?(params: ColumnFilterResetParams): void;
42
- // 默认行为
69
+ tableFilterResetMethod?(params: ColumnFilterResetParams): void;
70
+
71
+ /**
72
+ * 已废弃,请使用 defaultTableFilterMethod
73
+ * @deprecated
74
+ */
43
75
  defaultFilterMethod?(params: ColumnFilterMethodParams): boolean;
76
+ defaultTableFilterMethod?(params: ColumnFilterMethodParams): boolean;
44
77
 
45
- // 单元格渲染
78
+ /**
79
+ * 已废弃,请使用 tableCellClassName
80
+ * @deprecated
81
+ */
46
82
  cellClassName?: string | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => string | VNodeClassName)
83
+ tableCellClassName?: string | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => string | VNodeClassName)
84
+
85
+ /**
86
+ * 已废弃,请使用 tableCellStyle
87
+ * @deprecated
88
+ */
47
89
  cellStyle?: VNodeStyle | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => VNodeStyle)
90
+ tableCellStyle?: VNodeStyle | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => VNodeStyle)
91
+
92
+ /**
93
+ * 已废弃,请使用 renderTableHeader
94
+ * @deprecated
95
+ */
48
96
  renderHeader?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
97
+ renderTableHeader?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
98
+
99
+ /**
100
+ * 已废弃,请使用 renderTableDefault
101
+ * @deprecated
102
+ */
49
103
  renderDefault?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
104
+ renderTableDefault?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
105
+
106
+ /**
107
+ * 已废弃,请使用 renderTableFooter
108
+ * @deprecated
109
+ */
50
110
  renderFooter?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: any): SlotVNodeType | SlotVNodeType[];
111
+ renderTableFooter?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: any): SlotVNodeType | SlotVNodeType[];
112
+
113
+ /**
114
+ * 已废弃,请使用 tableExportMethod
115
+ * @deprecated
116
+ */
51
117
  exportMethod?(params: ColumnExportCellRenderParams): string;
118
+ tableExportMethod?(params: ColumnExportCellRenderParams): string;
119
+
120
+ /**
121
+ * 已废弃,请使用 tableFooterExportMethod
122
+ * @deprecated
123
+ */
52
124
  footerExportMethod?(params: ColumnExportFooterRenderParams): string;
125
+ tableFooterExportMethod?(params: ColumnExportFooterRenderParams): string;
53
126
 
54
- // 编辑渲染
127
+ /**
128
+ * 已废弃,请使用 tableAutofocus
129
+ * @deprecated
130
+ */
55
131
  autofocus?: string | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => HTMLElement | null);
132
+ tableAutofocus?: string | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => HTMLElement | null);
133
+
134
+ /**
135
+ * 已废弃,请使用 renderTableEdit
136
+ * @deprecated
137
+ */
56
138
  renderEdit?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
139
+ renderTableEdit?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
140
+
141
+ /**
142
+ * 已废弃,请使用 renderTableCell
143
+ * @deprecated
144
+ */
57
145
  renderCell?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
146
+ renderTableCell?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
58
147
 
59
- // 内容渲染
148
+ /**
149
+ * 已废弃,请使用 renderTableExpand
150
+ * @deprecated
151
+ */
60
152
  renderExpand?(h: CreateElement, renderOpts: ColumnContentRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
153
+ renderTableExpand?(h: CreateElement, renderOpts: ColumnContentRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
61
154
 
62
155
  // 工具栏-按钮渲染
63
156
  toolbarButtonClassName?: string | ((params: ToolbarButtonRenderParams) => string | VNodeClassName)
@@ -65,26 +158,82 @@ export interface RendererMapOptions {
65
158
  toolbarToolClassName?: string | ((params: ToolbarToolRenderParams) => string | VNodeClassName)
66
159
  renderToolbarTool?(h: CreateElement, renderOpts: ToolbarToolRenderOptions, params: ToolbarToolRenderParams): SlotVNodeType | SlotVNodeType[];
67
160
 
68
- // 表单-项渲染
161
+ /**
162
+ * 已废弃,请使用 formItemClassName
163
+ * @deprecated
164
+ */
69
165
  itemClassName?: string | ((params: FormItemRenderParams) => string | VNodeClassName)
166
+ formItemClassName?: string | ((params: FormItemRenderParams) => string | VNodeClassName)
167
+
168
+ /**
169
+ * 已废弃,请使用 formItemStyle
170
+ * @deprecated
171
+ */
70
172
  itemStyle?: VNodeStyle | ((params: FormItemRenderParams) => VNodeStyle)
173
+ formItemStyle?: VNodeStyle | ((params: FormItemRenderParams) => VNodeStyle)
174
+
175
+ /**
176
+ * 已废弃,请使用 formItemContentClassName
177
+ * @deprecated
178
+ */
71
179
  itemContentClassName?: string | ((params: FormItemRenderParams) => string | VNodeClassName)
180
+ formItemContentClassName?: string | ((params: FormItemRenderParams) => string | VNodeClassName)
181
+
182
+ /**
183
+ * 已废弃,请使用 formItemContentStyle
184
+ * @deprecated
185
+ */
72
186
  itemContentStyle?: VNodeStyle | ((params: FormItemRenderParams) => VNodeStyle)
187
+ formItemContentStyle?: VNodeStyle | ((params: FormItemRenderParams) => VNodeStyle)
188
+
189
+ /**
190
+ * 已废弃,请使用 formItemTitleClassName
191
+ * @deprecated
192
+ */
73
193
  itemTitleClassName?: string | ((params: FormItemRenderParams) => string | VNodeClassName)
194
+ formItemTitleClassName?: string | ((params: FormItemRenderParams) => string | VNodeClassName)
195
+
196
+ /**
197
+ * 已废弃,请使用 formItemTitleStyle
198
+ * @deprecated
199
+ */
74
200
  itemTitleStyle?: VNodeStyle | ((params: FormItemRenderParams) => VNodeStyle)
201
+ formItemTitleStyle?: VNodeStyle | ((params: FormItemRenderParams) => VNodeStyle)
202
+
203
+ /**
204
+ * 已废弃,请使用 renderFormItemTitle
205
+ * @deprecated
206
+ */
75
207
  renderItemTitle?(h: CreateElement, renderOpts: FormItemRenderOptions, params: FormItemRenderParams): SlotVNodeType | SlotVNodeType[];
208
+ renderFormItemTitle?(h: CreateElement, renderOpts: FormItemRenderOptions, params: FormItemRenderParams): SlotVNodeType | SlotVNodeType[];
209
+
210
+ /**
211
+ * 已废弃,请使用 renderFormItemContent
212
+ * @deprecated
213
+ */
76
214
  renderItemContent?(h: CreateElement, renderOpts: FormItemRenderOptions, params: FormItemRenderParams): SlotVNodeType | SlotVNodeType[];
215
+ renderFormItemContent?(h: CreateElement, renderOpts: FormItemRenderOptions, params: FormItemRenderParams): SlotVNodeType | SlotVNodeType[];
216
+
217
+ /**
218
+ * 已废弃,请使用 formItemVisibleMethod
219
+ * @deprecated
220
+ */
77
221
  itemVisibleMethod?(params: FormItemVisibleParams): boolean;
78
- itemResetMethod?(params: FormItemResetParams): void;
222
+ formItemVisibleMethod?(params: FormItemVisibleParams): boolean;
79
223
 
80
- // 空内容渲染
81
- renderTableEmptyView?(h: CreateElement, renderOpts: TableEmptyRender, params: EmptyRenderParams): SlotVNodeType | SlotVNodeType[];
224
+ /**
225
+ * 已废弃,请使用 formItemResetMethod
226
+ * @deprecated
227
+ */
228
+ itemResetMethod?(params: FormItemResetParams): void;
229
+ formItemResetMethod?(params: FormItemResetParams): void;
82
230
 
83
231
  /**
84
232
  * 已废弃,请使用 renderTableEmptyView
85
233
  * @deprecated
86
234
  */
87
235
  renderEmpty?(h: CreateElement, renderOpts: TableEmptyRender, params: EmptyRenderParams): SlotVNodeType | SlotVNodeType[];
236
+ renderTableEmptyView?(h: CreateElement, renderOpts: TableEmptyRender, params: EmptyRenderParams): SlotVNodeType | SlotVNodeType[];
88
237
 
89
238
  [key: string]: any;
90
239
  }