vxe-table 3.8.8-beta.6 → 3.8.8-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.
Files changed (100) 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 +2 -2
  6. package/lib/edit/src/mixin.min.js +1 -1
  7. package/lib/export/src/mixin.js +2 -2
  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 +127 -73
  27. package/lib/index.umd.min.js +1 -1
  28. package/lib/locale/lang/en-US.js +1 -1
  29. package/lib/locale/lang/en-US.min.js +1 -1
  30. package/lib/locale/lang/en-US.umd.js +1 -1
  31. package/lib/locale/lang/es-ES.js +1 -1
  32. package/lib/locale/lang/es-ES.min.js +1 -1
  33. package/lib/locale/lang/es-ES.umd.js +1 -1
  34. package/lib/locale/lang/ja-JP.js +1 -1
  35. package/lib/locale/lang/ja-JP.min.js +1 -1
  36. package/lib/locale/lang/ja-JP.umd.js +1 -1
  37. package/lib/locale/lang/pt-BR.js +1 -1
  38. package/lib/locale/lang/pt-BR.min.js +1 -1
  39. package/lib/locale/lang/pt-BR.umd.js +1 -1
  40. package/lib/locale/lang/zh-CN.js +1 -1
  41. package/lib/locale/lang/zh-CN.min.js +1 -1
  42. package/lib/locale/lang/zh-CN.umd.js +1 -1
  43. package/lib/locale/lang/zh-HK.min.js +1 -1
  44. package/lib/locale/lang/zh-HK.umd.js +1 -1
  45. package/lib/locale/lang/zh-MO.min.js +1 -1
  46. package/lib/locale/lang/zh-MO.umd.js +1 -1
  47. package/lib/locale/lang/zh-TC.js +1 -1
  48. package/lib/locale/lang/zh-TC.min.js +1 -1
  49. package/lib/locale/lang/zh-TC.umd.js +1 -1
  50. package/lib/locale/lang/zh-TW.min.js +1 -1
  51. package/lib/locale/lang/zh-TW.umd.js +1 -1
  52. package/lib/style.css +1 -1
  53. package/lib/style.min.css +1 -1
  54. package/lib/table/src/body.js +7 -4
  55. package/lib/table/src/body.min.js +1 -1
  56. package/lib/table/src/cell.js +17 -11
  57. package/lib/table/src/cell.min.js +1 -1
  58. package/lib/table/src/methods.js +51 -16
  59. package/lib/table/src/methods.min.js +1 -1
  60. package/lib/table/style/style.css +3 -0
  61. package/lib/table/style/style.min.css +1 -1
  62. package/lib/tools/log.js +1 -1
  63. package/lib/tools/log.min.js +1 -1
  64. package/lib/v-x-e-table/index.js +1 -1
  65. package/lib/v-x-e-table/index.min.js +1 -1
  66. package/lib/vxe-table/style/style.css +3 -0
  67. package/lib/vxe-table/style/style.min.css +1 -1
  68. package/lib/vxe-table-custom-module/style/style.css +4 -4
  69. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  70. package/package.json +1 -1
  71. package/packages/custom/src/panel.js +9 -7
  72. package/packages/edit/src/mixin.js +2 -2
  73. package/packages/export/src/mixin.js +2 -2
  74. package/packages/filter/src/mixin.js +2 -2
  75. package/packages/filter/src/panel.js +5 -5
  76. package/packages/form/src/form-config-item.js +9 -8
  77. package/packages/form/src/form-item.js +9 -8
  78. package/packages/form/src/form.js +3 -2
  79. package/packages/form/src/render.js +2 -1
  80. package/packages/form/src/util.js +5 -4
  81. package/packages/locale/lang/en-US.js +1 -1
  82. package/packages/locale/lang/es-ES.js +1 -1
  83. package/packages/locale/lang/ja-JP.js +1 -1
  84. package/packages/locale/lang/pt-BR.js +1 -1
  85. package/packages/locale/lang/zh-CN.js +1 -1
  86. package/packages/locale/lang/zh-TC.js +1 -1
  87. package/packages/table/src/body.js +7 -5
  88. package/packages/table/src/cell.js +17 -11
  89. package/packages/table/src/methods.js +42 -11
  90. package/packages/table/src/table.js +1 -1
  91. package/styles/custom.scss +4 -4
  92. package/styles/table.scss +9 -0
  93. package/styles/variable.scss +2 -0
  94. package/types/v-x-e-table/renderer.d.ts +158 -9
  95. /package/lib/icon/style/{iconfont.1717772226455.ttf → iconfont.1718470675024.ttf} +0 -0
  96. /package/lib/icon/style/{iconfont.1717772226455.woff → iconfont.1718470675024.woff} +0 -0
  97. /package/lib/icon/style/{iconfont.1717772226455.woff2 → iconfont.1718470675024.woff2} +0 -0
  98. /package/lib/{iconfont.1717772226455.ttf → iconfont.1718470675024.ttf} +0 -0
  99. /package/lib/{iconfont.1717772226455.woff → iconfont.1718470675024.woff} +0 -0
  100. /package/lib/{iconfont.1717772226455.woff2 → iconfont.1718470675024.woff2} +0 -0
