vxe-table 3.12.13 → 3.12.15

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 (64) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/edit/mixin.js +36 -21
  6. package/es/table/module/export/mixin.js +3 -2
  7. package/es/table/module/validator/mixin.js +18 -1
  8. package/es/table/render/index.js +104 -43
  9. package/es/table/src/body.js +1 -0
  10. package/es/table/src/header.js +4 -2
  11. package/es/table/src/methods.js +158 -116
  12. package/es/table/src/table.js +44 -7
  13. package/es/table/style.css +33 -2
  14. package/es/table/style.min.css +1 -1
  15. package/es/ui/index.js +1 -1
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-table/style.css +33 -2
  18. package/es/vxe-table/style.min.css +1 -1
  19. package/lib/index.css +1 -1
  20. package/lib/index.min.css +1 -1
  21. package/lib/index.umd.js +434 -248
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/style.css +1 -1
  24. package/lib/style.min.css +1 -1
  25. package/lib/table/module/edit/mixin.js +42 -21
  26. package/lib/table/module/edit/mixin.min.js +1 -1
  27. package/lib/table/module/export/mixin.js +3 -2
  28. package/lib/table/module/export/mixin.min.js +1 -1
  29. package/lib/table/module/validator/mixin.js +26 -4
  30. package/lib/table/module/validator/mixin.min.js +1 -1
  31. package/lib/table/render/index.js +109 -41
  32. package/lib/table/render/index.min.js +1 -1
  33. package/lib/table/src/body.js +1 -0
  34. package/lib/table/src/body.min.js +1 -1
  35. package/lib/table/src/header.js +4 -2
  36. package/lib/table/src/header.min.js +1 -1
  37. package/lib/table/src/methods.js +207 -169
  38. package/lib/table/src/methods.min.js +1 -1
  39. package/lib/table/src/table.js +40 -7
  40. package/lib/table/src/table.min.js +1 -1
  41. package/lib/table/style/style.css +33 -2
  42. package/lib/table/style/style.min.css +1 -1
  43. package/lib/ui/index.js +1 -1
  44. package/lib/ui/index.min.js +1 -1
  45. package/lib/ui/src/log.js +1 -1
  46. package/lib/ui/src/log.min.js +1 -1
  47. package/lib/vxe-table/style/style.css +33 -2
  48. package/lib/vxe-table/style/style.min.css +1 -1
  49. package/package.json +2 -2
  50. package/packages/table/module/edit/mixin.ts +42 -21
  51. package/packages/table/module/export/mixin.ts +3 -2
  52. package/packages/table/module/validator/mixin.ts +20 -2
  53. package/packages/table/render/index.ts +120 -51
  54. package/packages/table/src/body.ts +1 -0
  55. package/packages/table/src/header.ts +4 -2
  56. package/packages/table/src/methods.ts +169 -114
  57. package/packages/table/src/table.ts +47 -7
  58. package/styles/components/table.scss +31 -2
  59. /package/es/{iconfont.1739152166680.ttf → iconfont.1739257460253.ttf} +0 -0
  60. /package/es/{iconfont.1739152166680.woff → iconfont.1739257460253.woff} +0 -0
  61. /package/es/{iconfont.1739152166680.woff2 → iconfont.1739257460253.woff2} +0 -0
  62. /package/lib/{iconfont.1739152166680.ttf → iconfont.1739257460253.ttf} +0 -0
  63. /package/lib/{iconfont.1739152166680.woff → iconfont.1739257460253.woff} +0 -0
  64. /package/lib/{iconfont.1739152166680.woff2 → iconfont.1739257460253.woff2} +0 -0
@@ -7,7 +7,7 @@ import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible,
7
7
  import { getSlotVNs } from '../../ui/src/vn'
8
8
  import { warnLog, errLog } from '../../ui/src/log'
9
9
 
