vxe-table 4.18.0-beta.2 → 4.18.0-beta.20

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 (322) hide show
  1. package/README.md +10 -10
  2. package/es/colgroup/style.css +0 -0
  3. package/es/colgroup/style.min.css +0 -0
  4. package/es/column/style.css +0 -0
  5. package/es/column/style.min.css +0 -0
  6. package/es/grid/src/grid.js +23 -19
  7. package/es/grid/style.css +86 -0
  8. package/es/grid/style.min.css +1 -0
  9. package/es/iconfont.1770109263422.ttf +0 -0
  10. package/es/iconfont.1770109263422.woff +0 -0
  11. package/es/iconfont.1770109263422.woff2 +0 -0
  12. package/es/index.css +1 -1
  13. package/es/index.min.css +1 -1
  14. package/es/locale/lang/ar-EG.d.ts +2 -0
  15. package/es/locale/lang/ar-EG.js +6 -0
  16. package/es/locale/lang/de-DE.d.ts +2 -0
  17. package/es/locale/lang/de-DE.js +6 -0
  18. package/es/locale/lang/en-US.d.ts +2 -0
  19. package/es/locale/lang/en-US.js +6 -0
  20. package/es/locale/lang/es-ES.d.ts +2 -0
  21. package/es/locale/lang/es-ES.js +6 -0
  22. package/es/locale/lang/fr-FR.d.ts +2 -0
  23. package/es/locale/lang/fr-FR.js +6 -0
  24. package/es/locale/lang/hu-HU.d.ts +2 -0
  25. package/es/locale/lang/hu-HU.js +6 -0
  26. package/es/locale/lang/hy-AM.d.ts +2 -0
  27. package/es/locale/lang/hy-AM.js +6 -0
  28. package/es/locale/lang/id-ID.d.ts +2 -0
  29. package/es/locale/lang/id-ID.js +6 -0
  30. package/es/locale/lang/it-IT.d.ts +2 -0
  31. package/es/locale/lang/it-IT.js +6 -0
  32. package/es/locale/lang/ja-JP.d.ts +2 -0
  33. package/es/locale/lang/ja-JP.js +6 -0
  34. package/es/locale/lang/ko-KR.d.ts +2 -0
  35. package/es/locale/lang/ko-KR.js +6 -0
  36. package/es/locale/lang/ms-MY.d.ts +2 -0
  37. package/es/locale/lang/ms-MY.js +6 -0
  38. package/es/locale/lang/nb-NO.d.ts +2 -0
  39. package/es/locale/lang/nb-NO.js +6 -0
  40. package/es/locale/lang/pt-BR.d.ts +2 -0
  41. package/es/locale/lang/pt-BR.js +6 -0
  42. package/es/locale/lang/ru-RU.d.ts +2 -0
  43. package/es/locale/lang/ru-RU.js +6 -0
  44. package/es/locale/lang/th-TH.d.ts +2 -0
  45. package/es/locale/lang/th-TH.js +6 -0
  46. package/es/locale/lang/ug-CN.d.ts +2 -0
  47. package/es/locale/lang/ug-CN.js +6 -0
  48. package/es/locale/lang/uk-UA.d.ts +2 -0
  49. package/es/locale/lang/uk-UA.js +6 -0
  50. package/es/locale/lang/uz-UZ.d.ts +2 -0
  51. package/es/locale/lang/uz-UZ.js +6 -0
  52. package/es/locale/lang/vi-VN.d.ts +2 -0
  53. package/es/locale/lang/vi-VN.js +6 -0
  54. package/es/locale/lang/zh-CHT.d.ts +2 -0
  55. package/es/locale/lang/zh-CHT.js +6 -0
  56. package/es/locale/lang/zh-CN.d.ts +2 -0
  57. package/es/locale/lang/zh-CN.js +6 -0
  58. package/es/locale/lang/zh-HK.d.ts +2 -0
  59. package/es/locale/lang/zh-MO.d.ts +2 -0
  60. package/es/locale/lang/zh-TW.d.ts +2 -0
  61. package/es/style.css +1 -1
  62. package/es/style.min.css +1 -1
  63. package/es/table/module/custom/hook.js +25 -9
  64. package/es/table/module/custom/panel.js +14 -13
  65. package/es/table/module/edit/hook.js +3 -3
  66. package/es/table/module/export/hook.js +15 -1
  67. package/es/table/module/filter/panel.js +11 -3
  68. package/es/table/module/validator/hook.js +7 -6
  69. package/es/table/render/index.js +14 -0
  70. package/es/table/src/body.js +12 -5
  71. package/es/table/src/emits.js +1 -0
  72. package/es/table/src/props.js +2 -0
  73. package/es/table/src/table.js +235 -54
  74. package/es/table/src/util.js +23 -9
  75. package/es/table/style.css +3887 -0
  76. package/es/table/style.min.css +1 -0
  77. package/es/toolbar/src/toolbar.js +11 -7
  78. package/es/toolbar/style.css +110 -0
  79. package/es/toolbar/style.min.css +1 -0
  80. package/es/ui/index.js +1 -1
  81. package/es/ui/src/log.js +1 -1
  82. package/es/ui/style.css +0 -0
  83. package/es/ui/style.min.css +0 -0
  84. package/es/v-x-e-table/style.css +0 -0
  85. package/es/v-x-e-table/style.min.css +0 -0
  86. package/es/vxe-colgroup/style.css +0 -0
  87. package/es/vxe-colgroup/style.min.css +0 -0
  88. package/es/vxe-column/style.css +0 -0
  89. package/es/vxe-column/style.min.css +0 -0
  90. package/es/vxe-grid/style.css +86 -0
  91. package/es/vxe-grid/style.min.css +1 -0
  92. package/es/vxe-table/style.css +3887 -0
  93. package/es/vxe-table/style.min.css +1 -0
  94. package/es/vxe-toolbar/style.css +110 -0
  95. package/es/vxe-toolbar/style.min.css +1 -0
  96. package/es/vxe-ui/style.css +0 -0
  97. package/es/vxe-ui/style.min.css +0 -0
  98. package/es/vxe-v-x-e-table/style.css +0 -0
  99. package/es/vxe-v-x-e-table/style.min.css +0 -0
  100. package/lib/colgroup/style/index.js +1 -0
  101. package/lib/colgroup/style/style.css +0 -0
  102. package/lib/colgroup/style/style.min.css +0 -0
  103. package/lib/column/style/index.js +1 -0
  104. package/lib/column/style/style.css +0 -0
  105. package/lib/column/style/style.min.css +0 -0
  106. package/lib/grid/src/grid.js +22 -18
  107. package/lib/grid/src/grid.min.js +1 -1
  108. package/lib/grid/style/index.js +1 -0
  109. package/lib/grid/style/style.css +86 -0
  110. package/lib/grid/style/style.min.css +1 -0
  111. package/lib/iconfont.1770109263422.ttf +0 -0
  112. package/lib/iconfont.1770109263422.woff +0 -0
  113. package/lib/iconfont.1770109263422.woff2 +0 -0
  114. package/lib/index.common.js +22 -0
  115. package/lib/index.css +1 -1
  116. package/lib/index.min.css +1 -1
  117. package/lib/index.umd.js +224 -106
  118. package/lib/index.umd.min.js +1 -1
  119. package/lib/locale/lang/ar-EG.d.ts +2 -0
  120. package/lib/locale/lang/ar-EG.js +6 -0
  121. package/lib/locale/lang/ar-EG.min.js +1 -1
  122. package/lib/locale/lang/ar-EG.umd.js +848 -0
  123. package/lib/locale/lang/de-DE.d.ts +2 -0
  124. package/lib/locale/lang/de-DE.js +6 -0
  125. package/lib/locale/lang/de-DE.min.js +1 -1
  126. package/lib/locale/lang/de-DE.umd.js +848 -0
  127. package/lib/locale/lang/en-US.d.ts +2 -0
  128. package/lib/locale/lang/en-US.js +6 -0
  129. package/lib/locale/lang/en-US.min.js +1 -1
  130. package/lib/locale/lang/en-US.umd.js +848 -0
  131. package/lib/locale/lang/es-ES.d.ts +2 -0
  132. package/lib/locale/lang/es-ES.js +6 -0
  133. package/lib/locale/lang/es-ES.min.js +1 -1
  134. package/lib/locale/lang/es-ES.umd.js +848 -0
  135. package/lib/locale/lang/fr-FR.d.ts +2 -0
  136. package/lib/locale/lang/fr-FR.js +6 -0
  137. package/lib/locale/lang/fr-FR.min.js +1 -1
  138. package/lib/locale/lang/fr-FR.umd.js +848 -0
  139. package/lib/locale/lang/hu-HU.d.ts +2 -0
  140. package/lib/locale/lang/hu-HU.js +6 -0
  141. package/lib/locale/lang/hu-HU.min.js +1 -1
  142. package/lib/locale/lang/hu-HU.umd.js +848 -0
  143. package/lib/locale/lang/hy-AM.d.ts +2 -0
  144. package/lib/locale/lang/hy-AM.js +6 -0
  145. package/lib/locale/lang/hy-AM.min.js +1 -1
  146. package/lib/locale/lang/hy-AM.umd.js +848 -0
  147. package/lib/locale/lang/id-ID.d.ts +2 -0
  148. package/lib/locale/lang/id-ID.js +6 -0
  149. package/lib/locale/lang/id-ID.min.js +1 -1
  150. package/lib/locale/lang/id-ID.umd.js +848 -0
  151. package/lib/locale/lang/it-IT.d.ts +2 -0
  152. package/lib/locale/lang/it-IT.js +6 -0
  153. package/lib/locale/lang/it-IT.min.js +1 -1
  154. package/lib/locale/lang/it-IT.umd.js +848 -0
  155. package/lib/locale/lang/ja-JP.d.ts +2 -0
  156. package/lib/locale/lang/ja-JP.js +6 -0
  157. package/lib/locale/lang/ja-JP.min.js +1 -1
  158. package/lib/locale/lang/ja-JP.umd.js +848 -0
  159. package/lib/locale/lang/ko-KR.d.ts +2 -0
  160. package/lib/locale/lang/ko-KR.js +6 -0
  161. package/lib/locale/lang/ko-KR.min.js +1 -1
  162. package/lib/locale/lang/ko-KR.umd.js +848 -0
  163. package/lib/locale/lang/ms-MY.d.ts +2 -0
  164. package/lib/locale/lang/ms-MY.js +6 -0
  165. package/lib/locale/lang/ms-MY.min.js +1 -1
  166. package/lib/locale/lang/ms-MY.umd.js +848 -0
  167. package/lib/locale/lang/nb-NO.d.ts +2 -0
  168. package/lib/locale/lang/nb-NO.js +6 -0
  169. package/lib/locale/lang/nb-NO.min.js +1 -1
  170. package/lib/locale/lang/nb-NO.umd.js +848 -0
  171. package/lib/locale/lang/pt-BR.d.ts +2 -0
  172. package/lib/locale/lang/pt-BR.js +6 -0
  173. package/lib/locale/lang/pt-BR.min.js +1 -1
  174. package/lib/locale/lang/pt-BR.umd.js +848 -0
  175. package/lib/locale/lang/ru-RU.d.ts +2 -0
  176. package/lib/locale/lang/ru-RU.js +6 -0
  177. package/lib/locale/lang/ru-RU.min.js +1 -1
  178. package/lib/locale/lang/ru-RU.umd.js +848 -0
  179. package/lib/locale/lang/th-TH.d.ts +2 -0
  180. package/lib/locale/lang/th-TH.js +6 -0
  181. package/lib/locale/lang/th-TH.min.js +1 -1
  182. package/lib/locale/lang/th-TH.umd.js +848 -0
  183. package/lib/locale/lang/ug-CN.d.ts +2 -0
  184. package/lib/locale/lang/ug-CN.js +6 -0
  185. package/lib/locale/lang/ug-CN.min.js +1 -1
  186. package/lib/locale/lang/ug-CN.umd.js +848 -0
  187. package/lib/locale/lang/uk-UA.d.ts +2 -0
  188. package/lib/locale/lang/uk-UA.js +6 -0
  189. package/lib/locale/lang/uk-UA.min.js +1 -1
  190. package/lib/locale/lang/uk-UA.umd.js +848 -0
  191. package/lib/locale/lang/uz-UZ.d.ts +2 -0
  192. package/lib/locale/lang/uz-UZ.js +6 -0
  193. package/lib/locale/lang/uz-UZ.min.js +1 -1
  194. package/lib/locale/lang/uz-UZ.umd.js +848 -0
  195. package/lib/locale/lang/vi-VN.d.ts +2 -0
  196. package/lib/locale/lang/vi-VN.js +6 -0
  197. package/lib/locale/lang/vi-VN.min.js +1 -1
  198. package/lib/locale/lang/vi-VN.umd.js +848 -0
  199. package/lib/locale/lang/zh-CHT.d.ts +2 -0
  200. package/lib/locale/lang/zh-CHT.js +6 -0
  201. package/lib/locale/lang/zh-CHT.min.js +1 -1
  202. package/lib/locale/lang/zh-CHT.umd.js +848 -0
  203. package/lib/locale/lang/zh-CN.d.ts +2 -0
  204. package/lib/locale/lang/zh-CN.js +6 -0
  205. package/lib/locale/lang/zh-CN.min.js +1 -1
  206. package/lib/locale/lang/zh-CN.umd.js +848 -0
  207. package/lib/locale/lang/zh-HK.d.ts +2 -0
  208. package/lib/locale/lang/zh-HK.min.js +1 -1
  209. package/lib/locale/lang/zh-HK.umd.js +23 -0
  210. package/lib/locale/lang/zh-MO.d.ts +2 -0
  211. package/lib/locale/lang/zh-MO.min.js +1 -1
  212. package/lib/locale/lang/zh-MO.umd.js +23 -0
  213. package/lib/locale/lang/zh-TW.d.ts +2 -0
  214. package/lib/locale/lang/zh-TW.min.js +1 -1
  215. package/lib/locale/lang/zh-TW.umd.js +23 -0
  216. package/lib/style.css +1 -1
  217. package/lib/style.min.css +1 -1
  218. package/lib/table/module/custom/hook.js +29 -9
  219. package/lib/table/module/custom/hook.min.js +1 -1
  220. package/lib/table/module/custom/panel.js +12 -8
  221. package/lib/table/module/custom/panel.min.js +1 -1
  222. package/lib/table/module/edit/hook.js +3 -3
  223. package/lib/table/module/edit/hook.min.js +1 -1
  224. package/lib/table/module/export/hook.js +18 -6
  225. package/lib/table/module/export/hook.min.js +1 -1
  226. package/lib/table/module/filter/panel.js +14 -3
  227. package/lib/table/module/filter/panel.min.js +1 -1
  228. package/lib/table/module/validator/hook.js +8 -6
  229. package/lib/table/module/validator/hook.min.js +1 -1
  230. package/lib/table/render/index.js +18 -0
  231. package/lib/table/render/index.min.js +1 -1
  232. package/lib/table/src/body.js +13 -4
  233. package/lib/table/src/body.min.js +1 -1
  234. package/lib/table/src/emits.js +1 -1
  235. package/lib/table/src/emits.min.js +1 -1
  236. package/lib/table/src/props.js +2 -0
  237. package/lib/table/src/props.min.js +1 -1
  238. package/lib/table/src/table.js +37 -32
  239. package/lib/table/src/table.min.js +1 -1
  240. package/lib/table/src/util.js +31 -11
  241. package/lib/table/src/util.min.js +1 -1
  242. package/lib/table/style/index.js +1 -0
  243. package/lib/table/style/style.css +3887 -0
  244. package/lib/table/style/style.min.css +1 -0
  245. package/lib/toolbar/src/toolbar.js +10 -6
  246. package/lib/toolbar/src/toolbar.min.js +1 -1
  247. package/lib/toolbar/style/index.js +1 -0
  248. package/lib/toolbar/style/style.css +110 -0
  249. package/lib/toolbar/style/style.min.css +1 -0
  250. package/lib/ui/index.js +1 -1
  251. package/lib/ui/index.min.js +1 -1
  252. package/lib/ui/src/log.js +1 -1
  253. package/lib/ui/src/log.min.js +1 -1
  254. package/lib/ui/style/index.js +1 -0
  255. package/lib/ui/style/style.css +0 -0
  256. package/lib/ui/style/style.min.css +0 -0
  257. package/lib/v-x-e-table/style/index.js +1 -0
  258. package/lib/v-x-e-table/style/style.css +0 -0
  259. package/lib/v-x-e-table/style/style.min.css +0 -0
  260. package/lib/vxe-colgroup/style/index.js +1 -0
  261. package/lib/vxe-colgroup/style/style.css +0 -0
  262. package/lib/vxe-colgroup/style/style.min.css +0 -0
  263. package/lib/vxe-column/style/index.js +1 -0
  264. package/lib/vxe-column/style/style.css +0 -0
  265. package/lib/vxe-column/style/style.min.css +0 -0
  266. package/lib/vxe-grid/style/index.js +1 -0
  267. package/lib/vxe-grid/style/style.css +86 -0
  268. package/lib/vxe-grid/style/style.min.css +1 -0
  269. package/lib/vxe-table/style/index.js +1 -0
  270. package/lib/vxe-table/style/style.css +3887 -0
  271. package/lib/vxe-table/style/style.min.css +1 -0
  272. package/lib/vxe-toolbar/style/index.js +1 -0
  273. package/lib/vxe-toolbar/style/style.css +110 -0
  274. package/lib/vxe-toolbar/style/style.min.css +1 -0
  275. package/lib/vxe-ui/style/index.js +1 -0
  276. package/lib/vxe-ui/style/style.css +0 -0
  277. package/lib/vxe-ui/style/style.min.css +0 -0
  278. package/lib/vxe-v-x-e-table/style/index.js +1 -0
  279. package/lib/vxe-v-x-e-table/style/style.css +0 -0
  280. package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
  281. package/package.json +2 -2
  282. package/packages/grid/src/grid.ts +23 -18
  283. package/packages/locale/lang/ar-EG.ts +6 -0
  284. package/packages/locale/lang/de-DE.ts +6 -0
  285. package/packages/locale/lang/en-US.ts +6 -0
  286. package/packages/locale/lang/es-ES.ts +6 -0
  287. package/packages/locale/lang/fr-FR.ts +6 -0
  288. package/packages/locale/lang/hu-HU.ts +6 -0
  289. package/packages/locale/lang/hy-AM.ts +6 -0
  290. package/packages/locale/lang/id-ID.ts +6 -0
  291. package/packages/locale/lang/it-IT.ts +6 -0
  292. package/packages/locale/lang/ja-JP.ts +6 -0
  293. package/packages/locale/lang/ko-KR.ts +6 -0
  294. package/packages/locale/lang/ms-MY.ts +6 -0
  295. package/packages/locale/lang/nb-NO.ts +6 -0
  296. package/packages/locale/lang/pt-BR.ts +6 -0
  297. package/packages/locale/lang/ru-RU.ts +6 -0
  298. package/packages/locale/lang/th-TH.ts +6 -0
  299. package/packages/locale/lang/ug-CN.ts +6 -0
  300. package/packages/locale/lang/uk-UA.ts +6 -0
  301. package/packages/locale/lang/uz-UZ.ts +6 -0
  302. package/packages/locale/lang/vi-VN.ts +6 -0
  303. package/packages/locale/lang/zh-CHT.ts +6 -0
  304. package/packages/locale/lang/zh-CN.ts +6 -0
  305. package/packages/table/module/custom/hook.ts +24 -9
  306. package/packages/table/module/custom/panel.ts +15 -14
  307. package/packages/table/module/edit/hook.ts +3 -3
  308. package/packages/table/module/export/hook.ts +13 -1
  309. package/packages/table/module/filter/panel.ts +10 -3
  310. package/packages/table/module/validator/hook.ts +7 -6
  311. package/packages/table/render/index.ts +16 -0
  312. package/packages/table/src/body.ts +12 -5
  313. package/packages/table/src/emits.ts +1 -0
  314. package/packages/table/src/props.ts +5 -3
  315. package/packages/table/src/table.ts +235 -53
  316. package/packages/table/src/util.ts +25 -9
  317. package/packages/toolbar/src/toolbar.ts +12 -7
  318. package/styles/components/table-module/custom.scss +3 -0
  319. package/styles/components/table-module/filter.scss +1 -1
  320. package/styles/components/table.scss +8 -2
  321. package/styles/components/toolbar.scss +5 -1
  322. package/styles/theme/base.scss +4 -0
