vxe-table 3.21.21 → 3.21.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 (176) hide show
  1. package/es/{iconfont.1782656027274.ttf → iconfont.1783046294821.ttf} +0 -0
  2. package/es/iconfont.1783046294821.woff +0 -0
  3. package/es/iconfont.1783046294821.woff2 +0 -0
  4. package/es/index.css +1 -1
  5. package/es/index.min.css +1 -1
  6. package/es/locale/lang/ar-EG.js +16 -3
  7. package/es/locale/lang/de-DE.js +16 -3
  8. package/es/locale/lang/en-US.js +20 -7
  9. package/es/locale/lang/es-ES.js +16 -3
  10. package/es/locale/lang/fr-FR.js +16 -3
  11. package/es/locale/lang/hu-HU.js +16 -3
  12. package/es/locale/lang/hy-AM.js +16 -3
  13. package/es/locale/lang/id-ID.js +16 -3
  14. package/es/locale/lang/it-IT.js +15 -2
  15. package/es/locale/lang/ja-JP.js +16 -3
  16. package/es/locale/lang/ko-KR.js +16 -3
  17. package/es/locale/lang/ms-MY.js +16 -3
  18. package/es/locale/lang/nb-NO.js +16 -3
  19. package/es/locale/lang/pt-BR.js +16 -3
  20. package/es/locale/lang/ru-RU.js +16 -3
  21. package/es/locale/lang/th-TH.js +16 -3
  22. package/es/locale/lang/ug-CN.js +16 -3
  23. package/es/locale/lang/uk-UA.js +16 -3
  24. package/es/locale/lang/uz-UZ.js +16 -3
  25. package/es/locale/lang/vi-VN.js +15 -2
  26. package/es/locale/lang/zh-CHT.js +18 -5
  27. package/es/locale/lang/zh-CN.js +18 -5
  28. package/es/style.css +1 -1
  29. package/es/style.min.css +1 -1
  30. package/es/table/module/custom/mixin.js +115 -38
  31. package/es/table/module/custom/panel.js +492 -312
  32. package/es/table/module/edit/mixin.js +12 -6
  33. package/es/table/src/columnInfo.js +13 -7
  34. package/es/table/src/methods.js +105 -60
  35. package/es/table/src/util.js +31 -1
  36. package/es/table/style.css +96 -49
  37. package/es/table/style.min.css +1 -1
  38. package/es/ui/index.js +16 -4
  39. package/es/ui/src/log.js +1 -1
  40. package/es/vxe-table/style.css +96 -49
  41. package/es/vxe-table/style.min.css +1 -1
  42. package/lib/{iconfont.1782656027274.ttf → iconfont.1783046294821.ttf} +0 -0
  43. package/lib/iconfont.1783046294821.woff +0 -0
  44. package/lib/iconfont.1783046294821.woff2 +0 -0
  45. package/lib/index.css +1 -1
  46. package/lib/index.min.css +1 -1
  47. package/lib/index.umd.js +612 -226
  48. package/lib/index.umd.min.js +1 -1
  49. package/lib/locale/lang/ar-EG.js +16 -3
  50. package/lib/locale/lang/ar-EG.min.js +1 -1
  51. package/lib/locale/lang/ar-EG.umd.js +16 -3
  52. package/lib/locale/lang/de-DE.js +16 -3
  53. package/lib/locale/lang/de-DE.min.js +1 -1
  54. package/lib/locale/lang/de-DE.umd.js +16 -3
  55. package/lib/locale/lang/en-US.js +20 -7
  56. package/lib/locale/lang/en-US.min.js +1 -1
  57. package/lib/locale/lang/en-US.umd.js +20 -7
  58. package/lib/locale/lang/es-ES.js +16 -3
  59. package/lib/locale/lang/es-ES.min.js +1 -1
  60. package/lib/locale/lang/es-ES.umd.js +16 -3
  61. package/lib/locale/lang/fr-FR.js +16 -3
  62. package/lib/locale/lang/fr-FR.min.js +1 -1
  63. package/lib/locale/lang/fr-FR.umd.js +16 -3
  64. package/lib/locale/lang/hu-HU.js +16 -3
  65. package/lib/locale/lang/hu-HU.min.js +1 -1
  66. package/lib/locale/lang/hu-HU.umd.js +16 -3
  67. package/lib/locale/lang/hy-AM.js +16 -3
  68. package/lib/locale/lang/hy-AM.min.js +1 -1
  69. package/lib/locale/lang/hy-AM.umd.js +16 -3
  70. package/lib/locale/lang/id-ID.js +16 -3
  71. package/lib/locale/lang/id-ID.min.js +1 -1
  72. package/lib/locale/lang/id-ID.umd.js +16 -3
  73. package/lib/locale/lang/it-IT.js +15 -2
  74. package/lib/locale/lang/it-IT.min.js +1 -1
  75. package/lib/locale/lang/it-IT.umd.js +15 -2
  76. package/lib/locale/lang/ja-JP.js +16 -3
  77. package/lib/locale/lang/ja-JP.min.js +1 -1
  78. package/lib/locale/lang/ja-JP.umd.js +16 -3
  79. package/lib/locale/lang/ko-KR.js +16 -3
  80. package/lib/locale/lang/ko-KR.min.js +1 -1
  81. package/lib/locale/lang/ko-KR.umd.js +16 -3
  82. package/lib/locale/lang/ms-MY.js +16 -3
  83. package/lib/locale/lang/ms-MY.min.js +1 -1
  84. package/lib/locale/lang/ms-MY.umd.js +16 -3
  85. package/lib/locale/lang/nb-NO.js +16 -3
  86. package/lib/locale/lang/nb-NO.min.js +1 -1
  87. package/lib/locale/lang/nb-NO.umd.js +16 -3
  88. package/lib/locale/lang/pt-BR.js +16 -3
  89. package/lib/locale/lang/pt-BR.min.js +1 -1
  90. package/lib/locale/lang/pt-BR.umd.js +16 -3
  91. package/lib/locale/lang/ru-RU.js +16 -3
  92. package/lib/locale/lang/ru-RU.min.js +1 -1
  93. package/lib/locale/lang/ru-RU.umd.js +16 -3
  94. package/lib/locale/lang/th-TH.js +16 -3
  95. package/lib/locale/lang/th-TH.min.js +1 -1
  96. package/lib/locale/lang/th-TH.umd.js +16 -3
  97. package/lib/locale/lang/ug-CN.js +16 -3
  98. package/lib/locale/lang/ug-CN.min.js +1 -1
  99. package/lib/locale/lang/ug-CN.umd.js +16 -3
  100. package/lib/locale/lang/uk-UA.js +16 -3
  101. package/lib/locale/lang/uk-UA.min.js +1 -1
  102. package/lib/locale/lang/uk-UA.umd.js +16 -3
  103. package/lib/locale/lang/uz-UZ.js +16 -3
  104. package/lib/locale/lang/uz-UZ.min.js +1 -1
  105. package/lib/locale/lang/uz-UZ.umd.js +16 -3
  106. package/lib/locale/lang/vi-VN.js +15 -2
  107. package/lib/locale/lang/vi-VN.min.js +1 -1
  108. package/lib/locale/lang/vi-VN.umd.js +15 -2
  109. package/lib/locale/lang/zh-CHT.js +18 -5
  110. package/lib/locale/lang/zh-CHT.min.js +1 -1
  111. package/lib/locale/lang/zh-CHT.umd.js +18 -5
  112. package/lib/locale/lang/zh-CN.js +18 -5
  113. package/lib/locale/lang/zh-CN.min.js +1 -1
  114. package/lib/locale/lang/zh-CN.umd.js +18 -5
  115. package/lib/style.css +1 -1
  116. package/lib/style.min.css +1 -1
  117. package/lib/table/module/custom/mixin.js +121 -35
  118. package/lib/table/module/custom/mixin.min.js +1 -1
  119. package/lib/table/module/custom/panel.js +383 -158
  120. package/lib/table/module/custom/panel.min.js +1 -1
  121. package/lib/table/module/edit/mixin.js +12 -6
  122. package/lib/table/src/columnInfo.js +16 -6
  123. package/lib/table/src/columnInfo.min.js +1 -1
  124. package/lib/table/src/methods.js +11 -10
  125. package/lib/table/src/methods.min.js +1 -1
  126. package/lib/table/src/util.js +35 -1
  127. package/lib/table/src/util.min.js +1 -1
  128. package/lib/table/style/style.css +96 -49
  129. package/lib/table/style/style.min.css +1 -1
  130. package/lib/ui/index.js +16 -4
  131. package/lib/ui/index.min.js +1 -1
  132. package/lib/ui/src/log.js +1 -1
  133. package/lib/ui/src/log.min.js +1 -1
  134. package/lib/vxe-table/style/style.css +96 -49
  135. package/lib/vxe-table/style/style.min.css +1 -1
  136. package/package.json +2 -2
  137. package/packages/locale/lang/ar-EG.ts +16 -3
  138. package/packages/locale/lang/de-DE.ts +16 -3
  139. package/packages/locale/lang/en-US.ts +20 -7
  140. package/packages/locale/lang/es-ES.ts +16 -3
  141. package/packages/locale/lang/fr-FR.ts +16 -3
  142. package/packages/locale/lang/hu-HU.ts +16 -3
  143. package/packages/locale/lang/hy-AM.ts +16 -3
  144. package/packages/locale/lang/id-ID.ts +16 -3
  145. package/packages/locale/lang/it-IT.ts +15 -2
  146. package/packages/locale/lang/ja-JP.ts +16 -3
  147. package/packages/locale/lang/ko-KR.ts +16 -3
  148. package/packages/locale/lang/ms-MY.ts +16 -3
  149. package/packages/locale/lang/nb-NO.ts +16 -3
  150. package/packages/locale/lang/pt-BR.ts +16 -3
  151. package/packages/locale/lang/ru-RU.ts +16 -3
  152. package/packages/locale/lang/th-TH.ts +16 -3
  153. package/packages/locale/lang/ug-CN.ts +16 -3
  154. package/packages/locale/lang/uk-UA.ts +16 -3
  155. package/packages/locale/lang/uz-UZ.ts +16 -3
  156. package/packages/locale/lang/vi-VN.ts +15 -2
  157. package/packages/locale/lang/zh-CHT.ts +18 -5
  158. package/packages/locale/lang/zh-CN.ts +18 -5
  159. package/packages/table/module/custom/mixin.ts +115 -38
  160. package/packages/table/module/custom/panel.ts +545 -307
  161. package/packages/table/module/edit/mixin.ts +18 -6
  162. package/packages/table/src/columnInfo.ts +13 -7
  163. package/packages/table/src/methods.ts +120 -61
  164. package/packages/table/src/table.ts +6 -6
  165. package/packages/table/src/util.ts +34 -1
  166. package/packages/ui/index.ts +15 -3
  167. package/styles/components/icon.scss +29 -2
  168. package/styles/components/table-module/custom.scss +88 -67
  169. package/styles/icon/iconfont.ttf +0 -0
  170. package/styles/icon/iconfont.woff +0 -0
  171. package/styles/icon/iconfont.woff2 +0 -0
  172. package/styles/theme/base.scss +13 -1
  173. package/es/iconfont.1782656027274.woff +0 -0
  174. package/es/iconfont.1782656027274.woff2 +0 -0
  175. package/lib/iconfont.1782656027274.woff +0 -0
  176. package/lib/iconfont.1782656027274.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
  },