10
- import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf, TableReactData, VxeTableConstructor, VxeToolbarConstructor, TableInternalData, VxeTablePrivateMethods, VxeTooltipInstance } from '../../../types'
10
+ import type { VxeTableDefines, VxeColumnPropTypes, VxeTableEmits, ValueOf, TableReactData, VxeTableConstructor, VxeToolbarConstructor, TableInternalData, VxeTablePrivateMethods, VxeTooltipInstance, VxeTablePropTypes } from '../../../types'
11
11
 
12
12
  const { getConfig, getI18n, renderer, formats, interceptor, createEvent } = VxeUI
13
13
 
@@ -1120,14 +1120,14 @@ const calcCellHeight = ($xeTable: VxeTableConstructor) => {
1120
1120
  }
1121
1121
  }
1122
1122
 
1123
- function getOrderField (_vm: any, column: any) {
1123
+ function getOrderField ($xeTable: VxeTableConstructor, column: VxeTableDefines.ColumnInfo) {
1124
1124
  const { sortBy, sortType } = column
1125
1125
  return (row: any) => {
1126
1126
  let cellValue
1127
1127
  if (sortBy) {
1128
1128
  cellValue = XEUtils.isFunction(sortBy) ? sortBy({ row, column }) : XEUtils.get(row, sortBy)
1129
1129
  } else {
1130
- cellValue = _vm.getCellLabel(row, column)
1130
+ cellValue = $xeTable.getCellLabel(row, column)
1131
1131
  }
1132
1132
  if (!sortType || sortType === 'auto') {
1133
1133
  return isNaN(cellValue) ? cellValue : XEUtils.toNumber(cellValue)
@@ -2968,74 +2968,148 @@ const Methods = {
2968
2968
  * 如果存在筛选条件,继续处理
2969
2969
  */
2970
2970
  updateAfterFullData () {
2971
- const $xeTable = this
2971
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
2972
+ const props = $xeTable
2973
+ const internalData = $xeTable as unknown as TableInternalData
2972
2974
 
2973
- const { tableFullColumn, tableFullData, filterOpts, sortOpts, treeConfig, treeOpts, tableFullTreeData } = this
2975
+ const { treeConfig } = props
2976
+ const { tableFullColumn, tableFullData, tableFullTreeData } = internalData
2977
+ const filterOpts = $xeTable.computeFilterOpts
2978
+ const sortOpts = $xeTable.computeSortOpts
2979
+ const treeOpts = $xeTable.computeTreeOpts
2980
+ const childrenField = treeOpts.children || treeOpts.childrenField
2981
+ const { transform, rowField, parentField, mapChildrenField } = treeOpts
2974
2982
  const { remote: allRemoteFilter, filterMethod: allFilterMethod } = filterOpts
2975
2983
  const { remote: allRemoteSort, sortMethod: allSortMethod, multiple: sortMultiple, chronological } = sortOpts
2976
- const { transform } = treeOpts
2977
- const childrenField = treeOpts.children || treeOpts.childrenField
2978
2984
  let tableData: any[] = []
2979
2985
  let tableTree: any[] = []
2980
- const filterColumns: any[] = []
2981
- let orderColumns: any[] = []
2982
- tableFullColumn.forEach((column: any) => {
2983
- const { field, sortable, order, filters } = column
2984
- if (!allRemoteFilter && filters && filters.length) {
2985
- const valueList: any[] = []
2986
- const itemList: any[] = []
2987
- filters.forEach((item: any) => {
2988
- if (item.checked) {
2989
- itemList.push(item)
2990
- valueList.push(item.value)
2986
+
2987
+ // 处理数据
2988
+ if (!allRemoteFilter || !allRemoteSort) {
2989
+ const filterColumns: {
2990
+ column: VxeTableDefines.ColumnInfo
2991
+ valueList: any[]
2992
+ itemList: VxeTableDefines.FilterOption[]
2993
+ }[] = []
2994
+ let orderColumns: VxeTableDefines.SortCheckedParams[] = []
2995
+ tableFullColumn.forEach((column) => {
2996
+ const { field, sortable, order, filters } = column
2997
+ if (!allRemoteFilter && filters && filters.length) {
2998
+ const valueList: any[] = []
2999
+ const itemList: VxeTableDefines.FilterOption[] = []
3000
+ filters.forEach((item) => {
3001
+ if (item.checked) {
3002
+ itemList.push(item as VxeTableDefines.FilterOption)
3003
+ valueList.push(item.value)
3004
+ }
3005
+ })
3006
+ if (itemList.length) {
3007
+ filterColumns.push({ column, valueList, itemList })
2991
3008
  }
2992
- })
2993
- if (itemList.length) {
2994
- filterColumns.push({ column, valueList, itemList })
2995
3009
  }
3010
+ if (!allRemoteSort && sortable && order) {
3011
+ orderColumns.push({ column, field, property: field, order: order, sortTime: column.sortTime })
3012
+ }
3013
+ })
3014
+ if (sortMultiple && chronological && orderColumns.length > 1) {
3015
+ orderColumns = XEUtils.orderBy(orderColumns, 'sortTime')
2996
3016
  }
2997
- if (!allRemoteSort && sortable && order) {
2998
- orderColumns.push({ column, field, property: field, order, sortTime: column.sortTime })
2999
- }
3000
- })
3001
- if (sortMultiple && chronological && orderColumns.length > 1) {
3002
- orderColumns = XEUtils.orderBy(orderColumns, 'sortTime')
3003
- }
3004
- if (filterColumns.length) {
3005
- const handleFilter = (row: any) => {
3006
- return filterColumns.every(({ column, valueList, itemList }) => {
3007
- if (valueList.length && !allRemoteFilter) {
3008
- const { filterMethod, filterRender, field } = column
3017
+
3018
+ // 处理筛选
3019
+ // 支持单列、多列、组合筛选
3020
+ if (!allRemoteFilter && filterColumns.length) {
3021
+ const handleFilter = (row: any) => {
3022
+ return filterColumns.every(({ column, valueList, itemList }) => {
3023
+ const { filterMethod, filterRender } = column
3009
3024
  const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
3010
3025
  const compFilterMethod = compConf ? (compConf.tableFilterMethod || compConf.filterMethod) : null
3011
3026
  const tdFilterMethod = compConf ? (compConf.tableFilterDefaultMethod || compConf.defaultTableFilterMethod || compConf.defaultFilterMethod) : null
3012
3027
  const cellValue = getCellValue(row, column)
3013
3028
  if (filterMethod) {
3014
- return itemList.some((item: any) => filterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
3029
+ return itemList.some((item) => filterMethod({ value: item.value, option: item, cellValue, row, column, $table: $xeTable }))
3015
3030
  } else if (compFilterMethod) {
3016
- return itemList.some((item: any) => compFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
3031
+ return itemList.some((item) => compFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: $xeTable }))
3017
3032
  } else if (allFilterMethod) {
3018
3033
  return allFilterMethod({ options: itemList, values: valueList, cellValue, row, column })
3019
3034
  } else if (tdFilterMethod) {
3020
- return itemList.some((item: any) => tdFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: this }))
3035
+ return itemList.some((item) => tdFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: $xeTable }))
3021
3036
  }
3022
- return valueList.indexOf(XEUtils.get(row, field)) > -1
3023
- }
3024
- return true
3025
- })
3026
- }
3027
- if (treeConfig && transform) {
3028
- // 筛选虚拟树
3029
- tableTree = XEUtils.searchTree(tableFullTreeData, handleFilter, {
3030
- original: true,
3031
- isEvery: true,
3032
- children: treeOpts.mapChildrenField,
3033
- mapChildren: childrenField
3034
- })
3035
- tableData = tableTree
3037
+ return valueList.indexOf(XEUtils.get(row, column.field)) > -1
3038
+ })
3039
+ }
3040
+ if (treeConfig && transform) {
3041
+ // 筛选虚拟树
3042
+ tableTree = XEUtils.searchTree(tableFullTreeData, handleFilter, {
3043
+ original: true,
3044
+ isEvery: true,
3045
+ children: mapChildrenField,
3046
+ mapChildren: childrenField
3047
+ })
3048
+ tableData = tableTree
3049
+ } else {
3050
+ tableData = treeConfig ? tableFullTreeData.filter(handleFilter) : tableFullData.filter(handleFilter)
3051
+ tableTree = tableData
3052
+ }
3036
3053
  } else {
3037
- tableData = treeConfig ? tableFullTreeData.filter(handleFilter) : tableFullData.filter(handleFilter)
3038
- tableTree = tableData
3054
+ if (treeConfig && transform) {
3055
+ // 还原虚拟树
3056
+ tableTree = XEUtils.searchTree(tableFullTreeData, () => true, {
3057
+ original: true,
3058
+ isEvery: true,
3059
+ children: mapChildrenField,
3060
+ mapChildren: childrenField
3061
+ })
3062
+ tableData = tableTree
3063
+ } else {
3064
+ tableData = treeConfig ? tableFullTreeData.slice(0) : tableFullData.slice(0)
3065
+ tableTree = tableData
3066
+ }
3067
+ }
3068
+
3069
+ // 处理排序(不能用于树形结构)
3070
+ // 支持单列、多列、组合排序
3071
+ if (!allRemoteSort && orderColumns.length) {
3072
+ if (treeConfig && transform) {
3073
+ // 虚拟树和列表一样,只能排序根级节点
3074
+ if (allSortMethod) {
3075
+ const sortRests = allSortMethod({ data: tableTree, sortList: orderColumns, $table: $xeTable })
3076
+ tableTree = XEUtils.isArray(sortRests) ? sortRests : tableTree
3077
+ } else {
3078
+ const treeList = XEUtils.toTreeArray(tableTree, {
3079
+ children: mapChildrenField
3080
+ })
3081
+ tableTree = XEUtils.toArrayTree(
3082
+ XEUtils.orderBy(treeList, orderColumns.map(({ column, order }) => [getOrderField($xeTable, column), order])),
3083
+ {
3084
+ key: rowField,
3085
+ parentKey: parentField,
3086
+ children: childrenField,
3087
+ mapChildren: mapChildrenField
3088
+ }
3089
+ )
3090
+ }
3091
+ tableData = tableTree
3092
+ } else {
3093
+ if (allSortMethod) {
3094
+ const sortRests = allSortMethod({ data: tableData, sortList: orderColumns, $table: $xeTable })
3095
+ tableData = XEUtils.isArray(sortRests) ? sortRests : tableData
3096
+ } else {
3097
+ // 兼容 v4
3098
+ if (sortMultiple) {
3099
+ tableData = XEUtils.orderBy(tableData, orderColumns.map(({ column, order }) => [getOrderField(this, column), order]))
3100
+ } else {
3101
+ const firstOrderColumn = orderColumns[0]
3102
+ let sortByConfs
3103
+ // 已废弃,兼容 v2,在 v4 中废弃, sortBy 不能为数组
3104
+ if (XEUtils.isArray((firstOrderColumn as any).sortBy)) {
3105
+ sortByConfs = (firstOrderColumn as any).sortBy.map((item: any) => [item, firstOrderColumn.order])
3106
+ }
3107
+ tableData = XEUtils.orderBy(tableData, sortByConfs || [firstOrderColumn].map(({ column, order }) => [getOrderField(this, column), order]))
3108
+ }
3109
+ tableData = XEUtils.orderBy(tableData, orderColumns.map(({ column, order }) => [getOrderField($xeTable, column), order]))
3110
+ }
3111
+ tableTree = tableData
3112
+ }
3039
3113
  }
3040
3114
  } else {
3041
3115
  if (treeConfig && transform) {
@@ -3052,39 +3126,8 @@ const Methods = {
3052
3126
  tableTree = tableData
3053
3127
  }
3054
3128
  }
3055
- const firstOrderColumn = orderColumns[0]
3056
- if (!allRemoteSort && firstOrderColumn) {
3057
- if (treeConfig && transform) {
3058
- // 虚拟树和列表一样,只能排序根级节点
3059
- if (allSortMethod) {
3060
- const sortRests = allSortMethod({ data: tableTree, sortList: orderColumns, $table: this })
3061
- tableTree = XEUtils.isArray(sortRests) ? sortRests : tableTree
3062
- } else {
3063
- tableTree = XEUtils.orderBy(tableTree, orderColumns.map(({ column, order }) => [getOrderField(this, column), order]))
3064
- }
3065
- tableData = tableTree
3066
- } else {
3067
- if (allSortMethod) {
3068
- const sortRests = allSortMethod({ data: tableData, column: firstOrderColumn.column, property: firstOrderColumn.field, field: firstOrderColumn.field, order: firstOrderColumn.order, sortList: orderColumns, $table: this })
3069
- tableData = XEUtils.isArray(sortRests) ? sortRests : tableData
3070
- } else {
3071
- // 兼容 v4
3072
- if (sortMultiple) {
3073
- tableData = XEUtils.orderBy(tableData, orderColumns.map(({ column, order }) => [getOrderField(this, column), order]))
3074
- } else {
3075
- // 兼容 v2,在 v4 中废弃, sortBy 不能为数组
3076
- let sortByConfs
3077
- if (XEUtils.isArray(firstOrderColumn.sortBy)) {
3078
- sortByConfs = firstOrderColumn.sortBy.map((item: any) => [item, firstOrderColumn.order])
3079
- }
3080
- tableData = XEUtils.orderBy(tableData, sortByConfs || [firstOrderColumn].map(({ column, order }) => [getOrderField(this, column), order]))
3081
- }
3082
- }
3083
- tableTree = tableData
3084
- }
3085
- }
3086
- this.afterFullData = tableData
3087
- this.afterTreeFullData = tableTree
3129
+ internalData.afterFullData = tableData
3130
+ internalData.afterTreeFullData = tableTree
3088
3131
  updateAfterDataIndex($xeTable)
3089
3132
  },
3090
3133
  /**
@@ -6121,13 +6164,13 @@ const Methods = {
6121
6164
  /**
6122
6165
  * 点击排序事件
6123
6166
  */
6124
- triggerSortEvent (evnt: any, column: any, order: any) {
6167
+ triggerSortEvent (evnt: Event, column: VxeTableDefines.ColumnInfo, order: VxeTablePropTypes.SortOrder) {
6125
6168
  const $xeTable = this
6126
6169
 
6127
6170
  const sortOpts = $xeTable.computeSortOpts
6128
6171
  const { multiple, allowClear } = sortOpts
6129
- const { field, sortable, remoteSort } = column
6130
- if (sortable || remoteSort) {
6172
+ const { field, sortable } = column
6173
+ if (sortable || (column as any).remoteSort) {
6131
6174
  if (!order || column.order === order) {
6132
6175
  if (allowClear) {
6133
6176
  $xeTable.clearSort(multiple ? column : null)
@@ -6138,6 +6181,38 @@ const Methods = {
6138
6181
  $xeTable.handleColumnSortEvent(evnt, column)
6139
6182
  }
6140
6183
  },
6184
+ handleCellRuleUpdateStatus (type: 'change' | 'blur', cellParams: {
6185
+ row: any
6186
+ column: VxeTableDefines.ColumnInfo
6187
+ }, cellValue?: any) {
6188
+ const $xeTable = this
6189
+ const reactData = $xeTable as unknown as TableReactData
6190
+
6191
+ const { validStore } = reactData
6192
+ const { row, column } = cellParams
6193
+ if ($xeTable.hasCellRules) {
6194
+ if ($xeTable.hasCellRules(type, row, column)) {
6195
+ const cell = $xeTable.getCellElement(row, column)
6196
+ if (cell) {
6197
+ const customVal = !XEUtils.isUndefined(cellValue)
6198
+ return $xeTable.validCellRules(type, row, column, cellValue)
6199
+ .then(() => {
6200
+ if (customVal && validStore.visible) {
6201
+ setCellValue(row, column, cellValue)
6202
+ }
6203
+ $xeTable.clearValidate(row, column)
6204
+ })
6205
+ .catch(({ rule }: any) => {
6206
+ if (customVal) {
6207
+ setCellValue(row, column, cellValue)
6208
+ }
6209
+ $xeTable.showValidTooltip({ rule, row, column, cell })
6210
+ })
6211
+ }
6212
+ }
6213
+ }
6214
+ return $xeTable.$nextTick()
6215
+ },
6141
6216
  /**
6142
6217
  * 表头单元格按下事件
6143
6218
  */
@@ -8485,33 +8560,13 @@ const Methods = {
8485
8560
  * 如果单元格配置了校验规则,则会进行校验
8486
8561
  */
8487
8562
  updateStatus (slotParams: any, cellValue: any) {
8488
- const customVal = !XEUtils.isUndefined(cellValue)
8563
+ const $xeTable = this
8564
+ const props = $xeTable
8565
+
8489
8566
  return this.$nextTick().then(() => {
8490
- const { $refs, editRules, validStore } = this
8491
- const refTableBody = $refs.refTableBody
8492
- if (slotParams && refTableBody && editRules) {
8493
- const { row, column } = slotParams
8494
- const type = 'change'
8495
- if (this.hasCellRules) {
8496
- if (this.hasCellRules(type, row, column)) {
8497
- const cell = this.getCellElement(row, column)
8498
- if (cell) {
8499
- return this.validCellRules(type, row, column, cellValue)
8500
- .then(() => {
8501
- if (customVal && validStore.visible) {
8502
- setCellValue(row, column, cellValue)
8503
- }
8504
- this.clearValidate(row, column)
8505
- })
8506
- .catch(({ rule }: any) => {
8507
- if (customVal) {
8508
- setCellValue(row, column, cellValue)
8509
- }
8510
- this.showValidTooltip({ rule, row, column, cell })
8511
- })
8512
- }
8513
- }
8514
- }
8567
+ const { editRules } = props
8568
+ if (slotParams && editRules) {
8569
+ return $xeTable.handleCellRuleUpdateStatus('change', slotParams, cellValue)
8515
8570
  }
8516
8571
  })
8517
8572
  },
@@ -516,7 +516,6 @@ export default {
516
516
  column: null
517
517
  },
518
518
  insertMaps: {},
519
- removeList: [],
520
519
  removeMaps: {}
521
520
  },
522
521
  // 存放 tooltip 相关信息
@@ -575,6 +574,13 @@ export default {
575
574
  isFooter: false
576
575
  },
577
576
 
577
+ rowHeightStore: {
578
+ default: 48,
579
+ medium: 44,
580
+ small: 40,
581
+ mini: 36
582
+ },
583
+
578
584
  scrollVMLoading: false,
579
585
 
580
586
  calcCellHeightFlag: 0,
@@ -686,12 +692,10 @@ export default {
686
692
  return this.computeRowHeightMaps
687
693
  },
688
694
  computeRowHeightMaps () {
689
- return {
690
- default: 48,
691
- medium: 44,
692
- small: 40,
693
- mini: 36
694
- }
695
+ const $xeTable = this
696
+ const reactData = $xeTable as TableReactData
697
+
698
+ return reactData.rowHeightStore
695
699
  },
696
700
  computeDefaultRowHeight () {
697
701
  const $xeTable = this
@@ -1435,11 +1439,30 @@ export default {
1435
1439
  mounted () {
1436
1440
  const $xeTable = this
1437
1441
  const props = $xeTable
1442
+ const reactData = $xeTable
1438
1443
 
1444
+ const { rowHeightStore } = reactData
1445
+ const varEl = $xeTable.$refs.refVarElem
1439
1446
  const columnOpts = $xeTable.computeColumnOpts
1440
1447
  const rowOpts = $xeTable.computeRowOpts
1441
1448
  const customOpts = $xeTable.computeCustomOpts
1442
1449
 
1450
+ if (varEl) {
1451
+ const [defEl, mediumEl, smallEl, miniEl] = varEl.children
1452
+ if (defEl) {
1453
+ rowHeightStore.default = defEl.clientHeight
1454
+ }
1455
+ if (mediumEl) {
1456
+ rowHeightStore.medium = mediumEl.clientHeight
1457
+ }
1458
+ if (smallEl) {
1459
+ rowHeightStore.small = smallEl.clientHeight
1460
+ }
1461
+ if (miniEl) {
1462
+ rowHeightStore.mini = miniEl.clientHeight
1463
+ }
1464
+ }
1465
+
1443
1466
  if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
1444
1467
  initTpImg()
1445
1468
  }
@@ -1596,6 +1619,23 @@ export default {
1596
1619
  class: 'vxe-table-slots',
1597
1620
  ref: 'hideColumn'
1598
1621
  }, this.$slots.default),
1622
+ h('div', {
1623
+ ref: 'refVarElem',
1624
+ class: 'vxe-table-vars'
1625
+ }, [
1626
+ h('div', {
1627
+ class: 'vxe-table-var-default'
1628
+ }),
1629
+ h('div', {
1630
+ class: 'vxe-table-var-medium'
1631
+ }),
1632
+ h('div', {
1633
+ class: 'vxe-table-var-small'
1634
+ }),
1635
+ h('div', {
1636
+ class: 'vxe-table-var-mini'
1637
+ })
1638
+ ]),
1599
1639
  h('div', {
1600
1640
  key: 'tw',
1601
1641
  class: 'vxe-table--render-wrapper'
@@ -7,6 +7,27 @@
7
7
  display: none;
8
8
  }
9
9
 
10
+ .vxe-table-vars {
11
+ height: 0;
12
+ width: 0;
13
+ visibility: hidden;
14
+ overflow: hidden;
15
+ user-select: none;
16
+ pointer-events: none;
17
+ .vxe-table-var-default {
18
+ height: var(--vxe-ui-table-row-height-default);
19
+ }
20
+ .vxe-table-var-medium {
21
+ height: var(--vxe-ui-table-row-height-medium);
22
+ }
23
+ .vxe-table-var-small {
24
+ height: var(--vxe-ui-table-row-height-small);
25
+ }
26
+ .vxe-table-var-mini {
27
+ height: var(--vxe-ui-table-row-height-mini);
28
+ }
29
+ }
30
+
10
31
  .vxe-table--print-frame {
11
32
  position: fixed;
12
33
  bottom: -100%;
@@ -1234,6 +1255,9 @@
1234
1255
  }
1235
1256
  }
1236
1257
  }
1258
+ .vxe-cell--valid-error-tip {
1259
+ padding: 0 var(--vxe-ui-table-cell-padding-medium);
1260
+ }
1237
1261
  }
1238
1262
  &.size--small {
1239
1263
  font-size: var(--vxe-ui-font-size-small);
@@ -1265,6 +1289,9 @@
1265
1289
  }
1266
1290
  }
1267
1291
  }
1292
+ .vxe-cell--valid-error-tip {
1293
+ padding: 0 var(--vxe-ui-table-cell-padding-small);
1294
+ }
1268
1295
  }
1269
1296
  &.size--mini {
1270
1297
  font-size: var(--vxe-ui-font-size-mini);
@@ -1296,6 +1323,9 @@
1296
1323
  }
1297
1324
  }
1298
1325
  }
1326
+ .vxe-cell--valid-error-tip {
1327
+ padding: 0 var(--vxe-ui-table-cell-padding-mini);
1328
+ }
1299
1329
  }
1300
1330
 
1301
1331
  .vxe-header--column,
@@ -1894,8 +1924,7 @@
1894
1924
  transform: translateX(-50%);
1895
1925
  text-align: left;
1896
1926
  z-index: 4;
1897
- padding-left: var(--vxe-ui-table-cell-padding-left);
1898
- padding-right: var(--vxe-ui-table-cell-padding-right);
1927
+ padding: 0 var(--vxe-ui-table-cell-padding-default);
1899
1928
  }
1900
1929
  .vxe-cell--valid-error-wrapper {
1901
1930
  display: inline-block;