tomtaw-vxe-table 3.25.13 → 3.25.14

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 (593) hide show
  1. package/es/colgroup/index.d.ts +122 -0
  2. package/es/colgroup/index.js +16 -13
  3. package/es/column/index.d.ts +122 -0
  4. package/es/column/index.js +16 -13
  5. package/es/components.d.ts +12 -0
  6. package/es/components.js +28 -31
  7. package/es/grid/index.d.ts +1252 -0
  8. package/es/grid/index.js +18 -13
  9. package/es/grid/src/grid.d.ts +638 -0
  10. package/es/grid/src/grid.js +1883 -1876
  11. package/es/{vxe-grid/style.min.css → grid/style.mini.css} +1 -1
  12. package/es/index.d.ts +3 -0
  13. package/es/index.esm.js +14 -21
  14. package/es/index.js +15 -0
  15. package/es/locale/lang/ar-EG.d.ts +908 -2
  16. package/es/locale/lang/ar-EG.js +906 -899
  17. package/es/locale/lang/de-DE.d.ts +908 -2
  18. package/es/locale/lang/de-DE.js +906 -899
  19. package/es/locale/lang/en-US.d.ts +908 -2
  20. package/es/locale/lang/en-US.js +906 -899
  21. package/es/locale/lang/es-ES.d.ts +908 -2
  22. package/es/locale/lang/es-ES.js +906 -899
  23. package/es/locale/lang/fr-FR.d.ts +908 -2
  24. package/es/locale/lang/fr-FR.js +906 -899
  25. package/es/locale/lang/hu-HU.d.ts +908 -2
  26. package/es/locale/lang/hu-HU.js +906 -899
  27. package/es/locale/lang/hy-AM.d.ts +908 -2
  28. package/es/locale/lang/hy-AM.js +906 -899
  29. package/es/locale/lang/id-ID.d.ts +908 -2
  30. package/es/locale/lang/id-ID.js +906 -899
  31. package/es/locale/lang/it-IT.d.ts +908 -2
  32. package/es/locale/lang/it-IT.js +906 -899
  33. package/es/locale/lang/ja-JP.d.ts +908 -2
  34. package/es/locale/lang/ja-JP.js +906 -899
  35. package/es/locale/lang/ko-KR.d.ts +908 -2
  36. package/es/locale/lang/ko-KR.js +906 -899
  37. package/es/locale/lang/ms-MY.d.ts +908 -2
  38. package/es/locale/lang/ms-MY.js +906 -899
  39. package/es/locale/lang/nb-NO.d.ts +908 -2
  40. package/es/locale/lang/nb-NO.js +906 -899
  41. package/es/locale/lang/pt-BR.d.ts +908 -2
  42. package/es/locale/lang/pt-BR.js +906 -899
  43. package/es/locale/lang/ru-RU.d.ts +908 -2
  44. package/es/locale/lang/ru-RU.js +906 -899
  45. package/es/locale/lang/th-TH.d.ts +908 -2
  46. package/es/locale/lang/th-TH.js +906 -899
  47. package/es/locale/lang/ug-CN.d.ts +908 -2
  48. package/es/locale/lang/ug-CN.js +906 -899
  49. package/es/locale/lang/uk-UA.d.ts +908 -2
  50. package/es/locale/lang/uk-UA.js +906 -899
  51. package/es/locale/lang/uz-UZ.d.ts +908 -2
  52. package/es/locale/lang/uz-UZ.js +906 -899
  53. package/es/locale/lang/vi-VN.d.ts +908 -2
  54. package/es/locale/lang/vi-VN.js +906 -899
  55. package/es/locale/lang/zh-CHT.d.ts +908 -2
  56. package/es/locale/lang/zh-CHT.js +906 -899
  57. package/es/locale/lang/zh-CN.d.ts +908 -2
  58. package/es/locale/lang/zh-CN.js +906 -899
  59. package/es/locale/lang/zh-HK.d.ts +908 -2
  60. package/es/locale/lang/zh-HK.js +910 -2
  61. package/es/locale/lang/zh-MO.d.ts +908 -2
  62. package/es/locale/lang/zh-MO.js +910 -2
  63. package/es/locale/lang/zh-TC.d.ts +908 -0
  64. package/es/locale/lang/zh-TC.js +910 -2
  65. package/es/locale/lang/zh-TW.d.ts +908 -2
  66. package/es/locale/lang/zh-TW.js +910 -2
  67. package/es/style.css +4499 -1
  68. package/es/style.mini.css +1 -0
  69. package/es/table/index.d.ts +4 -0
  70. package/es/table/index.js +49 -44
  71. package/es/table/module/custom/mixin.d.ts +4 -0
  72. package/es/table/module/custom/mixin.js +476 -487
  73. package/es/table/module/custom/panel.d.ts +57 -0
  74. package/es/table/module/custom/panel.js +1939 -1771
  75. package/es/table/module/edit/mixin.d.ts +2 -0
  76. package/es/table/module/edit/mixin.js +1097 -1110
  77. package/es/table/module/export/export-panel.d.ts +51 -0
  78. package/es/table/module/export/export-panel.js +718 -683
  79. package/es/table/module/export/import-panel.d.ts +39 -0
  80. package/es/table/module/export/import-panel.js +327 -294
  81. package/es/table/module/export/mixin.d.ts +2 -0
  82. package/es/table/module/export/mixin.js +1838 -1860
  83. package/es/table/module/export/util.d.ts +5 -0
  84. package/es/table/module/export/util.js +20 -17
  85. package/es/table/module/filter/mixin.d.ts +4 -0
  86. package/es/table/module/filter/mixin.js +492 -508
  87. package/es/table/module/filter/panel.d.ts +41 -0
  88. package/es/table/module/filter/panel.js +342 -293
  89. package/es/table/module/keyboard/mixin.d.ts +12 -0
  90. package/es/table/module/keyboard/mixin.js +462 -507
  91. package/es/table/module/menu/mixin.d.ts +25 -0
  92. package/es/table/module/menu/mixin.js +302 -320
  93. package/es/table/module/menu/panel.d.ts +22 -0
  94. package/es/table/module/menu/panel.js +246 -197
  95. package/es/table/module/validator/mixin.d.ts +4 -0
  96. package/es/table/module/validator/mixin.js +516 -561
  97. package/es/table/render/index.d.ts +1 -0
  98. package/es/table/render/index.js +1472 -1476
  99. package/es/table/src/body.d.ts +8 -0
  100. package/es/table/src/body.js +950 -886
  101. package/es/table/src/cell.d.ts +148 -0
  102. package/es/table/src/cell.js +1348 -1212
  103. package/es/table/src/column.d.ts +150 -0
  104. package/es/table/src/column.js +202 -199
  105. package/es/table/src/columnInfo.d.ts +12 -0
  106. package/es/table/src/columnInfo.js +210 -205
  107. package/es/table/src/expand-height.d.ts +14 -0
  108. package/es/table/src/expand-height.js +109 -127
  109. package/es/table/src/footer.d.ts +8 -0
  110. package/es/table/src/footer.js +388 -354
  111. package/es/table/src/group.d.ts +59 -0
  112. package/es/table/src/group.js +52 -50
  113. package/es/table/src/header.d.ts +11 -0
  114. package/es/table/src/header.js +611 -564
  115. package/es/table/src/layout-scheduler.d.ts +13 -0
  116. package/es/table/src/layout-scheduler.js +118 -138
  117. package/es/table/src/methods.d.ts +2 -0
  118. package/es/table/src/methods.js +13243 -13956
  119. package/es/table/src/props.d.ts +239 -0
  120. package/es/table/src/props.js +315 -312
  121. package/es/table/src/scroll-sync.d.ts +9 -0
  122. package/es/table/src/scroll-sync.js +57 -65
  123. package/es/table/src/store.d.ts +7 -0
  124. package/es/table/src/store.js +9 -6
  125. package/es/table/src/table.d.ts +2 -0
  126. package/es/table/src/table.js +2729 -2668
  127. package/es/table/src/util.d.ts +70 -0
  128. package/es/table/src/util.js +1018 -1017
  129. package/es/table/style.css +31 -12
  130. package/es/table/style.mini.css +1 -0
  131. package/es/toolbar/index.d.ts +148 -0
  132. package/es/toolbar/index.js +14 -9
  133. package/es/toolbar/src/toolbar.d.ts +81 -0
  134. package/es/toolbar/src/toolbar.js +791 -766
  135. package/es/toolbar/{style.min.css → style.mini.css} +1 -1
  136. package/es/ui/index.d.ts +85 -0
  137. package/es/ui/index.js +460 -503
  138. package/es/ui/src/anime.d.ts +10 -0
  139. package/es/ui/src/anime.js +40 -40
  140. package/es/ui/src/comp.d.ts +2 -0
  141. package/es/ui/src/comp.js +4 -1
  142. package/es/ui/src/dom.d.ts +80 -0
  143. package/es/ui/src/dom.js +373 -378
  144. package/es/ui/src/log.d.ts +6 -0
  145. package/es/ui/src/log.js +18 -13
  146. package/es/ui/src/utils.d.ts +24 -0
  147. package/es/ui/src/utils.js +61 -56
  148. package/es/ui/src/vn.d.ts +7 -0
  149. package/es/ui/src/vn.js +61 -52
  150. package/es/v-x-e-table/index.d.ts +2 -0
  151. package/es/v-x-e-table/index.js +5 -3
  152. package/es/vxe-colgroup/index.d.ts +3 -0
  153. package/es/vxe-colgroup/index.js +6 -3
  154. package/es/vxe-column/index.d.ts +3 -0
  155. package/es/vxe-column/index.js +6 -3
  156. package/es/vxe-grid/index.d.ts +3 -0
  157. package/es/vxe-grid/index.js +6 -3
  158. package/{lib/grid/style/style.min.css → es/vxe-grid/style.mini.css} +1 -1
  159. package/es/vxe-table/index.d.ts +3 -0
  160. package/es/vxe-table/index.js +6 -3
  161. package/es/vxe-table/style.css +31 -12
  162. package/es/vxe-table/style.mini.css +1 -0
  163. package/es/vxe-toolbar/index.d.ts +3 -0
  164. package/es/vxe-toolbar/index.js +6 -3
  165. package/{lib/toolbar/style/style.min.css → es/vxe-toolbar/style.mini.css} +1 -1
  166. package/es/vxe-ui/index.d.ts +3 -0
  167. package/es/vxe-ui/index.js +6 -3
  168. package/lib/colgroup/index.js +44 -18
  169. package/lib/colgroup/style/index.js +1 -1
  170. package/lib/column/index.js +44 -18
  171. package/lib/column/style/index.js +1 -1
  172. package/lib/components.js +55 -92
  173. package/lib/grid/index.js +42 -14
  174. package/lib/grid/src/grid.js +860 -1112
  175. package/lib/grid/style/index.js +1 -1
  176. package/{es/grid/style.min.css → lib/grid/style/style.mini.css} +1 -1
  177. package/lib/index.common.js +43 -19
  178. package/lib/index.js +46 -0
  179. package/lib/index.umd.js +26848 -20027
  180. package/lib/index.umd.min.js +3 -1
  181. package/lib/locale/ar-EG.umd.js +948 -0
  182. package/lib/locale/ar-EG.umd.min.js +1 -0
  183. package/lib/locale/de-DE.umd.js +948 -0
  184. package/lib/locale/de-DE.umd.min.js +1 -0
  185. package/lib/locale/en-US.umd.js +948 -0
  186. package/lib/locale/en-US.umd.min.js +1 -0
  187. package/lib/locale/es-ES.umd.js +948 -0
  188. package/lib/locale/es-ES.umd.min.js +1 -0
  189. package/lib/locale/fr-FR.umd.js +948 -0
  190. package/lib/locale/fr-FR.umd.min.js +1 -0
  191. package/lib/locale/hu-HU.umd.js +948 -0
  192. package/lib/locale/hu-HU.umd.min.js +1 -0
  193. package/lib/locale/hy-AM.umd.js +948 -0
  194. package/lib/locale/hy-AM.umd.min.js +1 -0
  195. package/lib/locale/id-ID.umd.js +948 -0
  196. package/lib/locale/id-ID.umd.min.js +1 -0
  197. package/lib/locale/it-IT.umd.js +948 -0
  198. package/lib/locale/it-IT.umd.min.js +1 -0
  199. package/lib/locale/ja-JP.umd.js +948 -0
  200. package/lib/locale/ja-JP.umd.min.js +1 -0
  201. package/lib/locale/ko-KR.umd.js +948 -0
  202. package/lib/locale/ko-KR.umd.min.js +1 -0
  203. package/lib/locale/lang/ar-EG.js +683 -662
  204. package/lib/locale/lang/ar-EG.umd.js +913 -888
  205. package/lib/locale/lang/ar-EG.umd.min.js +1 -0
  206. package/lib/locale/lang/de-DE.js +683 -662
  207. package/lib/locale/lang/de-DE.umd.js +913 -888
  208. package/lib/locale/lang/de-DE.umd.min.js +1 -0
  209. package/lib/locale/lang/en-US.js +680 -659
  210. package/lib/locale/lang/en-US.umd.js +913 -888
  211. package/lib/locale/lang/en-US.umd.min.js +1 -0
  212. package/lib/locale/lang/es-ES.js +683 -662
  213. package/lib/locale/lang/es-ES.umd.js +913 -888
  214. package/lib/locale/lang/es-ES.umd.min.js +1 -0
  215. package/lib/locale/lang/fr-FR.js +656 -635
  216. package/lib/locale/lang/fr-FR.umd.js +913 -888
  217. package/lib/locale/lang/fr-FR.umd.min.js +1 -0
  218. package/lib/locale/lang/hu-HU.js +683 -662
  219. package/lib/locale/lang/hu-HU.umd.js +913 -888
  220. package/lib/locale/lang/hu-HU.umd.min.js +1 -0
  221. package/lib/locale/lang/hy-AM.js +683 -662
  222. package/lib/locale/lang/hy-AM.umd.js +913 -888
  223. package/lib/locale/lang/hy-AM.umd.min.js +1 -0
  224. package/lib/locale/lang/id-ID.js +683 -662
  225. package/lib/locale/lang/id-ID.umd.js +913 -888
  226. package/lib/locale/lang/id-ID.umd.min.js +1 -0
  227. package/lib/locale/lang/it-IT.js +663 -642
  228. package/lib/locale/lang/it-IT.umd.js +912 -887
  229. package/lib/locale/lang/it-IT.umd.min.js +1 -0
  230. package/lib/locale/lang/ja-JP.js +712 -691
  231. package/lib/locale/lang/ja-JP.umd.js +913 -888
  232. package/lib/locale/lang/ja-JP.umd.min.js +1 -0
  233. package/lib/locale/lang/ko-KR.js +683 -662
  234. package/lib/locale/lang/ko-KR.umd.js +913 -888
  235. package/lib/locale/lang/ko-KR.umd.min.js +1 -0
  236. package/lib/locale/lang/ms-MY.js +683 -662
  237. package/lib/locale/lang/ms-MY.umd.js +913 -888
  238. package/lib/locale/lang/ms-MY.umd.min.js +1 -0
  239. package/lib/locale/lang/nb-NO.js +683 -662
  240. package/lib/locale/lang/nb-NO.umd.js +913 -888
  241. package/lib/locale/lang/nb-NO.umd.min.js +1 -0
  242. package/lib/locale/lang/pt-BR.js +683 -662
  243. package/lib/locale/lang/pt-BR.umd.js +913 -888
  244. package/lib/locale/lang/pt-BR.umd.min.js +1 -0
  245. package/lib/locale/lang/ru-RU.js +692 -671
  246. package/lib/locale/lang/ru-RU.umd.js +913 -888
  247. package/lib/locale/lang/ru-RU.umd.min.js +1 -0
  248. package/lib/locale/lang/th-TH.js +683 -662
  249. package/lib/locale/lang/th-TH.umd.js +913 -888
  250. package/lib/locale/lang/th-TH.umd.min.js +1 -0
  251. package/lib/locale/lang/ug-CN.js +683 -662
  252. package/lib/locale/lang/ug-CN.umd.js +913 -888
  253. package/lib/locale/lang/ug-CN.umd.min.js +1 -0
  254. package/lib/locale/lang/uk-UA.js +676 -655
  255. package/lib/locale/lang/uk-UA.umd.js +913 -888
  256. package/lib/locale/lang/uk-UA.umd.min.js +1 -0
  257. package/lib/locale/lang/uz-UZ.js +585 -564
  258. package/lib/locale/lang/uz-UZ.umd.js +908 -883
  259. package/lib/locale/lang/uz-UZ.umd.min.js +1 -0
  260. package/lib/locale/lang/vi-VN.js +683 -662
  261. package/lib/locale/lang/vi-VN.umd.js +913 -888
  262. package/lib/locale/lang/vi-VN.umd.min.js +1 -0
  263. package/lib/locale/lang/zh-CHT.js +683 -662
  264. package/lib/locale/lang/zh-CHT.umd.js +913 -888
  265. package/lib/locale/lang/zh-CHT.umd.min.js +1 -0
  266. package/lib/locale/lang/zh-CN.js +683 -662
  267. package/lib/locale/lang/zh-CN.umd.js +913 -888
  268. package/lib/locale/lang/zh-CN.umd.min.js +1 -0
  269. package/lib/locale/lang/zh-HK.js +928 -7
  270. package/lib/locale/lang/zh-HK.umd.js +945 -20
  271. package/lib/locale/lang/zh-HK.umd.min.js +1 -0
  272. package/lib/locale/lang/zh-MO.js +928 -7
  273. package/lib/locale/lang/zh-MO.umd.js +945 -20
  274. package/lib/locale/lang/zh-MO.umd.min.js +1 -0
  275. package/lib/locale/lang/zh-TC.js +928 -7
  276. package/lib/locale/lang/zh-TC.umd.js +948 -0
  277. package/lib/locale/lang/zh-TC.umd.min.js +1 -0
  278. package/lib/locale/lang/zh-TW.js +928 -7
  279. package/lib/locale/lang/zh-TW.umd.js +945 -20
  280. package/lib/locale/lang/zh-TW.umd.min.js +1 -0
  281. package/lib/locale/ms-MY.umd.js +948 -0
  282. package/lib/locale/ms-MY.umd.min.js +1 -0
  283. package/lib/locale/nb-NO.umd.js +948 -0
  284. package/lib/locale/nb-NO.umd.min.js +1 -0
  285. package/lib/locale/pt-BR.umd.js +948 -0
  286. package/lib/locale/pt-BR.umd.min.js +1 -0
  287. package/lib/locale/ru-RU.umd.js +948 -0
  288. package/lib/locale/ru-RU.umd.min.js +1 -0
  289. package/lib/locale/th-TH.umd.js +948 -0
  290. package/lib/locale/th-TH.umd.min.js +1 -0
  291. package/lib/locale/ug-CN.umd.js +948 -0
  292. package/lib/locale/ug-CN.umd.min.js +1 -0
  293. package/lib/locale/uk-UA.umd.js +948 -0
  294. package/lib/locale/uk-UA.umd.min.js +1 -0
  295. package/lib/locale/uz-UZ.umd.js +948 -0
  296. package/lib/locale/uz-UZ.umd.min.js +1 -0
  297. package/lib/locale/vi-VN.umd.js +948 -0
  298. package/lib/locale/vi-VN.umd.min.js +1 -0
  299. package/lib/locale/zh-CHT.umd.js +948 -0
  300. package/lib/locale/zh-CHT.umd.min.js +1 -0
  301. package/lib/locale/zh-CN.umd.js +948 -0
  302. package/lib/locale/zh-CN.umd.min.js +1 -0
  303. package/lib/locale/zh-HK.umd.js +948 -0
  304. package/lib/locale/zh-HK.umd.min.js +1 -0
  305. package/lib/locale/zh-MO.umd.js +948 -0
  306. package/lib/locale/zh-MO.umd.min.js +1 -0
  307. package/lib/locale/zh-TC.umd.js +948 -0
  308. package/lib/locale/zh-TC.umd.min.js +1 -0
  309. package/lib/locale/zh-TW.umd.js +948 -0
  310. package/lib/locale/zh-TW.umd.min.js +1 -0
  311. package/lib/style.css +4499 -1
  312. package/lib/style.mini.css +1 -0
  313. package/lib/table/index.js +60 -32
  314. package/lib/table/module/custom/mixin.js +166 -262
  315. package/lib/table/module/custom/panel.js +1277 -1076
  316. package/lib/table/module/edit/mixin.js +347 -645
  317. package/lib/table/module/export/export-panel.js +526 -399
  318. package/lib/table/module/export/import-panel.js +210 -141
  319. package/lib/table/module/export/mixin.js +898 -1253
  320. package/lib/table/module/export/util.js +37 -14
  321. package/lib/table/module/filter/mixin.js +110 -196
  322. package/lib/table/module/filter/panel.js +229 -186
  323. package/lib/table/module/keyboard/mixin.js +104 -153
  324. package/lib/table/module/menu/mixin.js +89 -151
  325. package/lib/table/module/menu/panel.js +243 -140
  326. package/lib/table/module/validator/mixin.js +188 -278
  327. package/lib/table/render/index.js +777 -1230
  328. package/lib/table/src/body.js +542 -556
  329. package/lib/table/src/cell.js +783 -933
  330. package/lib/table/src/column.js +49 -23
  331. package/lib/table/src/columnInfo.js +86 -104
  332. package/lib/table/src/expand-height.js +43 -47
  333. package/lib/table/src/footer.js +231 -234
  334. package/lib/table/src/group.js +45 -23
  335. package/lib/table/src/header.js +352 -357
  336. package/lib/table/src/layout-scheduler.js +44 -48
  337. package/lib/table/src/methods.js +13656 -945
  338. package/lib/table/src/props.js +33 -36
  339. package/lib/table/src/scroll-sync.js +28 -17
  340. package/lib/table/src/store.js +24 -8
  341. package/lib/table/src/table.js +1217 -1302
  342. package/lib/table/src/util.js +218 -304
  343. package/lib/table/style/index.js +1 -1
  344. package/lib/table/style/style.css +31 -12
  345. package/lib/table/style/style.mini.css +1 -0
  346. package/lib/toolbar/index.js +42 -14
  347. package/lib/toolbar/src/toolbar.js +302 -357
  348. package/lib/toolbar/style/index.js +1 -1
  349. package/lib/{vxe-toolbar/style/style.min.css → toolbar/style/style.mini.css} +1 -1
  350. package/lib/ui/index.js +152 -194
  351. package/lib/ui/src/anime.js +49 -29
  352. package/lib/ui/src/comp.js +22 -6
  353. package/lib/ui/src/dom.js +126 -158
  354. package/lib/ui/src/log.js +34 -18
  355. package/lib/ui/src/utils.js +59 -47
  356. package/lib/ui/src/vn.js +72 -45
  357. package/lib/ui/style/index.js +1 -1
  358. package/lib/v-x-e-table/index.js +33 -20
  359. package/lib/vxe-colgroup/index.js +35 -20
  360. package/lib/vxe-colgroup/style/index.js +1 -1
  361. package/lib/vxe-column/index.js +35 -20
  362. package/lib/vxe-column/style/index.js +1 -1
  363. package/lib/vxe-grid/index.js +35 -20
  364. package/lib/vxe-grid/style/index.js +1 -1
  365. package/lib/vxe-grid/style/{style.min.css → style.mini.css} +1 -1
  366. package/lib/vxe-table/index.js +35 -20
  367. package/lib/vxe-table/style/index.js +1 -1
  368. package/lib/vxe-table/style/style.css +31 -12
  369. package/lib/vxe-table/style/style.mini.css +1 -0
  370. package/lib/vxe-toolbar/index.js +35 -20
  371. package/lib/vxe-toolbar/style/index.js +1 -1
  372. package/{es/vxe-toolbar/style.min.css → lib/vxe-toolbar/style/style.mini.css} +1 -1
  373. package/lib/vxe-ui/index.js +35 -20
  374. package/lib/vxe-ui/style/index.js +1 -1
  375. package/package.json +21 -6
  376. package/packages/colgroup/index.ts +2 -2
  377. package/packages/column/index.ts +2 -2
  378. package/packages/components.ts +12 -10
  379. package/packages/grid/index.ts +2 -2
  380. package/packages/grid/src/grid.ts +437 -351
  381. package/packages/index.ts +11 -0
  382. package/packages/locale/lang/ar-EG.ts +4 -0
  383. package/packages/locale/lang/de-DE.ts +4 -0
  384. package/packages/locale/lang/en-US.ts +4 -0
  385. package/packages/locale/lang/es-ES.ts +4 -0
  386. package/packages/locale/lang/fr-FR.ts +22 -18
  387. package/packages/locale/lang/hu-HU.ts +4 -0
  388. package/packages/locale/lang/hy-AM.ts +4 -0
  389. package/packages/locale/lang/id-ID.ts +4 -0
  390. package/packages/locale/lang/it-IT.ts +8 -4
  391. package/packages/locale/lang/ja-JP.ts +4 -0
  392. package/packages/locale/lang/ko-KR.ts +4 -0
  393. package/packages/locale/lang/ms-MY.ts +4 -0
  394. package/packages/locale/lang/nb-NO.ts +4 -0
  395. package/packages/locale/lang/pt-BR.ts +4 -0
  396. package/packages/locale/lang/ru-RU.ts +4 -0
  397. package/packages/locale/lang/th-TH.ts +4 -0
  398. package/packages/locale/lang/ug-CN.ts +4 -0
  399. package/packages/locale/lang/uk-UA.ts +5 -1
  400. package/packages/locale/lang/uz-UZ.ts +17 -13
  401. package/packages/locale/lang/vi-VN.ts +4 -0
  402. package/packages/locale/lang/zh-CHT.ts +4 -0
  403. package/packages/locale/lang/zh-CN.ts +4 -0
  404. package/packages/locale/lang/zh-HK.ts +907 -3
  405. package/packages/locale/lang/zh-MO.ts +907 -3
  406. package/packages/locale/lang/zh-TC.ts +907 -3
  407. package/packages/locale/lang/zh-TW.ts +907 -3
  408. package/packages/table/index.ts +6 -6
  409. package/packages/table/module/custom/mixin.ts +73 -66
  410. package/packages/table/module/custom/panel.ts +1176 -925
  411. package/packages/table/module/edit/mixin.ts +253 -173
  412. package/packages/table/module/export/export-panel.ts +541 -461
  413. package/packages/table/module/export/import-panel.ts +179 -136
  414. package/packages/table/module/export/mixin.ts +725 -633
  415. package/packages/table/module/export/util.ts +4 -3
  416. package/packages/table/module/filter/mixin.ts +58 -54
  417. package/packages/table/module/filter/panel.ts +176 -122
  418. package/packages/table/module/keyboard/mixin.ts +35 -31
  419. package/packages/table/module/menu/mixin.ts +12 -12
  420. package/packages/table/module/menu/panel.ts +225 -158
  421. package/packages/table/module/validator/mixin.ts +179 -162
  422. package/packages/table/render/index.ts +362 -285
  423. package/packages/table/src/body.ts +383 -284
  424. package/packages/table/src/cell.ts +579 -410
  425. package/packages/table/src/column.ts +6 -6
  426. package/packages/table/src/columnInfo.ts +7 -7
  427. package/packages/table/src/expand-height.ts +27 -26
  428. package/packages/table/src/footer.ts +172 -127
  429. package/packages/table/src/group.ts +5 -5
  430. package/packages/table/src/header.ts +275 -211
  431. package/packages/table/src/layout-scheduler.ts +7 -9
  432. package/packages/table/src/methods.ts +2132 -1809
  433. package/packages/table/src/props.ts +1 -1
  434. package/packages/table/src/scroll-sync.ts +5 -5
  435. package/packages/table/src/store.ts +1 -1
  436. package/packages/table/src/table.ts +1062 -871
  437. package/packages/table/src/util.ts +58 -71
  438. package/packages/toolbar/index.ts +2 -2
  439. package/packages/toolbar/src/toolbar.ts +245 -191
  440. package/packages/ui/index.ts +9 -36
  441. package/packages/ui/src/anime.ts +10 -11
  442. package/packages/ui/src/dom.ts +52 -49
  443. package/packages/ui/src/log.ts +2 -2
  444. package/packages/ui/src/utils.ts +13 -13
  445. package/packages/ui/src/vn.ts +8 -7
  446. package/packages/v-x-e-table/index.ts +0 -1
  447. package/styles/components/table-module/filter.scss +26 -13
  448. package/styles/components/table.scss +6 -0
  449. package/styles/theme/base.scss +1 -0
  450. package/types/all.d.ts +1 -1
  451. package/es/index.css +0 -1
  452. package/es/index.min.css +0 -1
  453. package/es/style.min.css +0 -1
  454. package/es/table/style.min.css +0 -1
  455. package/es/vxe-table/style.min.css +0 -1
  456. package/es/vxe-v-x-e-table/index.js +0 -3
  457. package/lib/colgroup/index.min.js +0 -1
  458. package/lib/column/index.min.js +0 -1
  459. package/lib/components.min.js +0 -1
  460. package/lib/grid/index.min.js +0 -1
  461. package/lib/grid/src/grid.min.js +0 -1
  462. package/lib/index.css +0 -1
  463. package/lib/index.min.css +0 -1
  464. package/lib/locale/lang/ar-EG.d.ts +0 -2
  465. package/lib/locale/lang/ar-EG.min.js +0 -1
  466. package/lib/locale/lang/de-DE.d.ts +0 -2
  467. package/lib/locale/lang/de-DE.min.js +0 -1
  468. package/lib/locale/lang/en-US.d.ts +0 -2
  469. package/lib/locale/lang/en-US.min.js +0 -1
  470. package/lib/locale/lang/es-ES.d.ts +0 -2
  471. package/lib/locale/lang/es-ES.min.js +0 -1
  472. package/lib/locale/lang/fr-FR.d.ts +0 -2
  473. package/lib/locale/lang/fr-FR.min.js +0 -1
  474. package/lib/locale/lang/hu-HU.d.ts +0 -2
  475. package/lib/locale/lang/hu-HU.min.js +0 -1
  476. package/lib/locale/lang/hy-AM.d.ts +0 -2
  477. package/lib/locale/lang/hy-AM.min.js +0 -1
  478. package/lib/locale/lang/id-ID.d.ts +0 -2
  479. package/lib/locale/lang/id-ID.min.js +0 -1
  480. package/lib/locale/lang/it-IT.d.ts +0 -2
  481. package/lib/locale/lang/it-IT.min.js +0 -1
  482. package/lib/locale/lang/ja-JP.d.ts +0 -2
  483. package/lib/locale/lang/ja-JP.min.js +0 -1
  484. package/lib/locale/lang/ko-KR.d.ts +0 -2
  485. package/lib/locale/lang/ko-KR.min.js +0 -1
  486. package/lib/locale/lang/ms-MY.d.ts +0 -2
  487. package/lib/locale/lang/ms-MY.min.js +0 -1
  488. package/lib/locale/lang/nb-NO.d.ts +0 -2
  489. package/lib/locale/lang/nb-NO.min.js +0 -1
  490. package/lib/locale/lang/pt-BR.d.ts +0 -2
  491. package/lib/locale/lang/pt-BR.min.js +0 -1
  492. package/lib/locale/lang/ru-RU.d.ts +0 -2
  493. package/lib/locale/lang/ru-RU.min.js +0 -1
  494. package/lib/locale/lang/th-TH.d.ts +0 -2
  495. package/lib/locale/lang/th-TH.min.js +0 -1
  496. package/lib/locale/lang/ug-CN.d.ts +0 -2
  497. package/lib/locale/lang/ug-CN.min.js +0 -1
  498. package/lib/locale/lang/uk-UA.d.ts +0 -2
  499. package/lib/locale/lang/uk-UA.min.js +0 -1
  500. package/lib/locale/lang/uz-UZ.d.ts +0 -2
  501. package/lib/locale/lang/uz-UZ.min.js +0 -1
  502. package/lib/locale/lang/vi-VN.d.ts +0 -2
  503. package/lib/locale/lang/vi-VN.min.js +0 -1
  504. package/lib/locale/lang/zh-CHT.d.ts +0 -2
  505. package/lib/locale/lang/zh-CHT.min.js +0 -1
  506. package/lib/locale/lang/zh-CN.d.ts +0 -2
  507. package/lib/locale/lang/zh-CN.min.js +0 -1
  508. package/lib/locale/lang/zh-HK.d.ts +0 -2
  509. package/lib/locale/lang/zh-HK.min.js +0 -1
  510. package/lib/locale/lang/zh-MO.d.ts +0 -2
  511. package/lib/locale/lang/zh-MO.min.js +0 -1
  512. package/lib/locale/lang/zh-TC.min.js +0 -1
  513. package/lib/locale/lang/zh-TW.d.ts +0 -2
  514. package/lib/locale/lang/zh-TW.min.js +0 -1
  515. package/lib/style.min.css +0 -1
  516. package/lib/table/index.min.js +0 -1
  517. package/lib/table/module/custom/mixin.min.js +0 -1
  518. package/lib/table/module/custom/panel.min.js +0 -1
  519. package/lib/table/module/edit/mixin.min.js +0 -1
  520. package/lib/table/module/export/export-panel.min.js +0 -1
  521. package/lib/table/module/export/import-panel.min.js +0 -1
  522. package/lib/table/module/export/mixin.min.js +0 -1
  523. package/lib/table/module/export/util.min.js +0 -1
  524. package/lib/table/module/filter/mixin.min.js +0 -1
  525. package/lib/table/module/filter/panel.min.js +0 -1
  526. package/lib/table/module/keyboard/mixin.min.js +0 -1
  527. package/lib/table/module/menu/mixin.min.js +0 -1
  528. package/lib/table/module/menu/panel.min.js +0 -1
  529. package/lib/table/module/validator/mixin.min.js +0 -1
  530. package/lib/table/render/index.min.js +0 -1
  531. package/lib/table/src/body.min.js +0 -1
  532. package/lib/table/src/cell.min.js +0 -1
  533. package/lib/table/src/column.min.js +0 -1
  534. package/lib/table/src/columnInfo.min.js +0 -1
  535. package/lib/table/src/expand-height.min.js +0 -1
  536. package/lib/table/src/footer.min.js +0 -1
  537. package/lib/table/src/group.min.js +0 -1
  538. package/lib/table/src/header.min.js +0 -1
  539. package/lib/table/src/layout-scheduler.min.js +0 -1
  540. package/lib/table/src/methods.min.js +0 -1
  541. package/lib/table/src/props.min.js +0 -1
  542. package/lib/table/src/scroll-sync.min.js +0 -1
  543. package/lib/table/src/store.min.js +0 -1
  544. package/lib/table/src/table.min.js +0 -1
  545. package/lib/table/src/util.min.js +0 -1
  546. package/lib/table/style/style.min.css +0 -1
  547. package/lib/toolbar/index.min.js +0 -1
  548. package/lib/toolbar/src/toolbar.min.js +0 -1
  549. package/lib/ui/index.min.js +0 -1
  550. package/lib/ui/src/anime.min.js +0 -1
  551. package/lib/ui/src/comp.min.js +0 -1
  552. package/lib/ui/src/dom.min.js +0 -1
  553. package/lib/ui/src/log.min.js +0 -1
  554. package/lib/ui/src/utils.min.js +0 -1
  555. package/lib/ui/src/vn.min.js +0 -1
  556. package/lib/ui/style/style.min.css +0 -0
  557. package/lib/v-x-e-table/index.min.js +0 -1
  558. package/lib/v-x-e-table/style/index.js +0 -1
  559. package/lib/v-x-e-table/style/style.css +0 -0
  560. package/lib/v-x-e-table/style/style.min.css +0 -0
  561. package/lib/vxe-colgroup/index.min.js +0 -1
  562. package/lib/vxe-colgroup/style/style.min.css +0 -0
  563. package/lib/vxe-column/index.min.js +0 -1
  564. package/lib/vxe-column/style/style.min.css +0 -0
  565. package/lib/vxe-grid/index.min.js +0 -1
  566. package/lib/vxe-table/index.min.js +0 -1
  567. package/lib/vxe-table/style/style.min.css +0 -1
  568. package/lib/vxe-toolbar/index.min.js +0 -1
  569. package/lib/vxe-ui/index.min.js +0 -1
  570. package/lib/vxe-ui/style/style.min.css +0 -0
  571. package/lib/vxe-v-x-e-table/index.js +0 -22
  572. package/lib/vxe-v-x-e-table/index.min.js +0 -1
  573. package/lib/vxe-v-x-e-table/style/index.js +0 -1
  574. package/lib/vxe-v-x-e-table/style/style.css +0 -0
  575. package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
  576. /package/es/colgroup/{style.min.css → style.mini.css} +0 -0
  577. /package/es/column/{style.min.css → style.mini.css} +0 -0
  578. /package/es/{iconfont.1792648484860.ttf → iconfont.1793178568083.ttf} +0 -0
  579. /package/es/{iconfont.1792648484860.woff → iconfont.1793178568083.woff} +0 -0
  580. /package/es/{iconfont.1792648484860.woff2 → iconfont.1793178568083.woff2} +0 -0
  581. /package/es/ui/{style.min.css → style.mini.css} +0 -0
  582. /package/es/{v-x-e-table/style.css → vxe-colgroup/style.mini.css} +0 -0
  583. /package/es/{v-x-e-table/style.min.css → vxe-column/style.mini.css} +0 -0
  584. /package/es/{vxe-colgroup/style.min.css → vxe-ui/style.mini.css} +0 -0
  585. /package/{es/vxe-column/style.min.css → lib/colgroup/style/style.mini.css} +0 -0
  586. /package/{es/vxe-ui/style.min.css → lib/column/style/style.mini.css} +0 -0
  587. /package/lib/{iconfont.1792648484860.ttf → iconfont.1793178568083.ttf} +0 -0
  588. /package/lib/{iconfont.1792648484860.woff → iconfont.1793178568083.woff} +0 -0
  589. /package/lib/{iconfont.1792648484860.woff2 → iconfont.1793178568083.woff2} +0 -0
  590. /package/{es/vxe-v-x-e-table/style.css → lib/ui/style/style.mini.css} +0 -0
  591. /package/{es/vxe-v-x-e-table/style.min.css → lib/vxe-colgroup/style/style.mini.css} +0 -0
  592. /package/lib/{colgroup/style/style.min.css → vxe-column/style/style.mini.css} +0 -0
  593. /package/lib/{column/style/style.min.css → vxe-ui/style/style.mini.css} +0 -0
