vxe-table 4.19.21 → 4.19.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 (183) hide show
  1. package/dist/all.esm.js +682 -359
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/{iconfont.1782656047498.ttf → iconfont.1783046321610.ttf} +0 -0
  5. package/es/iconfont.1783046321610.woff +0 -0
  6. package/es/iconfont.1783046321610.woff2 +0 -0
  7. package/es/index.css +1 -1
  8. package/es/index.min.css +1 -1
  9. package/es/locale/lang/ar-EG.js +16 -3
  10. package/es/locale/lang/de-DE.js +16 -3
  11. package/es/locale/lang/en-US.js +20 -7
  12. package/es/locale/lang/es-ES.js +16 -3
  13. package/es/locale/lang/fr-FR.js +16 -3
  14. package/es/locale/lang/hu-HU.js +16 -3
  15. package/es/locale/lang/hy-AM.js +16 -3
  16. package/es/locale/lang/id-ID.js +16 -3
  17. package/es/locale/lang/it-IT.js +15 -2
  18. package/es/locale/lang/ja-JP.js +16 -3
  19. package/es/locale/lang/ko-KR.js +16 -3
  20. package/es/locale/lang/ms-MY.js +16 -3
  21. package/es/locale/lang/nb-NO.js +16 -3
  22. package/es/locale/lang/pt-BR.js +16 -3
  23. package/es/locale/lang/ru-RU.js +16 -3
  24. package/es/locale/lang/th-TH.js +16 -3
  25. package/es/locale/lang/ug-CN.js +16 -3
  26. package/es/locale/lang/uk-UA.js +16 -3
  27. package/es/locale/lang/uz-UZ.js +16 -3
  28. package/es/locale/lang/vi-VN.js +15 -2
  29. package/es/locale/lang/zh-CHT.js +18 -5
  30. package/es/locale/lang/zh-CN.js +18 -5
  31. package/es/style.css +1 -1
  32. package/es/style.min.css +1 -1
  33. package/es/table/module/custom/hook.js +114 -37
  34. package/es/table/module/custom/panel.js +405 -257
  35. package/es/table/module/edit/hook.js +0 -1
  36. package/es/table/src/columnInfo.js +14 -8
  37. package/es/table/src/emits.js +8 -0
  38. package/es/table/src/table.js +81 -46
  39. package/es/table/src/util.js +32 -1
  40. package/es/table/style.css +96 -49
  41. package/es/table/style.min.css +1 -1
  42. package/es/ui/index.js +16 -4
  43. package/es/ui/src/log.js +1 -1
  44. package/es/vxe-table/style.css +96 -49
  45. package/es/vxe-table/style.min.css +1 -1
  46. package/lib/{iconfont.1782656047498.ttf → iconfont.1783046321610.ttf} +0 -0
  47. package/lib/iconfont.1783046321610.woff +0 -0
  48. package/lib/iconfont.1783046321610.woff2 +0 -0
  49. package/lib/index.css +1 -1
  50. package/lib/index.min.css +1 -1
  51. package/lib/index.umd.js +561 -206
  52. package/lib/index.umd.min.js +1 -1
  53. package/lib/locale/lang/ar-EG.js +16 -3
  54. package/lib/locale/lang/ar-EG.min.js +1 -1
  55. package/lib/locale/lang/ar-EG.umd.js +16 -3
  56. package/lib/locale/lang/de-DE.js +16 -3
  57. package/lib/locale/lang/de-DE.min.js +1 -1
  58. package/lib/locale/lang/de-DE.umd.js +16 -3
  59. package/lib/locale/lang/en-US.js +20 -7
  60. package/lib/locale/lang/en-US.min.js +1 -1
  61. package/lib/locale/lang/en-US.umd.js +20 -7
  62. package/lib/locale/lang/es-ES.js +16 -3
  63. package/lib/locale/lang/es-ES.min.js +1 -1
  64. package/lib/locale/lang/es-ES.umd.js +16 -3
  65. package/lib/locale/lang/fr-FR.js +16 -3
  66. package/lib/locale/lang/fr-FR.min.js +1 -1
  67. package/lib/locale/lang/fr-FR.umd.js +16 -3
  68. package/lib/locale/lang/hu-HU.js +16 -3
  69. package/lib/locale/lang/hu-HU.min.js +1 -1
  70. package/lib/locale/lang/hu-HU.umd.js +16 -3
  71. package/lib/locale/lang/hy-AM.js +16 -3
  72. package/lib/locale/lang/hy-AM.min.js +1 -1
  73. package/lib/locale/lang/hy-AM.umd.js +16 -3
  74. package/lib/locale/lang/id-ID.js +16 -3
  75. package/lib/locale/lang/id-ID.min.js +1 -1
  76. package/lib/locale/lang/id-ID.umd.js +16 -3
  77. package/lib/locale/lang/it-IT.js +15 -2
  78. package/lib/locale/lang/it-IT.min.js +1 -1
  79. package/lib/locale/lang/it-IT.umd.js +15 -2
  80. package/lib/locale/lang/ja-JP.js +16 -3
  81. package/lib/locale/lang/ja-JP.min.js +1 -1
  82. package/lib/locale/lang/ja-JP.umd.js +16 -3
  83. package/lib/locale/lang/ko-KR.js +16 -3
  84. package/lib/locale/lang/ko-KR.min.js +1 -1
  85. package/lib/locale/lang/ko-KR.umd.js +16 -3
  86. package/lib/locale/lang/ms-MY.js +16 -3
  87. package/lib/locale/lang/ms-MY.min.js +1 -1
  88. package/lib/locale/lang/ms-MY.umd.js +16 -3
  89. package/lib/locale/lang/nb-NO.js +16 -3
  90. package/lib/locale/lang/nb-NO.min.js +1 -1
  91. package/lib/locale/lang/nb-NO.umd.js +16 -3
  92. package/lib/locale/lang/pt-BR.js +16 -3
  93. package/lib/locale/lang/pt-BR.min.js +1 -1
  94. package/lib/locale/lang/pt-BR.umd.js +16 -3
  95. package/lib/locale/lang/ru-RU.js +16 -3
  96. package/lib/locale/lang/ru-RU.min.js +1 -1
  97. package/lib/locale/lang/ru-RU.umd.js +16 -3
  98. package/lib/locale/lang/th-TH.js +16 -3
  99. package/lib/locale/lang/th-TH.min.js +1 -1
  100. package/lib/locale/lang/th-TH.umd.js +16 -3
  101. package/lib/locale/lang/ug-CN.js +16 -3
  102. package/lib/locale/lang/ug-CN.min.js +1 -1
  103. package/lib/locale/lang/ug-CN.umd.js +16 -3
  104. package/lib/locale/lang/uk-UA.js +16 -3
  105. package/lib/locale/lang/uk-UA.min.js +1 -1
  106. package/lib/locale/lang/uk-UA.umd.js +16 -3
  107. package/lib/locale/lang/uz-UZ.js +16 -3
  108. package/lib/locale/lang/uz-UZ.min.js +1 -1
  109. package/lib/locale/lang/uz-UZ.umd.js +16 -3
  110. package/lib/locale/lang/vi-VN.js +15 -2
  111. package/lib/locale/lang/vi-VN.min.js +1 -1
  112. package/lib/locale/lang/vi-VN.umd.js +15 -2
  113. package/lib/locale/lang/zh-CHT.js +18 -5
  114. package/lib/locale/lang/zh-CHT.min.js +1 -1
  115. package/lib/locale/lang/zh-CHT.umd.js +18 -5
  116. package/lib/locale/lang/zh-CN.js +18 -5
  117. package/lib/locale/lang/zh-CN.min.js +1 -1
  118. package/lib/locale/lang/zh-CN.umd.js +18 -5
  119. package/lib/style.css +1 -1
  120. package/lib/style.min.css +1 -1
  121. package/lib/table/module/custom/hook.js +120 -34
  122. package/lib/table/module/custom/hook.min.js +1 -1
  123. package/lib/table/module/custom/panel.js +340 -141
  124. package/lib/table/module/custom/panel.min.js +1 -1
  125. package/lib/table/module/edit/hook.js +0 -1
  126. package/lib/table/module/edit/hook.min.js +1 -1
  127. package/lib/table/src/columnInfo.js +17 -7
  128. package/lib/table/src/columnInfo.min.js +1 -1
  129. package/lib/table/src/emits.js +1 -1
  130. package/lib/table/src/emits.min.js +1 -1
  131. package/lib/table/src/table.js +11 -11
  132. package/lib/table/src/table.min.js +1 -1
  133. package/lib/table/src/util.js +38 -1
  134. package/lib/table/src/util.min.js +1 -1
  135. package/lib/table/style/style.css +96 -49
  136. package/lib/table/style/style.min.css +1 -1
  137. package/lib/ui/index.js +16 -4
  138. package/lib/ui/index.min.js +1 -1
  139. package/lib/ui/src/log.js +1 -1
  140. package/lib/ui/src/log.min.js +1 -1
  141. package/lib/vxe-table/style/style.css +96 -49
  142. package/lib/vxe-table/style/style.min.css +1 -1
  143. package/package.json +2 -2
  144. package/packages/locale/lang/ar-EG.ts +16 -3
  145. package/packages/locale/lang/de-DE.ts +16 -3
  146. package/packages/locale/lang/en-US.ts +20 -7
  147. package/packages/locale/lang/es-ES.ts +16 -3
  148. package/packages/locale/lang/fr-FR.ts +16 -3
  149. package/packages/locale/lang/hu-HU.ts +16 -3
  150. package/packages/locale/lang/hy-AM.ts +16 -3
  151. package/packages/locale/lang/id-ID.ts +16 -3
  152. package/packages/locale/lang/it-IT.ts +15 -2
  153. package/packages/locale/lang/ja-JP.ts +16 -3
  154. package/packages/locale/lang/ko-KR.ts +16 -3
  155. package/packages/locale/lang/ms-MY.ts +16 -3
  156. package/packages/locale/lang/nb-NO.ts +16 -3
  157. package/packages/locale/lang/pt-BR.ts +16 -3
  158. package/packages/locale/lang/ru-RU.ts +16 -3
  159. package/packages/locale/lang/th-TH.ts +16 -3
  160. package/packages/locale/lang/ug-CN.ts +16 -3
  161. package/packages/locale/lang/uk-UA.ts +16 -3
  162. package/packages/locale/lang/uz-UZ.ts +16 -3
  163. package/packages/locale/lang/vi-VN.ts +15 -2
  164. package/packages/locale/lang/zh-CHT.ts +18 -5
  165. package/packages/locale/lang/zh-CN.ts +18 -5
  166. package/packages/table/module/custom/hook.ts +113 -36
  167. package/packages/table/module/custom/panel.ts +488 -286
  168. package/packages/table/module/edit/hook.ts +0 -1
  169. package/packages/table/src/columnInfo.ts +14 -8
  170. package/packages/table/src/emits.ts +8 -0
  171. package/packages/table/src/table.ts +91 -47
  172. package/packages/table/src/util.ts +35 -1
  173. package/packages/ui/index.ts +15 -3
  174. package/styles/components/icon.scss +29 -2
  175. package/styles/components/table-module/custom.scss +88 -67
  176. package/styles/icon/iconfont.ttf +0 -0
  177. package/styles/icon/iconfont.woff +0 -0
  178. package/styles/icon/iconfont.woff2 +0 -0
  179. package/styles/theme/base.scss +13 -1
  180. package/es/iconfont.1782656047498.woff +0 -0
  181. package/es/iconfont.1782656047498.woff2 +0 -0
  182. package/lib/iconfont.1782656047498.woff +0 -0
  183. package/lib/iconfont.1782656047498.woff2 +0 -0