@@ -76,6 +76,7 @@ export function createInternalData() {
76
76
  fullDataRowIdData: {},
77
77
  // 数据集(仅可视)
78
78
  visibleDataRowIdData: {},
79
+ keepUpdateFieldMaps: {},
79
80
  footerFullDataRowData: {},
80
81
  // 渲染中缓存数据
81
82
  sourceDataRowIdData: {},
@@ -131,6 +132,7 @@ export function createInternalData() {
131
132
  }
132
133
  export function createReactData() {
133
134
  return {
135
+ updateColFlag: 0,
134
136
  // 低性能的静态列
135
137
  staticColumns: [],
136
138
  // 渲染的列分组
@@ -200,7 +202,8 @@ export function createReactData() {
200
202
  activeBtn: false,
201
203
  activeWrapper: false,
202
204
  visible: false,
203
- maxHeight: 0,
205
+ maxHeight: null,
206
+ popupTop: 0,
204
207
  oldSortMaps: {},
205
208
  oldFixedMaps: {},
206
209
  oldVisibleMaps: {}
@@ -508,11 +511,18 @@ export function restoreScrollLocation($xeTable, scrollLeft, scrollTop) {
508
511
  }
509
512
  return $xeTable.clearScroll();
510
513
  }
514
+ export function getRowUniqueId() {
515
+ return XEUtils.uniqueId('row_');
516
+ }
511
517
  /**
512
518
  * 生成行的唯一主键
513
519
  */
514
- export function getRowUniqueId() {
515
- return XEUtils.uniqueId('row_');
520
+ export function createRowId(rowOpts, row, keyField) {
521
+ const { createKeyMethod } = rowOpts;
522
+ if (createKeyMethod) {
523
+ return createKeyMethod({ row, keyField });
524
+ }
525
+ return getRowUniqueId();
516
526
  }
517
527
  export function hasDeepKey(rowKey) {
518
528
  return rowKey.indexOf('.') > -1;
@@ -531,11 +541,13 @@ export function getRowid($xeTable, row) {
531
541
  export function createHandleUpdateRowId($xeTable) {
532
542
  const internalData = $xeTable.internalData;
533
543
  const { isCurrDeepKey, currKeyField } = internalData;
544
+ const { computeRowOpts } = $xeTable.getComputeMaps();
545
+ const rowOpts = computeRowOpts.value;
534
546
  const updateRId = isCurrDeepKey ? updateDeepRowKey : updateFastRowKey;
535
547
  return {
536
548
  rowKey: currKeyField,
537
549
  handleUpdateRowId(row) {
538
- return row ? updateRId(row, currKeyField) : '';
550
+ return row ? updateRId(rowOpts, row, currKeyField) : '';
539
551
  }
540
552
  };
541
553
  }
@@ -557,10 +569,11 @@ export function encodeRowid(rowVal) {
557
569
  function getDeepRowIdByKey(row, rowKey) {
558
570
  return XEUtils.get(row, rowKey);
559
571
  }
560
- export function updateDeepRowKey(row, rowKey) {
572
+ function updateDeepRowKey(rowOpts, row, rowKey) {
561
573
  let rowid = encodeRowid(getDeepRowIdByKey(row, rowKey));
562
574
  if (eqEmptyValue(rowid)) {
563
- rowid = getRowUniqueId();
575
+ const newRowid = createRowId(rowOpts, row, rowKey);
576
+ rowid = '' + newRowid;
564
577
  XEUtils.set(row, rowKey, rowid);
565
578
  }
566
579
  return rowid;
@@ -568,11 +581,12 @@ export function updateDeepRowKey(row, rowKey) {
568
581
  function getFastRowIdByKey(row, rowKey) {
569
582
  return row[rowKey];
570
583
  }
571
- export function updateFastRowKey(row, rowKey) {
584
+ function updateFastRowKey(rowOpts, row, rowKey) {
572
585
  let rowid = encodeRowid(getFastRowIdByKey(row, rowKey));
573
586
  if (eqEmptyValue(rowid)) {
574
- rowid = getRowUniqueId();
575
- row[rowKey] = rowid;
587
+ const newRowid = createRowId(rowOpts, row, rowKey);
588
+ rowid = '' + newRowid;
589
+ row[rowKey] = newRowid;
576
590
  }
577
591
  return rowid;
578
592
  }