@@ -58,7 +58,7 @@ export default {
58
58
  const { target: targetElem, pageX } = evnt
59
59
  const { filters, filterMultiple, filterRender } = column
60
60
  const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
61
- const filterRecoverMethod = column.filterRecoverMethod || (compConf ? compConf.filterRecoverMethod : null)
61
+ const filterRecoverMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null)
62
62
  const { visibleWidth } = DomTools.getDomNode()
63
63
  Object.assign(filterStore, {
64
64
  args: params,
@@ -206,7 +206,7 @@ export default {
206
206
  const { filters, filterRender } = column
207
207
  if (filters) {
208
208
  const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
209
- const filterResetMethod = column.filterResetMethod || (compConf ? compConf.filterResetMethod : null)
209
+ const filterResetMethod = column.filterResetMethod || (compConf ? (compConf.tableFilterResetMethod || compConf.filterResetMethod) : null)
210
210
  filters.forEach((item) => {
211
211
  item._checked = false
212
212
  item.checked = false
@@ -1,7 +1,6 @@
1
1
  import GlobalConfig from '../../v-x-e-table/src/conf'
2
2
  import VXETable from '../../v-x-e-table'
3
3
  import UtilTools from '../../tools/utils'
4
- import XEUtils from 'xe-utils'
5
4
  import { getSlotVNs } from '../../tools/vn'
6
5
 
7
6
  export default {
@@ -20,7 +19,7 @@ export default {
20
19
  const { args, column } = filterStore
21
20
  const filterRender = column ? column.filterRender : null
22
21
  const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
23
- const filterClassName = compConf ? compConf.filterClassName : ''
22
+ const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : ''
24
23
  return h('div', {
25
24
  class: [
26
25
  'vxe-table--filter-wrapper',
@@ -41,17 +40,18 @@ export default {
41
40
  const { $parent: $xetable, filterStore } = this
42
41
  const { args, column, multiple, maxHeight } = filterStore
43
42
  const { slots } = column
43
+ const rtFilter = compConf ? (compConf.renderTableFilter || compConf.renderFilter) : null
44
44
  if (slots && slots.filter) {
45
45
  return [
46
46
  h('div', {
47
47
  class: 'vxe-table--filter-template'
48
48
  }, $xetable.callSlot(slots.filter, Object.assign({ $panel: this, context: this }, args), h))
49
49
  ]
50
- } else if (compConf && compConf.renderFilter) {
50
+ } else if (rtFilter) {
51
51
  return [
52
52
  h('div', {
53
53
  class: 'vxe-table--filter-template'
54
- }, getSlotVNs(compConf.renderFilter.call($xetable, h, filterRender, Object.assign({ $panel: this, context: this }, args))))
54
+ }, getSlotVNs(rtFilter.call($xetable, h, filterRender, Object.assign({ $panel: this, context: this }, args))))
55
55
  ]
56
56
  }
57
57
  const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some(item => item._checked)
@@ -122,7 +122,7 @@ export default {
122
122
  const filterRender = column.filterRender
123
123
  const compConf = filterRender ? VXETable.renderer.get(filterRender.name) : null
124
124
  const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate
125
- return multiple && (!compConf || (XEUtils.isBoolean(compConf.showFilterFooter) ? compConf.showFilterFooter !== false : compConf.isFooter !== false)) ? [
125
+ return multiple(compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false) : true) ? [
126
126
  h('div', {
127
127
  class: 'vxe-table--filter-footer'
128
128
  }, [
@@ -30,12 +30,12 @@ const VxeFormConfigItem = {
30
30
  const { rules, data, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = $xeform
31
31
  const { slots, title, folding, visible, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, children, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
32
32
  const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
33
- const itemClassName = compConf ? compConf.itemClassName : ''
34
- const itemStyle = compConf ? compConf.itemStyle : null
35
- const itemContentClassName = compConf ? compConf.itemContentClassName : ''
36
- const itemContentStyle = compConf ? compConf.itemContentStyle : null
37
- const itemTitleClassName = compConf ? compConf.itemTitleClassName : ''
38
- const itemTitleStyle = compConf ? compConf.itemTitleStyle : null
33
+ const itemClassName = compConf ? (compConf.formItemClassName || compConf.itemClassName) : ''
34
+ const itemStyle = compConf ? (compConf.formItemStyle || compConf.itemStyle) : null
35
+ const itemContentClassName = compConf ? (compConf.formItemContentClassName || compConf.itemContentClassName) : ''
36
+ const itemContentStyle = compConf ? (compConf.formItemContentStyle || compConf.itemContentStyle) : null
37
+ const itemTitleClassName = compConf ? (compConf.formItemTitleClassName || compConf.itemTitleClassName) : ''
38
+ const itemTitleStyle = compConf ? (compConf.formItemTitleStyle || compConf.itemTitleStyle) : null
39
39
  const span = item.span || $xeform.span
40
40
  const align = item.align || $xeform.align
41
41
  const titleAlign = XEUtils.eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign
@@ -75,10 +75,11 @@ const VxeFormConfigItem = {
75
75
  }
76
76
  }
77
77
  let contentVNs = []
78
+ const rfiContent = compConf ? (compConf.renderFormItemContent || compConf.renderItemContent) : null
78
79
  if (slots && slots.default) {
79
80
  contentVNs = $xeform.callSlot(slots.default, params, h)
80
- } else if (compConf && compConf.renderItemContent) {
81
- contentVNs = getSlotVNs(compConf.renderItemContent.call($xeform, h, itemRender, params))
81
+ } else if (rfiContent) {
82
+ contentVNs = getSlotVNs(rfiContent.call($xeform, h, itemRender, params))
82
83
  } else if (compConf && compConf.renderItem) {
83
84
  contentVNs = getSlotVNs(compConf.renderItem.call($xeform, h, itemRender, params))
84
85
  } else if (field) {
@@ -67,12 +67,12 @@ const renderItem = (h, _vm, item, slots) => {
67
67
  const { _e, rules, data, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = _vm
68
68
  const { title, folding, visible, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
69
69
  const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
70
- const itemClassName = compConf ? compConf.itemClassName : ''
71
- const itemStyle = compConf ? compConf.itemStyle : null
72
- const itemContentClassName = compConf ? compConf.itemContentClassName : ''
73
- const itemContentStyle = compConf ? compConf.itemContentStyle : null
74
- const itemTitleClassName = compConf ? compConf.itemTitleClassName : ''
75
- const itemTitleStyle = compConf ? compConf.itemTitleStyle : null
70
+ const itemClassName = compConf ? (compConf.formItemClassName || compConf.itemClassName) : ''
71
+ const itemStyle = compConf ? (compConf.formItemStyle || compConf.itemStyle) : null
72
+ const itemContentClassName = compConf ? (compConf.formItemContentClassName || compConf.itemContentClassName) : ''
73
+ const itemContentStyle = compConf ? (compConf.formItemContentStyle || compConf.itemContentStyle) : null
74
+ const itemTitleClassName = compConf ? (compConf.formItemTitleClassName || compConf.itemTitleClassName) : ''
75
+ const itemTitleStyle = compConf ? (compConf.formItemTitleStyle || compConf.itemTitleStyle) : null
76
76
  const span = item.span || _vm.span
77
77
  const align = item.align || _vm.align
78
78
  const titleAlign = XEUtils.eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign
@@ -97,10 +97,11 @@ const renderItem = (h, _vm, item, slots) => {
97
97
  }
98
98
  }
99
99
  let contentVNs = []
100
+ const rfiContent = compConf ? (compConf.renderFormItemContent || compConf.renderItemContent) : null
100
101
  if (slots && slots.default) {
101
102
  contentVNs = _vm.callSlot(slots.default, params, h)
102
- } else if (compConf && compConf.renderItemContent) {
103
- contentVNs = getSlotVNs(compConf.renderItemContent.call(_vm, h, itemRender, params))
103
+ } else if (rfiContent) {
104
+ contentVNs = getSlotVNs(rfiContent.call(_vm, h, itemRender, params))
104
105
  } else if (compConf && compConf.renderItem) {
105
106
  contentVNs = getSlotVNs(compConf.renderItem.call(_vm, h, itemRender, params))
106
107
  } else if (field) {
@@ -271,8 +271,9 @@ export default {
271
271
  const { field, resetValue, itemRender } = item
272
272
  if (isEnableConf(itemRender)) {
273
273
  const compConf = VXETable.renderer.get(itemRender.name)
274
- if (compConf && compConf.itemResetMethod) {
275
- compConf.itemResetMethod({ data, field, property: field, item, $form: this, $grid: this.xegrid })
274
+ const fiResetMethod = compConf ? (compConf.formItemResetMethod || compConf.itemResetMethod) : null
275
+ if (compConf && fiResetMethod) {
276
+ fiResetMethod({ data, field, property: field, item, $form: this, $grid: this.xegrid })
276
277
  } else if (field) {
277
278
  XEUtils.set(data, field, resetValue === null ? getResetValue(XEUtils.get(data, field), undefined) : XEUtils.clone(resetValue, true))
278
279
  }
@@ -45,10 +45,11 @@ export function renderTitle (h, _vm, item) {
45
45
  : renderPrefixIcon(h, titlePrefix)
46
46
  )
47
47
  }
48
+ const rfiTitle = compConf ? (compConf.renderFormItemTitle || compConf.renderItemTitle) : null
48
49
  titVNs.push(
49
50
  h('span', {
50
51
  class: 'vxe-form--item-title-label'
51
- }, compConf && compConf.renderItemTitle ? getSlotVNs(compConf.renderItemTitle(itemRender, params)) : (slots && slots.title ? _vm.callSlot(slots.title, params, h) : getFuncText(item.title)))
52
+ }, rfiTitle ? getSlotVNs(rfiTitle(itemRender, params)) : (slots && slots.title ? _vm.callSlot(slots.title, params, h) : getFuncText(item.title)))
52
53
  )
53
54
  contVNs.push(
54
55
  h('div', {
@@ -39,8 +39,8 @@ class ItemConfig {
39
39
  })
40
40
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
41
41
  const compConf = item.itemRender ? VXETable.renderer.get(item.itemRender.name) : null
42
- if (compConf && !compConf.renderItemContent && compConf.renderItem) {
43
- warnLog('vxe.error.delProp', ['item-render.renderItem', 'item-render.renderItemContent'])
42
+ if (compConf && !(compConf.renderFormItemContent || compConf.renderItemContent) && compConf.renderItem) {
43
+ warnLog('vxe.error.delProp', ['item-render.renderItem', 'item-render.renderFormItemContent'])
44
44
  }
45
45
  }
46
46
  }
@@ -77,8 +77,9 @@ export function isActivetem ($xeform, formItem) {
77
77
  return visible
78
78
  }
79
79
  const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
80
- if (!visibleMethod && compConf && compConf.itemVisibleMethod) {
81
- visibleMethod = compConf.itemVisibleMethod
80
+ const fiVisibleMethod = compConf ? (compConf.formItemVisibleMethod || compConf.itemVisibleMethod) : null
81
+ if (!visibleMethod && fiVisibleMethod) {
82
+ visibleMethod = fiVisibleMethod
82
83
  }
83
84
  if (!visibleMethod) {
84
85
  return true
@@ -45,7 +45,7 @@ export default {
45
45
  table: {
46
46
  emptyText: 'No Data',
47
47
  allTitle: 'Select all / cancel',
48
- seqTitle: '#',
48
+ seqTitle: 'S/N',
49
49
  confirmFilter: 'Confirm',
50
50
  resetFilter: 'Reset',
51
51
  allFilter: 'All',
@@ -45,7 +45,7 @@ export default {
45
45
  table: {
46
46
  emptyText: 'No hay datos',
47
47
  allTitle: 'Seleccionar todo / cancelar',
48
- seqTitle: '#',
48
+ seqTitle: 'S/N',
49
49
  confirmFilter: 'Confirmar',
50
50
  resetFilter: 'Restablecer',
51
51
  allFilter: 'Todo',
@@ -45,7 +45,7 @@ export default {
45
45
  table: {
46
46
  emptyText: 'データがありません',
47
47
  allTitle: '全て選択/取消',
48
- seqTitle: '#',
48
+ seqTitle: 'S/N',
49
49
  confirmFilter: 'OK',
50
50
  resetFilter: 'リセット',
51
51
  allFilter: '全て',
@@ -45,7 +45,7 @@ export default {
45
45
  table: {
46
46
  emptyText: 'Sem dados',
47
47
  allTitle: 'Selecionar todos / cancelar',
48
- seqTitle: '#',
48
+ seqTitle: 'S/N',
49
49
  confirmFilter: 'Confirmar',
50
50
  resetFilter: 'Redefinir',
51
51
  allFilter: 'Todos',
@@ -45,7 +45,7 @@ export default {
45
45
  table: {
46
46
  emptyText: '暂无数据',
47
47
  allTitle: '全选/取消',
48
- seqTitle: '#',
48
+ seqTitle: '序号',
49
49
  confirmFilter: '筛选',
50
50
  resetFilter: '重置',
51
51
  allFilter: '全部',
@@ -45,7 +45,7 @@ export default {
45
45
  table: {
46
46
  emptyText: '暫無資料',
47
47
  allTitle: '全選/取消',
48
- seqTitle: '#',
48
+ seqTitle: '序號',
49
49
  confirmFilter: '篩選',
50
50
  resetFilter: '重置',
51
51
  allFilter: '全部',
@@ -94,8 +94,8 @@ function renderColumn (h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, r
94
94
  const { height: rowHeight } = rowOpts
95
95
  const renderOpts = editRender || cellRender
96
96
  const compConf = renderOpts ? VXETable.renderer.get(renderOpts.name) : null
97
- const compCellClassName = compConf ? compConf.cellClassName : ''
98
- const compCellStyle = compConf ? compConf.cellStyle : ''
97
+ const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : ''
98
+ const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : ''
99
99
  const showAllTip = tooltipOpts.showAll || tooltipOpts.enabled
100
100
  const columnIndex = $xetable.getColumnIndex(column)
101
101
  const _columnIndex = $xetable.getVTColumnIndex(column)
@@ -389,7 +389,7 @@ function renderRows (h, _vm, $xetable, fixedType, tableData, tableColumn) {
389
389
  )
390
390
  // 如果行被展开了
391
391
  if (isExpandRow) {
392
- const { height: expandHeight } = expandOpts
392
+ const { height: expandHeight, padding } = expandOpts
393
393
  const cellStyle = {}
394
394
  if (expandHeight) {
395
395
  cellStyle.height = `${expandHeight}px`
@@ -402,7 +402,9 @@ function renderRows (h, _vm, $xetable, fixedType, tableData, tableColumn) {
402
402
  const expandParams = { $table: $xetable, seq, column: expandColumn, fixed: fixedType, type: renderType, level: rowLevel, row, rowIndex, $rowIndex }
403
403
  rows.push(
404
404
  h('tr', {
405
- class: 'vxe-body--expanded-row',
405
+ class: ['vxe-body--expanded-row', {
406
+ 'is--padding': padding
407
+ }],
406
408
  key: `expand_${rowid}`,
407
409
  style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(expandParams) : rowStyle) : null,
408
410
  on: trOn
@@ -559,7 +561,7 @@ export default {
559
561
  emptyContent = $scopedSlots.empty.call(this, { $table: $xetable }, h)
560
562
  } else {
561
563
  const compConf = emptyOpts.name ? VXETable.renderer.get(emptyOpts.name) : null
562
- const renderTableEmptyView = compConf ? compConf.renderTableEmptyView || compConf.renderEmpty : null
564
+ const renderTableEmptyView = compConf ? (compConf.renderTableEmptyView || compConf.renderEmpty) : null
563
565
  if (renderTableEmptyView) {
564
566
  emptyContent = getSlotVNs(renderTableEmptyView.call(this, h, emptyOpts, { $table: $xetable }))
565
567
  } else {
@@ -96,8 +96,9 @@ function getFooterContent (h, params) {
96
96
  }
97
97
  if (renderOpts) {
98
98
  const compConf = VXETable.renderer.get(renderOpts.name)
99
- if (compConf && compConf.renderFooter) {
100
- return getSlotVNs(compConf.renderFooter.call($table, h, renderOpts, params))
99
+ const rtFooter = compConf ? (compConf.renderTableFooter || compConf.renderFooter) : null
100
+ if (rtFooter) {
101
+ return getSlotVNs(rtFooter.call($table, h, renderOpts, params))
101
102
  }
102
103
  }
103
104
  // 兼容老模式
@@ -174,8 +175,9 @@ export const Cell = {
174
175
  }
175
176
  if (renderOpts) {
176
177
  const compConf = VXETable.renderer.get(renderOpts.name)
177
- if (compConf && compConf.renderHeader) {
178
- return getSlotVNs(renderTitleContent(h, params, compConf.renderHeader.call($table, h, renderOpts, params)))
178
+ const rtHeader = compConf ? (compConf.renderTableHeader || compConf.renderHeader) : null
179
+ if (rtHeader) {
180
+ return getSlotVNs(renderTitleContent(h, params, rtHeader.call($table, h, renderOpts, params)))
179
181
  }
180
182
  }
181
183
  return renderTitleContent(h, params, UtilTools.formatText(column.getTitle(), 1))
@@ -191,10 +193,12 @@ export const Cell = {
191
193
  return $table.callSlot(slots.default, params, h)
192
194
  }
193
195
  if (renderOpts) {
194
- const funName = editRender ? 'renderCell' : 'renderDefault'
195
196
  const compConf = VXETable.renderer.get(renderOpts.name)
196
- if (compConf && compConf[funName]) {
197
- return getSlotVNs(compConf[funName].call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params)))
197
+ const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null
198
+ const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null
199
+ const renderFn = editRender ? rtCell : rtDefault
200
+ if (renderFn) {
201
+ return getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params)))
198
202
  }
199
203
  }
200
204
  const cellValue = $table.getCellLabel(row, column)
@@ -610,8 +614,9 @@ export const Cell = {
610
614
  }
611
615
  if (contentRender) {
612
616
  const compConf = VXETable.renderer.get(contentRender.name)
613
- if (compConf && compConf.renderExpand) {
614
- return getSlotVNs(compConf.renderExpand.call($table, h, contentRender, params))
617
+ const rtExpand = compConf ? (compConf.renderTableExpand || compConf.renderExpand) : null
618
+ if (rtExpand) {
619
+ return getSlotVNs(rtExpand.call($table, h, contentRender, params))
615
620
  }
616
621
  }
617
622
  return []
@@ -775,12 +780,13 @@ export const Cell = {
775
780
  const { $table, column } = params
776
781
  const { slots, editRender, formatter } = column
777
782
  const compConf = VXETable.renderer.get(editRender.name)
783
+ const rtEdit = compConf ? (compConf.renderTableEdit || compConf.renderEdit) : null
778
784
  if (isEdit) {
779
785
  if (slots && slots.edit) {
780
786
  return $table.callSlot(slots.edit, params, h)
781
787
  }
782
- if (compConf && compConf.renderEdit) {
783
- return getSlotVNs(compConf.renderEdit.call($table, h, editRender, Object.assign({ $type: 'edit' }, params)))
788
+ if (rtEdit) {
789
+ return getSlotVNs(rtEdit.call($table, h, editRender, Object.assign({ $type: 'edit' }, params)))
784
790
  }
785
791
  return []
786
792
  }
@@ -1287,8 +1287,8 @@ const Methods = {
1287
1287
  if (valueList.length && !allRemoteFilter) {
1288
1288
  const { filterMethod, filterRender, field } = column
1289
1289
  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
1290
+ const compFilterMethod = compConf && compConf.renderFilter ? (compConf.tableFilterMethod || compConf.filterMethod) : null
1291
+ const defaultFilterMethod = compConf ? (compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null
1292
1292
  const cellValue = UtilTools.getCellValue(row, column)
1293
1293
  if (filterMethod) {
1294
1294
  return itemList.some((item) => filterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
@@ -1620,8 +1620,7 @@ const Methods = {
1620
1620
  this.clearCopyCellArea()
1621
1621
  }
1622
1622
  }
1623
- this.saveCustomVisible()
1624
- this.saveCustomSort()
1623
+ this.saveCustomStore()
1625
1624
  this.analyColumnWidth()
1626
1625
  return this.refreshColumn(true)
1627
1626
  },
@@ -1854,6 +1853,12 @@ const Methods = {
1854
1853
  })
1855
1854
  return storeData
1856
1855
  },
1856
+ saveCustomStore () {
1857
+ this.saveCustomVisible()
1858
+ this.saveCustomSort()
1859
+ this.saveCustomFixed()
1860
+ this.saveCustomResizable()
1861
+ },
1857
1862
  saveCustomResizable (isReset) {
1858
1863
  const { id, collectColumn, customConfig, customOpts } = this
1859
1864
  const { storage } = customOpts
@@ -3394,8 +3399,11 @@ const Methods = {
3394
3399
  },
3395
3400
  handleToggleCheckRowEvent (evnt, params) {
3396
3401
  const { selectCheckboxMaps, checkboxOpts } = this
3397
- const { checkField } = checkboxOpts
3402
+ const { checkField, trigger } = checkboxOpts
3398
3403
  const { row } = params
3404
+ if (trigger === 'manual') {
3405
+ return
3406
+ }
3399
3407
  let value = false
3400
3408
  if (checkField) {
3401
3409
  value = !XEUtils.get(row, checkField)
@@ -3410,8 +3418,11 @@ const Methods = {
3410
3418
  },
3411
3419
  triggerCheckRowEvent (evnt, params, value) {
3412
3420
  const { checkboxOpts, afterFullData } = this
3413
- const { checkMethod } = checkboxOpts
3421
+ const { checkMethod, trigger } = checkboxOpts
3414
3422
  const { row } = params
3423
+ if (trigger === 'manual') {
3424
+ return
3425
+ }
3415
3426
  if (checkboxOpts.isShiftKey && evnt.shiftKey && !this.treeConfig) {
3416
3427
  const checkboxRecords = this.getCheckboxRecords()
3417
3428
  if (checkboxRecords.length) {
@@ -3771,18 +3782,28 @@ const Methods = {
3771
3782
  }
3772
3783
  }
3773
3784
  },
3785
+ handleCheckAllEvent (evnt, value) {
3786
+ this.handleCheckedAllCheckboxRow(value)
3787
+ if (evnt) {
3788
+ this.emitEvent('checkbox-all', { records: this.getCheckboxRecords(), reserves: this.getCheckboxReserveRecords(), indeterminates: this.getCheckboxIndeterminateRecords(), checked: value }, evnt)
3789
+ }
3790
+ },
3774
3791
  /**
3775
3792
  * 多选,选中所有事件
3776
3793
  */
3777
3794
  triggerCheckAllEvent (evnt, value) {
3778
- this.handleCheckedAllCheckboxRow(value)
3779
- this.emitEvent('checkbox-all', { records: this.getCheckboxRecords(), reserves: this.getCheckboxReserveRecords(), indeterminates: this.getCheckboxIndeterminateRecords(), checked: value }, evnt)
3795
+ const { checkboxOpts } = this
3796
+ const { trigger } = checkboxOpts
3797
+ if (trigger === 'manual') {
3798
+ return
3799
+ }
3800
+ this.handleCheckAllEvent(evnt, value)
3780
3801
  },
3781
3802
  /**
3782
3803
  * 多选,切换所有行的选中状态
3783
3804
  */
3784
3805
  toggleAllCheckboxRow () {
3785
- this.triggerCheckAllEvent(null, !this.isAllSelected)
3806
+ this.handleCheckAllEvent(null, !this.isAllSelected)
3786
3807
  return this.$nextTick()
3787
3808
  },
3788
3809
  /**
@@ -3838,6 +3859,10 @@ const Methods = {
3838
3859
  triggerRadioRowEvent (evnt, params) {
3839
3860
  const { selectRadioRow: oldValue, radioOpts } = this
3840
3861
  const { row } = params
3862
+ const { trigger } = radioOpts
3863
+ if (trigger === 'manual') {
3864
+ return
3865
+ }
3841
3866
  let newValue = row
3842
3867
  let isChange = oldValue !== newValue
3843
3868
  if (isChange) {
@@ -4413,7 +4438,10 @@ const Methods = {
4413
4438
  triggerRowExpandEvent (evnt, params) {
4414
4439
  const { expandOpts, rowExpandLazyLoadedMaps, expandColumn: column } = this
4415
4440
  const { row } = params
4416
- const { lazy } = expandOpts
4441
+ const { lazy, trigger } = expandOpts
4442
+ if (trigger === 'manual') {
4443
+ return
4444
+ }
4417
4445
  const rowid = getRowid(this, row)
4418
4446
  if (!lazy || !rowExpandLazyLoadedMaps[rowid]) {
4419
4447
  const expanded = !this.isRowExpandByRow(row)
@@ -4688,7 +4716,10 @@ const Methods = {
4688
4716
  triggerTreeExpandEvent (evnt, params) {
4689
4717
  const { treeOpts, treeExpandLazyLoadedMaps } = this
4690
4718
  const { row, column } = params
4691
- const { lazy } = treeOpts
4719
+ const { lazy, trigger } = treeOpts
4720
+ if (trigger === 'manual') {
4721
+ return
4722
+ }
4692
4723
  const rowid = getRowid(this, row)
4693
4724
  if (!lazy || !treeExpandLazyLoadedMaps[rowid]) {
4694
4725
  const expanded = !this.isTreeExpandByRow(row)
@@ -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 {
@@ -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;