vxe-table 4.6.5 → 4.6.6

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 (149) hide show
  1. package/es/button/style.css +6 -6
  2. package/es/checkbox/src/group.js +7 -1
  3. package/es/custom/src/hook.js +1 -0
  4. package/es/custom/src/panel.js +207 -45
  5. package/es/custom/style.css +326 -80
  6. package/es/export/src/export-panel.js +1 -1
  7. package/es/export/src/import-panel.js +1 -1
  8. package/es/icon/style.css +1 -1
  9. package/es/input/style.css +0 -1
  10. package/es/loading/src/loading.js +1 -1
  11. package/es/loading/style.css +1 -1
  12. package/es/locale/lang/en-US.js +18 -7
  13. package/es/locale/lang/es-ES.js +18 -7
  14. package/es/locale/lang/ja-JP.js +18 -6
  15. package/es/locale/lang/pt-BR.js +18 -7
  16. package/es/locale/lang/zh-CN.js +18 -7
  17. package/es/locale/lang/zh-TC.js +18 -7
  18. package/es/modal/src/modal.js +1 -1
  19. package/es/radio/src/group.js +7 -1
  20. package/es/style.css +1 -1
  21. package/es/style.min.css +1 -1
  22. package/es/table/src/columnInfo.js +3 -3
  23. package/es/table/src/table.js +60 -36
  24. package/es/table/style.css +4 -4
  25. package/es/tools/log.js +1 -1
  26. package/es/v-x-e-table/index.js +1 -1
  27. package/es/v-x-e-table/style.css +1 -1
  28. package/es/vxe-button/style.css +6 -6
  29. package/es/vxe-input/style.css +0 -1
  30. package/es/vxe-loading/style.css +1 -1
  31. package/es/vxe-table/style.css +4 -4
  32. package/es/vxe-table-custom-module/style.css +326 -80
  33. package/lib/button/style/style.css +6 -6
  34. package/lib/button/style/style.min.css +1 -1
  35. package/lib/checkbox/src/group.js +7 -1
  36. package/lib/checkbox/src/group.min.js +1 -1
  37. package/lib/custom/src/hook.js +1 -0
  38. package/lib/custom/src/hook.min.js +1 -1
  39. package/lib/custom/src/panel.js +185 -30
  40. package/lib/custom/src/panel.min.js +1 -1
  41. package/lib/custom/style/style.css +326 -80
  42. package/lib/custom/style/style.min.css +1 -1
  43. package/lib/export/src/export-panel.js +1 -1
  44. package/lib/export/src/export-panel.min.js +1 -1
  45. package/lib/export/src/import-panel.js +1 -1
  46. package/lib/export/src/import-panel.min.js +1 -1
  47. package/lib/icon/style/style.css +1 -1
  48. package/lib/icon/style/style.min.css +1 -1
  49. package/lib/index.umd.js +288 -84
  50. package/lib/index.umd.min.js +1 -1
  51. package/lib/input/style/style.css +0 -1
  52. package/lib/input/style/style.min.css +1 -1
  53. package/lib/loading/src/loading.js +1 -1
  54. package/lib/loading/src/loading.min.js +1 -1
  55. package/lib/loading/style/style.css +1 -1
  56. package/lib/loading/style/style.min.css +1 -1
  57. package/lib/locale/lang/en-US.js +18 -7
  58. package/lib/locale/lang/en-US.min.js +1 -1
  59. package/lib/locale/lang/en-US.umd.js +18 -7
  60. package/lib/locale/lang/es-ES.js +18 -7
  61. package/lib/locale/lang/es-ES.min.js +1 -1
  62. package/lib/locale/lang/es-ES.umd.js +18 -7
  63. package/lib/locale/lang/ja-JP.js +18 -6
  64. package/lib/locale/lang/ja-JP.min.js +1 -1
  65. package/lib/locale/lang/ja-JP.umd.js +18 -6
  66. package/lib/locale/lang/pt-BR.js +18 -7
  67. package/lib/locale/lang/pt-BR.min.js +1 -1
  68. package/lib/locale/lang/pt-BR.umd.js +18 -7
  69. package/lib/locale/lang/zh-CN.js +18 -7
  70. package/lib/locale/lang/zh-CN.min.js +1 -1
  71. package/lib/locale/lang/zh-CN.umd.js +18 -7
  72. package/lib/locale/lang/zh-HK.min.js +1 -1
  73. package/lib/locale/lang/zh-HK.umd.js +18 -7
  74. package/lib/locale/lang/zh-MO.min.js +1 -1
  75. package/lib/locale/lang/zh-MO.umd.js +18 -7
  76. package/lib/locale/lang/zh-TC.js +18 -7
  77. package/lib/locale/lang/zh-TC.min.js +1 -1
  78. package/lib/locale/lang/zh-TC.umd.js +18 -7
  79. package/lib/locale/lang/zh-TW.min.js +1 -1
  80. package/lib/locale/lang/zh-TW.umd.js +18 -7
  81. package/lib/modal/src/modal.js +1 -1
  82. package/lib/modal/src/modal.min.js +1 -1
  83. package/lib/radio/src/group.js +7 -1
  84. package/lib/radio/src/group.min.js +1 -1
  85. package/lib/style.css +1 -1
  86. package/lib/style.min.css +1 -1
  87. package/lib/table/src/columnInfo.js +3 -3
  88. package/lib/table/src/columnInfo.min.js +1 -1
  89. package/lib/table/src/table.js +61 -36
  90. package/lib/table/src/table.min.js +1 -1
  91. package/lib/table/style/style.css +4 -4
  92. package/lib/table/style/style.min.css +1 -1
  93. package/lib/tools/log.js +1 -1
  94. package/lib/tools/log.min.js +1 -1
  95. package/lib/v-x-e-table/index.js +1 -1
  96. package/lib/v-x-e-table/index.min.js +1 -1
  97. package/lib/v-x-e-table/style/style.css +1 -1
  98. package/lib/v-x-e-table/style/style.min.css +1 -1
  99. package/lib/vxe-button/style/style.css +6 -6
  100. package/lib/vxe-button/style/style.min.css +1 -1
  101. package/lib/vxe-input/style/style.css +0 -1
  102. package/lib/vxe-input/style/style.min.css +1 -1
  103. package/lib/vxe-loading/style/style.css +1 -1
  104. package/lib/vxe-loading/style/style.min.css +1 -1
  105. package/lib/vxe-table/style/style.css +4 -4
  106. package/lib/vxe-table/style/style.min.css +1 -1
  107. package/lib/vxe-table-custom-module/style/style.css +326 -80
  108. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  109. package/package.json +1 -1
  110. package/packages/checkbox/src/group.ts +8 -1
  111. package/packages/custom/src/hook.ts +1 -0
  112. package/packages/custom/src/panel.ts +213 -45
  113. package/packages/export/src/export-panel.ts +1 -1
  114. package/packages/export/src/import-panel.ts +1 -1
  115. package/packages/loading/src/loading.ts +1 -1
  116. package/packages/locale/lang/en-US.ts +18 -7
  117. package/packages/locale/lang/es-ES.ts +18 -7
  118. package/packages/locale/lang/ja-JP.ts +18 -6
  119. package/packages/locale/lang/pt-BR.ts +18 -7
  120. package/packages/locale/lang/zh-CN.ts +18 -7
  121. package/packages/locale/lang/zh-TC.ts +18 -7
  122. package/packages/modal/src/modal.ts +1 -1
  123. package/packages/radio/src/group.ts +8 -1
  124. package/packages/table/src/columnInfo.ts +9 -6
  125. package/packages/table/src/table.ts +62 -39
  126. package/packages/table/src/util.ts +1 -1
  127. package/styles/base/common.scss +4 -4
  128. package/styles/button.scss +5 -5
  129. package/styles/custom.scss +192 -86
  130. package/styles/helpers/mixin.scss +1 -1
  131. package/styles/input.scss +1 -2
  132. package/styles/loading.scss +1 -1
  133. package/styles/modal.scss +2 -2
  134. package/styles/select.scss +1 -1
  135. package/styles/table.scss +2 -2
  136. package/types/table.d.ts +32 -22
  137. package/types/v-x-e-table/renderer.d.ts +1 -0
  138. /package/es/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  139. /package/es/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  140. /package/es/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  141. /package/es/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  142. /package/es/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  143. /package/es/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  144. /package/lib/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  145. /package/lib/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  146. /package/lib/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  147. /package/lib/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  148. /package/lib/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  149. /package/lib/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
