vxe-table 3.15.21 → 3.15.23

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 (164) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/locale/lang/ar-EG.js +3 -0
  4. package/es/locale/lang/de-DE.js +3 -0
  5. package/es/locale/lang/en-US.js +3 -0
  6. package/es/locale/lang/es-ES.js +3 -0
  7. package/es/locale/lang/fr-FR.js +3 -0
  8. package/es/locale/lang/hu-HU.js +3 -0
  9. package/es/locale/lang/hy-AM.js +3 -0
  10. package/es/locale/lang/id-ID.js +3 -0
  11. package/es/locale/lang/it-IT.js +3 -0
  12. package/es/locale/lang/ja-JP.js +3 -0
  13. package/es/locale/lang/ko-KR.js +3 -0
  14. package/es/locale/lang/ms-MY.js +3 -0
  15. package/es/locale/lang/nb-NO.js +3 -0
  16. package/es/locale/lang/pt-BR.js +3 -0
  17. package/es/locale/lang/ru-RU.js +3 -0
  18. package/es/locale/lang/th-TH.js +3 -0
  19. package/es/locale/lang/ug-CN.js +3 -0
  20. package/es/locale/lang/uk-UA.js +3 -0
  21. package/es/locale/lang/uz-UZ.js +3 -0
  22. package/es/locale/lang/vi-VN.js +3 -0
  23. package/es/locale/lang/zh-CHT.js +3 -0
  24. package/es/locale/lang/zh-CN.js +3 -0
  25. package/es/style.css +1 -1
  26. package/es/style.min.css +1 -1
  27. package/es/table/render/index.js +74 -2
  28. package/es/table/src/cell.js +21 -7
  29. package/es/table/src/util.js +12 -15
  30. package/es/table/style.css +21 -8
  31. package/es/table/style.min.css +1 -1
  32. package/es/toolbar/src/toolbar.js +1 -1
  33. package/es/ui/index.js +1 -1
  34. package/es/ui/src/dom.js +6 -0
  35. package/es/ui/src/log.js +1 -1
  36. package/es/vxe-table/style.css +21 -8
  37. package/es/vxe-table/style.min.css +1 -1
  38. package/helper/vetur/attributes.json +1 -1
  39. package/helper/vetur/tags.json +1 -1
  40. package/lib/index.css +1 -1
  41. package/lib/index.min.css +1 -1
  42. package/lib/index.umd.js +121 -25
  43. package/lib/index.umd.min.js +1 -1
  44. package/lib/locale/lang/ar-EG.js +3 -0
  45. package/lib/locale/lang/ar-EG.min.js +1 -1
  46. package/lib/locale/lang/ar-EG.umd.js +3 -0
  47. package/lib/locale/lang/de-DE.js +3 -0
  48. package/lib/locale/lang/de-DE.min.js +1 -1
  49. package/lib/locale/lang/de-DE.umd.js +3 -0
  50. package/lib/locale/lang/en-US.js +3 -0
  51. package/lib/locale/lang/en-US.min.js +1 -1
  52. package/lib/locale/lang/en-US.umd.js +3 -0
  53. package/lib/locale/lang/es-ES.js +3 -0
  54. package/lib/locale/lang/es-ES.min.js +1 -1
  55. package/lib/locale/lang/es-ES.umd.js +3 -0
  56. package/lib/locale/lang/fr-FR.js +3 -0
  57. package/lib/locale/lang/fr-FR.min.js +1 -1
  58. package/lib/locale/lang/fr-FR.umd.js +3 -0
  59. package/lib/locale/lang/hu-HU.js +3 -0
  60. package/lib/locale/lang/hu-HU.min.js +1 -1
  61. package/lib/locale/lang/hu-HU.umd.js +3 -0
  62. package/lib/locale/lang/hy-AM.js +3 -0
  63. package/lib/locale/lang/hy-AM.min.js +1 -1
  64. package/lib/locale/lang/hy-AM.umd.js +3 -0
  65. package/lib/locale/lang/id-ID.js +3 -0
  66. package/lib/locale/lang/id-ID.min.js +1 -1
  67. package/lib/locale/lang/id-ID.umd.js +3 -0
  68. package/lib/locale/lang/it-IT.js +3 -0
  69. package/lib/locale/lang/it-IT.min.js +1 -1
  70. package/lib/locale/lang/it-IT.umd.js +3 -0
  71. package/lib/locale/lang/ja-JP.js +3 -0
  72. package/lib/locale/lang/ja-JP.min.js +1 -1
  73. package/lib/locale/lang/ja-JP.umd.js +3 -0
  74. package/lib/locale/lang/ko-KR.js +3 -0
  75. package/lib/locale/lang/ko-KR.min.js +1 -1
  76. package/lib/locale/lang/ko-KR.umd.js +3 -0
  77. package/lib/locale/lang/ms-MY.js +3 -0
  78. package/lib/locale/lang/ms-MY.min.js +1 -1
  79. package/lib/locale/lang/ms-MY.umd.js +3 -0
  80. package/lib/locale/lang/nb-NO.js +3 -0
  81. package/lib/locale/lang/nb-NO.min.js +1 -1
  82. package/lib/locale/lang/nb-NO.umd.js +3 -0
  83. package/lib/locale/lang/pt-BR.js +3 -0
  84. package/lib/locale/lang/pt-BR.min.js +1 -1
  85. package/lib/locale/lang/pt-BR.umd.js +3 -0
  86. package/lib/locale/lang/ru-RU.js +3 -0
  87. package/lib/locale/lang/ru-RU.min.js +1 -1
  88. package/lib/locale/lang/ru-RU.umd.js +3 -0
  89. package/lib/locale/lang/th-TH.js +3 -0
  90. package/lib/locale/lang/th-TH.min.js +1 -1
  91. package/lib/locale/lang/th-TH.umd.js +3 -0
  92. package/lib/locale/lang/ug-CN.js +3 -0
  93. package/lib/locale/lang/ug-CN.min.js +1 -1
  94. package/lib/locale/lang/ug-CN.umd.js +3 -0
  95. package/lib/locale/lang/uk-UA.js +3 -0
  96. package/lib/locale/lang/uk-UA.min.js +1 -1
  97. package/lib/locale/lang/uk-UA.umd.js +3 -0
  98. package/lib/locale/lang/uz-UZ.js +3 -0
  99. package/lib/locale/lang/uz-UZ.min.js +1 -1
  100. package/lib/locale/lang/uz-UZ.umd.js +3 -0
  101. package/lib/locale/lang/vi-VN.js +3 -0
  102. package/lib/locale/lang/vi-VN.min.js +1 -1
  103. package/lib/locale/lang/vi-VN.umd.js +3 -0
  104. package/lib/locale/lang/zh-CHT.js +3 -0
  105. package/lib/locale/lang/zh-CHT.min.js +1 -1
  106. package/lib/locale/lang/zh-CHT.umd.js +3 -0
  107. package/lib/locale/lang/zh-CN.js +3 -0
  108. package/lib/locale/lang/zh-CN.min.js +1 -1
  109. package/lib/locale/lang/zh-CN.umd.js +3 -0
  110. package/lib/style.css +1 -1
  111. package/lib/style.min.css +1 -1
  112. package/lib/table/render/index.js +85 -2
  113. package/lib/table/render/index.min.js +1 -1
  114. package/lib/table/src/cell.js +13 -7
  115. package/lib/table/src/cell.min.js +1 -1
  116. package/lib/table/src/util.js +11 -14
  117. package/lib/table/src/util.min.js +1 -1
  118. package/lib/table/style/style.css +21 -8
  119. package/lib/table/style/style.min.css +1 -1
  120. package/lib/toolbar/src/toolbar.js +1 -0
  121. package/lib/toolbar/src/toolbar.min.js +1 -1
  122. package/lib/ui/index.js +1 -1
  123. package/lib/ui/index.min.js +1 -1
  124. package/lib/ui/src/dom.js +7 -0
  125. package/lib/ui/src/dom.min.js +1 -1
  126. package/lib/ui/src/log.js +1 -1
  127. package/lib/ui/src/log.min.js +1 -1
  128. package/lib/vxe-table/style/style.css +21 -8
  129. package/lib/vxe-table/style/style.min.css +1 -1
  130. package/package.json +1 -1
  131. package/packages/locale/lang/ar-EG.ts +3 -0
  132. package/packages/locale/lang/de-DE.ts +3 -0
  133. package/packages/locale/lang/en-US.ts +3 -0
  134. package/packages/locale/lang/es-ES.ts +3 -0
  135. package/packages/locale/lang/fr-FR.ts +3 -0
  136. package/packages/locale/lang/hu-HU.ts +3 -0
  137. package/packages/locale/lang/hy-AM.ts +3 -0
  138. package/packages/locale/lang/id-ID.ts +3 -0
  139. package/packages/locale/lang/it-IT.ts +3 -0
  140. package/packages/locale/lang/ja-JP.ts +3 -0
  141. package/packages/locale/lang/ko-KR.ts +3 -0
  142. package/packages/locale/lang/ms-MY.ts +3 -0
  143. package/packages/locale/lang/nb-NO.ts +3 -0
  144. package/packages/locale/lang/pt-BR.ts +3 -0
  145. package/packages/locale/lang/ru-RU.ts +3 -0
  146. package/packages/locale/lang/th-TH.ts +3 -0
  147. package/packages/locale/lang/ug-CN.ts +3 -0
  148. package/packages/locale/lang/uk-UA.ts +3 -0
  149. package/packages/locale/lang/uz-UZ.ts +3 -0
  150. package/packages/locale/lang/vi-VN.ts +3 -0
  151. package/packages/locale/lang/zh-CHT.ts +3 -0
  152. package/packages/locale/lang/zh-CN.ts +3 -0
  153. package/packages/table/render/index.ts +72 -2
  154. package/packages/table/src/cell.ts +21 -7
  155. package/packages/table/src/util.ts +12 -16
  156. package/packages/toolbar/src/toolbar.ts +1 -1
  157. package/packages/ui/src/dom.ts +7 -0
  158. package/styles/components/table.scss +27 -15
  159. /package/es/{iconfont.1746783133677.ttf → iconfont.1746863438419.ttf} +0 -0
  160. /package/es/{iconfont.1746783133677.woff → iconfont.1746863438419.woff} +0 -0
  161. /package/es/{iconfont.1746783133677.woff2 → iconfont.1746863438419.woff2} +0 -0
  162. /package/lib/{iconfont.1746783133677.ttf → iconfont.1746863438419.ttf} +0 -0
  163. /package/lib/{iconfont.1746783133677.woff → iconfont.1746863438419.woff} +0 -0
  164. /package/lib/{iconfont.1746783133677.woff2 → iconfont.1746863438419.woff2} +0 -0
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} 年'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '01 月',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} tahun'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'Januari',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} anni'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'Gennaio',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} 年'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '1月',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} 년'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '1월',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} tahun'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '01 bulan',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} år'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'januar',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} anos'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'Janeiro',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} Годы'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'Январь',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} ปี'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'มกราคม',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} يىل'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '01 ئاي',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} років'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'Січень',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} yillar'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '01 oy',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} năm'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: 'Tháng Một',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} 年'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '01 月',
@@ -245,6 +245,9 @@ export default {
245
245
  datePicker: {
246
246
  yearTitle: '{0} 年'
247
247
  },
248
+ dateRangePicker: {
249
+ pleaseRange: '请选择开始日期与结束日期'
250
+ },
248
251
  input: {
249
252
  date: {
250
253
  m1: '01 月',
@@ -176,7 +176,7 @@ function getComponentOns (renderOpts: any, params: any, eFns?: {
176
176
  model: (cellValue: any) => void
177
177
  change?: (...args: any[]) => void
178
178
  blur?: (...args: any[]) => void
179
- }) {
179
+ }, eventOns?: Record<string, any>) {
180
180
  const { events } = renderOpts
181
181
  const modelEvent = getModelEvent(renderOpts)
182
182
  const changeEvent = getChangeEvent(renderOpts)
@@ -214,7 +214,7 @@ function getComponentOns (renderOpts: any, params: any, eFns?: {
214
214
  }
215
215
  }
216
216
  }
217
- return ons
217
+ return eventOns ? Object.assign(ons, eventOns) : ons
218
218
  }
219
219
 
220
220
  function getEditOns (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: VxeGlobalRendererHandles.RenderTableEditParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
@@ -834,6 +834,76 @@ renderer.mixin({
834
834
  renderTableFilter: defaultFilterRender,
835
835
  tableFilterDefaultMethod: handleFilterMethod
836
836
  },
837
+ VxeDateRangePicker: {
838
+ tableAutoFocus: 'input',
839
+ renderTableEdit (h: CreateElement, renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: VxeGlobalRendererHandles.RenderEditParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
840
+ const { startField, endField } = renderOpts
841
+ const { $table, row, column } = params
842
+ const { model } = column
843
+ const cellValue = getCellValue(row, column)
844
+ const seProps: Record<string, any> = {}
845
+ const seOs: Record<string, any> = {}
846
+ if (startField && endField) {
847
+ seProps.startValue = XEUtils.get(row, startField)
848
+ seProps.endValue = XEUtils.get(row, endField)
849
+ seOs['update:startValue'] = (value: any) => {
850
+ if (startField) {
851
+ XEUtils.set(row, startField, value)
852
+ }
853
+ }
854
+ seOs['update:endValue'] = (value: any) => {
855
+ if (endField) {
856
+ XEUtils.set(row, endField, value)
857
+ }
858
+ }
859
+ }
860
+ return [
861
+ h(getDefaultComponent(renderOpts), {
862
+ props: getCellEditProps(renderOpts, params, cellValue, seProps),
863
+ on: getComponentOns(renderOpts, params, {
864
+ model (cellValue) {
865
+ model.update = true
866
+ model.value = cellValue
867
+ setCellValue(row, column, cellValue)
868
+ },
869
+ change () {
870
+ $table.updateStatus(params)
871
+ },
872
+ blur () {
873
+ $table.handleCellRuleUpdateStatus('blur', params)
874
+ }
875
+ }, seOs)
876
+ })
877
+ ]
878
+ },
879
+ renderTableCell (h, renderOpts, params) {
880
+ const { startField, endField } = renderOpts
881
+ const { row, column } = params
882
+ let startValue = ''
883
+ let endValue = ''
884
+ if (startField && endField) {
885
+ startValue = XEUtils.get(row, startField)
886
+ endValue = XEUtils.get(row, endField)
887
+ } else {
888
+ const cellValue = XEUtils.get(row, column.field)
889
+ if (cellValue) {
890
+ if (XEUtils.isArray(cellValue)) {
891
+ startValue = cellValue[0]
892
+ endValue = cellValue[1]
893
+ } else {
894
+ const strs = `${cellValue}`.split(',')
895
+ startValue = strs[0]
896
+ endValue = strs[1]
897
+ }
898
+ }
899
+ }
900
+ let cellLabel = ''
901
+ if (startValue && endValue) {
902
+ cellLabel = `${startValue} ~ ${endValue}`
903
+ }
904
+ return getCellLabelVNs(h, renderOpts, params, cellLabel)
905
+ }
906
+ },
837
907
  VxeTextarea: {
838
908
  tableAutoFocus: 'textarea',
839
909
  renderTableEdit: defaultEditRender
@@ -15,7 +15,7 @@ function renderTitlePrefixIcon (h: CreateElement, params: VxeTableDefines.CellRe
15
15
  const titlePrefix = column.titlePrefix || column.titleHelp
16
16
  if (titlePrefix) {
17
17
  return h('i', {
18
- class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : '', titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX],
18
+ class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ''],
19
19
  on: {
20
20
  mouseenter (evnt: any) {
21
21
  $table.triggerHeaderTitleEvent(evnt, titlePrefix, params)
@@ -24,7 +24,11 @@ function renderTitlePrefixIcon (h: CreateElement, params: VxeTableDefines.CellRe
24
24
  $table.handleTargetLeaveEvent(evnt)
25
25
  }
26
26
  }
27
- })
27
+ }, [
28
+ h('i', {
29
+ class: titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX
30
+ })
31
+ ])
28
32
  }
29
33
  return renderEmptyElement($table)
30
34
  }
@@ -34,7 +38,7 @@ function renderTitleSuffixIcon (h: CreateElement, params: VxeTableDefines.CellRe
34
38
  const titleSuffix = column.titleSuffix
35
39
  if (titleSuffix) {
36
40
  return h('i', {
37
- class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : '', titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX],
41
+ class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ''],
38
42
  on: {
39
43
  mouseenter (evnt: any) {
40
44
  $table.triggerHeaderTitleEvent(evnt, titleSuffix, params)
@@ -43,7 +47,11 @@ function renderTitleSuffixIcon (h: CreateElement, params: VxeTableDefines.CellRe
43
47
  $table.handleTargetLeaveEvent(evnt)
44
48
  }
45
49
  }
46
- })
50
+ }, [
51
+ h('i', {
52
+ class: titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX
53
+ })
54
+ ])
47
55
  }