@@ -4,6 +4,8 @@ import { toCssUnit } from '../../../ui/src/dom'
4
4
 
5
5
  import type { VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods, VxeTableDefines, TableReactData, TableInternalData, VxeComponentStyleType } from '../../../../types'
6
6
 
7
+ const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align']
8
+
7
9
  function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
8
10
  const $xeGrid = $xeTable.$xeGrid
9
11
  const $xeGantt = $xeTable.$xeGantt
@@ -14,14 +16,15 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
14
16
  const customOpts = $xeTable.computeCustomOpts
15
17
  const { mode, placement, popupOptions } = customOpts
16
18
  const showSimple = !(mode === 'modal' || mode === 'drawer')
17
- const { transfer, maxHeight } = popupOptions || {}
19
+ const { transfer, minWidth, maxWidth, maxHeight } = popupOptions || {}
18
20
  const customSimpleMode = $xeTable.computeCustomSimpleMode
19
21
  const showCustomSimpleOutside = customSimpleMode === 'outside'
20
22
  const bodyEl = document.documentElement
21
23
  let wrapperEl = $xeTable.$refs.refElem as HTMLDivElement
22
24
  let popupTop = 0
23
25
  let popupMaxHeight: string | number = 0
24
- const popupStys: VxeComponentStyleType = {}
26
+ const defPupStys: VxeComponentStyleType = {}
27
+ const panePupStys: VxeComponentStyleType = {}
25
28
  if ($xeGantt) {
26
29
  const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem as HTMLDivElement
27
30
  if (ganttContainerElem) {
@@ -51,25 +54,42 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
51
54
  }
52
55
  if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
53
56
  if (popupTop) {
54
- popupStys.top = toCssUnit(popupTop)
57
+ defPupStys.top = toCssUnit(popupTop)
55
58
  }
56
59
  }