@@ -175,10 +175,16 @@ export default {
175
175
  colResizable: 'Width (pixels)',
176
176
  colVisible: 'Visible',
177
177
  colFixed: 'Freeze',
178
- colFixedMax: 'Freeze (up to {0} columns)',
178
+ colFixedMax: 'Freeze (Max {0})',
179
+ colAlign: '对齐方式',
180
+ colHeadAlign: '表头对齐方式',
181
+ colFootAlign: '表尾对齐方式',
179
182
  fixedLeft: 'Left',
180
- fixedUnset: 'Not set​',
183
+ fixedUnset: 'None',
181
184
  fixedRight: 'Right',
185
+ alignLeft: '居左',
186
+ alignCenter: '居中',
187
+ alignRight: '居右',
182
188
  moveUp: '上移',
183
189
  moveDn: '下移',
184
190
  putTop: '置顶',
@@ -186,7 +192,10 @@ export default {
186
192
  moveUpTitle: '点击向上移动',
187
193
  moveDnTitle: '点击向下移动',
188
194
  putTopTitle: '点击置顶',
189
- putBottomTitle: '点击置尾'
195
+ putBottomTitle: '点击置尾',
196
+ anLeftTitle: '左对齐',
197
+ anCenterTitle: '居中',
198
+ anRightTitle: '右对齐'
190
199
  }
191
200
  },