48
56
  return renderEmptyElement($table)
49
57
  }
@@ -1071,12 +1079,18 @@ export const Cell = {
1071
1079
  isRequired && editOpts.showAsterisk
1072
1080
  ? h('i', {
1073
1081
  class: 'vxe-cell--required-icon'
1074
- })
1082
+ }, [
1083
+ h('i', {
1084
+ class: 'vxe-cell--required-icon'
1085
+ })
1086
+ ])
1075
1087
  : renderEmptyElement($table),
1076
1088
  isEnableConf(editRender) && editOpts.showIcon
1077
1089
  ? h('i', {
1078
- class: ['vxe-cell--edit-icon', editOpts.icon || getIcon().TABLE_EDIT]
1079
- })
1090
+ class: 'vxe-cell--edit-icon'
1091
+ }, [
1092
+ h('i')
1093
+ ])
1080
1094
  : renderEmptyElement($table)
1081
1095
  ]
1082
1096
  }
@@ -1,6 +1,6 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import { ColumnInfo } from './columnInfo'
3
- import { isScale, isPx } from '../../ui/src/dom'
3
+ import { isScale, isPx, queryElement } from '../../ui/src/dom'
4
4
  import { warnLog, errLog } from '../../ui/src/log'
5
5
  import { eqEmptyValue } from '../../ui/src/utils'