@@ -8,7 +8,7 @@ export default {
8
8
  text: '加载中...'
9
9
  },
10
10
  error: {
11
- groupFixed: '如果使用分组表头,固定列必须按组设置',
11
+ groupFixed: '如果使用分组表头,冻结列必须按组设置',
12
12
  groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误',
13
13
  groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',
14
14
  scrollErrProp: '启用虚拟滚动后不支持该参数 "{0}"',
@@ -61,7 +61,7 @@ export default {
61
61
  customAll: '全部',
62
62
  customConfirm: '确认',
63
63
  customRestore: '重置',
64
- maxFixedCol: '最大固定列的数量不能超过 {0} 个'
64
+ maxFixedCol: '最大冻结列的数量不能超过 {0} 个'
65
65
  },
66
66
  grid: {
67
67
  selectOneRecord: '请至少选择一条记录!',
@@ -96,7 +96,7 @@ export default {
96
96
  endPageTitle: '末页'
97
97
  },
98
98
  alert: {
99
- title: '消息提示'
99
+ title: '系统提示'
100
100
  },
101
101
  button: {
102
102
  confirm: '确认',
@@ -109,7 +109,18 @@ export default {
109
109
  cstmTitle: '列设置',
110
110
  cstmRestore: '恢复默认',
111
111
  cstmCancel: '取消',
112
- cstmConfirm: '确定'
112
+ cstmConfirm: '确定',
113
+ cstmConfirmRestore: '请确认是否恢复成默认列配置?',
114
+ cstmDragTarget: '移动目标:{0}',
115
+ setting: {
116
+ colSort: '排序',
117
+ colTitle: '标题',
118
+ colVisible: '是否显示',
119
+ colFixed: '冻结列',
120
+ fixedLeft: '左侧',
121
+ fixedUnset: '不设置',
122
+ fixedRight: '右侧'
123
+ }
113
124
  },
114
125
  import: {
115
126
  modes: {
@@ -188,9 +199,9 @@ export default {
188
199
  customAll: '全部',
189
200
  customConfirm: '确认',
190
201
  customRestore: '重置',
191
- fixedLeft: '固定在左侧',
192
- fixedRight: '固定在右侧',
193
- cancelfixed: '取消固定'
202
+ fixedLeft: '冻结在左侧',
203
+ fixedRight: '冻结在右侧',
204
+ cancelfixed: '取消冻结列'
194
205
  },
195
206
  input: {
196
207
  date: {
@@ -8,7 +8,7 @@ export default {
8
8
  text: '加載中...'
9
9
  },
10
10
  error: {
11
- groupFixed: '如果使用分組表頭,固定列必須按組設定',
11
+ groupFixed: '如果使用分組表頭,固冻结列必須按組設定',
12
12
  groupMouseRange: '分组表頭與 "{0}" 不能同時使用,這可能會出現錯誤',
13
13
  groupTag: '分組列頭應該使用 "{0}" 而不是 "{1}",這可能會出現錯誤',
14
14
  scrollErrProp: '啟用虛擬滾動後不支持該參數 "{0}"',
@@ -61,7 +61,7 @@ export default {
61
61
  customAll: '全部',
62
62
  customConfirm: '確認',
63
63
  customRestore: '重置',
64
- maxFixedCol: '最大固定列的數量不能超過 {0} 個'
64
+ maxFixedCol: '最大冻结列的數量不能超過 {0} 個'
65
65
  },
66
66
  grid: {
67
67
  selectOneRecord: '請至少選擇一條記錄!',
@@ -96,7 +96,7 @@ export default {
96
96
  endPageTitle: '末頁'
97
97
  },
98
98
  alert: {
99
- title: '訊息提示'
99
+ title: '系統提示'
100
100
  },
101
101
  button: {
102
102
  confirm: '確認',
@@ -109,7 +109,18 @@ export default {
109
109
  cstmTitle: '列設定',
110
110
  cstmRestore: '恢復默認',
111
111
  cstmCancel: '取消',
112
- cstmConfirm: '確認'
112
+ cstmConfirm: '確認',
113
+ cstmConfirmRestore: '請確認是否恢復成默認列配置?',
114
+ cstmDragTarget: '移動目標:{0}',
115
+ setting: {
116
+ colSort: '排序',
117
+ colTitle: '標題',
118
+ colVisible: '是否顯示',
119
+ colFixed: '冻结列',
120
+ fixedLeft: '左側',
121
+ fixedUnset: '不設定',
122
+ fixedRight: '右側'
123
+ }
113
124
  },
114
125
  import: {
115
126
  modes: {
@@ -188,9 +199,9 @@ export default {
188
199
  customAll: '全部',
189
200
  customConfirm: '確認',
190
201
  customRestore: '重置',
191
- fixedLeft: '固定在左側',
192
- fixedRight: '固定在右側',
193
- cancelfixed: '取消固定'
202
+ fixedLeft: '冻结在左側',
203
+ fixedRight: '冻结在右側',
204
+ cancelfixed: '取消冻结列'
194
205
  },
195
206
  input: {
196
207
  date: {
@@ -698,7 +698,7 @@ export default defineComponent({
698
698
  if (cornerSlot) {
699
699
  rightVNs.push(
700
700
  h('span', {
701
- class: 'vxe-modal--corner-warpper'
701
+ class: 'vxe-modal--corner-wrapper'
702
702
  }, getSlotVNs(cornerSlot({ $modal: $xemodal })))
703
703
  )
704
704
  }
@@ -50,6 +50,11 @@ export default defineComponent({
50
50
  return propsOpts.value || 'value'
51
51
  })
52
52
 
53
+ const computeDisabledField = computed(() => {
54
+ const propsOpts = computePropsOpts.value
55
+ return propsOpts.disabled || 'disabled'
56
+ })
57
+
53
58
  let radioGroupMethods = {} as RadioGroupMethods
54
59
 
55
60
  useSize(props)
@@ -76,13 +81,15 @@ export default defineComponent({
76
81
  const defaultSlot = slots.default
77
82
  const valueField = computeValueField.value as 'value'
78
83
  const labelField = computeLabelField.value as 'label'
84
+ const disabledField = computeDisabledField.value as 'disabled'
79
85
  const btnComp = type === 'button' ? VxeRadioButtonComponent : VxeRadioComponent
80
86
  return h('div', {
81
87
  class: 'vxe-radio-group'
82
88
  }, defaultSlot ? defaultSlot({}) : (options ? options.map(item => {
83
89
  return h(btnComp, {
84
90
  label: item[valueField],
85
- content: item[labelField]
91
+ content: item[labelField],
92
+ disabled: item[disabledField]
86
93
  })
87
94
  }) : []))
88
95
  }
@@ -116,15 +116,18 @@ export class ColumnInfo {
116
116
  rowSpan: 1,
117
117
  // 跨列
118
118
  colSpan: 1,
119
- // 数据排序-自定义排序
120
- order: null,
121
- // 数据排序-用于多列的先后顺序
122
- sortTime: 0,
119
+
120
+ // 数据排序
121
+ order: null, // 用于记录排序类型,升序和倒序
122
+ sortTime: 0, // 用于多列的先后顺序
123
+
123
124
  // 列排序
124
- customOrder: 0,
125
+ sortNumber: 0, // 用于记录自定义列顺序
126
+ renderSortNumber: 0, // 用于记录自定义列顺序
127
+
125
128
  renderWidth: 0,
126
129
  renderHeight: 0,
127
- resizeWidth: 0,
130
+ resizeWidth: 0, // 手动调整
128
131
  renderLeft: 0,
129
132
  renderArgs: [], // 渲染参数可用于扩展
130
133
  model: {},
@@ -18,14 +18,14 @@ import VxeLoading from '../../loading/index'
18
18
  import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, restoreScrollListener, XEBodyScrollElement, getRootColumn } from './util'
19
19
  import { getSlotVNs } from '../../tools/vn'
20
20
 
21
- import { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, VxeTooltipInstance, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, VxeTableMethods, TableMethods, VxeTableMenuPanelInstance, VxeTableDefines, VxeTableProps, VxeColumnPropTypes, VxeTableDataRow } from '../../../types/all'
21
+ import { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, VxeTooltipInstance, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, VxeTableMethods, TableMethods, VxeTableMenuPanelInstance, VxeTableDefines, VxeTableProps, VxeColumnPropTypes, VxeTableDataRow, VxeTableCustomStorageObj } from '../../../types/all'
22
22
 
23
23
  const isWebkit = browse['-webkit'] && !browse.edge
24
24
 
25
25
  const resizableStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_WIDTH'
26
26
  const visibleStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_VISIBLE'
27
27
  const fixedStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_FIXED'
28
- const orderStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_ORDER'
28
+ const sortStorageKey = 'VXE_TABLE_CUSTOM_COLUMN_SORT'
29
29
 
30
30
  export default defineComponent({
31
31
  name: 'VxeTable',
@@ -130,6 +130,7 @@ export default defineComponent({
130
130
  visible: false,
131
131
  maxHeight: 0
132
132
  },
133
+ customColumnList: [],
133
134
  // 当前选中的筛选列
134
135
  filterStore: {
135
136
  isAllSelected: false,
@@ -527,9 +528,10 @@ export default defineComponent({
527
528
  })
528
529
 
529
530
  const computeFixedColumnSize = computed(() => {
530
- const { tableFullColumn } = internalData
531
+ const { collectColumn } = internalData
531
532
  let fixedSize = 0
532
- tableFullColumn.forEach((column) => {
533
+ // 只判断第一层
534
+ collectColumn.forEach((column) => {
533
535
  if (column.fixed) {
534
536
  fixedSize++
535
537
  }
@@ -886,18 +888,20 @@ export default defineComponent({
886
888
  const { collectColumn } = internalData
887
889
  const customOpts = computeCustomOpts.value
888
890
  const { storage } = customOpts
889
- const isCustomResizable = storage === true || (storage && storage.resizable)
890
- const isCustomVisible = storage === true || (storage && storage.visible)
891
- const isCustomFixed = storage === true || (storage && storage.fixed)
892
- const isCustomOrder = storage === true || (storage && storage.order)
893
- if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomOrder)) {
891
+ const isAllCustom = storage === true
892
+ const storageOpts: VxeTableCustomStorageObj = isAllCustom ? {} : Object.assign({}, storage || {})
893
+ const isCustomResizable = isAllCustom || storageOpts.resizable
894
+ const isCustomVisible = isAllCustom || storageOpts.visible
895
+ const isCustomFixed = isAllCustom || storageOpts.fixed
896
+ const isCustomSort = isAllCustom || storageOpts.sort
897
+ if (customConfig && (isCustomResizable || isCustomVisible || isCustomFixed || isCustomSort)) {
894
898
  const customMap: {
895
899
  [key: string]: {
896
900
  field?: VxeColumnPropTypes.Field
897
901
  resizeWidth?: number
898
902
  visible?: boolean
899
903
  fixed?: string
900
- order?: number
904
+ sortNumber?: number
901
905
  }
902
906
  } = {}
903
907
  if (!id) {
@@ -929,18 +933,18 @@ export default defineComponent({
929
933
  }
930
934
  }
931
935
  // 自定义顺序
932
- if (isCustomOrder) {
933
- const columnOrderStorage = getCustomStorageMap(orderStorageKey)[id]
934
- if (columnOrderStorage) {
935
- // const colOrderSeqs = columnOrderStorage.split(',')
936
- // colOrderSeqs.forEach((orderConf: any) => {
937
- // const [colKey, order] = orderConf.split('|')
938
- // if (customMap[colKey]) {
939
- // customMap[colKey].order = order
940
- // } else {
941
- // customMap[colKey] = { order }
942
- // }
943
- // })
936
+ if (isCustomSort) {
937
+ const columnSortStorage = getCustomStorageMap(sortStorageKey)[id]
938
+ if (columnSortStorage) {
939
+ const colOrderSeqs = columnSortStorage.split(',')
940
+ colOrderSeqs.forEach((orderConf: any) => {
941
+ const [colKey, sortNumber] = orderConf.split('|')
942
+ if (customMap[colKey]) {
943
+ customMap[colKey].sortNumber = sortNumber
944
+ } else {
945
+ customMap[colKey] = { sortNumber }
946
+ }
947
+ })
944
948
  }
945
949
  }
946
950
  // 自定义隐藏列
@@ -975,7 +979,7 @@ export default defineComponent({
975
979
  keyMap[colKey] = column
976
980
  }
977
981
  })
978
- XEUtils.each(customMap, ({ visible, resizeWidth, fixed, order }, colKey) => {
982
+ XEUtils.each(customMap, ({ visible, resizeWidth, fixed, sortNumber }, colKey) => {
979
983
  const column = keyMap[colKey]
980
984
  if (column) {
981
985
  if (XEUtils.isNumber(resizeWidth)) {
@@ -987,8 +991,8 @@ export default defineComponent({
987
991
  if (fixed) {
988
992
  column.fixed = fixed
989
993
  }
990
- if (order) {
991
- column.customOrder = order
994
+ if (sortNumber) {
995
+ column.renderSortNumber = Number(sortNumber)
992
996
  }
993
997
  }
994
998
  })
@@ -999,7 +1003,7 @@ export default defineComponent({
999
1003
  * 更新数据列的 Map
1000
1004
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
1001
1005
  */
1002
- const cacheColumnMap = () => {
1006
+ const cacheColumnMap = (isInit?: boolean) => {
1003
1007
  const { tableFullColumn, collectColumn } = internalData
1004
1008
  const fullColumnIdData: any = internalData.fullColumnIdData = {}
1005
1009
  const fullColumnFieldData: any = internalData.fullColumnFieldData = {}
@@ -1073,6 +1077,9 @@ export default defineComponent({
1073
1077
  if (fullColumnIdData[colid]) {
1074
1078
  errLog('vxe.error.colRepet', ['colId', colid])
1075
1079
  }
1080
+ if (isInit) {
1081
+ column.sortNumber = index
1082
+ }
1076
1083
  fullColumnIdData[colid] = rest
1077
1084
  }
1078
1085
  if (isGroup) {
@@ -1383,7 +1390,7 @@ export default defineComponent({
1383
1390
  }
1384
1391
  }
1385
1392
  if (!allRemoteSort && sortable && order) {
1386
- orderColumns.push({ column, field, property: field, order, sortTime: column.sortTime })
1393
+ orderColumns.push({ column, field, property: field, order: order, sortTime: column.sortTime })
1387
1394
  }
1388
1395
  })
1389
1396
  if (sortMultiple && chronological && orderColumns.length > 1) {
@@ -2531,7 +2538,7 @@ export default defineComponent({
2531
2538
  internalData.collectColumn = collectColumn
2532
2539
  const tableFullColumn = getColumnList(collectColumn)
2533
2540
  internalData.tableFullColumn = tableFullColumn
2534
- cacheColumnMap()
2541
+ cacheColumnMap(true)
2535
2542
  restoreCustomStorage()
2536
2543
  parseColumns().then(() => {
2537
2544
  if (reactData.scrollXLoad) {
@@ -3103,7 +3110,7 @@ export default defineComponent({
3103
3110
  */
3104
3111
  getColumnById (colid) {
3105
3112
  const fullColumnIdData = internalData.fullColumnIdData
3106
- return fullColumnIdData[colid] ? fullColumnIdData[colid].column : null
3113
+ return colid && fullColumnIdData[colid] ? fullColumnIdData[colid].column : null
3107
3114
  },
3108
3115
  /**
3109
3116
  * 根据列的字段名获取列
@@ -3111,7 +3118,7 @@ export default defineComponent({
3111
3118
  */
3112
3119
  getColumnByField (field) {
3113
3120
  const fullColumnFieldData = internalData.fullColumnFieldData
3114
- return fullColumnFieldData[field] ? fullColumnFieldData[field].column : null
3121
+ return field && fullColumnFieldData[field] ? fullColumnFieldData[field].column : null
3115
3122
  },
3116
3123
  /**
3117
3124
  * 获取当前表格的列
@@ -3187,7 +3194,7 @@ export default defineComponent({
3187
3194
  */
3188
3195
  getRowById (cellValue) {
3189
3196
  const { fullDataRowIdData } = internalData
3190
- const rowid = XEUtils.eqNull(cellValue) ? '' : encodeURIComponent(cellValue)
3197
+ const rowid = XEUtils.eqNull(cellValue) ? '' : encodeURIComponent(cellValue || '')
3191
3198
  return fullDataRowIdData[rowid] ? fullDataRowIdData[rowid].row : null
3192
3199
  },
3193
3200
  /**
@@ -3308,10 +3315,11 @@ export default defineComponent({
3308
3315
  const { collectColumn } = internalData
3309
3316
  const customOpts = computeCustomOpts.value
3310
3317
  const { checkMethod } = customOpts
3311
- const opts = Object.assign({
3318
+ const opts: VxeTableCustomStorageObj = Object.assign({
3312
3319
  visible: true,
3313
3320
  resizable: options === true,
3314
- fixed: options === true
3321
+ fixed: options === true,
3322
+ sort: options === true
3315
3323
  }, options)
3316
3324
  XEUtils.eachTree(collectColumn, (column) => {
3317
3325
  if (opts.resizable) {
@@ -3320,6 +3328,9 @@ export default defineComponent({
3320
3328
  if (opts.fixed) {
3321
3329
  column.fixed = column.defaultFixed
3322
3330
  }
3331
+ if (opts.sort) {
3332
+ column.renderSortNumber = column.sortNumber
3333
+ }
3323
3334
  if (!checkMethod || checkMethod({ column })) {
3324
3335
  column.visible = column.defaultVisible
3325
3336
  }
@@ -3335,8 +3346,16 @@ export default defineComponent({
3335
3346
  /**
3336
3347
  * 刷新列信息
3337
3348
  * 将固定的列左边、右边分别靠边
3349
+ * 如果传 true 则会检查列顺序并排序
3338
3350
  */
3339
- refreshColumn () {
3351
+ refreshColumn (resiveOrder) {
3352
+ if (resiveOrder) {
3353
+ const columnList = XEUtils.orderBy(internalData.collectColumn, 'renderSortNumber')
3354
+ internalData.collectColumn = columnList
3355
+ const tableFullColumn = getColumnList(columnList)
3356
+ internalData.tableFullColumn = tableFullColumn
3357
+ cacheColumnMap()
3358
+ }
3340
3359
  return parseColumns().then(() => {
3341
3360
  return tableMethods.refreshScroll()
3342
3361
  }).then(() => {
@@ -3855,7 +3874,7 @@ export default defineComponent({
3855
3874
  tableFullColumn.forEach((column) => {
3856
3875
  const { field, order } = column
3857
3876
  if (column.sortable && order) {
3858
- sortList.push({ column, field, property: field, order, sortTime: column.sortTime })
3877
+ sortList.push({ column, field, property: field, order: order, sortTime: column.sortTime })
3859
3878
  }
3860
3879
  })
3861
3880
  if (multiple && chronological && sortList.length > 1) {
@@ -5257,7 +5276,9 @@ export default defineComponent({
5257
5276
  const { collectColumn } = internalData
5258
5277
  const customOpts = computeCustomOpts.value
5259
5278
  const { storage } = customOpts
5260
- const isCustomFixed = storage === true || (storage && storage.fixed)
5279
+ const isAllStorage = storage === true
5280
+ const storageOpts = isAllStorage ? {} : Object.assign({}, storage || {})
5281
+ const isCustomFixed = isAllStorage || storageOpts.fixed
5261
5282
  if (customConfig && isCustomFixed) {
5262
5283
  const columnFixedStorageMap = getCustomStorageMap(fixedStorageKey)
5263
5284
  const colFixeds: any[] = []
@@ -5282,7 +5303,9 @@ export default defineComponent({
5282
5303
  const { collectColumn } = internalData
5283
5304
  const customOpts = computeCustomOpts.value
5284
5305
  const { checkMethod, storage } = customOpts
5285
- const isCustomVisible = storage === true || (storage && storage.visible)
5306
+ const isAllStorage = storage === true
5307
+ const storageOpts = isAllStorage ? {} : Object.assign({}, storage || {})
5308
+ const isCustomVisible = isAllStorage || storageOpts.visible
5286
5309
  if (customConfig && isCustomVisible) {
5287
5310
  const columnVisibleStorageMap = getCustomStorageMap(visibleStorageKey)
5288
5311
  const colHides: any[] = []
@@ -5313,7 +5336,7 @@ export default defineComponent({
5313
5336
  handleCustom () {
5314
5337
  tablePrivateMethods.saveCustomVisible()
5315
5338
  tablePrivateMethods.analyColumnWidth()
5316
- return tableMethods.refreshColumn()
5339
+ return tableMethods.refreshColumn(true)
5317
5340
  },
5318
5341
  handleUpdateDataQueue () {
5319
5342
  reactData.upDataFlag++
@@ -6684,7 +6707,7 @@ export default defineComponent({
6684
6707
  ref: refElem,
6685
6708
  class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, {
6686
6709
  [`size--${vSize}`]: vSize,
6687
- [`vaild-msg--${validOpts.msgMode}`]: !!editRules,
6710
+ [`valid-msg--${validOpts.msgMode}`]: !!editRules,
6688
6711
  'vxe-editable': !!editConfig,
6689
6712
  'old-cell-valid': editRules && GlobalConfig.cellVaildMode === 'obsolete',
6690
6713
  'cell--highlight': highlightCell,
@@ -123,7 +123,7 @@ export interface XEColumnInstance {
123
123
  column: ColumnInfo;
124
124
  }
125
125
 
126
- export const handleFieldOrColumn = ($xetable: VxeTableConstructor, fieldOrColumn: string | VxeTableDefines.ColumnInfo) => {
126
+ export const handleFieldOrColumn = ($xetable: VxeTableConstructor, fieldOrColumn: string | VxeTableDefines.ColumnInfo | null) => {
127
127
  if (fieldOrColumn) {
128
128
  return XEUtils.isString(fieldOrColumn) ? $xetable.getColumnByField(fieldOrColumn) : fieldOrColumn
129
129
  }
@@ -65,23 +65,23 @@
65
65
  .vxe-filter--btn {
66
66
  &:before,
67
67
  &:after {
68
- @include animatTransition(border);
68
+ @include createAnimationTransition(border);
69
69
  }
70
70
  }
71
71
  .vxe-input--wrapper {
72
72
  .vxe-input {
73
- @include animatTransition(border);
73
+ @include createAnimationTransition(border);
74
74
  }
75
75
  }
76
76
  .vxe-table--expand-btn,
77
77
  .vxe-tree--node-btn {
78
- @include animatTransition(transform);
78
+ @include createAnimationTransition(transform);
79
79
  }
80
80
  .vxe-checkbox,
81
81
  .vxe-radio {
82
82
  > input {
83
83
  &:checked+span {
84
- @include animatTransition(background-color);
84
+ @include createAnimationTransition(background-color);
85
85
  }
86
86
  }
87
87
  }
@@ -66,7 +66,7 @@ $btnThemeList: (
66
66
  white-space: nowrap;
67
67
  user-select: none;
68
68
  appearance: none;
69
- @include animatTransition(border, .2s);
69
+ @include createAnimationTransition(border, .2s);
70
70
  &:not(.is--disabled) {
71
71
  color: var(--vxe-font-color);
72
72
  cursor: pointer;
@@ -236,8 +236,8 @@ $btnThemeList: (
236
236
  }
237
237
  .vxe-input,
238
238
  .vxe-button,
239
- .vxe-button-warpper {
240
- &+.vxe-button-warpper,
239
+ .vxe-button-wrapper {
240
+ &+.vxe-button-wrapper,
241
241
  &+.vxe-button.type--button,
242
242
  &+.vxe-button--dropdown {
243
243
  margin-left: 12px;
@@ -256,7 +256,7 @@ $btnThemeList: (
256
256
  }
257
257
  .vxe-button--dropdown {
258
258
  position: relative;
259
- &+.vxe-button-warpper,
259
+ &+.vxe-button-wrapper,
260
260
  &+.vxe-button.type--button,
261
261
  &+.vxe-button--dropdown {
262
262
  margin-left: 12px;
@@ -306,7 +306,7 @@ $btnThemeList: (
306
306
  display: inline-block;
307
307
  font-size: 12px;
308
308
  margin-left: 4px;
309
- @include animatTransition(transform, .2s);
309
+ @include createAnimationTransition(transform, .2s);
310
310
  }
311
311
 
312
312
  .vxe-button--dropdown-panel {