@@ -1,527 +1,482 @@
1
- import XEUtils from 'xe-utils';
2
- import { getRefElem } from '../../src/util';
3
- import { getAbsolutePos, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
4
- import { hasEnableConf } from '../../../ui/src/utils';
1
+ import XEUtils from "xe-utils";
2
+ import { getRefElem } from "../../src/util";
3
+ import { getAbsolutePos, addClass, removeClass, hasControlKey } from "../../../ui/src/dom";
4
+ import { hasEnableConf } from "../../../ui/src/utils";
5
5
  function getCheckboxRangeRows($xeTable, evnt, params, targetTrElem, trRect, offsetClientTop, moveRange) {
6
- const props = $xeTable;
7
- const reactData = $xeTable;
8
- const internalData = $xeTable;
9
- const { showOverflow } = props;
10
- const { fullAllDataRowIdData, isResizeCellHeight } = internalData;
11
- const rowOpts = $xeTable.computeRowOpts;
12
- const cellOpts = $xeTable.computeCellOpts;
13
- const defaultRowHeight = $xeTable.computeDefaultRowHeight;
14
- const { row } = params;
15
- let countHeight = 0;
16
- let rangeRows = [];
17
- let moveSize = 0;
18
- const isDown = moveRange > 0;
19
- const { scrollYLoad } = reactData;
20
- const { afterFullData } = internalData;
21
- if (isDown) {
22
- moveSize = offsetClientTop + moveRange;
23
- }
24
- else {
25
- moveSize = (trRect.height - offsetClientTop) + Math.abs(moveRange);
26
- }
27
- if (scrollYLoad) {
28
- const _rowIndex = $xeTable.getVTRowIndex(row);
29
- const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
30
- if (!isCustomCellHeight && showOverflow) {
31
- if (isDown) {
32
- rangeRows = afterFullData.slice(_rowIndex, _rowIndex + Math.ceil(moveSize / defaultRowHeight));
33
- }
34
- else {
35
- rangeRows = afterFullData.slice(_rowIndex - Math.floor(moveSize / defaultRowHeight), _rowIndex + 1);
36
- }
6
+ const props = $xeTable;
7
+ const reactData = $xeTable;
8
+ const internalData = $xeTable;
9
+ const { showOverflow } = props;
10
+ const { fullAllDataRowIdData, isResizeCellHeight } = internalData;
11
+ const rowOpts = $xeTable.computeRowOpts;
12
+ const cellOpts = $xeTable.computeCellOpts;
13
+ const defaultRowHeight = $xeTable.computeDefaultRowHeight;
14
+ const { row } = params;
15
+ let countHeight = 0;
16
+ let rangeRows = [];
17
+ let moveSize = 0;
18
+ const isDown = moveRange > 0;
19
+ const { scrollYLoad } = reactData;
20
+ const { afterFullData } = internalData;
21
+ if (isDown) {
22
+ moveSize = offsetClientTop + moveRange;
23
+ } else {
24
+ moveSize = trRect.height - offsetClientTop + Math.abs(moveRange);
25
+ }
26
+ if (scrollYLoad) {
27
+ const _rowIndex = $xeTable.getVTRowIndex(row);
28
+ const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
29
+ if (!isCustomCellHeight && showOverflow) {
30
+ if (isDown) {
31
+ rangeRows = afterFullData.slice(_rowIndex, _rowIndex + Math.ceil(moveSize / defaultRowHeight));
32
+ } else {
33
+ rangeRows = afterFullData.slice(_rowIndex - Math.floor(moveSize / defaultRowHeight), _rowIndex + 1);
34
+ }
35
+ } else {
36
+ if (isDown) {
37
+ for (let i = _rowIndex; i < afterFullData.length; i++) {
38
+ const item = afterFullData[i];
39
+ const rowid = $xeTable.getRowid(item);
40
+ const rowRest = fullAllDataRowIdData[rowid] || {};
41
+ countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
42
+ rangeRows.push(item);
43
+ if (countHeight > moveSize) {
44
+ return rangeRows;
45
+ }
37
46
  }
38
- else {
39
- if (isDown) {
40
- for (let i = _rowIndex; i < afterFullData.length; i++) {
41
- const item = afterFullData[i];
42
- const rowid = $xeTable.getRowid(item);
43
- const rowRest = fullAllDataRowIdData[rowid] || {};
44
- countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
45
- rangeRows.push(item);
46
- if (countHeight > moveSize) {
47
- return rangeRows;
48
- }
49
- }
50
- }
51
- else {
52
- for (let len = _rowIndex; len >= 0; len--) {
53
- const item = afterFullData[len];
54
- const rowid = $xeTable.getRowid(item);
55
- const rowRest = fullAllDataRowIdData[rowid] || {};
56
- countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
57
- rangeRows.push(item);
58
- if (countHeight > moveSize) {
59
- return rangeRows;
60
- }
61
- }
62
- }
47
+ } else {
48
+ for (let len = _rowIndex; len >= 0; len--) {
49
+ const item = afterFullData[len];
50
+ const rowid = $xeTable.getRowid(item);
51
+ const rowRest = fullAllDataRowIdData[rowid] || {};
52
+ countHeight += rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
53
+ rangeRows.push(item);
54
+ if (countHeight > moveSize) {
55
+ return rangeRows;
56
+ }
63
57
  }
58
+ }
64
59
  }
65
- else {
66
- const siblingProp = isDown ? 'next' : 'previous';
67
- while (targetTrElem && countHeight < moveSize) {
68
- const rowNodeRest = $xeTable.getRowNode(targetTrElem);
69
- if (rowNodeRest) {
70
- rangeRows.push(rowNodeRest.item);
71
- countHeight += targetTrElem.offsetHeight;
72
- targetTrElem = targetTrElem[`${siblingProp}ElementSibling`];
73
- }
74
- }
60
+ } else {
61
+ const siblingProp = isDown ? "next" : "previous";
62
+ while (targetTrElem && countHeight < moveSize) {
63
+ const rowNodeRest = $xeTable.getRowNode(targetTrElem);
64
+ if (rowNodeRest) {
65
+ rangeRows.push(rowNodeRest.item);
66
+ countHeight += targetTrElem.offsetHeight;
67
+ targetTrElem = targetTrElem[`${siblingProp}ElementSibling`];
68
+ }
75
69
  }
76
- return rangeRows;
70
+ }
71
+ return rangeRows;
77
72
  }
78
73
  function handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow) {
79
- const internalData = $xeTable;
80
- const { afterFullData, visibleColumn } = internalData;
81
- const params = Object.assign({}, args);
82
- const { row, column } = params;
83
- const _rowIndex = $xeTable.getVTRowIndex(row);
84
- const _columnIndex = $xeTable.getVTColumnIndex(column);
85
- const refTableBody = $xeTable.$refs.refTableBody;
86
- const tableBodyElem = refTableBody ? refTableBody.$el : null;
87
- const tableWidth = tableBodyElem ? tableBodyElem.clientWidth : 0;
88
- let colAlign = isLeftArrow || isRightArrow || (column.renderWidth < tableWidth);
89
- if ((isLeftArrow && _columnIndex >= 0) || (isRightArrow && _columnIndex <= visibleColumn.length - 1)) {
90
- colAlign = false;
91
- }
92
- else {
93
- evnt.preventDefault();
94
- }
95
- if (isUpArrow && _rowIndex > 0) {
96
- // 移动到上一行
97
- params.rowIndex = _rowIndex - 1;
98
- params.row = afterFullData[params.rowIndex];
99
- }
100
- else if (isDwArrow && _rowIndex < afterFullData.length - 1) {
101
- // 移动到下一行
102
- params.rowIndex = _rowIndex + 1;
103
- params.row = afterFullData[params.rowIndex];
104
- }
105
- else if (isLeftArrow && _columnIndex) {
106
- // 移动到左侧单元格
107
- params.columnIndex = _columnIndex - 1;
108
- params.column = visibleColumn[params.columnIndex];
109
- }
110
- else if (isRightArrow && _columnIndex < visibleColumn.length - 1) {
111
- // 移动到右侧单元格
112
- params.columnIndex = _columnIndex + 1;
113
- params.column = visibleColumn[params.columnIndex];
114
- }
115
- $xeTable.scrollToRow(params.row, params.column, {
116
- colAlign
117
- }).then(() => {
118
- params.cell = $xeTable.getCellElement(params.row, params.column);
119
- $xeTable.handleSelected(params, evnt);
120
- });
121
- return params;
74
+ const internalData = $xeTable;
75
+ const { afterFullData, visibleColumn } = internalData;
76
+ const params = Object.assign({}, args);
77
+ const { row, column } = params;
78
+ const _rowIndex = $xeTable.getVTRowIndex(row);
79
+ const _columnIndex = $xeTable.getVTColumnIndex(column);
80
+ const refTableBody = $xeTable.$refs.refTableBody;
81
+ const tableBodyElem = refTableBody ? refTableBody.$el : null;
82
+ const tableWidth = tableBodyElem ? tableBodyElem.clientWidth : 0;
83
+ let colAlign = isLeftArrow || isRightArrow || column.renderWidth < tableWidth;
84
+ if (isLeftArrow && _columnIndex >= 0 || isRightArrow && _columnIndex <= visibleColumn.length - 1) {
85
+ colAlign = false;
86
+ } else {
87
+ evnt.preventDefault();
88
+ }
89
+ if (isUpArrow && _rowIndex > 0) {
90
+ params.rowIndex = _rowIndex - 1;
91
+ params.row = afterFullData[params.rowIndex];
92
+ } else if (isDwArrow && _rowIndex < afterFullData.length - 1) {
93
+ params.rowIndex = _rowIndex + 1;
94
+ params.row = afterFullData[params.rowIndex];
95
+ } else if (isLeftArrow && _columnIndex) {
96
+ params.columnIndex = _columnIndex - 1;
97
+ params.column = visibleColumn[params.columnIndex];
98
+ } else if (isRightArrow && _columnIndex < visibleColumn.length - 1) {
99
+ params.columnIndex = _columnIndex + 1;
100
+ params.column = visibleColumn[params.columnIndex];
101
+ }
102
+ $xeTable.scrollToRow(params.row, params.column, {
103
+ colAlign
104
+ }).then(() => {
105
+ params.cell = $xeTable.getCellElement(params.row, params.column);
106
+ $xeTable.handleSelected(params, evnt);
107
+ });
108
+ return params;
122
109
  }
123
110
  function handleCheckboxRangeEvent($xeTable, evnt, params) {
124
- const internalData = $xeTable;
125
- const { elemStore } = internalData;
126
- const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
127
- const leftScrollElem = getRefElem(elemStore['left-body-scroll']);
128
- const rightScrollElem = getRefElem(elemStore['right-body-scroll']);
129
- const { column, cell } = params;
130
- if (column.type === 'checkbox') {
131
- let bodyWrapperElem = bodyScrollElem;
132
- if (leftScrollElem && column.fixed === 'left') {
133
- bodyWrapperElem = leftScrollElem;
111
+ const internalData = $xeTable;
112
+ const { elemStore } = internalData;
113
+ const bodyScrollElem = getRefElem(elemStore["main-body-scroll"]);
114
+ const leftScrollElem = getRefElem(elemStore["left-body-scroll"]);
115
+ const rightScrollElem = getRefElem(elemStore["right-body-scroll"]);
116
+ const { column, cell } = params;
117
+ if (column.type === "checkbox") {
118
+ let bodyWrapperElem = bodyScrollElem;
119
+ if (leftScrollElem && column.fixed === "left") {
120
+ bodyWrapperElem = leftScrollElem;
121
+ } else if (rightScrollElem && column.fixed === "right") {
122
+ bodyWrapperElem = rightScrollElem;
123
+ }
124
+ if (!bodyWrapperElem) {
125
+ return;
126
+ }
127
+ const bodyRect = bodyWrapperElem.getBoundingClientRect();
128
+ const el = $xeTable.$refs.refElem;
129
+ const disX = evnt.clientX;
130
+ const disY = evnt.clientY;
131
+ const checkboxRangeElem = bodyWrapperElem.querySelector(".vxe-table--checkbox-range");
132
+ const trElem = cell.parentNode;
133
+ const selectRecords = $xeTable.getCheckboxRecords();
134
+ let lastRangeRows = [];
135
+ const marginSize = 1;
136
+ const startTop = evnt.clientY - bodyRect.y + bodyWrapperElem.scrollTop;
137
+ const startLeft = evnt.clientX - bodyRect.x + bodyWrapperElem.scrollLeft;
138
+ const startScrollTop = bodyWrapperElem.scrollTop;
139
+ const rowHeight = trElem.offsetHeight;
140
+ const trRect = trElem.getBoundingClientRect();
141
+ const offsetClientTop = disY - trRect.y;
142
+ let mouseScrollTimeout = null;
143
+ let isMouseScrollDown = false;
144
+ let mouseScrollSpaceSize = 1;
145
+ const triggerEvent = (type, evnt2) => {
146
+ $xeTable.dispatchEvent(
147
+ `checkbox-range-${type}`,
148
+ {
149
+ records: () => $xeTable.getCheckboxRecords(),
150
+ reserves: () => $xeTable.getCheckboxReserveRecords()
151
+ },
152
+ evnt2
153
+ );
154
+ };
155
+ const handleChecked = (evnt2) => {
156
+ const { clientX, clientY } = evnt2;
157
+ const offsetLeft = clientX - disX;
158
+ const offsetTop = clientY - disY + (bodyWrapperElem.scrollTop - startScrollTop);
159
+ let rangeHeight = Math.abs(offsetTop);
160
+ let rangeWidth = Math.abs(offsetLeft);
161
+ let rangeTop = startTop;
162
+ let rangeLeft = startLeft;
163
+ if (offsetTop < marginSize) {
164
+ rangeTop += offsetTop;
165
+ if (rangeTop < marginSize) {
166
+ rangeTop = marginSize;
167
+ rangeHeight = startTop;
134
168
  }
135
- else if (rightScrollElem && column.fixed === 'right') {
136
- bodyWrapperElem = rightScrollElem;
169
+ } else {
170
+ rangeHeight = Math.min(rangeHeight, bodyWrapperElem.scrollHeight - startTop - marginSize);
171
+ }
172
+ if (offsetLeft < marginSize) {
173
+ rangeLeft += offsetLeft;
174
+ if (rangeWidth > startLeft) {
175
+ rangeLeft = marginSize;
176
+ rangeWidth = startLeft;
137
177
  }
138
- if (!bodyWrapperElem) {
139
- return;
178
+ } else {
179
+ rangeWidth = Math.min(rangeWidth, bodyWrapperElem.clientWidth - startLeft - marginSize);
180
+ }
181
+ checkboxRangeElem.style.height = `${rangeHeight}px`;
182
+ checkboxRangeElem.style.width = `${rangeWidth}px`;
183
+ checkboxRangeElem.style.left = `${rangeLeft}px`;
184
+ checkboxRangeElem.style.top = `${rangeTop}px`;
185
+ checkboxRangeElem.style.display = "block";
186
+ const rangeRows = getCheckboxRangeRows($xeTable, evnt2, params, trElem, trRect, offsetClientTop, offsetTop < marginSize ? -rangeHeight : rangeHeight);
187
+ if (rangeHeight > 10 && rangeRows.length !== lastRangeRows.length) {
188
+ const isControlKey = hasControlKey(evnt2);
189
+ lastRangeRows = rangeRows;
190
+ if (isControlKey) {
191
+ rangeRows.forEach((row) => {
192
+ $xeTable.handleBatchSelectRows([row], selectRecords.indexOf(row) === -1);
193
+ });
194
+ } else {
195
+ $xeTable.setAllCheckboxRow(false);
196
+ $xeTable.handleCheckedCheckboxRow(rangeRows, true, false);
140
197
  }
141
- const bodyRect = bodyWrapperElem.getBoundingClientRect();
142
- const el = $xeTable.$refs.refElem;
143
- const disX = evnt.clientX;
144
- const disY = evnt.clientY;
145
- const checkboxRangeElem = bodyWrapperElem.querySelector('.vxe-table--checkbox-range');
146
- const trElem = cell.parentNode;
147
- const selectRecords = $xeTable.getCheckboxRecords();
148
- let lastRangeRows = [];
149
- const marginSize = 1;
150
- const startTop = evnt.clientY - bodyRect.y + bodyWrapperElem.scrollTop;
151
- const startLeft = evnt.clientX - bodyRect.x + bodyWrapperElem.scrollLeft;
152
- const startScrollTop = bodyWrapperElem.scrollTop;
153
- const rowHeight = trElem.offsetHeight;
154
- const trRect = trElem.getBoundingClientRect();
155
- const offsetClientTop = disY - trRect.y;
156
- let mouseScrollTimeout = null;
157
- let isMouseScrollDown = false;
158
- let mouseScrollSpaceSize = 1;
159
- const triggerEvent = (type, evnt) => {
160
- $xeTable.dispatchEvent(`checkbox-range-${type}`, {
161
- records: () => $xeTable.getCheckboxRecords(),
162
- reserves: () => $xeTable.getCheckboxReserveRecords()
163
- }, evnt);
164
- };
165
- const handleChecked = (evnt) => {
166
- const { clientX, clientY } = evnt;
167
- const offsetLeft = clientX - disX;
168
- const offsetTop = clientY - disY + (bodyWrapperElem.scrollTop - startScrollTop);
169
- let rangeHeight = Math.abs(offsetTop);
170
- let rangeWidth = Math.abs(offsetLeft);
171
- let rangeTop = startTop;
172
- let rangeLeft = startLeft;
173
- if (offsetTop < marginSize) {
174
- // 向上
175
- rangeTop += offsetTop;
176
- if (rangeTop < marginSize) {
177
- rangeTop = marginSize;
178
- rangeHeight = startTop;
179
- }
180
- }
181
- else {
182
- // 向下
183
- rangeHeight = Math.min(rangeHeight, bodyWrapperElem.scrollHeight - startTop - marginSize);
184
- }
185
- if (offsetLeft < marginSize) {
186
- // 向左
187
- rangeLeft += offsetLeft;
188
- if (rangeWidth > startLeft) {
189
- rangeLeft = marginSize;
190
- rangeWidth = startLeft;
191
- }
192
- }
193
- else {
194
- // 向右
195
- rangeWidth = Math.min(rangeWidth, bodyWrapperElem.clientWidth - startLeft - marginSize);
196
- }
197
- checkboxRangeElem.style.height = `${rangeHeight}px`;
198
- checkboxRangeElem.style.width = `${rangeWidth}px`;
199
- checkboxRangeElem.style.left = `${rangeLeft}px`;
200
- checkboxRangeElem.style.top = `${rangeTop}px`;
201
- checkboxRangeElem.style.display = 'block';
202
- const rangeRows = getCheckboxRangeRows($xeTable, evnt, params, trElem, trRect, offsetClientTop, offsetTop < marginSize ? -rangeHeight : rangeHeight);
203
- // 至少滑动 10px 才能有效匹配
204
- if (rangeHeight > 10 && rangeRows.length !== lastRangeRows.length) {
205
- const isControlKey = hasControlKey(evnt);
206
- lastRangeRows = rangeRows;
207
- if (isControlKey) {
208
- rangeRows.forEach((row) => {
209
- $xeTable.handleBatchSelectRows([row], selectRecords.indexOf(row) === -1);
210
- });
211
- }
212
- else {
213
- $xeTable.setAllCheckboxRow(false);
214
- $xeTable.handleCheckedCheckboxRow(rangeRows, true, false);
215
- }
216
- triggerEvent('change', evnt);
217
- }
218
- };
219
- // 停止鼠标滚动
220
- const stopMouseScroll = () => {
221
- clearTimeout(mouseScrollTimeout);
222
- mouseScrollTimeout = null;
223
- };
224
- // 开始鼠标滚动
225
- const startMouseScroll = (evnt) => {
226
- stopMouseScroll();
227
- mouseScrollTimeout = setTimeout(() => {
228
- if (mouseScrollTimeout) {
229
- const { scrollLeft, scrollTop, clientHeight, scrollHeight } = bodyWrapperElem;
230
- const topSize = Math.ceil(mouseScrollSpaceSize * 50 / rowHeight);
231
- if (isMouseScrollDown) {
232
- if (scrollTop + clientHeight < scrollHeight) {
233
- $xeTable.scrollTo(scrollLeft, scrollTop + topSize);
234
- startMouseScroll(evnt);
235
- handleChecked(evnt);
236
- }
237
- else {
238
- stopMouseScroll();
239
- }
240
- }
241
- else {
242
- if (scrollTop) {
243
- $xeTable.scrollTo(scrollLeft, scrollTop - topSize);
244
- startMouseScroll(evnt);
245
- handleChecked(evnt);
246
- }
247
- else {
248
- stopMouseScroll();
249
- }
250
- }
251
- }
252
- }, 50);
253
- };
254
- addClass(el, 'drag--range');
255
- document.onmousemove = evnt => {
256
- evnt.preventDefault();
257
- evnt.stopPropagation();
258
- const { clientY } = evnt;
259
- const { boundingTop } = getAbsolutePos(bodyWrapperElem);
260
- // 如果超过可视区,触发滚动
261
- if (clientY < boundingTop) {
262
- isMouseScrollDown = false;
263
- mouseScrollSpaceSize = boundingTop - clientY;
264
- if (!mouseScrollTimeout) {
265
- startMouseScroll(evnt);
266
- }
198
+ triggerEvent("change", evnt2);
199
+ }
200
+ };
201
+ const stopMouseScroll = () => {
202
+ clearTimeout(mouseScrollTimeout);
203
+ mouseScrollTimeout = null;
204
+ };
205
+ const startMouseScroll = (evnt2) => {
206
+ stopMouseScroll();
207
+ mouseScrollTimeout = setTimeout(() => {
208
+ if (mouseScrollTimeout) {
209
+ const { scrollLeft, scrollTop, clientHeight, scrollHeight } = bodyWrapperElem;
210
+ const topSize = Math.ceil(mouseScrollSpaceSize * 50 / rowHeight);
211
+ if (isMouseScrollDown) {
212
+ if (scrollTop + clientHeight < scrollHeight) {
213
+ $xeTable.scrollTo(scrollLeft, scrollTop + topSize);
214
+ startMouseScroll(evnt2);
215
+ handleChecked(evnt2);
216
+ } else {
217
+ stopMouseScroll();
267
218
  }
268
- else if (clientY > boundingTop + bodyWrapperElem.clientHeight) {
269
- isMouseScrollDown = true;
270
- mouseScrollSpaceSize = clientY - boundingTop - bodyWrapperElem.clientHeight;
271
- if (!mouseScrollTimeout) {
272
- startMouseScroll(evnt);
273
- }
219
+ } else {
220
+ if (scrollTop) {
221
+ $xeTable.scrollTo(scrollLeft, scrollTop - topSize);
222
+ startMouseScroll(evnt2);
223
+ handleChecked(evnt2);
224
+ } else {
225
+ stopMouseScroll();
274
226
  }
275
- else if (mouseScrollTimeout) {
276
- stopMouseScroll();
227
+ }
228
+ }
229
+ }, 50);
230
+ };
231
+ addClass(el, "drag--range");
232
+ document.onmousemove = (evnt2) => {
233
+ evnt2.preventDefault();
234
+ evnt2.stopPropagation();
235
+ const { clientY } = evnt2;
236
+ const { boundingTop } = getAbsolutePos(bodyWrapperElem);
237
+ if (clientY < boundingTop) {
238
+ isMouseScrollDown = false;
239
+ mouseScrollSpaceSize = boundingTop - clientY;
240
+ if (!mouseScrollTimeout) {
241
+ startMouseScroll(evnt2);
242
+ }
243
+ } else if (clientY > boundingTop + bodyWrapperElem.clientHeight) {
244
+ isMouseScrollDown = true;
245
+ mouseScrollSpaceSize = clientY - boundingTop - bodyWrapperElem.clientHeight;
246
+ if (!mouseScrollTimeout) {
247
+ startMouseScroll(evnt2);
248
+ }
249
+ } else if (mouseScrollTimeout) {
250
+ stopMouseScroll();
251
+ }
252
+ handleChecked(evnt2);
253
+ };
254
+ document.onmouseup = (evnt2) => {
255
+ stopMouseScroll();
256
+ removeClass(el, "drag--range");
257
+ checkboxRangeElem.removeAttribute("style");
258
+ document.onmousemove = null;
259
+ document.onmouseup = null;
260
+ triggerEvent("end", evnt2);
261
+ };
262
+ triggerEvent("start", evnt);
263
+ }
264
+ }
265
+ var mixin_default = {
266
+ methods: {
267
+ // 处理 Tab 键移动
268
+ moveTabSelected(args, isLeft, evnt) {
269
+ const $xeTable = this;
270
+ const props = $xeTable;
271
+ const internalData = $xeTable;
272
+ const { editConfig } = props;
273
+ const { afterFullData, visibleColumn } = internalData;
274
+ const editOpts = $xeTable.computeEditOpts;
275
+ const rowOpts = $xeTable.computeRowOpts;
276
+ const currentRowOpts = $xeTable.computeCurrentRowOpts;
277
+ const columnOpts = $xeTable.computeColumnOpts;
278
+ const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
279
+ let targetRow;
280
+ let targetRowIndex;
281
+ let targetColumnIndex;
282
+ const params = Object.assign({}, args);
283
+ const _rowIndex = $xeTable.getVTRowIndex(params.row);
284
+ const _columnIndex = $xeTable.getVTColumnIndex(params.column);
285
+ evnt.preventDefault();
286
+ if (isLeft) {
287
+ if (_columnIndex <= 0) {
288
+ if (_rowIndex > 0) {
289
+ targetRowIndex = _rowIndex - 1;
290
+ targetRow = afterFullData[targetRowIndex];
291
+ targetColumnIndex = visibleColumn.length - 1;
292
+ }
293
+ } else {
294
+ targetColumnIndex = _columnIndex - 1;
295
+ }
296
+ } else {
297
+ if (_columnIndex >= visibleColumn.length - 1) {
298
+ if (_rowIndex < afterFullData.length - 1) {
299
+ targetRowIndex = _rowIndex + 1;
300
+ targetRow = afterFullData[targetRowIndex];
301
+ targetColumnIndex = 0;
302
+ }
303
+ } else {
304
+ targetColumnIndex = _columnIndex + 1;
305
+ }
306
+ }
307
+ const targetColumn = visibleColumn[targetColumnIndex];
308
+ if (targetColumn) {
309
+ if (targetRow) {
310
+ params.rowIndex = targetRowIndex;
311
+ params.row = targetRow;
312
+ } else {
313
+ params.rowIndex = _rowIndex;
314
+ }
315
+ params.columnIndex = targetColumnIndex;
316
+ params.column = targetColumn;
317
+ params.cell = $xeTable.getCellElement(params.row, params.column);
318
+ if (rowOpts.isCurrent && currentRowOpts.isFollowSelected) {
319
+ $xeTable.triggerCurrentRowEvent(evnt, params);
320
+ }
321
+ if (columnOpts.isCurrent && currentColumnOpts.isFollowSelected) {
322
+ $xeTable.triggerCurrentColumnEvent(evnt, params);
323
+ }
324
+ if (editConfig) {
325
+ if (editOpts.trigger === "click" || editOpts.trigger === "dblclick") {
326
+ if (editOpts.mode === "row") {
327
+ $xeTable.handleEdit(params, evnt);
328
+ } else {
329
+ $xeTable.scrollToRow(params.row, params.column).then(() => {
330
+ $xeTable.handleSelected(params, evnt);
331
+ });
277
332
  }
278
- handleChecked(evnt);
333
+ }
334
+ } else {
335
+ $xeTable.scrollToRow(params.row, params.column).then(() => {
336
+ $xeTable.handleSelected(params, evnt);
337
+ });
338
+ }
339
+ }
340
+ },
341
+ // 处理当前行方向键移动
342
+ moveCurrentRow(isUpArrow, isDwArrow, evnt) {
343
+ const $xeTable = this;
344
+ const props = $xeTable;
345
+ const internalData = $xeTable;
346
+ const { treeConfig } = props;
347
+ const { afterFullData, currentRow } = internalData;
348
+ const treeOpts = $xeTable.computeTreeOpts;
349
+ const childrenField = treeOpts.children || treeOpts.childrenField;
350
+ let targetRow;
351
+ if (currentRow) {
352
+ if (treeConfig) {
353
+ const { index, items } = XEUtils.findTree(afterFullData, (item) => item === currentRow, { children: childrenField });
354
+ if (isUpArrow && index > 0) {
355
+ targetRow = items[index - 1];
356
+ } else if (isDwArrow && index < items.length - 1) {
357
+ targetRow = items[index + 1];
358
+ }
359
+ } else {
360
+ const _rowIndex = $xeTable.getVTRowIndex(currentRow);
361
+ if (isUpArrow && _rowIndex > 0) {
362
+ targetRow = afterFullData[_rowIndex - 1];
363
+ } else if (isDwArrow && _rowIndex < afterFullData.length - 1) {
364
+ targetRow = afterFullData[_rowIndex + 1];
365
+ }
366
+ }
367
+ } else {
368
+ targetRow = afterFullData[0];
369
+ }
370
+ if (targetRow) {
371
+ evnt.preventDefault();
372
+ const params = {
373
+ $table: $xeTable,
374
+ row: targetRow,
375
+ rowIndex: $xeTable.getRowIndex(targetRow),
376
+ $rowIndex: $xeTable.getVMRowIndex(targetRow)
279
377
  };
280
- document.onmouseup = (evnt) => {
281
- stopMouseScroll();
282
- removeClass(el, 'drag--range');
283
- checkboxRangeElem.removeAttribute('style');
284
- document.onmousemove = null;
285
- document.onmouseup = null;
286
- triggerEvent('end', evnt);
378
+ $xeTable.scrollToRow(targetRow).then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
379
+ }
380
+ },
381
+ // 处理当前列方向键移动
382
+ moveCurrentColumn(isLeftArrow, isRightArrow, evnt) {
383
+ const $xeTable = this;
384
+ const internalData = $xeTable;
385
+ const { currentCol, visibleColumn } = internalData;
386
+ let targetCol = null;
387
+ if (currentCol) {
388
+ const _columnIndex = $xeTable.getVTColumnIndex(currentCol);
389
+ if (isLeftArrow && _columnIndex > 0) {
390
+ targetCol = visibleColumn[_columnIndex - 1];
391
+ } else if (isRightArrow && _columnIndex < visibleColumn.length - 1) {
392
+ targetCol = visibleColumn[_columnIndex + 1];
393
+ }
394
+ } else {
395
+ targetCol = visibleColumn[0];
396
+ }
397
+ if (targetCol) {
398
+ evnt.preventDefault();
399
+ const params = {
400
+ $table: $xeTable,
401
+ column: targetCol,
402
+ columnIndex: $xeTable.getColumnIndex(targetCol),
403
+ $columnIndex: $xeTable.getVMColumnIndex(targetCol)
287
404
  };
288
- triggerEvent('start', evnt);
289
- }
290
- }
291
- export default {
292
- methods: {
293
- // 处理 Tab 键移动
294
- moveTabSelected(args, isLeft, evnt) {
295
- const $xeTable = this;
296
- const props = $xeTable;
297
- const internalData = $xeTable;
298
- const { editConfig } = props;
299
- const { afterFullData, visibleColumn } = internalData;
300
- const editOpts = $xeTable.computeEditOpts;
301
- const rowOpts = $xeTable.computeRowOpts;
302
- const currentRowOpts = $xeTable.computeCurrentRowOpts;
303
- const columnOpts = $xeTable.computeColumnOpts;
304
- const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
305
- let targetRow;
306
- let targetRowIndex;
307
- let targetColumnIndex;
308
- const params = Object.assign({}, args);
309
- const _rowIndex = $xeTable.getVTRowIndex(params.row);
310
- const _columnIndex = $xeTable.getVTColumnIndex(params.column);
311
- evnt.preventDefault();
312
- if (isLeft) {
313
- // 向左
314
- if (_columnIndex <= 0) {
315
- // 如果已经是第一列,则移动到上一行
316
- if (_rowIndex > 0) {
317
- targetRowIndex = _rowIndex - 1;
318
- targetRow = afterFullData[targetRowIndex];
319
- targetColumnIndex = visibleColumn.length - 1;
320
- }
321
- }
322
- else {
323
- targetColumnIndex = _columnIndex - 1;
324
- }
325
- }
326
- else {
327
- if (_columnIndex >= visibleColumn.length - 1) {
328
- // 如果已经是第一列,则移动到上一行
329
- if (_rowIndex < afterFullData.length - 1) {
330
- targetRowIndex = _rowIndex + 1;
331
- targetRow = afterFullData[targetRowIndex];
332
- targetColumnIndex = 0;
333
- }
334
- }
335
- else {
336
- targetColumnIndex = _columnIndex + 1;
337
- }
338
- }
339
- const targetColumn = visibleColumn[targetColumnIndex];
340
- if (targetColumn) {
341
- if (targetRow) {
342
- params.rowIndex = targetRowIndex;
343
- params.row = targetRow;
344
- }
345
- else {
346
- params.rowIndex = _rowIndex;
347
- }
348
- params.columnIndex = targetColumnIndex;
349
- params.column = targetColumn;
350
- params.cell = $xeTable.getCellElement(params.row, params.column);
351
- if (rowOpts.isCurrent && currentRowOpts.isFollowSelected) {
352
- $xeTable.triggerCurrentRowEvent(evnt, params);
353
- }
354
- if (columnOpts.isCurrent && currentColumnOpts.isFollowSelected) {
355
- $xeTable.triggerCurrentColumnEvent(evnt, params);
356
- }
357
- if (editConfig) {
358
- if (editOpts.trigger === 'click' || editOpts.trigger === 'dblclick') {
359
- if (editOpts.mode === 'row') {
360
- $xeTable.handleEdit(params, evnt);
361
- }
362
- else {
363
- $xeTable.scrollToRow(params.row, params.column).then(() => {
364
- $xeTable.handleSelected(params, evnt);
365
- });
366
- }
367
- }
368
- }
369
- else {
370
- $xeTable.scrollToRow(params.row, params.column).then(() => {
371
- $xeTable.handleSelected(params, evnt);
372
- });
373
- }
374
- }
375
- },
376
- // 处理当前行方向键移动
377
- moveCurrentRow(isUpArrow, isDwArrow, evnt) {
378
- const $xeTable = this;
379
- const props = $xeTable;
380
- const internalData = $xeTable;
381
- const { treeConfig } = props;
382
- const { afterFullData, currentRow } = internalData;
383
- const treeOpts = $xeTable.computeTreeOpts;
384
- const childrenField = treeOpts.children || treeOpts.childrenField;
385
- let targetRow;
386
- if (currentRow) {
387
- if (treeConfig) {
388
- const { index, items } = XEUtils.findTree(afterFullData, item => item === currentRow, { children: childrenField });
389
- if (isUpArrow && index > 0) {
390
- targetRow = items[index - 1];
391
- }
392
- else if (isDwArrow && index < items.length - 1) {
393
- targetRow = items[index + 1];
394
- }
395
- }
396
- else {
397
- const _rowIndex = $xeTable.getVTRowIndex(currentRow);
398
- if (isUpArrow && _rowIndex > 0) {
399
- targetRow = afterFullData[_rowIndex - 1];
400
- }
401
- else if (isDwArrow && _rowIndex < afterFullData.length - 1) {
402
- targetRow = afterFullData[_rowIndex + 1];
403
- }
404
- }
405
- }
406
- else {
407
- targetRow = afterFullData[0];
408
- }
409
- if (targetRow) {
410
- evnt.preventDefault();
411
- const params = {
412
- $table: $xeTable,
413
- row: targetRow,
414
- rowIndex: $xeTable.getRowIndex(targetRow),
415
- $rowIndex: $xeTable.getVMRowIndex(targetRow)
416
- };
417
- $xeTable.scrollToRow(targetRow)
418
- .then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
419
- }
420
- },
421
- // 处理当前列方向键移动
422
- moveCurrentColumn(isLeftArrow, isRightArrow, evnt) {
423
- const $xeTable = this;
424
- const internalData = $xeTable;
425
- const { currentCol, visibleColumn } = internalData;
426
- let targetCol = null;
427
- if (currentCol) {
428
- const _columnIndex = $xeTable.getVTColumnIndex(currentCol);
429
- if (isLeftArrow && _columnIndex > 0) {
430
- targetCol = visibleColumn[_columnIndex - 1];
431
- }
432
- else if (isRightArrow && _columnIndex < visibleColumn.length - 1) {
433
- targetCol = visibleColumn[_columnIndex + 1];
434
- }
435
- }
436
- else {
437
- targetCol = visibleColumn[0];
438
- }
439
- if (targetCol) {
440
- evnt.preventDefault();
441
- const params = {
442
- $table: $xeTable,
443
- column: targetCol,
444
- columnIndex: $xeTable.getColumnIndex(targetCol),
445
- $columnIndex: $xeTable.getVMColumnIndex(targetCol)
446
- };
447
- $xeTable.scrollToColumn(targetCol)
448
- .then(() => $xeTable.triggerCurrentColumnEvent(evnt, params));
449
- }
450
- },
451
- // 处理可编辑方向键移动
452
- moveArrowSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
453
- const $xeTable = this;
454
- const props = $xeTable;
455
- const { highlightCurrentRow, highlightCurrentColumn } = props;
456
- const rowOpts = $xeTable.computeRowOpts;
457
- const currentRowOpts = $xeTable.computeCurrentRowOpts;
458
- const columnOpts = $xeTable.computeColumnOpts;
459
- const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
460
- const params = handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow);
461
- if (rowOpts.isCurrent || highlightCurrentRow) {
462
- if (currentRowOpts.isFollowSelected) {
463
- $xeTable.triggerCurrentRowEvent(evnt, params);
464
- }
465
- else {
466
- // 当前行按键上下移动
467
- if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
468
- $xeTable.moveCurrentRow(isUpArrow, isDwArrow, evnt);
469
- }
470
- }
471
- }
472
- if (columnOpts.isCurrent || highlightCurrentColumn) {
473
- if (currentColumnOpts.isFollowSelected) {
474
- $xeTable.triggerCurrentColumnEvent(evnt, params);
475
- }
476
- else {
477
- // 当前行按键左右移动
478
- if ((isLeftArrow || isRightArrow) && (columnOpts.isCurrent || highlightCurrentColumn)) {
479
- $xeTable.moveCurrentColumn(isLeftArrow, isRightArrow, evnt);
480
- }
481
- }
482
- }
483
- },
484
- moveEnterSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
485
- const $xeTable = this;
486
- const props = $xeTable;
487
- const { highlightCurrentRow, highlightCurrentColumn } = props;
488
- const rowOpts = $xeTable.computeRowOpts;
489
- const currentRowOpts = $xeTable.computeCurrentRowOpts;
490
- const columnOpts = $xeTable.computeColumnOpts;
491
- const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
492
- const params = handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow);
493
- if (((rowOpts.isCurrent || highlightCurrentRow) && currentRowOpts.isFollowSelected)) {
494
- $xeTable.triggerCurrentRowEvent(evnt, params);
495
- }
496
- if ((columnOpts.isCurrent || highlightCurrentColumn) && currentColumnOpts.isFollowSelected) {
497
- $xeTable.triggerCurrentColumnEvent(evnt, params);
498
- }
499
- },
500
- // 处理可编辑方向键移动
501
- moveSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
502
- const $xeTable = this;
503
- handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow);
504
- },
505
- handleCellMousedownEvent(evnt, params) {
506
- const $xeTable = this;
507
- const props = $xeTable;
508
- const { editConfig, checkboxConfig, mouseConfig } = props;
509
- const checkboxOpts = $xeTable.computeCheckboxOpts;
510
- const mouseOpts = $xeTable.computeMouseOpts;
511
- const editOpts = $xeTable.computeEditOpts;
512
- if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.triggerClAaMnEvent) {
513
- return $xeTable.triggerClAaMnEvent(evnt, params);
514
- }
515
- else {
516
- if (checkboxConfig && checkboxOpts.range) {
517
- handleCheckboxRangeEvent($xeTable, evnt, params);
518
- }
519
- if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
520
- if (!editConfig || editOpts.mode === 'cell') {
521
- $xeTable.handleSelected(params, evnt);
522
- }
523
- }
524
- }
405
+ $xeTable.scrollToColumn(targetCol).then(() => $xeTable.triggerCurrentColumnEvent(evnt, params));
406
+ }
407
+ },
408
+ // 处理可编辑方向键移动
409
+ moveArrowSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
410
+ const $xeTable = this;
411
+ const props = $xeTable;
412
+ const { highlightCurrentRow, highlightCurrentColumn } = props;
413
+ const rowOpts = $xeTable.computeRowOpts;
414
+ const currentRowOpts = $xeTable.computeCurrentRowOpts;
415
+ const columnOpts = $xeTable.computeColumnOpts;
416
+ const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
417
+ const params = handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow);
418
+ if (rowOpts.isCurrent || highlightCurrentRow) {
419
+ if (currentRowOpts.isFollowSelected) {
420
+ $xeTable.triggerCurrentRowEvent(evnt, params);
421
+ } else {
422
+ if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
423
+ $xeTable.moveCurrentRow(isUpArrow, isDwArrow, evnt);
424
+ }
525
425
  }
426
+ }
427
+ if (columnOpts.isCurrent || highlightCurrentColumn) {
428
+ if (currentColumnOpts.isFollowSelected) {
429
+ $xeTable.triggerCurrentColumnEvent(evnt, params);
430
+ } else {
431
+ if ((isLeftArrow || isRightArrow) && (columnOpts.isCurrent || highlightCurrentColumn)) {
432
+ $xeTable.moveCurrentColumn(isLeftArrow, isRightArrow, evnt);
433
+ }
434
+ }
435
+ }
436
+ },
437
+ moveEnterSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
438
+ const $xeTable = this;
439
+ const props = $xeTable;
440
+ const { highlightCurrentRow, highlightCurrentColumn } = props;
441
+ const rowOpts = $xeTable.computeRowOpts;
442
+ const currentRowOpts = $xeTable.computeCurrentRowOpts;
443
+ const columnOpts = $xeTable.computeColumnOpts;
444
+ const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
445
+ const params = handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow);
446
+ if ((rowOpts.isCurrent || highlightCurrentRow) && currentRowOpts.isFollowSelected) {
447
+ $xeTable.triggerCurrentRowEvent(evnt, params);
448
+ }
449
+ if ((columnOpts.isCurrent || highlightCurrentColumn) && currentColumnOpts.isFollowSelected) {
450
+ $xeTable.triggerCurrentColumnEvent(evnt, params);
451
+ }
452
+ },
453
+ // 处理可编辑方向键移动
454
+ moveSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
455
+ const $xeTable = this;
456
+ handleMoveSelected($xeTable, evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow);
457
+ },
458
+ handleCellMousedownEvent(evnt, params) {
459
+ const $xeTable = this;
460
+ const props = $xeTable;
461
+ const { editConfig, checkboxConfig, mouseConfig } = props;
462
+ const checkboxOpts = $xeTable.computeCheckboxOpts;
463
+ const mouseOpts = $xeTable.computeMouseOpts;
464
+ const editOpts = $xeTable.computeEditOpts;
465
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.triggerClAaMnEvent) {
466
+ return $xeTable.triggerClAaMnEvent(evnt, params);
467
+ } else {
468
+ if (checkboxConfig && checkboxOpts.range) {
469
+ handleCheckboxRangeEvent($xeTable, evnt, params);
470
+ }
471
+ if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.selected) {
472
+ if (!editConfig || editOpts.mode === "cell") {
473
+ $xeTable.handleSelected(params, evnt);
474
+ }
475
+ }
476
+ }
526
477
  }
478
+ }
479
+ };
480
+ export {
481
+ mixin_default as default
527
482
  };