6
6
 
@@ -175,7 +175,7 @@ function getPaddingLeftRightSize (elem: any) {
175
175
  return 0
176
176
  }
177
177
 
178
- function getElementMarginWidth (elem: any) {
178
+ function getElementMarginAndWidth (elem: any) {
179
179
  if (elem) {
180
180
  const computedStyle = getComputedStyle(elem)
181
181
  const marginLeft = XEUtils.toNumber(computedStyle.marginLeft)
@@ -261,10 +261,6 @@ export function getRootColumn ($xeTable: VxeTableConstructor & VxeTablePrivateMe
261
261
  return column
262
262
  }
263
263
 
264
- function queryCellElement (cell: any, selector: any) {
265
- return cell.querySelector('.vxe-cell' + selector)
266
- }
267
-
268
264
  export function toFilters (filters: any) {
269
265
  if (filters && XEUtils.isArray(filters)) {
270
266
  return filters.map(({ label, value, data, resetValue, checked }) => {
@@ -293,19 +289,19 @@ export function getColReMinWidth (params: any) {
293
289
  const showTitle = headOverflow === 'title'
294
290
  const showTooltip = headOverflow === true || headOverflow === 'tooltip'
295
291
  const hasEllipsis = showTitle || showTooltip || showEllipsis
296
- const minTitleWidth = XEUtils.floor((XEUtils.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.6)
297
- const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryCellElement(cell, ''))
292
+ const minTitleWidth = XEUtils.floor((XEUtils.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.8)
293
+ const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryElement(cell, ''))
298
294
  let mWidth = minTitleWidth + paddingLeftRight
299
295
  // 默认最小宽处理
300
296
  if (hasEllipsis) {
301
- const dragIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--drag-handle'))
302
- const checkboxIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--checkbox'))
303
- const requiredIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--required-icon'))
304
- const editIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--edit-icon'))
305
- const prefixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-prefix-icon'))
306
- const suffixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-suffix-icon'))
307
- const sortIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--sort'))
308
- const filterIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--filter'))
297
+ const dragIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--drag-handle'))
298
+ const checkboxIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--checkbox'))
299
+ const requiredIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--required-icon'))
300
+ const editIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--edit-icon'))
301
+ const prefixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-prefix-icon'))
302
+ const suffixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-suffix-icon'))
303
+ const sortIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--sort'))
304
+ const filterIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--filter'))
309
305
  mWidth += dragIconWidth + checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth
310
306
  }
311
307
  // 如果设置最小宽
@@ -275,7 +275,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
275
275
  $xeGrid.triggerToolbarTolEvent(item, evnt)
276
276
  } else {
277
277
  const gCommandOpts = commands.get(code)
278
- const params = { code, tool: item, $table: $table!, $grid: $xeGrid, $event: evnt }
278
+ const params = { code, button: null, tool: item, $table: $table!, $grid: $xeGrid, $event: evnt }
279
279
  if (gCommandOpts) {
280
280
  const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod
281
281
  if (tCommandMethod) {
@@ -82,6 +82,13 @@ export function toCssUnit (val?: number | string, unit = 'px') {
82
82
  return `${val || ''}`
83
83
  }
84
84
 
85
+ export function queryElement (elem: HTMLTableCellElement, selector: string) {
86
+ if (elem) {
87
+ return elem.querySelector<HTMLElement>(selector)
88
+ }
89
+ return null
90
+ }
91
+
85
92
  export function getDomNode () {
86
93
  const documentElement = document.documentElement
87
94
  const bodyElem = document.body
@@ -138,6 +138,7 @@ $btnThemeList: (
138
138
  .vxe-select,
139
139
  .vxe-tree-select,
140
140
  .vxe-date-picker,
141
+ .vxe-date-range-picker,
141
142
  .vxe-number-input,
142
143
  .vxe-ico-picker {
143
144
  width: 100%;
@@ -160,6 +161,7 @@ $btnThemeList: (
160
161
  & > .vxe-select,
161
162
  & > .vxe-tree-select,
162
163
  & > .vxe-date-picker,
164
+ & > .vxe-date-range-picker,
163
165
  & > .vxe-number-input,
164
166
  & > .vxe-ico-picker {
165
167
  width: 100%;
@@ -174,6 +176,7 @@ $btnThemeList: (
174
176
  .vxe-select,
175
177
  .vxe-tree-select,
176
178
  .vxe-date-picker,
179
+ .vxe-date-range-picker,
177
180
  .vxe-number-input,
178
181
  .vxe-ico-picker {
179
182
  width: 100%;
@@ -194,6 +197,7 @@ $btnThemeList: (
194
197
  & > .vxe-select,
195
198
  & > .vxe-tree-select,
196
199
  & > .vxe-date-picker,
200
+ & > .vxe-date-range-picker,
197
201
  & > .vxe-number-input,
198
202
  & > .vxe-ico-picker {
199
203
  width: 100%;
@@ -772,19 +776,25 @@ $btnThemeList: (
772
776
  // user-select: none;
773
777
  &.col--ellipsis {
774
778
  & > .vxe-cell {
775
- display: flex;
776
- align-items: center;
779
+ .vxe-cell--wrapper {
780
+ display: flex;
781
+ align-items: center;
782
+ .vxe-cell--drag-handle,
783
+ .vxe-cell--sort,
784
+ .vxe-cell--filter,
785
+ .vxe-cell-title-prefix-icon,
786
+ .vxe-cell-title-suffix-icon,
787
+ .vxe-cell--checkbox,
788
+ .vxe-cell-title-suffix-icon,
789
+ .vxe-cell--required-icon {
790
+ flex-shrink: 0;
791
+ }
792
+ }
777
793
  .vxe-cell--title {
778
794
  overflow: hidden;
779
795
  text-overflow: ellipsis;
780
796
  white-space: nowrap;
781
797
  }
782
- & > i,
783
- & > span {
784
- &:not(.vxe-cell--title) {
785
- flex-shrink: 0;
786
- }
787
- }
788
798
  }
789
799
  }
790
800
  .vxe-cell--required-icon {
@@ -793,14 +803,16 @@ $btnThemeList: (
793
803
  width: 0.8em;
794
804
  height: 1em;
795
805
  line-height: 1em;
796
- font-family: Verdana,Arial,Tahoma;
797
- font-weight: normal;
798
806
  position: relative;
799
- &:before {
800
- content: "*";
801
- position: absolute;
802
- left: 0;
803
- top: 0.2em;
807
+ & > i {
808
+ font-family: Verdana,Arial,Tahoma;
809
+ font-weight: normal;
810
+ &:before {
811
+ content: "*";
812
+ position: absolute;
813
+ left: 0;
814
+ top: 0.2em;
815
+ }
804
816
  }
805
817
  }
806
818
  // .vxe-cell--required-icon,