192
201
  import: {
@@ -287,6 +296,10 @@ export default {
287
296
  fixedRight: 'แช่แข็งขวา',
288
297
  cancelFixed: 'สูดดม'
289
298
  },
299
+ iconPicker: {
300
+ search: '搜索',
301
+ emptyText: '暂无数据'
302
+ },
290
303
  datePicker: {
291
304
  yearTitle: '{0} ปี'
292
305
  },
@@ -175,10 +175,16 @@ export default {
175
175
  colResizable: 'Width (pixels)',
176
176
  colVisible: 'Visible',
177
177
  colFixed: 'Freeze',
178
- colFixedMax: 'Freeze (up to {0} columns)',
178
+ colFixedMax: 'Freeze (Max {0})',
179
+ colAlign: '对齐方式',
180
+ colHeadAlign: '表头对齐方式',
181
+ colFootAlign: '表尾对齐方式',
179
182
  fixedLeft: 'Left',
180
- fixedUnset: 'Not set​',
183
+ fixedUnset: 'None',
181
184
  fixedRight: 'Right',
185
+ alignLeft: '居左',
186
+ alignCenter: '居中',
187
+ alignRight: '居右',
182
188
  moveUp: '上移',
183
189
  moveDn: '下移',
184
190
  putTop: '置顶',
@@ -186,7 +192,10 @@ export default {
186
192
  moveUpTitle: '点击向上移动',
187
193
  moveDnTitle: '点击向下移动',
188
194
  putTopTitle: '点击置顶',
189
- putBottomTitle: '点击置尾'
195
+ putBottomTitle: '点击置尾',
196
+ anLeftTitle: '左对齐',
197
+ anCenterTitle: '居中',
198
+ anRightTitle: '右对齐'
190
199
  }
191
200
  },
192
201
  import: {
@@ -287,6 +296,10 @@ export default {
287
296
  fixedRight: 'ئوڭ ياندا توڭلىتىش',
288
297
  cancelFixed: 'قۇر توڭلىتىشنى ئەمەلدىن قالدۇرۇش'
289
298
  },
299
+ iconPicker: {
300
+ search: '搜索',
301
+ emptyText: '暂无数据'
302
+ },
290
303
  datePicker: {
291
304
  yearTitle: '{0} يىل'
292
305
  },
@@ -175,10 +175,16 @@ export default {
175
175
  colResizable: 'Width (pixels)',
176
176
  colVisible: 'Visible',
177
177
  colFixed: 'Freeze',
178
- colFixedMax: 'Freeze (up to {0} columns)',
178
+ colFixedMax: 'Freeze (Max {0})',
179
+ colAlign: '对齐方式',
180
+ colHeadAlign: '表头对齐方式',
181
+ colFootAlign: '表尾对齐方式',
179
182
  fixedLeft: 'Left',
180
- fixedUnset: 'Not set​',
183
+ fixedUnset: 'None',
181
184
  fixedRight: 'Right',
185
+ alignLeft: '居左',
186
+ alignCenter: '居中',
187
+ alignRight: '居右',
182
188
  moveUp: '上移',
183
189
  moveDn: '下移',
184
190
  putTop: '置顶',
@@ -186,7 +192,10 @@ export default {
186
192
  moveUpTitle: '点击向上移动',
187
193
  moveDnTitle: '点击向下移动',
188
194
  putTopTitle: '点击置顶',
189
- putBottomTitle: '点击置尾'
195
+ putBottomTitle: '点击置尾',
196
+ anLeftTitle: '左对齐',
197
+ anCenterTitle: '居中',
198
+ anRightTitle: '右对齐'
190
199
  }
191
200
  },
192
201
  import: {
@@ -287,6 +296,10 @@ export default {
287
296
  fixedRight: 'Заморожуйте право',
288
297
  cancelFixed: 'Розморожувати'
289
298
  },
299
+ iconPicker: {
300
+ search: '搜索',
301
+ emptyText: '暂无数据'
302
+ },
290
303
  datePicker: {
291
304
  yearTitle: '{0} років'
292
305
  },
@@ -175,10 +175,16 @@ export default {
175
175
  colResizable: 'Width (pixels)',
176
176
  colVisible: 'Visible',
177
177
  colFixed: 'Freeze',
178
- colFixedMax: 'Freeze (up to {0} columns)',
178
+ colFixedMax: 'Freeze (Max {0})',
179
+ colAlign: '对齐方式',
180
+ colHeadAlign: '表头对齐方式',
181
+ colFootAlign: '表尾对齐方式',
179
182
  fixedLeft: 'Left',
180
- fixedUnset: 'Not set​',
183
+ fixedUnset: 'None',
181
184
  fixedRight: 'Right',
185
+ alignLeft: '居左',
186
+ alignCenter: '居中',
187
+ alignRight: '居右',
182
188
  moveUp: '上移',
183
189
  moveDn: '下移',
184
190
  putTop: '置顶',
@@ -186,7 +192,10 @@ export default {
186
192
  moveUpTitle: '点击向上移动',
187
193
  moveDnTitle: '点击向下移动',
188
194
  putTopTitle: '点击置顶',
189
- putBottomTitle: '点击置尾'
195
+ putBottomTitle: '点击置尾',
196
+ anLeftTitle: '左对齐',
197
+ anCenterTitle: '居中',
198
+ anRightTitle: '右对齐'
190
199
  }
191
200
  },
192
201
  import: {
@@ -287,6 +296,10 @@ export default {
287
296
  fixedRight: "O'ng tomonda muzlatib qo'ying",
288
297
  cancelFixed: "Urug'lar ustunini"
289
298
  },
299
+ iconPicker: {
300
+ search: '搜索',
301
+ emptyText: '暂无数据'
302
+ },
290
303
  datePicker: {
291
304
  yearTitle: '{0} yillar'
292
305
  },
@@ -176,9 +176,15 @@ export default {
176
176
  colVisible: 'Chiều rộng (pixels)',
177
177
  colFixed: 'Sử dụn',
178
178
  colFixedMax: 'Sử dụng (lên đến {0})',
179
+ colAlign: '对齐方式',
180
+ colHeadAlign: '表头对齐方式',
181
+ colFootAlign: '表尾对齐方式',
179
182
  fixedLeft: 'Trái',
180
- fixedUnset: 'Không',
183
+ fixedUnset: '',
181
184
  fixedRight: 'Đúng',
185
+ alignLeft: '居左',
186
+ alignCenter: '居中',
187
+ alignRight: '居右',
182
188
  moveUp: '上移',
183
189
  moveDn: '下移',
184
190
  putTop: '置顶',
@@ -186,7 +192,10 @@ export default {
186
192
  moveUpTitle: '点击向上移动',
187
193
  moveDnTitle: '点击向下移动',
188
194
  putTopTitle: '点击置顶',
189
- putBottomTitle: '点击置尾'
195
+ putBottomTitle: '点击置尾',
196
+ anLeftTitle: '左对齐',
197
+ anCenterTitle: '居中',
198
+ anRightTitle: '右对齐'
190
199
  }
191
200
  },
192
201
  import: {
@@ -287,6 +296,10 @@ export default {
287
296
  fixedRight: 'Đóng băng bên phải',
288
297
  cancelFixed: 'Mở ra cột'
289
298
  },
299
+ iconPicker: {
300
+ search: '搜索',
301
+ emptyText: '暂无数据'
302
+ },
290
303
  datePicker: {
291
304
  yearTitle: '{0} năm'
292
305
  },
@@ -175,10 +175,16 @@ export default {
175
175
  colResizable: '列寬(像素)',
176
176
  colVisible: '是否顯示',
177
177
  colFixed: '凍結列',
178
- colFixedMax: '凍結列(最多 {0} 列)',
179
- fixedLeft: '左側',
180
- fixedUnset: '不設置',
181
- fixedRight: '右側',
178
+ colFixedMax: '凍結列({0}',
179
+ colAlign: '对齐方式',
180
+ colHeadAlign: '表头对齐方式',
181
+ colFootAlign: '表尾对齐方式',
182
+ fixedLeft: '左',
183
+ fixedUnset: '无',
184
+ fixedRight: '右',
185
+ alignLeft: '左',
186
+ alignCenter: '中',
187
+ alignRight: '右',
182
188
  moveUp: '上移',
183
189
  moveDn: '下移',
184
190
  putTop: '置顶',
@@ -186,7 +192,10 @@ export default {
186
192
  moveUpTitle: '点击向上移动',
187
193
  moveDnTitle: '点击向下移动',
188
194
  putTopTitle: '点击置顶',
189
- putBottomTitle: '点击置尾'
195
+ putBottomTitle: '点击置尾',
196
+ anLeftTitle: '左对齐',
197
+ anCenterTitle: '居中',
198
+ anRightTitle: '右对齐'
190
199
  }
191
200
  },
192
201
  import: {
@@ -287,6 +296,10 @@ export default {
287
296
  fixedRight: '凍結在右側',
288
297
  cancelFixed: '取消凍結列'
289
298
  },
299
+ iconPicker: {
300
+ search: '搜索',
301
+ emptyText: '暂无数据'
302
+ },
290
303
  datePicker: {
291
304
  yearTitle: '{0} 年'
292
305
  },
@@ -175,10 +175,16 @@ export default {
175
175
  colResizable: '列宽(像素)',
176
176
  colVisible: '是否显示',
177
177
  colFixed: '冻结列',
178
- colFixedMax: '冻结列(最多 {0} 列)',
179
- fixedLeft: '左侧',
180
- fixedUnset: '不设置',
181
- fixedRight: '右侧',
178
+ colFixedMax: '冻结列({0}',
179
+ colAlign: '对齐方式',
180
+ colHeadAlign: '表头对齐方式',
181
+ colFootAlign: '表尾对齐方式',
182
+ fixedLeft: '左',
183
+ fixedUnset: '无',
184
+ fixedRight: '右',
185
+ alignLeft: '左',
186
+ alignCenter: '中',
187
+ alignRight: '右',
182
188
  moveUp: '上移',
183
189
  moveDn: '下移',
184
190
  putTop: '置顶',
@@ -186,7 +192,10 @@ export default {
186
192
  moveUpTitle: '点击向上移动',
187
193
  moveDnTitle: '点击向下移动',
188
194
  putTopTitle: '点击置顶',
189
- putBottomTitle: '点击置尾'
195
+ putBottomTitle: '点击置尾',
196
+ anLeftTitle: '左对齐',
197
+ anCenterTitle: '居中',
198
+ anRightTitle: '右对齐'
190
199
  }
191
200
  },
192
201
  import: {
@@ -287,6 +296,10 @@ export default {
287
296
  fixedRight: '冻结在右侧',
288
297
  cancelFixed: '取消冻结列'
289
298
  },
299
+ iconPicker: {
300
+ search: '搜索',
301
+ emptyText: '暂无数据'
302
+ },
290
303
  datePicker: {
291
304
  yearTitle: '{0} 年'
292
305
  },
@@ -8,6 +8,8 @@ import type { TableCustomMethods, TableCustomPrivateMethods, VxeColumnPropTypes,
8
8
 
9
9
  const tableCustomMethodKeys: (keyof TableCustomMethods)[] = ['openCustom', 'closeCustom', 'getCustomVisible', 'toggleCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox']
10
10
 
11
+ const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align']
12
+
11
13
  VxeUI.hooks.add('tableCustomModule', {
12
14
  setupTable ($xeTable) {
13
15
  const { reactData, internalData } = $xeTable
@@ -23,14 +25,15 @@ VxeUI.hooks.add('tableCustomModule', {
23
25
  const customOpts = computeCustomOpts.value
24
26
  const { mode, placement, popupOptions } = customOpts
25
27
  const showSimple = !(mode === 'modal' || mode === 'drawer')
26
- const { transfer, maxHeight } = popupOptions || {}
28
+ const { transfer, minWidth, maxWidth, maxHeight } = popupOptions || {}
27
29
  const customSimpleMode = computeCustomSimpleMode.value
28
30
  const showCustomSimpleOutside = customSimpleMode === 'outside'
29
31
  const bodyEl = document.documentElement
30
32
  let wrapperEl = refElem.value
31
33
  let popupTop = 0
32
34
  let popupMaxHeight: string | number = 0
33
- const popupStys: VxeComponentStyleType = {}
35
+ const defPupStys: VxeComponentStyleType = {}
36
+ const panePupStys: VxeComponentStyleType = {}
34
37
  if ($xeGantt) {
35
38
  const { refGanttContainerElem } = $xeGantt.getRefMaps()
36
39
  const ganttContainerElem = refGanttContainerElem.value
@@ -61,25 +64,42 @@ VxeUI.hooks.add('tableCustomModule', {
61
64
  }
62
65
  if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
63
66
  if (popupTop) {
64
- popupStys.top = toCssUnit(popupTop)
67
+ defPupStys.top = toCssUnit(popupTop)
65
68
  }
66
69
  }
67
70
 
68
71
  if (showSimple && transfer) {
69
72
  if (placement === 'bottom-left' || placement === 'bottom-right') {
70
- popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1)
73
+ defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1)
71
74
  }
72
75
  if (placement === 'top-left' || placement === 'bottom-left') {
73
- popupStys.left = toCssUnit(tableRect.left)
76
+ defPupStys.left = toCssUnit(tableRect.left)
74
77
  } else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
75
- popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1)
78
+ defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1)
76
79
  }
77
80
  }
78
81
 
82
+ // 同步表格的css变量到弹窗中
83
+ const bodyComputeStyle = getComputedStyle(bodyEl)
84
+ const tableComputeStyle = getComputedStyle(wrapperEl)
85
+ customColumnCssKeys.forEach(key => {
86
+ const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`
87
+ const currCssVal = tableComputeStyle.getPropertyValue(currCssKey)
88
+ if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
89
+ panePupStys[currCssKey] = currCssVal
90
+ }
91
+ })
92
+ if (minWidth) {
93
+ defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = toCssUnit(minWidth)
94
+ }
95
+ if (maxWidth) {
96
+ defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = toCssUnit(maxWidth)
97
+ }
79
98
  if (popupMxHeight) {
80
- popupStys.maxHeight = toCssUnit(popupMxHeight)
99
+ defPupStys.maxHeight = toCssUnit(popupMxHeight)
81
100
  }
82
- customStore.popupStyle = popupStys
101
+ customStore.defPopupStyle = defPupStys
102
+ customStore.panePopupStyle = panePupStys
83
103
  customStore.maxHeight = popupMxHeight
84
104
  return nextTick()
85
105
  }
@@ -129,6 +149,9 @@ VxeUI.hooks.add('tableCustomModule', {
129
149
  column.renderFixed = column.fixed
130
150
  column.renderVisible = column.visible
131
151
  column.renderResizeWidth = column.renderWidth
152
+ column.renderAlign = column.align
153
+ column.renderHeaderAlign = column.headerAlign
154
+ column.renderFooterAlign = column.footerAlign
132
155
  sortMaps[colid] = column.renderSortNumber
133
156
  fixedMaps[colid] = column.fixed
134
157
  visibleMaps[colid] = column.visible
@@ -160,38 +183,57 @@ VxeUI.hooks.add('tableCustomModule', {
160
183
  return openCustom()
161
184
  }
162
185
 
163
- const saveCustom = () => {
186
+ const saveCustom = (isDirectly?: boolean) => {
164
187
  const { customColumnList, aggHandleFields, rowGroupList } = reactData
165
188
  const customOpts = computeCustomOpts.value
166
- const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts
167
- XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
168
- if (parentColumn) {
169
- // 更新子列信息
170
- column.fixed = parentColumn.fixed
171
- } else {
172
- if (allowSort) {
173
- const sortIndex = index + 1
174
- column.renderSortNumber = sortIndex
189
+ const { allowVisible, allowSort, allowFixed, allowResizable, allowAlign, allowHeaderAlign, allowFooterAlign, allowGroup, allowValues } = customOpts
190
+ if (isDirectly) {
191
+ XEUtils.eachTree(customColumnList, (column) => {
192
+ if (allowResizable) {
193
+ if (column.renderVisible && (!column.children || !column.children.length)) {
194
+ column.resizeWidth = Math.max(0, XEUtils.toNumber(column.renderWidth))
195
+ }
175
196
  }
176
- if (allowFixed) {
177
- column.fixed = column.renderFixed
197
+ })
198
+ } else {
199
+ XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
200
+ if (parentColumn) {
201
+ // 更新子列信息
202
+ column.fixed = parentColumn.fixed
203
+ } else {
204
+ if (allowSort) {
205
+ const sortIndex = index + 1
206
+ column.renderSortNumber = sortIndex
207
+ }
208
+ if (allowFixed) {
209
+ column.fixed = column.renderFixed
210
+ }
178
211
  }
179
- }
180
- if (allowResizable) {
181
- if (column.renderVisible && (!column.children || !column.children.length)) {
182
- if (column.renderResizeWidth !== column.renderWidth) {
183
- column.resizeWidth = column.renderResizeWidth
184
- column.renderWidth = column.renderResizeWidth
212
+ if (allowResizable) {
213
+ if (column.renderVisible && (!column.children || !column.children.length)) {
214
+ if (column.renderResizeWidth !== column.renderWidth) {
215
+ column.resizeWidth = column.renderResizeWidth
216
+ column.renderWidth = column.renderResizeWidth
217
+ }
185
218
  }
186
219
  }
187
- }
188
- if (allowVisible) {
189
- column.visible = column.renderVisible
190
- }
191
- if (allowGroup && allowValues) {
192
- column.aggFunc = column.renderAggFn
193
- }
194
- })
220
+ if (allowVisible) {
221
+ column.visible = column.renderVisible
222
+ }
223
+ if (allowAlign) {
224
+ column.align = column.renderAlign
225
+ }
226
+ if (allowHeaderAlign) {
227
+ column.headerAlign = column.renderHeaderAlign
228
+ }
229
+ if (allowFooterAlign) {
230
+ column.footerAlign = column.renderFooterAlign
231
+ }
232
+ if (allowGroup && allowValues) {
233
+ column.aggFunc = column.renderAggFn
234
+ }
235
+ })
236
+ }
195
237
  reactData.isCustomStatus = true
196
238
  if (allowGroup && !!$xeTable.handlePivotTableAggData) {
197
239
  if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
@@ -216,7 +258,7 @@ VxeUI.hooks.add('tableCustomModule', {
216
258
  const { customColumnList, customStore } = reactData
217
259
  const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore
218
260
  const customOpts = computeCustomOpts.value
219
- const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
261
+ const { allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues } = customOpts
220
262
  XEUtils.eachTree(customColumnList, column => {
221
263
  const colid = column.getKey()
222
264
  const visible = !!oldVisibleMaps[colid]
@@ -235,6 +277,21 @@ VxeUI.hooks.add('tableCustomModule', {
235
277
  if (allowResizable) {
236
278
  column.renderResizeWidth = column.renderWidth
237
279
  }
280
+ if (allowAlign) {
281
+ column.align = column.renderAlign
282
+ }
283
+ if (allowHeaderAlign) {
284
+ column.headerAlign = column.renderHeaderAlign
285
+ }
286
+ if (allowFooterAlign) {
287
+ column.footerAlign = column.renderFooterAlign
288
+ }
289
+ if (allowGroup) {
290
+ // 无
291
+ }
292
+ if (allowValues) {
293
+ // 无
294
+ }
238
295
  }, { children: 'children' })
239
296
  return nextTick()
240
297
  }
@@ -298,7 +355,10 @@ VxeUI.hooks.add('tableCustomModule', {
298
355
  resizable: options === true,
299
356
  fixed: options === true,
300
357
  sort: options === true,
301
- aggFunc: options === true
358
+ aggFunc: options === true,
359
+ align: options === true,
360
+ headerAlign: options === true,
361
+ footerAlign: options === true
302
362
  }, options)
303
363
  const allCols: VxeTableDefines.ColumnInfo[] = []
304
364
  XEUtils.eachTree(collectColumn, (column) => {
@@ -307,6 +367,7 @@ VxeUI.hooks.add('tableCustomModule', {
307
367
  }
308
368
  if (opts.fixed) {
309
369
  column.fixed = column.defaultFixed
370
+ column.renderFixed = column.defaultFixed
310
371
  }
311
372
  if (opts.sort) {
312
373
  column.renderSortNumber = column.sortNumber
@@ -315,6 +376,18 @@ VxeUI.hooks.add('tableCustomModule', {
315
376
  if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
316
377
  column.visible = column.defaultVisible
317
378
  }
379
+ if (opts.align) {
380
+ column.align = column.defaultAlign
381
+ column.renderAlign = column.defaultAlign
382
+ }
383
+ if (opts.headerAlign) {
384
+ column.headerAlign = column.defaultHeaderAlign
385
+ column.renderHeaderAlign = column.defaultHeaderAlign
386
+ }
387
+ if (opts.footerAlign) {
388
+ column.footerAlign = column.defaultFooterAlign
389
+ column.renderFooterAlign = column.defaultFooterAlign
390
+ }
318
391
  if (opts.aggFunc) {
319
392
  column.aggFunc = column.defaultAggFunc
320
393
  column.renderAggFn = column.defaultAggFunc
@@ -375,10 +448,12 @@ VxeUI.hooks.add('tableCustomModule', {
375
448
  if (customStore.visible) {
376
449
  closeCustom()
377
450
  emitCustomEvent('close', evnt)
451
+ $xeTable.dispatchEvent('custom-close', {}, evnt)
378
452
  } else {
379
453
  customStore.btnEl = evnt.target as HTMLDivElement
380
454
  openCustom()
381
455
  emitCustomEvent('open', evnt)
456
+ $xeTable.dispatchEvent('custom-open', {}, evnt)
382
457
  }
383
458
  },
384
459
  customOpenEvent (evnt) {
@@ -390,6 +465,7 @@ VxeUI.hooks.add('tableCustomModule', {
390
465
  customStore.btnEl = evnt.target as HTMLDivElement
391
466
  $xeTable.openCustom()
392
467
  $xeTable.emitCustomEvent('open', evnt)
468
+ $xeTable.dispatchEvent('custom-open', {}, evnt)
393
469
  }
394
470
  },
395
471
  customCloseEvent (evnt) {
@@ -400,6 +476,7 @@ VxeUI.hooks.add('tableCustomModule', {
400
476
  customStore.activeBtn = false
401
477
  $xeTable.closeCustom()
402
478
  $xeTable.emitCustomEvent('close', evnt)
479
+ $xeTable.dispatchEvent('custom-close', {}, evnt)
403
480
  }
404
481
  },
405
482
  handleUpdateCustomColumn,