57
60
 
58
61
  if (showSimple && transfer) {
59
62
  if (placement === 'bottom-left' || placement === 'bottom-right') {
60
- popupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1)
63
+ defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1)
61
64
  }
62
65
  if (placement === 'top-left' || placement === 'bottom-left') {
63
- popupStys.left = toCssUnit(tableRect.left)
66
+ defPupStys.left = toCssUnit(tableRect.left)
64
67
  } else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
65
- popupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1)
68
+ defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1)
66
69
  }
67
70
  }
68
71
 
72
+ // 同步表格的css变量到弹窗中
73
+ const bodyComputeStyle = getComputedStyle(bodyEl)
74
+ const tableComputeStyle = getComputedStyle(wrapperEl)
75
+ customColumnCssKeys.forEach(key => {
76
+ const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`
77
+ const currCssVal = tableComputeStyle.getPropertyValue(currCssKey)
78
+ if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
79
+ panePupStys[currCssKey] = currCssVal
80
+ }
81
+ })
82
+ if (minWidth) {
83
+ defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = toCssUnit(minWidth)
84
+ }
85
+ if (maxWidth) {
86
+ defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = toCssUnit(maxWidth)
87
+ }
69
88
  if (popupMxHeight) {
70
- popupStys.maxHeight = toCssUnit(popupMxHeight)
89
+ defPupStys.maxHeight = toCssUnit(popupMxHeight)
71
90
  }
72
- customStore.popupStyle = popupStys
91
+ customStore.defPopupStyle = defPupStys
92
+ customStore.panePopupStyle = panePupStys
73
93
  customStore.maxHeight = popupMxHeight
74
94
  return $xeTable.$nextTick()
75
95
  }
@@ -159,44 +179,63 @@ export default {
159
179
  }
160
180
  return $xeTable.openCustom()
161
181
  },
162
- _saveCustom () {
182
+ _saveCustom (isDirectly?: boolean) {
163
183
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
164
184
  const reactData = $xeTable as unknown as TableReactData
165
185
  const internalData = $xeTable as unknown as TableInternalData
166
186
 
167
187
  const { customColumnList, aggHandleFields, rowGroupList } = reactData
168
188
  const customOpts = $xeTable.computeCustomOpts
169
- const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts
170
- XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
171
- if (parentColumn) {
172
- // 更新子列信息
173
- column.fixed = parentColumn.fixed
174
- } else {
175
- if (allowSort) {
176
- const sortIndex = index + 1
177
- 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
+ }
178
196
  }
179
- if (allowFixed) {
180
- 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
+ }
181
211
  }
182
- }
183
- if (allowResizable) {
184
- if (column.renderVisible && (!column.children || !column.children.length)) {
185
- if (column.renderResizeWidth !== column.renderWidth) {
186
- column.resizeWidth = column.renderResizeWidth
187
- 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
+ }
188
218
  }
189
219
  }
190
- }
191
- if (allowVisible) {
192
- column.visible = column.renderVisible
193
- }
194
- if (allowGroup && allowValues) {
195
- column.aggFunc = column.renderAggFn
196
- }
197
- })
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
+ }
198
237
  reactData.isCustomStatus = true
199
- if (allowGroup && allowValues && !!$xeTable.handlePivotTableAggData) {
238
+ if (allowGroup && !!$xeTable.handlePivotTableAggData) {
200
239
  if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
201
240
  // 更新数据分组
202
241
  if (aggHandleFields.length) {
@@ -221,7 +260,7 @@ export default {
221
260
  const { customColumnList, customStore } = reactData
222
261
  const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore
223
262
  const customOpts = $xeTable.computeCustomOpts
224
- const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts
263
+ const { allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues } = customOpts
225
264
  XEUtils.eachTree(customColumnList, column => {
226
265
  const colid = column.getKey()
227
266
  const visible = !!oldVisibleMaps[colid]
@@ -240,6 +279,21 @@ export default {
240
279
  if (allowResizable) {
241
280
  column.renderResizeWidth = column.renderWidth
242
281
  }
282
+ if (allowAlign) {
283
+ column.align = column.renderAlign
284
+ }
285
+ if (allowHeaderAlign) {
286
+ column.headerAlign = column.renderHeaderAlign
287
+ }
288
+ if (allowFooterAlign) {
289
+ column.footerAlign = column.renderFooterAlign
290
+ }
291
+ if (allowGroup) {
292
+ // 无
293
+ }
294
+ if (allowValues) {
295
+ // 无
296
+ }
243
297
  }, { children: 'children' })
244
298
  return $xeTable.$nextTick()
245
299
  },
@@ -252,12 +306,15 @@ export default {
252
306
  const { collectColumn } = internalData
253
307
  const customOpts = $xeTable.computeCustomOpts
254
308
  const { checkMethod } = customOpts
255
- const opts = Object.assign({
309
+ const opts: VxeTableDefines.VxeTableCustomStorageObj = Object.assign({
256
310
  visible: true,
257
311
  resizable: options === true,
258
312
  fixed: options === true,
259
313
  sort: options === true,
260
- aggFunc: options === true
314
+ aggFunc: options === true,
315
+ align: options === true,
316
+ headerAlign: options === true,
317
+ footerAlign: options === true
261
318
  }, options)
262
319
  const allCols: VxeTableDefines.ColumnInfo[] = []
263
320
  XEUtils.eachTree(collectColumn, (column) => {
@@ -266,6 +323,7 @@ export default {
266
323
  }
267
324
  if (opts.fixed) {
268
325
  column.fixed = column.defaultFixed
326
+ column.renderFixed = column.defaultFixed
269
327
  }
270
328
  if (opts.sort) {
271
329
  column.renderSortNumber = column.sortNumber
@@ -274,6 +332,18 @@ export default {
274
332
  if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
275
333
  column.visible = column.defaultVisible
276
334
  }
335
+ if (opts.align) {
336
+ column.align = column.defaultAlign
337
+ column.renderAlign = column.defaultAlign
338
+ }
339
+ if (opts.headerAlign) {
340
+ column.headerAlign = column.defaultHeaderAlign
341
+ column.renderHeaderAlign = column.defaultHeaderAlign
342
+ }
343
+ if (opts.footerAlign) {
344
+ column.footerAlign = column.defaultFooterAlign
345
+ column.renderFooterAlign = column.defaultFooterAlign
346
+ }
277
347
  if (opts.aggFunc) {
278
348
  column.aggFunc = column.defaultAggFunc
279
349
  column.renderAggFn = column.defaultAggFunc
@@ -376,10 +446,12 @@ export default {
376
446
  if (customStore.visible) {
377
447
  $xeTable.closeCustom()
378
448
  emitCustomEvent($xeTable, 'close', evnt)
449
+ $xeTable.dispatchEvent('custom-close', {}, evnt)
379
450
  } else {
380
451
  customStore.btnEl = evnt.target
381
452
  $xeTable.openCustom()
382
453
  emitCustomEvent($xeTable, 'open', evnt)
454
+ $xeTable.dispatchEvent('custom-open', {}, evnt)
383
455
  }
384
456
  },
385
457
  customOpenEvent (evnt: any) {
@@ -392,6 +464,7 @@ export default {
392
464
  customStore.btnEl = evnt.target
393
465
  $xeTable.openCustom()
394
466
  emitCustomEvent($xeTable, 'open', evnt)
467
+ $xeTable.dispatchEvent('custom-open', {}, evnt)
395
468
  }
396
469
  },
397
470
  customCloseEvent (evnt: any) {
@@ -403,6 +476,7 @@ export default {
403
476
  customStore.activeBtn = false
404
477
  $xeTable.closeCustom()
405
478
  emitCustomEvent($xeTable, 'close', evnt)
479
+ $xeTable.dispatchEvent('custom-close', {}, evnt)
406
480
  }
407
481
  },
408
482
  handleUpdateCustomColumn () {
@@ -421,6 +495,9 @@ export default {
421
495
  column.renderFixed = column.fixed
422
496
  column.renderVisible = column.visible
423
497
  column.renderResizeWidth = column.renderWidth
498
+ column.renderAlign = column.align
499
+ column.renderHeaderAlign = column.headerAlign
500
+ column.renderFooterAlign = column.footerAlign
424
501
  sortMaps[colid] = column.renderSortNumber
425
502
  fixedMaps[colid] = column.fixed
426
503
  visibleMaps[colid] = column.visible