vxe-table 4.23.5 → 4.23.7

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 (482) hide show
  1. package/dist/all.esm.js +32456 -33938
  2. package/dist/style.css +4501 -1
  3. package/dist/style.mini.css +1 -0
  4. package/es/colgroup/index.d.ts +760 -0
  5. package/es/colgroup/index.js +16 -13
  6. package/es/column/index.d.ts +760 -0
  7. package/es/column/index.js +16 -13
  8. package/es/components.d.ts +9 -0
  9. package/es/components.js +29 -29
  10. package/es/grid/index.d.ts +2824 -0
  11. package/es/grid/index.js +14 -9
  12. package/es/grid/src/emits.d.ts +2 -0
  13. package/es/grid/src/emits.js +18 -15
  14. package/es/grid/src/grid.d.ts +556 -0
  15. package/es/grid/src/grid.js +1695 -1758
  16. package/es/grid/src/props.d.ts +200 -0
  17. package/es/grid/src/props.js +19 -6
  18. package/es/{vxe-grid/style.min.css → grid/style.mini.css} +1 -1
  19. package/es/index.d.ts +3 -0
  20. package/es/index.esm.js +6 -3
  21. package/es/index.js +6 -0
  22. package/es/locale/lang/ar-EG.d.ts +908 -2
  23. package/es/locale/lang/ar-EG.js +906 -903
  24. package/es/locale/lang/de-DE.d.ts +908 -2
  25. package/es/locale/lang/de-DE.js +906 -903
  26. package/es/locale/lang/en-US.d.ts +908 -2
  27. package/es/locale/lang/en-US.js +906 -903
  28. package/es/locale/lang/es-ES.d.ts +908 -2
  29. package/es/locale/lang/es-ES.js +906 -903
  30. package/es/locale/lang/fr-FR.d.ts +908 -2
  31. package/es/locale/lang/fr-FR.js +906 -903
  32. package/es/locale/lang/hu-HU.d.ts +908 -2
  33. package/es/locale/lang/hu-HU.js +906 -903
  34. package/es/locale/lang/hy-AM.d.ts +908 -2
  35. package/es/locale/lang/hy-AM.js +906 -903
  36. package/es/locale/lang/id-ID.d.ts +908 -2
  37. package/es/locale/lang/id-ID.js +906 -903
  38. package/es/locale/lang/it-IT.d.ts +908 -2
  39. package/es/locale/lang/it-IT.js +906 -903
  40. package/es/locale/lang/ja-JP.d.ts +908 -2
  41. package/es/locale/lang/ja-JP.js +906 -903
  42. package/es/locale/lang/ko-KR.d.ts +908 -2
  43. package/es/locale/lang/ko-KR.js +906 -903
  44. package/es/locale/lang/ms-MY.d.ts +908 -2
  45. package/es/locale/lang/ms-MY.js +906 -903
  46. package/es/locale/lang/nb-NO.d.ts +908 -2
  47. package/es/locale/lang/nb-NO.js +906 -903
  48. package/es/locale/lang/pt-BR.d.ts +908 -2
  49. package/es/locale/lang/pt-BR.js +906 -903
  50. package/es/locale/lang/ru-RU.d.ts +908 -2
  51. package/es/locale/lang/ru-RU.js +906 -903
  52. package/es/locale/lang/th-TH.d.ts +908 -2
  53. package/es/locale/lang/th-TH.js +906 -903
  54. package/es/locale/lang/ug-CN.d.ts +908 -2
  55. package/es/locale/lang/ug-CN.js +906 -903
  56. package/es/locale/lang/uk-UA.d.ts +908 -2
  57. package/es/locale/lang/uk-UA.js +906 -903
  58. package/es/locale/lang/uz-UZ.d.ts +908 -2
  59. package/es/locale/lang/uz-UZ.js +906 -903
  60. package/es/locale/lang/vi-VN.d.ts +908 -2
  61. package/es/locale/lang/vi-VN.js +906 -903
  62. package/es/locale/lang/zh-CHT.d.ts +908 -2
  63. package/es/locale/lang/zh-CHT.js +906 -903
  64. package/es/locale/lang/zh-CN.d.ts +908 -2
  65. package/es/locale/lang/zh-CN.js +906 -903
  66. package/es/locale/lang/zh-HK.d.ts +908 -2
  67. package/es/locale/lang/zh-HK.js +910 -2
  68. package/es/locale/lang/zh-MO.d.ts +908 -2
  69. package/es/locale/lang/zh-MO.js +910 -2
  70. package/es/locale/lang/zh-TC.d.ts +908 -0
  71. package/es/locale/lang/zh-TC.js +910 -2
  72. package/es/locale/lang/zh-TW.d.ts +908 -2
  73. package/es/locale/lang/zh-TW.js +910 -2
  74. package/es/style.css +4501 -1
  75. package/es/style.mini.css +1 -0
  76. package/es/table/index.d.ts +2672 -0
  77. package/es/table/index.js +16 -11
  78. package/es/table/module/custom/hook.d.ts +1 -0
  79. package/es/table/module/custom/hook.js +462 -483
  80. package/es/table/module/custom/panel.d.ts +17 -0
  81. package/es/table/module/custom/panel.js +1482 -1559
  82. package/es/table/module/edit/hook.d.ts +1 -0
  83. package/es/table/module/edit/hook.js +1008 -1078
  84. package/es/table/module/export/export-panel.d.ts +27 -0
  85. package/es/table/module/export/export-panel.js +523 -575
  86. package/es/table/module/export/hook.d.ts +1 -0
  87. package/es/table/module/export/hook.js +1805 -1884
  88. package/es/table/module/export/import-panel.d.ts +27 -0
  89. package/es/table/module/export/import-panel.js +244 -252
  90. package/es/table/module/export/util.d.ts +5 -0
  91. package/es/table/module/export/util.js +20 -17
  92. package/es/table/module/filter/hook.d.ts +1 -0
  93. package/es/table/module/filter/hook.js +472 -487
  94. package/es/table/module/filter/panel.d.ts +16 -0
  95. package/es/table/module/filter/panel.js +251 -275
  96. package/es/table/module/keyboard/hook.d.ts +1 -0
  97. package/es/table/module/keyboard/hook.js +445 -497
  98. package/es/table/module/menu/hook.d.ts +1 -0
  99. package/es/table/module/menu/hook.js +295 -315
  100. package/es/table/module/menu/panel.d.ts +2 -0
  101. package/es/table/module/menu/panel.js +164 -183
  102. package/es/table/module/validator/hook.d.ts +1 -0
  103. package/es/table/module/validator/hook.js +522 -571
  104. package/es/table/render/index.d.ts +1 -0
  105. package/es/table/render/index.js +1402 -1362
  106. package/es/table/src/body.d.ts +24 -0
  107. package/es/table/src/body.js +850 -865
  108. package/es/table/src/cell.d.ts +192 -0
  109. package/es/table/src/cell.js +1209 -1207
  110. package/es/table/src/column.d.ts +263 -0
  111. package/es/table/src/column.js +178 -174
  112. package/es/table/src/columnInfo.d.ts +13 -0
  113. package/es/table/src/columnInfo.js +202 -196
  114. package/es/table/src/emits.d.ts +2 -0
  115. package/es/table/src/emits.js +126 -119
  116. package/es/table/src/footer.d.ts +45 -0
  117. package/es/table/src/footer.js +336 -340
  118. package/es/table/src/group.d.ts +178 -0
  119. package/es/table/src/group.js +49 -46
  120. package/es/table/src/header.d.ts +26 -0
  121. package/es/table/src/header.js +517 -519
  122. package/es/table/src/props.d.ts +238 -0
  123. package/es/table/src/props.js +331 -328
  124. package/es/table/src/store.d.ts +6 -0
  125. package/es/table/src/store.js +9 -6
  126. package/es/table/src/table.d.ts +539 -0
  127. package/es/table/src/table.js +14061 -15071
  128. package/es/table/src/use/cell-view.d.ts +10 -0
  129. package/es/table/src/use/cell-view.js +36 -33
  130. package/es/table/src/use/index.d.ts +1 -0
  131. package/es/table/src/use/index.js +1 -1
  132. package/es/table/src/util.d.ts +74 -0
  133. package/es/table/src/util.js +1038 -1026
  134. package/es/table/style.css +1 -1
  135. package/es/table/style.mini.css +1 -0
  136. package/es/toolbar/index.d.ts +340 -0
  137. package/es/toolbar/index.js +14 -9
  138. package/es/toolbar/src/toolbar.d.ts +75 -0
  139. package/es/toolbar/src/toolbar.js +605 -613
  140. package/es/toolbar/{style.min.css → style.mini.css} +1 -1
  141. package/es/ui/index.d.ts +86 -0
  142. package/es/ui/index.js +457 -501
  143. package/es/ui/src/anime.d.ts +10 -0
  144. package/es/ui/src/anime.js +40 -40
  145. package/es/ui/src/comp.d.ts +2 -0
  146. package/es/ui/src/comp.js +5 -2
  147. package/es/ui/src/dom.d.ts +80 -0
  148. package/es/ui/src/dom.js +377 -380
  149. package/es/ui/src/log.d.ts +6 -0
  150. package/es/ui/src/log.js +18 -13
  151. package/es/ui/src/utils.d.ts +23 -0
  152. package/es/ui/src/utils.js +57 -53
  153. package/es/ui/src/vn.d.ts +7 -0
  154. package/es/ui/src/vn.js +49 -42
  155. package/es/v-x-e-table/index.d.ts +3 -0
  156. package/es/v-x-e-table/index.js +6 -3
  157. package/es/vxe-colgroup/index.d.ts +3 -0
  158. package/es/vxe-colgroup/index.js +6 -3
  159. package/es/vxe-column/index.d.ts +3 -0
  160. package/es/vxe-column/index.js +6 -3
  161. package/es/vxe-grid/index.d.ts +3 -0
  162. package/es/vxe-grid/index.js +6 -3
  163. package/{lib/grid/style/style.min.css → es/vxe-grid/style.mini.css} +1 -1
  164. package/es/vxe-table/index.d.ts +3 -0
  165. package/es/vxe-table/index.js +6 -3
  166. package/es/vxe-table/style.css +1 -1
  167. package/es/vxe-table/style.mini.css +1 -0
  168. package/es/vxe-toolbar/index.d.ts +3 -0
  169. package/es/vxe-toolbar/index.js +6 -3
  170. package/es/vxe-toolbar/{style.min.css → style.mini.css} +1 -1
  171. package/es/vxe-ui/index.d.ts +3 -0
  172. package/es/vxe-ui/index.js +6 -3
  173. package/lib/colgroup/index.js +44 -18
  174. package/lib/colgroup/style/index.js +1 -1
  175. package/lib/column/index.js +44 -18
  176. package/lib/column/style/index.js +1 -1
  177. package/lib/components.js +58 -92
  178. package/lib/grid/index.js +42 -14
  179. package/lib/grid/src/emits.js +37 -6
  180. package/lib/grid/src/grid.js +850 -1195
  181. package/lib/grid/src/props.js +27 -11
  182. package/lib/grid/style/index.js +1 -1
  183. package/lib/{vxe-grid/style/style.min.css → grid/style/style.mini.css} +1 -1
  184. package/lib/iconfont.1792979665397.ttf +0 -0
  185. package/lib/iconfont.1792979665397.woff +0 -0
  186. package/lib/iconfont.1792979665397.woff2 +0 -0
  187. package/lib/index.common.js +35 -19
  188. package/lib/index.js +37 -0
  189. package/lib/index.umd.js +30584 -24324
  190. package/lib/index.umd.min.js +3 -1
  191. package/lib/locale/ar-EG.umd.js +948 -0
  192. package/lib/locale/de-DE.umd.js +948 -0
  193. package/lib/locale/en-US.umd.js +948 -0
  194. package/lib/locale/es-ES.umd.js +948 -0
  195. package/lib/locale/fr-FR.umd.js +948 -0
  196. package/lib/locale/hu-HU.umd.js +948 -0
  197. package/lib/locale/hy-AM.umd.js +948 -0
  198. package/lib/locale/id-ID.umd.js +948 -0
  199. package/lib/locale/it-IT.umd.js +948 -0
  200. package/lib/locale/ja-JP.umd.js +948 -0
  201. package/lib/locale/ko-KR.umd.js +948 -0
  202. package/lib/locale/lang/ar-EG.js +681 -664
  203. package/lib/locale/lang/ar-EG.umd.js +913 -892
  204. package/lib/locale/lang/de-DE.js +681 -664
  205. package/lib/locale/lang/de-DE.umd.js +913 -892
  206. package/lib/locale/lang/en-US.js +678 -661
  207. package/lib/locale/lang/en-US.umd.js +913 -892
  208. package/lib/locale/lang/es-ES.js +681 -664
  209. package/lib/locale/lang/es-ES.umd.js +913 -892
  210. package/lib/locale/lang/fr-FR.js +654 -637
  211. package/lib/locale/lang/fr-FR.umd.js +913 -892
  212. package/lib/locale/lang/hu-HU.js +681 -664
  213. package/lib/locale/lang/hu-HU.umd.js +913 -892
  214. package/lib/locale/lang/hy-AM.js +681 -664
  215. package/lib/locale/lang/hy-AM.umd.js +913 -892
  216. package/lib/locale/lang/id-ID.js +681 -664
  217. package/lib/locale/lang/id-ID.umd.js +913 -892
  218. package/lib/locale/lang/it-IT.js +661 -644
  219. package/lib/locale/lang/it-IT.umd.js +912 -891
  220. package/lib/locale/lang/ja-JP.js +710 -693
  221. package/lib/locale/lang/ja-JP.umd.js +913 -892
  222. package/lib/locale/lang/ko-KR.js +681 -664
  223. package/lib/locale/lang/ko-KR.umd.js +913 -892
  224. package/lib/locale/lang/ms-MY.js +681 -664
  225. package/lib/locale/lang/ms-MY.umd.js +913 -892
  226. package/lib/locale/lang/nb-NO.js +681 -664
  227. package/lib/locale/lang/nb-NO.umd.js +913 -892
  228. package/lib/locale/lang/pt-BR.js +681 -664
  229. package/lib/locale/lang/pt-BR.umd.js +913 -892
  230. package/lib/locale/lang/ru-RU.js +690 -673
  231. package/lib/locale/lang/ru-RU.umd.js +913 -892
  232. package/lib/locale/lang/th-TH.js +681 -664
  233. package/lib/locale/lang/th-TH.umd.js +913 -892
  234. package/lib/locale/lang/ug-CN.js +681 -664
  235. package/lib/locale/lang/ug-CN.umd.js +913 -892
  236. package/lib/locale/lang/uk-UA.js +674 -657
  237. package/lib/locale/lang/uk-UA.umd.js +913 -892
  238. package/lib/locale/lang/uz-UZ.js +583 -566
  239. package/lib/locale/lang/uz-UZ.umd.js +908 -887
  240. package/lib/locale/lang/vi-VN.js +681 -664
  241. package/lib/locale/lang/vi-VN.umd.js +913 -892
  242. package/lib/locale/lang/zh-CHT.js +681 -664
  243. package/lib/locale/lang/zh-CHT.umd.js +913 -892
  244. package/lib/locale/lang/zh-CN.js +681 -664
  245. package/lib/locale/lang/zh-CN.umd.js +913 -892
  246. package/lib/locale/lang/zh-HK.js +928 -7
  247. package/lib/locale/lang/zh-HK.umd.js +945 -20
  248. package/lib/locale/lang/zh-MO.js +928 -7
  249. package/lib/locale/lang/zh-MO.umd.js +945 -20
  250. package/lib/locale/lang/zh-TC.js +928 -7
  251. package/lib/locale/lang/zh-TC.umd.js +948 -0
  252. package/lib/locale/lang/zh-TW.js +928 -7
  253. package/lib/locale/lang/zh-TW.umd.js +945 -20
  254. package/lib/locale/ms-MY.umd.js +948 -0
  255. package/lib/locale/nb-NO.umd.js +948 -0
  256. package/lib/locale/pt-BR.umd.js +948 -0
  257. package/lib/locale/ru-RU.umd.js +948 -0
  258. package/lib/locale/th-TH.umd.js +948 -0
  259. package/lib/locale/ug-CN.umd.js +948 -0
  260. package/lib/locale/uk-UA.umd.js +948 -0
  261. package/lib/locale/uz-UZ.umd.js +948 -0
  262. package/lib/locale/vi-VN.umd.js +948 -0
  263. package/lib/locale/zh-CHT.umd.js +948 -0
  264. package/lib/locale/zh-CN.umd.js +948 -0
  265. package/lib/locale/zh-HK.umd.js +948 -0
  266. package/lib/locale/zh-MO.umd.js +948 -0
  267. package/lib/locale/zh-TC.umd.js +948 -0
  268. package/lib/locale/zh-TW.umd.js +948 -0
  269. package/lib/style.css +4501 -1
  270. package/lib/style.mini.css +1 -0
  271. package/lib/table/index.js +45 -17
  272. package/lib/table/module/custom/hook.js +132 -252
  273. package/lib/table/module/custom/panel.js +919 -970
  274. package/lib/table/module/edit/hook.js +248 -618
  275. package/lib/table/module/export/export-panel.js +390 -347
  276. package/lib/table/module/export/hook.js +745 -1179
  277. package/lib/table/module/export/import-panel.js +170 -136
  278. package/lib/table/module/export/util.js +37 -14
  279. package/lib/table/module/filter/hook.js +127 -227
  280. package/lib/table/module/filter/panel.js +177 -208
  281. package/lib/table/module/keyboard/hook.js +93 -172
  282. package/lib/table/module/menu/hook.js +86 -165
  283. package/lib/table/module/menu/panel.js +176 -141
  284. package/lib/table/module/validator/hook.js +164 -271
  285. package/lib/table/render/index.js +700 -1147
  286. package/lib/table/src/body.js +426 -559
  287. package/lib/table/src/cell.js +619 -987
  288. package/lib/table/src/column.js +55 -30
  289. package/lib/table/src/columnInfo.js +88 -110
  290. package/lib/table/src/emits.js +145 -13
  291. package/lib/table/src/footer.js +181 -240
  292. package/lib/table/src/group.js +56 -34
  293. package/lib/table/src/header.js +292 -367
  294. package/lib/table/src/props.js +27 -12
  295. package/lib/table/src/store.js +25 -9
  296. package/lib/table/src/table.js +14179 -1023
  297. package/lib/table/src/use/cell-view.js +47 -37
  298. package/lib/table/src/use/index.js +17 -15
  299. package/lib/table/src/util.js +236 -337
  300. package/lib/table/style/index.js +1 -1
  301. package/lib/table/style/style.css +1 -1
  302. package/lib/table/style/style.mini.css +1 -0
  303. package/lib/toolbar/index.js +42 -14
  304. package/lib/toolbar/src/toolbar.js +271 -379
  305. package/lib/toolbar/style/index.js +1 -1
  306. package/lib/toolbar/style/{style.min.css → style.mini.css} +1 -1
  307. package/lib/ui/index.js +153 -195
  308. package/lib/ui/src/anime.js +49 -29
  309. package/lib/ui/src/comp.js +23 -6
  310. package/lib/ui/src/dom.js +114 -147
  311. package/lib/ui/src/log.js +34 -18
  312. package/lib/ui/src/utils.js +57 -45
  313. package/lib/ui/src/vn.js +60 -34
  314. package/lib/ui/style/index.js +1 -1
  315. package/lib/v-x-e-table/index.js +35 -19
  316. package/lib/vxe-colgroup/index.js +35 -19
  317. package/lib/vxe-colgroup/style/index.js +1 -1
  318. package/lib/vxe-column/index.js +35 -19
  319. package/lib/vxe-column/style/index.js +1 -1
  320. package/lib/vxe-grid/index.js +35 -19
  321. package/lib/vxe-grid/style/index.js +1 -1
  322. package/{es/grid/style.min.css → lib/vxe-grid/style/style.mini.css} +1 -1
  323. package/lib/vxe-table/index.js +35 -19
  324. package/lib/vxe-table/style/index.js +1 -1
  325. package/lib/vxe-table/style/style.css +1 -1
  326. package/lib/vxe-table/style/style.mini.css +1 -0
  327. package/lib/vxe-toolbar/index.js +35 -19
  328. package/lib/vxe-toolbar/style/index.js +1 -1
  329. package/lib/vxe-toolbar/style/{style.min.css → style.mini.css} +1 -1
  330. package/lib/vxe-ui/index.js +35 -19
  331. package/lib/vxe-ui/style/index.js +1 -1
  332. package/package.json +8 -4
  333. package/packages/locale/lang/zh-HK.ts +907 -3
  334. package/packages/locale/lang/zh-MO.ts +907 -3
  335. package/packages/locale/lang/zh-TC.ts +907 -3
  336. package/packages/locale/lang/zh-TW.ts +907 -3
  337. package/packages/ui/index.ts +1 -28
  338. package/dist/style.min.css +0 -1
  339. package/es/index.css +0 -1
  340. package/es/index.min.css +0 -1
  341. package/es/style.min.css +0 -1
  342. package/es/table/style.min.css +0 -1
  343. package/es/vxe-table/style.min.css +0 -1
  344. package/es/vxe-v-x-e-table/index.js +0 -3
  345. package/lib/colgroup/index.min.js +0 -1
  346. package/lib/column/index.min.js +0 -1
  347. package/lib/components.min.js +0 -1
  348. package/lib/grid/index.min.js +0 -1
  349. package/lib/grid/src/emits.min.js +0 -1
  350. package/lib/grid/src/grid.min.js +0 -1
  351. package/lib/grid/src/props.min.js +0 -1
  352. package/lib/index.css +0 -1
  353. package/lib/index.min.css +0 -1
  354. package/lib/locale/lang/ar-EG.d.ts +0 -2
  355. package/lib/locale/lang/ar-EG.min.js +0 -1
  356. package/lib/locale/lang/de-DE.d.ts +0 -2
  357. package/lib/locale/lang/de-DE.min.js +0 -1
  358. package/lib/locale/lang/en-US.d.ts +0 -2
  359. package/lib/locale/lang/en-US.min.js +0 -1
  360. package/lib/locale/lang/es-ES.d.ts +0 -2
  361. package/lib/locale/lang/es-ES.min.js +0 -1
  362. package/lib/locale/lang/fr-FR.d.ts +0 -2
  363. package/lib/locale/lang/fr-FR.min.js +0 -1
  364. package/lib/locale/lang/hu-HU.d.ts +0 -2
  365. package/lib/locale/lang/hu-HU.min.js +0 -1
  366. package/lib/locale/lang/hy-AM.d.ts +0 -2
  367. package/lib/locale/lang/hy-AM.min.js +0 -1
  368. package/lib/locale/lang/id-ID.d.ts +0 -2
  369. package/lib/locale/lang/id-ID.min.js +0 -1
  370. package/lib/locale/lang/it-IT.d.ts +0 -2
  371. package/lib/locale/lang/it-IT.min.js +0 -1
  372. package/lib/locale/lang/ja-JP.d.ts +0 -2
  373. package/lib/locale/lang/ja-JP.min.js +0 -1
  374. package/lib/locale/lang/ko-KR.d.ts +0 -2
  375. package/lib/locale/lang/ko-KR.min.js +0 -1
  376. package/lib/locale/lang/ms-MY.d.ts +0 -2
  377. package/lib/locale/lang/ms-MY.min.js +0 -1
  378. package/lib/locale/lang/nb-NO.d.ts +0 -2
  379. package/lib/locale/lang/nb-NO.min.js +0 -1
  380. package/lib/locale/lang/pt-BR.d.ts +0 -2
  381. package/lib/locale/lang/pt-BR.min.js +0 -1
  382. package/lib/locale/lang/ru-RU.d.ts +0 -2
  383. package/lib/locale/lang/ru-RU.min.js +0 -1
  384. package/lib/locale/lang/th-TH.d.ts +0 -2
  385. package/lib/locale/lang/th-TH.min.js +0 -1
  386. package/lib/locale/lang/ug-CN.d.ts +0 -2
  387. package/lib/locale/lang/ug-CN.min.js +0 -1
  388. package/lib/locale/lang/uk-UA.d.ts +0 -2
  389. package/lib/locale/lang/uk-UA.min.js +0 -1
  390. package/lib/locale/lang/uz-UZ.d.ts +0 -2
  391. package/lib/locale/lang/uz-UZ.min.js +0 -1
  392. package/lib/locale/lang/vi-VN.d.ts +0 -2
  393. package/lib/locale/lang/vi-VN.min.js +0 -1
  394. package/lib/locale/lang/zh-CHT.d.ts +0 -2
  395. package/lib/locale/lang/zh-CHT.min.js +0 -1
  396. package/lib/locale/lang/zh-CN.d.ts +0 -2
  397. package/lib/locale/lang/zh-CN.min.js +0 -1
  398. package/lib/locale/lang/zh-HK.d.ts +0 -2
  399. package/lib/locale/lang/zh-HK.min.js +0 -1
  400. package/lib/locale/lang/zh-MO.d.ts +0 -2
  401. package/lib/locale/lang/zh-MO.min.js +0 -1
  402. package/lib/locale/lang/zh-TC.min.js +0 -1
  403. package/lib/locale/lang/zh-TW.d.ts +0 -2
  404. package/lib/locale/lang/zh-TW.min.js +0 -1
  405. package/lib/style.min.css +0 -1
  406. package/lib/table/index.min.js +0 -1
  407. package/lib/table/module/custom/hook.min.js +0 -1
  408. package/lib/table/module/custom/panel.min.js +0 -1
  409. package/lib/table/module/edit/hook.min.js +0 -1
  410. package/lib/table/module/export/export-panel.min.js +0 -1
  411. package/lib/table/module/export/hook.min.js +0 -1
  412. package/lib/table/module/export/import-panel.min.js +0 -1
  413. package/lib/table/module/export/util.min.js +0 -1
  414. package/lib/table/module/filter/hook.min.js +0 -1
  415. package/lib/table/module/filter/panel.min.js +0 -1
  416. package/lib/table/module/keyboard/hook.min.js +0 -1
  417. package/lib/table/module/menu/hook.min.js +0 -1
  418. package/lib/table/module/menu/panel.min.js +0 -1
  419. package/lib/table/module/validator/hook.min.js +0 -1
  420. package/lib/table/render/index.min.js +0 -1
  421. package/lib/table/src/body.min.js +0 -1
  422. package/lib/table/src/cell.min.js +0 -1
  423. package/lib/table/src/column.min.js +0 -1
  424. package/lib/table/src/columnInfo.min.js +0 -1
  425. package/lib/table/src/emits.min.js +0 -1
  426. package/lib/table/src/footer.min.js +0 -1
  427. package/lib/table/src/group.min.js +0 -1
  428. package/lib/table/src/header.min.js +0 -1
  429. package/lib/table/src/props.min.js +0 -1
  430. package/lib/table/src/store.min.js +0 -1
  431. package/lib/table/src/table.min.js +0 -1
  432. package/lib/table/src/use/cell-view.min.js +0 -1
  433. package/lib/table/src/use/index.min.js +0 -1
  434. package/lib/table/src/util.min.js +0 -1
  435. package/lib/table/style/style.min.css +0 -1
  436. package/lib/toolbar/index.min.js +0 -1
  437. package/lib/toolbar/src/toolbar.min.js +0 -1
  438. package/lib/ui/index.min.js +0 -1
  439. package/lib/ui/src/anime.min.js +0 -1
  440. package/lib/ui/src/comp.min.js +0 -1
  441. package/lib/ui/src/dom.min.js +0 -1
  442. package/lib/ui/src/log.min.js +0 -1
  443. package/lib/ui/src/utils.min.js +0 -1
  444. package/lib/ui/src/vn.min.js +0 -1
  445. package/lib/ui/style/style.min.css +0 -0
  446. package/lib/v-x-e-table/index.min.js +0 -1
  447. package/lib/v-x-e-table/style/index.js +0 -1
  448. package/lib/v-x-e-table/style/style.css +0 -0
  449. package/lib/v-x-e-table/style/style.min.css +0 -0
  450. package/lib/vxe-colgroup/index.min.js +0 -1
  451. package/lib/vxe-colgroup/style/style.min.css +0 -0
  452. package/lib/vxe-column/index.min.js +0 -1
  453. package/lib/vxe-column/style/style.min.css +0 -0
  454. package/lib/vxe-grid/index.min.js +0 -1
  455. package/lib/vxe-table/index.min.js +0 -1
  456. package/lib/vxe-table/style/style.min.css +0 -1
  457. package/lib/vxe-toolbar/index.min.js +0 -1
  458. package/lib/vxe-ui/index.min.js +0 -1
  459. package/lib/vxe-ui/style/style.min.css +0 -0
  460. package/lib/vxe-v-x-e-table/index.js +0 -21
  461. package/lib/vxe-v-x-e-table/index.min.js +0 -1
  462. package/lib/vxe-v-x-e-table/style/index.js +0 -1
  463. package/lib/vxe-v-x-e-table/style/style.css +0 -0
  464. package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
  465. /package/{es/iconfont.1792838769925.ttf → dist/iconfont.1792979665397.ttf} +0 -0
  466. /package/{es/iconfont.1792838769925.woff → dist/iconfont.1792979665397.woff} +0 -0
  467. /package/{es/iconfont.1792838769925.woff2 → dist/iconfont.1792979665397.woff2} +0 -0
  468. /package/es/colgroup/{style.min.css → style.mini.css} +0 -0
  469. /package/es/column/{style.min.css → style.mini.css} +0 -0
  470. /package/{lib/iconfont.1792838769925.ttf → es/iconfont.1792979665397.ttf} +0 -0
  471. /package/{lib/iconfont.1792838769925.woff → es/iconfont.1792979665397.woff} +0 -0
  472. /package/{lib/iconfont.1792838769925.woff2 → es/iconfont.1792979665397.woff2} +0 -0
  473. /package/es/ui/{style.min.css → style.mini.css} +0 -0
  474. /package/es/{v-x-e-table/style.css → vxe-colgroup/style.mini.css} +0 -0
  475. /package/es/{v-x-e-table/style.min.css → vxe-column/style.mini.css} +0 -0
  476. /package/es/{vxe-colgroup/style.min.css → vxe-ui/style.mini.css} +0 -0
  477. /package/{es/vxe-column/style.min.css → lib/colgroup/style/style.mini.css} +0 -0
  478. /package/{es/vxe-ui/style.min.css → lib/column/style/style.mini.css} +0 -0
  479. /package/{es/vxe-v-x-e-table/style.css → lib/ui/style/style.mini.css} +0 -0
  480. /package/{es/vxe-v-x-e-table/style.min.css → lib/vxe-colgroup/style/style.mini.css} +0 -0
  481. /package/lib/{colgroup/style/style.min.css → vxe-column/style/style.mini.css} +0 -0
  482. /package/lib/{column/style/style.min.css → vxe-ui/style/style.mini.css} +0 -0
@@ -1,62 +1,55 @@
1
1
  "use strict";
2
-
3
- var _vue = require("vue");
4
- var _xeUtils = _interopRequireDefault(require("xe-utils"));
5
- var _ui = require("../../../ui");
6
- var _utils = require("../../../ui/src/utils");
7
- var _util = require("../../src/util");
8
- var _dom = require("../../../ui/src/dom");
9
- var _log = require("../../../ui/src/log");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const {
12
- warnLog,
13
- errLog
14
- } = (0, _log.createComponentLog)('table');
15
- const {
16
- getConfig,
17
- renderer,
18
- hooks,
19
- getI18n
20
- } = _ui.VxeUI;
21
- const tableEditMethodKeys = ['insert', 'insertAt', 'insertNextAt', 'insertChild', 'insertChildAt', 'insertChildNextAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', 'removeCurrentRow', 'getRecordset', 'getInsertRecords', 'getRemoveRecords', 'getUpdateRecords', 'getEditRecord', 'getActiveRecord', 'getEditCell', 'getSelectedCell', 'clearEdit', 'clearActived', 'clearSelected', 'isEditByRow', 'isActiveByRow', 'setEditRow', 'setActiveRow', 'setEditCell', 'setActiveCell', 'setSelectCell'];
22
- hooks.add('tableEditModule', {
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var import_vue = require("vue");
25
+ var import_xe_utils = __toESM(require("xe-utils"));
26
+ var import_ui = require("../../../ui");
27
+ var import_utils = require("../../../ui/src/utils");
28
+ var import_util = require("../../src/util");
29
+ var import_dom = require("../../../ui/src/dom");
30
+ var import_log = require("../../../ui/src/log");
31
+ const { warnLog, errLog } = (0, import_log.createComponentLog)("table");
32
+ const { getConfig, renderer, hooks, getI18n } = import_ui.VxeUI;
33
+ const tableEditMethodKeys = ["insert", "insertAt", "insertNextAt", "insertChild", "insertChildAt", "insertChildNextAt", "remove", "removeCheckboxRow", "removeRadioRow", "removeCurrentRow", "getRecordset", "getInsertRecords", "getRemoveRecords", "getUpdateRecords", "getEditRecord", "getActiveRecord", "getEditCell", "getSelectedCell", "clearEdit", "clearActived", "clearSelected", "isEditByRow", "isActiveByRow", "setEditRow", "setActiveRow", "setEditCell", "setActiveCell", "setSelectCell"];
34
+ hooks.add("tableEditModule", {
23
35
  setupTable($xeTable) {
24
- const {
25
- props,
26
- reactData,
27
- internalData
28
- } = $xeTable;
29
- const {
30
- refElem
31
- } = $xeTable.getRefMaps();
32
- const {
33
- computeMouseOpts,
34
- computeEditOpts,
35
- computeCheckboxOpts,
36
- computeTreeOpts,
37
- computeValidOpts,
38
- computeRendererOpts
39
- } = $xeTable.getComputeMaps();
40
- const browseObj = _xeUtils.default.browse();
36
+ const { props, reactData, internalData } = $xeTable;
37
+ const { refElem } = $xeTable.getRefMaps();
38
+ const { computeMouseOpts, computeEditOpts, computeCheckboxOpts, computeTreeOpts, computeValidOpts, computeRendererOpts } = $xeTable.getComputeMaps();
39
+ const browseObj = import_xe_utils.default.browse();
41
40
  let editMethods = {};
42
41
  let editPrivateMethods = {};
43
42
  const getEditColumnModel = (row, column) => {
44
- const {
45
- model,
46
- editRender
47
- } = column;
43
+ const { model, editRender } = column;
48
44
  if (editRender) {
49
- model.value = (0, _util.getCellValue)(row, column);
45
+ model.value = (0, import_util.getCellValue)(row, column);
50
46
  model.update = false;
51
47
  }
52
48
  };
53
49
  const setEditColumnModel = (row, column) => {
54
- const {
55
- model,
56
- editRender
57
- } = column;
50
+ const { model, editRender } = column;
58
51
  if (editRender && model.update) {
59
- (0, _util.setCellValue)(row, column, model.value);
52
+ (0, import_util.setCellValue)(row, column, model.value);
60
53
  model.update = false;
61
54
  model.value = null;
62
55
  }
@@ -64,217 +57,109 @@ hooks.add('tableEditModule', {
64
57
  const removeCellSelectedClass = () => {
65
58
  const el = refElem.value;
66
59
  if (el) {
67
- const cell = el.querySelector('.col--selected');
60
+ const cell = el.querySelector(".col--selected");
68
61
  if (cell) {
69
- (0, _dom.removeClass)(cell, 'col--selected');
62
+ (0, import_dom.removeClass)(cell, "col--selected");
70
63
  }
71
64
  }
72
65
  };
73
66
  const syncActivedCell = () => {
74
- const {
75
- editStore,
76
- tableColumn
77
- } = reactData;
67
+ const { editStore, tableColumn } = reactData;
78
68
  const editOpts = computeEditOpts.value;
79
- const {
80
- actived
81
- } = editStore;
82
- const {
83
- row,
84
- column
85
- } = actived;
69
+ const { actived } = editStore;
70
+ const { row, column } = actived;
86
71
  if (row && column) {
87
- if (editOpts.mode === 'row') {
88
- tableColumn.forEach(column => setEditColumnModel(row, column));
72
+ if (editOpts.mode === "row") {
73
+ tableColumn.forEach((column2) => setEditColumnModel(row, column2));
89
74
  } else {
90
75
  setEditColumnModel(row, column);
91
76
  }
92
77
  }
93
78
  };
94
79
  const insertTreeRow = (newRecords, isAppend) => {
95
- const {
96
- tableFullTreeData,
97
- afterFullData,
98
- fullDataRowIdData,
99
- fullAllDataRowIdData
100
- } = internalData;
80
+ const { tableFullTreeData, afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
101
81
  const treeOpts = computeTreeOpts.value;
102
- const {
103
- rowField,
104
- parentField,
105
- mapChildrenField
106
- } = treeOpts;
82
+ const { rowField, parentField, mapChildrenField } = treeOpts;
107
83
  const childrenField = treeOpts.children || treeOpts.childrenField;
108
- const funcName = isAppend ? 'push' : 'unshift';
109
- newRecords.forEach(item => {
84
+ const funcName = isAppend ? "push" : "unshift";
85
+ newRecords.forEach((item) => {
110
86
  const parentRowId = item[parentField];
111
- const rowid = (0, _util.getRowid)($xeTable, item);
112
- const matchObj = parentRowId ? _xeUtils.default.findTree(tableFullTreeData, item => parentRowId === item[rowField], {
113
- children: mapChildrenField
114
- }) : null;
87
+ const rowid = (0, import_util.getRowid)($xeTable, item);
88
+ const matchObj = parentRowId ? import_xe_utils.default.findTree(tableFullTreeData, (item2) => parentRowId === item2[rowField], { children: mapChildrenField }) : null;
115
89
  if (matchObj) {
116
- const {
117
- item: parentRow
118
- } = matchObj;
119
- const parentRest = fullAllDataRowIdData[(0, _util.getRowid)($xeTable, parentRow)];
90
+ const { item: parentRow } = matchObj;
91
+ const parentRest = fullAllDataRowIdData[(0, import_util.getRowid)($xeTable, parentRow)];
120
92
  const parentLevel = parentRest ? parentRest.level : 0;
121
93
  let pChilds = parentRow[childrenField];
122
94
  let pMapChilds = parentRow[mapChildrenField];
123
- if (!_xeUtils.default.isArray(pChilds)) {
95
+ if (!import_xe_utils.default.isArray(pChilds)) {
124
96
  pChilds = parentRow[childrenField] = [];
125
97
  }
126
- if (!_xeUtils.default.isArray(pMapChilds)) {
98
+ if (!import_xe_utils.default.isArray(pMapChilds)) {
127
99
  pMapChilds = parentRow[mapChildrenField] = [];
128
100
  }
129
101
  pChilds[funcName](item);
130
102
  pMapChilds[funcName](item);
131
- const rest = {
132
- row: item,
133
- rowid,
134
- _seq: -1,
135
- seq: -1,
136
- index: -1,
137
- _index: -1,
138
- $index: -1,
139
- treeIndex: -1,
140
- _tIndex: -1,
141
- items: pChilds,
142
- parent: parentRow,
143
- level: parentLevel + 1,
144
- height: 0,
145
- resizeHeight: 0,
146
- oTop: 0,
147
- expandHeight: 0
148
- };
103
+ const rest = { row: item, rowid, _seq: -1, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items: pChilds, parent: parentRow, level: parentLevel + 1, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
149
104
  fullDataRowIdData[rowid] = rest;
150
105
  fullAllDataRowIdData[rowid] = rest;
151
106
  } else {
152
107
  if (parentRowId) {
153
- warnLog('vxe.error.unableInsert');
108
+ warnLog("vxe.error.unableInsert");
154
109
  }
155
110
  afterFullData[funcName](item);
156
111
  tableFullTreeData[funcName](item);
157
- const rest = {
158
- row: item,
159
- rowid,
160
- _seq: -1,
161
- seq: -1,
162
- index: -1,
163
- _index: -1,
164
- $index: -1,
165
- treeIndex: -1,
166
- _tIndex: -1,
167
- items: tableFullTreeData,
168
- parent: null,
169
- level: 0,
170
- height: 0,
171
- resizeHeight: 0,
172
- oTop: 0,
173
- expandHeight: 0
174
- };
112
+ const rest = { row: item, rowid, _seq: -1, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items: tableFullTreeData, parent: null, level: 0, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
175
113
  fullDataRowIdData[rowid] = rest;
176
114
  fullAllDataRowIdData[rowid] = rest;
177
115
  }
178
116
  });
179
117
  };
180
- // const insertGroupRow = (newRecords: any[], isAppend: boolean) => {
181
- // }
182
118
  const handleInsertRowAt = (records, targetRowOrRowid, isInsertNextRow) => {
183
- const {
184
- treeConfig
185
- } = props;
186
- const {
187
- isRowGroupStatus
188
- } = reactData;
189
- const {
190
- tableFullTreeData,
191
- afterFullData,
192
- mergeBodyList,
193
- tableFullData,
194
- fullDataRowIdData,
195
- fullAllDataRowIdData,
196
- insertRowMaps,
197
- removeRowMaps
198
- } = internalData;
119
+ const { treeConfig } = props;
120
+ const { isRowGroupStatus } = reactData;
121
+ const { tableFullTreeData, afterFullData, mergeBodyList, tableFullData, fullDataRowIdData, fullAllDataRowIdData, insertRowMaps, removeRowMaps } = internalData;
199
122
  const treeOpts = computeTreeOpts.value;
200
- const {
201
- transform,
202
- parentField,
203
- rowField,
204
- mapChildrenField
205
- } = treeOpts;
123
+ const { transform, parentField, rowField, mapChildrenField } = treeOpts;
206
124
  const childrenField = treeOpts.children || treeOpts.childrenField;
207
- if (!_xeUtils.default.isArray(records)) {
125
+ if (!import_xe_utils.default.isArray(records)) {
208
126
  records = [records];
209
127
  }
210
128
  let targetRow = targetRowOrRowid;
211
- if (_xeUtils.default.isString(targetRowOrRowid) || _xeUtils.default.isNumber(targetRowOrRowid)) {
129
+ if (import_xe_utils.default.isString(targetRowOrRowid) || import_xe_utils.default.isNumber(targetRowOrRowid)) {
212
130
  const rowRest = fullAllDataRowIdData[targetRowOrRowid];
213
131
  if (rowRest) {
214
132
  targetRow = rowRest.row;
215
133
  }
216
134
  }
217
135
  if (!records.length) {
218
- return Promise.resolve({
219
- row: null,
220
- rows: []
221
- });
136
+ return Promise.resolve({ row: null, rows: [] });
222
137
  }
223
138
  $xeTable.handlePushStack();
224
- const newRecords = (0, _vue.reactive)($xeTable.defineField(records.map(record => Object.assign(treeConfig && transform ? {
225
- [mapChildrenField]: [],
226
- [childrenField]: []
227
- } : {}, record))));
139
+ const newRecords = (0, import_vue.reactive)($xeTable.defineField(records.map((record) => Object.assign(treeConfig && transform ? { [mapChildrenField]: [], [childrenField]: [] } : {}, record))));
228
140
  let treeRecords = [];
229
141
  if (treeConfig && transform) {
230
- treeRecords = _xeUtils.default.toArrayTree(newRecords, {
231
- key: rowField,
232
- parentKey: parentField,
233
- children: childrenField
234
- });
142
+ treeRecords = import_xe_utils.default.toArrayTree(newRecords, { key: rowField, parentKey: parentField, children: childrenField });
235
143
  }
236
- if (_xeUtils.default.eqNull(targetRow)) {
237
- // 如果为虚拟树
144
+ if (import_xe_utils.default.eqNull(targetRow)) {
238
145
  if (treeConfig && transform) {
239
146
  insertTreeRow(newRecords, false);
240
147
  } else if (isRowGroupStatus) {
241
- // 如果分组
242
148
  if (treeConfig) {
243
- throw new Error(getI18n('vxe.error.noTree', ['insert']));
149
+ throw new Error(getI18n("vxe.error.noTree", ["insert"]));
244
150
  }
245
- errLog(getI18n('vxe.error.noGroup', ['insert']));
246
- // insertGroupRow(newRecords, false)
151
+ errLog(getI18n("vxe.error.noGroup", ["insert"]));
247
152
  } else {
248
- newRecords.forEach(item => {
249
- const rowid = (0, _util.getRowid)($xeTable, item);
250
- const rest = {
251
- row: item,
252
- rowid,
253
- _seq: -1,
254
- seq: -1,
255
- index: -1,
256
- _index: -1,
257
- $index: -1,
258
- treeIndex: -1,
259
- _tIndex: -1,
260
- items: afterFullData,
261
- parent: null,
262
- level: 0,
263
- height: 0,
264
- resizeHeight: 0,
265
- oTop: 0,
266
- expandHeight: 0
267
- };
153
+ newRecords.forEach((item) => {
154
+ const rowid = (0, import_util.getRowid)($xeTable, item);
155
+ const rest = { row: item, rowid, _seq: -1, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items: afterFullData, parent: null, level: 0, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
268
156
  fullDataRowIdData[rowid] = rest;
269
157
  fullAllDataRowIdData[rowid] = rest;
270
158
  afterFullData.unshift(item);
271
159
  tableFullData.unshift(item);
272
160
  });
273
- // 刷新单元格合并
274
- mergeBodyList.forEach(mergeItem => {
275
- const {
276
- row: mergeRowIndex
277
- } = mergeItem;
161
+ mergeBodyList.forEach((mergeItem) => {
162
+ const { row: mergeRowIndex } = mergeItem;
278
163
  if (mergeRowIndex >= 0) {
279
164
  mergeItem.row = mergeRowIndex + newRecords.length;
280
165
  }
@@ -282,37 +167,17 @@ hooks.add('tableEditModule', {
282
167
  }
283
168
  } else {
284
169
  if (targetRow === -1) {
285
- // 如果为虚拟树
286
170
  if (treeConfig && transform) {
287
171
  insertTreeRow(newRecords, true);
288
172
  } else if (isRowGroupStatus) {
289
- // 如果分组
290
173
  if (treeConfig) {
291
- throw new Error(getI18n('vxe.error.noTree', ['insert']));
174
+ throw new Error(getI18n("vxe.error.noTree", ["insert"]));
292
175
  }
293
- errLog(getI18n('vxe.error.noGroup', ['insert']));
294
- // insertGroupRow(newRecords, true)
176
+ errLog(getI18n("vxe.error.noGroup", ["insert"]));
295
177
  } else {
296
- newRecords.forEach(item => {
297
- const rowid = (0, _util.getRowid)($xeTable, item);
298
- const rest = {
299
- row: item,
300
- rowid,
301
- _seq: -1,
302
- seq: -1,
303
- index: -1,
304
- _index: -1,
305
- treeIndex: -1,
306
- _tIndex: -1,
307
- $index: -1,
308
- items: afterFullData,
309
- parent: null,
310
- level: 0,
311
- height: 0,
312
- resizeHeight: 0,
313
- oTop: 0,
314
- expandHeight: 0
315
- };
178
+ newRecords.forEach((item) => {
179
+ const rowid = (0, import_util.getRowid)($xeTable, item);
180
+ const rest = { row: item, rowid, _seq: -1, seq: -1, index: -1, _index: -1, treeIndex: -1, _tIndex: -1, $index: -1, items: afterFullData, parent: null, level: 0, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
316
181
  fullDataRowIdData[rowid] = rest;
317
182
  fullAllDataRowIdData[rowid] = rest;
318
183
  afterFullData.push(item);
@@ -320,28 +185,23 @@ hooks.add('tableEditModule', {
320
185
  });
321
186
  }
322
187
  } else {
323
- // 如果为虚拟树
324
188
  if (treeConfig && transform) {
325
- const matchMapObj = _xeUtils.default.findTree(tableFullTreeData, item => targetRow[rowField] === item[rowField], {
326
- children: mapChildrenField
327
- });
189
+ const matchMapObj = import_xe_utils.default.findTree(tableFullTreeData, (item) => targetRow[rowField] === item[rowField], { children: mapChildrenField });
328
190
  if (matchMapObj) {
329
- const {
330
- parent: parentRow
331
- } = matchMapObj;
191
+ const { parent: parentRow } = matchMapObj;
332
192
  const parentMapChilds = parentRow ? parentRow[mapChildrenField] : tableFullTreeData;
333
- const parentRest = fullAllDataRowIdData[(0, _util.getRowid)($xeTable, parentRow)];
193
+ const parentRest = fullAllDataRowIdData[(0, import_util.getRowid)($xeTable, parentRow)];
334
194
  const parentLevel = parentRest ? parentRest.level : 0;
335
195
  treeRecords.forEach((row, i) => {
336
196
  if (parentRow) {
337
197
  if (row[parentField] !== parentRow[rowField]) {
338
- errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, `${parentField}=${parentRow[rowField]}`]);
198
+ errLog("vxe.error.errProp", [`${parentField}=${row[parentField]}`, `${parentField}=${parentRow[rowField]}`]);
339
199
  row[parentField] = parentRow[rowField];
340
200
  }
341
201
  } else {
342
202
  if (row[parentField] !== null) {
343
- if (!_xeUtils.default.eqNull(row[parentField])) {
344
- errLog('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
203
+ if (!import_xe_utils.default.eqNull(row[parentField])) {
204
+ errLog("vxe.error.errProp", [`${parentField}=${row[parentField]}`, "null"]);
345
205
  }
346
206
  row[parentField] = null;
347
207
  }
@@ -352,39 +212,17 @@ hooks.add('tableEditModule', {
352
212
  }
353
213
  parentMapChilds.splice(targetIndex, 0, row);
354
214
  });
355
- _xeUtils.default.eachTree(treeRecords, item => {
356
- const rowid = (0, _util.getRowid)($xeTable, item);
357
- const rest = {
358
- row: item,
359
- rowid,
360
- _seq: -1,
361
- seq: -1,
362
- index: -1,
363
- _index: -1,
364
- $index: -1,
365
- treeIndex: -1,
366
- _tIndex: -1,
367
- items: parentMapChilds,
368
- parent: parentRow,
369
- level: parentLevel + 1,
370
- height: 0,
371
- resizeHeight: 0,
372
- oTop: 0,
373
- expandHeight: 0
374
- };
215
+ import_xe_utils.default.eachTree(treeRecords, (item) => {
216
+ const rowid = (0, import_util.getRowid)($xeTable, item);
217
+ const rest = { row: item, rowid, _seq: -1, seq: -1, index: -1, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items: parentMapChilds, parent: parentRow, level: parentLevel + 1, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
375
218
  if (item[childrenField]) {
376
219
  item[mapChildrenField] = item[childrenField];
377
220
  }
378
221
  fullDataRowIdData[rowid] = rest;
379
222
  fullAllDataRowIdData[rowid] = rest;
380
- }, {
381
- children: childrenField
382
- });
383
- // 源
223
+ }, { children: childrenField });
384
224
  if (parentRow) {
385
- const matchObj = _xeUtils.default.findTree(tableFullTreeData, item => targetRow[rowField] === item[rowField], {
386
- children: childrenField
387
- });
225
+ const matchObj = import_xe_utils.default.findTree(tableFullTreeData, (item) => targetRow[rowField] === item[rowField], { children: childrenField });
388
226
  if (matchObj) {
389
227
  const parentChilds = matchObj.items;
390
228
  let targetIndex = matchObj.index;
@@ -395,34 +233,31 @@ hooks.add('tableEditModule', {
395
233
  }
396
234
  }
397
235
  } else {
398
- warnLog('vxe.error.unableInsert');
236
+ warnLog("vxe.error.unableInsert");
399
237
  insertTreeRow(newRecords, true);
400
238
  }
401
239
  } else if (isRowGroupStatus) {
402
- // 如果分组
403
240
  if (treeConfig) {
404
- throw new Error(getI18n('vxe.error.noTree', ['insert']));
241
+ throw new Error(getI18n("vxe.error.noTree", ["insert"]));
405
242
  }
406
- errLog(getI18n('vxe.error.noGroup', ['insert']));
243
+ errLog(getI18n("vxe.error.noGroup", ["insert"]));
407
244
  } else {
408
245
  if (treeConfig) {
409
- throw new Error(getI18n('vxe.error.noTree', ['insert']));
246
+ throw new Error(getI18n("vxe.error.noTree", ["insert"]));
410
247
  }
411
248
  let afIndex = -1;
412
- // 如果是可视索引
413
- if (_xeUtils.default.isNumber(targetRow)) {
249
+ if (import_xe_utils.default.isNumber(targetRow)) {
414
250
  if (targetRow < afterFullData.length) {
415
251
  afIndex = targetRow;
416
252
  }
417
253
  } else {
418
254
  afIndex = $xeTable.findRowIndexOf(afterFullData, targetRow);
419
255
  }
420
- // 如果是插入指定行的下一行
421
256
  if (isInsertNextRow) {
422
257
  afIndex = Math.min(afterFullData.length, afIndex + 1);
423
258
  }
424
259
  if (afIndex === -1) {
425
- throw new Error(getI18n('vxe.error.unableInsert'));
260
+ throw new Error(getI18n("vxe.error.unableInsert"));
426
261
  }
427
262
  afterFullData.splice(afIndex, 0, ...newRecords);
428
263
  const tfIndex = $xeTable.findRowIndexOf(tableFullData, targetRow);
@@ -431,12 +266,8 @@ hooks.add('tableEditModule', {
431
266
  } else {
432
267
  tableFullData.push(...newRecords);
433
268
  }
434
- // 刷新单元格合并
435
- mergeBodyList.forEach(mergeItem => {
436
- const {
437
- row: mergeRowIndex,
438
- rowspan: mergeRowspan
439
- } = mergeItem;
269
+ mergeBodyList.forEach((mergeItem) => {
270
+ const { row: mergeRowIndex, rowspan: mergeRowspan } = mergeItem;
440
271
  if (mergeRowIndex >= afIndex) {
441
272
  mergeItem.row = mergeRowIndex + newRecords.length;
442
273
  } else if (isInsertNextRow ? mergeRowIndex + mergeRowspan >= afIndex : mergeRowIndex + mergeRowspan > afIndex) {
@@ -446,9 +277,8 @@ hooks.add('tableEditModule', {
446
277
  }
447
278
  }
448
279
  }
449
- const handleStatus = newRow => {
450
- const rowid = (0, _util.getRowid)($xeTable, newRow);
451
- // 如果是被删除的数据,则还原状态
280
+ const handleStatus = (newRow) => {
281
+ const rowid = (0, import_util.getRowid)($xeTable, newRow);
452
282
  if (removeRowMaps[rowid]) {
453
283
  delete removeRowMaps[rowid];
454
284
  if (insertRowMaps[rowid]) {
@@ -458,11 +288,8 @@ hooks.add('tableEditModule', {
458
288
  insertRowMaps[rowid] = newRow;
459
289
  }
460
290
  };
461
- // 如果为虚拟树
462
291
  if (treeConfig && transform) {
463
- _xeUtils.default.eachTree(treeRecords, handleStatus, {
464
- children: mapChildrenField
465
- });
292
+ import_xe_utils.default.eachTree(treeRecords, handleStatus, { children: mapChildrenField });
466
293
  } else {
467
294
  newRecords.forEach(handleStatus);
468
295
  }
@@ -480,7 +307,7 @@ hooks.add('tableEditModule', {
480
307
  if (reactData.scrollYLoad) {
481
308
  $xeTable.updateScrollYSpace();
482
309
  }
483
- return (0, _vue.nextTick)().then(() => {
310
+ return (0, import_vue.nextTick)().then(() => {
484
311
  $xeTable.updateCellAreas();
485
312
  return $xeTable.recalculate(true);
486
313
  }).then(() => {
@@ -491,63 +318,42 @@ hooks.add('tableEditModule', {
491
318
  });
492
319
  };
493
320
  const handleInsertChildRowAt = (records, parentRowOrParentId, targetRow, isInsertNextRow) => {
494
- const {
495
- treeConfig
496
- } = props;
497
- const {
498
- fullAllDataRowIdData
499
- } = internalData;
321
+ const { treeConfig } = props;
322
+ const { fullAllDataRowIdData } = internalData;
500
323
  const treeOpts = computeTreeOpts.value;
501
- const {
502
- transform,
503
- rowField,
504
- parentField
505
- } = treeOpts;
324
+ const { transform, rowField, parentField } = treeOpts;
506
325
  if (treeConfig && transform) {
507
- if (!_xeUtils.default.isArray(records)) {
326
+ if (!import_xe_utils.default.isArray(records)) {
508
327
  records = [records];
509
328
  }
510
329
  let parentRow = parentRowOrParentId;
511
- if (_xeUtils.default.isString(parentRowOrParentId) || _xeUtils.default.isNumber(parentRowOrParentId)) {
330
+ if (import_xe_utils.default.isString(parentRowOrParentId) || import_xe_utils.default.isNumber(parentRowOrParentId)) {
512
331
  const rowRest = fullAllDataRowIdData[parentRowOrParentId];
513
332
  if (rowRest) {
514
333
  parentRow = rowRest.row;
515
334
  }
516
335
  }
517
- return handleInsertRowAt(records.map(item => Object.assign({}, item, {
518
- [parentField]: parentRow[rowField]
519
- })), targetRow, isInsertNextRow);
336
+ return handleInsertRowAt(records.map((item) => Object.assign({}, item, { [parentField]: parentRow[rowField] })), targetRow, isInsertNextRow);
520
337
  } else {
521
- errLog('vxe.error.errProp', ['tree-config.transform=false', 'tree-config.transform=true']);
338
+ errLog("vxe.error.errProp", ["tree-config.transform=false", "tree-config.transform=true"]);
522
339
  }
523
- return Promise.resolve({
524
- row: null,
525
- rows: []
526
- });
340
+ return Promise.resolve({ row: null, rows: [] });
527
341
  };
528
342
  const handleClearEdit = (evnt, targetRow) => {
529
- const {
530
- editStore
531
- } = reactData;
532
- const {
533
- actived,
534
- focused
535
- } = editStore;
536
- const {
537
- row,
538
- column
539
- } = actived;
343
+ const { editStore } = reactData;
344
+ const { actived, focused } = editStore;
345
+ const { row, column } = actived;
540
346
  const validOpts = computeValidOpts.value;
541
347
  if (row || column) {
542
- if (targetRow && (0, _util.getRowid)($xeTable, targetRow) !== (0, _util.getRowid)($xeTable, row)) {
543
- return (0, _vue.nextTick)();
348
+ if (targetRow && (0, import_util.getRowid)($xeTable, targetRow) !== (0, import_util.getRowid)($xeTable, row)) {
349
+ return (0, import_vue.nextTick)();
544
350
  }
545
351
  syncActivedCell();
546
352
  $xeTable.updateFooter();
547
353
  actived.args = null;
548
354
  actived.row = null;
549
355
  actived.column = null;
550
- $xeTable.dispatchEvent('edit-closed', {
356
+ $xeTable.dispatchEvent("edit-closed", {
551
357
  row,
552
358
  rowIndex: $xeTable.getRowIndex(row),
553
359
  $rowIndex: $xeTable.getVMRowIndex(row),
@@ -559,63 +365,35 @@ hooks.add('tableEditModule', {
559
365
  focused.row = null;
560
366
  focused.column = null;
561
367
  if (validOpts.autoClear) {
562
- if (validOpts.msgMode !== 'full' || getConfig().cellVaildMode === 'obsolete') {
368
+ if (validOpts.msgMode !== "full" || getConfig().cellVaildMode === "obsolete") {
563
369
  if ($xeTable.clearValidate) {
564
370
  return $xeTable.clearValidate();
565
371
  }
566
372
  }
567
373
  }
568
- return (0, _vue.nextTick)().then(() => $xeTable.updateCellAreas());
374
+ return (0, import_vue.nextTick)().then(() => $xeTable.updateCellAreas());
569
375
  };
570
376
  const handleEditActive = (params, evnt, options) => {
571
377
  const $xeGrid = $xeTable.xeGrid;
572
378
  const $xeGantt = $xeTable.xeGantt;
573
- const {
574
- editConfig,
575
- mouseConfig
576
- } = props;
577
- const {
578
- editStore,
579
- tableColumn
580
- } = reactData;
379
+ const { editConfig, mouseConfig } = props;
380
+ const { editStore, tableColumn } = reactData;
581
381
  const editOpts = computeEditOpts.value;
582
382
  const mouseOpts = computeMouseOpts.value;
583
- const {
584
- mode
585
- } = editOpts;
586
- const {
587
- actived,
588
- focused
589
- } = editStore;
590
- const {
591
- row,
592
- column
593
- } = params;
594
- const {
595
- editRender
596
- } = column;
597
- const {
598
- isFocus,
599
- isPos,
600
- isClear
601
- } = options;
383
+ const { mode } = editOpts;
384
+ const { actived, focused } = editStore;
385
+ const { row, column } = params;
386
+ const { editRender } = column;
387
+ const { isFocus, isPos, isClear } = options;
602
388
  const cell = params.cell || $xeTable.getCellElement(row, column);
603
389
  const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
604
- const editParams = Object.assign(Object.assign({}, params), {
605
- cell
606
- });
607
- if (cell && (0, _utils.isEnableConf)(editConfig) && (0, _utils.isEnableConf)(editRender)) {
608
- // 激活编辑
390
+ const editParams = { ...params, cell };
391
+ if (cell && (0, import_utils.isEnableConf)(editConfig) && (0, import_utils.isEnableConf)(editRender)) {
609
392
  if (!$xeTable.isPendingByRow(row) && !$xeTable.isAggregateRecord(row)) {
610
- if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
611
- // 判断是否禁用编辑
612
- let type = 'edit-disabled';
613
- if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, editParams), {
614
- $table: $xeTable,
615
- $grid: $xeGrid,
616
- $gantt: $xeGantt
617
- }))) {
618
- if ((0, _utils.hasEnableConf)(mouseConfig, mouseOpts)) {
393
+ if (actived.row !== row || (mode === "cell" ? actived.column !== column : false)) {
394
+ let type = "edit-disabled";
395
+ if (!beforeEditMethod || beforeEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })) {
396
+ if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
619
397
  $xeTable.clearSelected();
620
398
  if ($xeTable.clearCellAreas) {
621
399
  $xeTable.clearCellAreas();
@@ -626,31 +404,27 @@ hooks.add('tableEditModule', {
626
404
  if (actived.column) {
627
405
  handleClearEdit(evnt);
628
406
  }
629
- type = 'edit-activated';
407
+ type = "edit-activated";
630
408
  column.renderHeight = cell.offsetHeight;
631
409
  actived.args = editParams;
632
410
  actived.row = row;
633
411
  actived.column = column;
634
412
  $xeTable.handlePushStack();
635
413
  if (isClear) {
636
- (0, _util.setCellValue)(row, column, null);
414
+ (0, import_util.setCellValue)(row, column, null);
637
415
  }
638
- if (mode === 'row') {
639
- tableColumn.forEach(column => getEditColumnModel(row, column));
416
+ if (mode === "row") {
417
+ tableColumn.forEach((column2) => getEditColumnModel(row, column2));
640
418
  } else {
641
419
  getEditColumnModel(row, column);
642
420
  }
643
421
  const afterEditMethod = editOpts.afterEditMethod;
644
- (0, _vue.nextTick)(() => {
422
+ (0, import_vue.nextTick)(() => {
645
423
  if (isFocus) {
646
424
  $xeTable.handleFocus(editParams, evnt);
647
425
  }
648
426
  if (afterEditMethod) {
649
- afterEditMethod(Object.assign(Object.assign({}, editParams), {
650
- $table: $xeTable,
651
- $grid: $xeGrid,
652
- $gantt: $xeGantt
653
- }));
427
+ afterEditMethod({ ...editParams, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
654
428
  }
655
429
  });
656
430
  }
@@ -662,9 +436,8 @@ hooks.add('tableEditModule', {
662
436
  columnIndex: $xeTable.getColumnIndex(column),
663
437
  $columnIndex: $xeTable.getVMColumnIndex(column)
664
438
  }, evnt);
665
- // v4已废弃
666
- if (type === 'edit-activated') {
667
- $xeTable.dispatchEvent('edit-actived', {
439
+ if (type === "edit-activated") {
440
+ $xeTable.dispatchEvent("edit-actived", {
668
441
  row,
669
442
  rowIndex: $xeTable.getRowIndex(row),
670
443
  $rowIndex: $xeTable.getVMRowIndex(row),
@@ -674,10 +447,8 @@ hooks.add('tableEditModule', {
674
447
  }, evnt);
675
448
  }
676
449
  } else {
677
- const {
678
- column: oldColumn
679
- } = actived;
680
- if ((0, _utils.hasEnableConf)(mouseConfig, mouseOpts)) {
450
+ const { column: oldColumn } = actived;
451
+ if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
681
452
  $xeTable.clearSelected();
682
453
  if ($xeTable.clearCellAreas) {
683
454
  $xeTable.clearCellAreas();
@@ -685,11 +456,9 @@ hooks.add('tableEditModule', {
685
456
  }
686
457
  }
687
458
  if (oldColumn && oldColumn !== column) {
688
- const {
689
- model: oldModel
690
- } = oldColumn;
459
+ const { model: oldModel } = oldColumn;
691
460
  if (oldModel.update) {
692
- (0, _util.setCellValue)(row, oldColumn, oldModel.value);
461
+ (0, import_util.setCellValue)(row, oldColumn, oldModel.value);
693
462
  }
694
463
  if ($xeTable.clearValidate) {
695
464
  $xeTable.clearValidate(row, column);
@@ -709,17 +478,13 @@ hooks.add('tableEditModule', {
709
478
  $xeTable.focus();
710
479
  }
711
480
  }
712
- return (0, _vue.nextTick)();
481
+ return (0, import_vue.nextTick)();
713
482
  };
714
483
  const handleEditCell = (row, fieldOrColumn, options) => {
715
- const {
716
- editConfig
717
- } = props;
718
- const {
719
- isPos
720
- } = options;
721
- const column = _xeUtils.default.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
722
- if (row && column && (0, _utils.isEnableConf)(editConfig) && (0, _utils.isEnableConf)(column.editRender) && !$xeTable.isAggregateRecord(row)) {
484
+ const { editConfig } = props;
485
+ const { isPos } = options;
486
+ const column = import_xe_utils.default.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
487
+ if (row && column && (0, import_utils.isEnableConf)(editConfig) && (0, import_utils.isEnableConf)(column.editRender) && !$xeTable.isAggregateRecord(row)) {
723
488
  return Promise.resolve(isPos ? $xeTable.scrollToRow(row, column) : null).then(() => {
724
489
  const cell = $xeTable.getCellElement(row, column);
725
490
  if (cell) {
@@ -740,10 +505,10 @@ hooks.add('tableEditModule', {
740
505
  });
741
506
  internalData._lastCallTime = Date.now();
742
507
  }
743
- return (0, _vue.nextTick)();
508
+ return (0, import_vue.nextTick)();
744
509
  });
745
510
  }
746
- return (0, _vue.nextTick)();
511
+ return (0, import_vue.nextTick)();
747
512
  };
748
513
  editMethods = {
749
514
  /**
@@ -782,87 +547,55 @@ hooks.add('tableEditModule', {
782
547
  * 如果为空则删除所有
783
548
  */
784
549
  remove(rows) {
785
- const {
786
- treeConfig
787
- } = props;
788
- const {
789
- editStore,
790
- isRowGroupStatus
791
- } = reactData;
792
- const {
793
- tableFullTreeData,
794
- selectCheckboxMaps,
795
- afterFullData,
796
- mergeBodyList,
797
- tableFullData,
798
- pendingRowMaps,
799
- insertRowMaps,
800
- removeRowMaps
801
- } = internalData;
550
+ const { treeConfig } = props;
551
+ const { editStore, isRowGroupStatus } = reactData;
552
+ const { tableFullTreeData, selectCheckboxMaps, afterFullData, mergeBodyList, tableFullData, pendingRowMaps, insertRowMaps, removeRowMaps } = internalData;
802
553
  const checkboxOpts = computeCheckboxOpts.value;
803
554
  const treeOpts = computeTreeOpts.value;
804
- const {
805
- transform,
806
- mapChildrenField
807
- } = treeOpts;
555
+ const { transform, mapChildrenField } = treeOpts;
808
556
  const childrenField = treeOpts.children || treeOpts.childrenField;
809
- const {
810
- actived
811
- } = editStore;
812
- const {
813
- checkField
814
- } = checkboxOpts;
557
+ const { actived } = editStore;
558
+ const { checkField } = checkboxOpts;
815
559
  let delList = [];
816
560
  if (!rows) {
817
561
  rows = tableFullData;
818
- } else if (!_xeUtils.default.isArray(rows)) {
562
+ } else if (!import_xe_utils.default.isArray(rows)) {
819
563
  rows = [rows];
820
564
  }
821
565
  if (!rows.length) {
822
- return Promise.resolve({
823
- row: null,
824
- rows: []
825
- });
566
+ return Promise.resolve({ row: null, rows: [] });
826
567
  }
827
568
  $xeTable.handlePushStack();
828
- // 如果是新增,则保存记录
829
- rows.forEach(row => {
569
+ rows.forEach((row) => {
830
570
  if (!$xeTable.isInsertByRow(row)) {
831
- const rowid = (0, _util.getRowid)($xeTable, row);
571
+ const rowid = (0, import_util.getRowid)($xeTable, row);
832
572
  removeRowMaps[rowid] = row;
833
573
  }
834
574
  });
835
- // 如果绑定了多选属性,则更新状态
836
575
  if (!checkField) {
837
- rows.forEach(row => {
838
- const rowid = (0, _util.getRowid)($xeTable, row);
576
+ rows.forEach((row) => {
577
+ const rowid = (0, import_util.getRowid)($xeTable, row);
839
578
  if (selectCheckboxMaps[rowid]) {
840
579
  delete selectCheckboxMaps[rowid];
841
580
  }
842
581
  });
843
582
  reactData.updateCheckboxFlag++;
844
583
  }
845
- // 从数据源中移除
846
584
  if (tableFullData === rows) {
847
585
  rows = delList = tableFullData.slice(0);
848
586
  internalData.tableFullData = [];
849
587
  internalData.afterFullData = [];
850
588
  $xeTable.clearMergeCells();
851
589
  } else {
852
- // 如果为虚拟树
853
590
  if (treeConfig && transform) {
854
- rows.forEach(row => {
855
- const rowid = (0, _util.getRowid)($xeTable, row);
856
- const matchMapObj = _xeUtils.default.findTree(tableFullTreeData, item => rowid === (0, _util.getRowid)($xeTable, item), {
857
- children: mapChildrenField
858
- });
591
+ rows.forEach((row) => {
592
+ const rowid = (0, import_util.getRowid)($xeTable, row);
593
+ const matchMapObj = import_xe_utils.default.findTree(tableFullTreeData, (item) => rowid === (0, import_util.getRowid)($xeTable, item), { children: mapChildrenField });
859
594
  if (matchMapObj) {
860
595
  const rItems = matchMapObj.items.splice(matchMapObj.index, 1);
861
596
  delList.push(rItems[0]);
862
597
  }
863
- const matchObj = _xeUtils.default.findTree(tableFullTreeData, item => rowid === (0, _util.getRowid)($xeTable, item), {
864
- children: childrenField
865
- });
598
+ const matchObj = import_xe_utils.default.findTree(tableFullTreeData, (item) => rowid === (0, import_util.getRowid)($xeTable, item), { children: childrenField });
866
599
  if (matchObj) {
867
600
  matchObj.items.splice(matchObj.index, 1);
868
601
  }
@@ -872,10 +605,9 @@ hooks.add('tableEditModule', {
872
605
  }
873
606
  });
874
607
  } else if (isRowGroupStatus) {
875
- // 如果分组
876
- warnLog(getI18n('vxe.error.noGroup', ['remove']));
608
+ warnLog(getI18n("vxe.error.noGroup", ["remove"]));
877
609
  } else {
878
- rows.forEach(row => {
610
+ rows.forEach((row) => {
879
611
  const tfIndex = $xeTable.findRowIndexOf(tableFullData, row);
880
612
  if (tfIndex > -1) {
881
613
  const rItems = tableFullData.splice(tfIndex, 1);
@@ -883,12 +615,8 @@ hooks.add('tableEditModule', {
883
615
  }
884
616
  const afIndex = $xeTable.findRowIndexOf(afterFullData, row);
885
617
  if (afIndex > -1) {
886
- // 刷新单元格合并
887
- mergeBodyList.forEach(mergeItem => {
888
- const {
889
- row: mergeRowIndex,
890
- rowspan: mergeRowspan
891
- } = mergeItem;
618
+ mergeBodyList.forEach((mergeItem) => {
619
+ const { row: mergeRowIndex, rowspan: mergeRowspan } = mergeItem;
892
620
  if (mergeRowIndex > afIndex) {
893
621
  mergeItem.row = mergeRowIndex - 1;
894
622
  } else if (mergeRowIndex + mergeRowspan > afIndex) {
@@ -900,13 +628,11 @@ hooks.add('tableEditModule', {
900
628
  });
901
629
  }
902
630
  }
903
- // 如果当前行被激活编辑,则清除激活状态
904
631
  if (actived.row && $xeTable.findRowIndexOf(rows, actived.row) > -1) {
905
632
  editMethods.clearEdit();
906
633
  }
907
- // 从新增中移除已删除的数据
908
- rows.forEach(row => {
909
- const rowid = (0, _util.getRowid)($xeTable, row);
634
+ rows.forEach((row) => {
635
+ const rowid = (0, import_util.getRowid)($xeTable, row);
910
636
  if (insertRowMaps[rowid]) {
911
637
  delete insertRowMaps[rowid];
912
638
  }
@@ -928,21 +654,18 @@ hooks.add('tableEditModule', {
928
654
  if (reactData.scrollYLoad) {
929
655
  $xeTable.updateScrollYSpace();
930
656
  }
931
- return (0, _vue.nextTick)().then(() => {
657
+ return (0, import_vue.nextTick)().then(() => {
932
658
  $xeTable.updateCellAreas();
933
659
  return $xeTable.recalculate(true);
934
660
  }).then(() => {
935
- return {
936
- row: delList.length ? delList[delList.length - 1] : null,
937
- rows: delList
938
- };
661
+ return { row: delList.length ? delList[delList.length - 1] : null, rows: delList };
939
662
  });
940
663
  },
941
664
  /**
942
665
  * 删除复选框选中的数据
943
666
  */
944
667
  removeCheckboxRow() {
945
- return editMethods.remove($xeTable.getCheckboxRecords()).then(params => {
668
+ return editMethods.remove($xeTable.getCheckboxRecords()).then((params) => {
946
669
  $xeTable.clearCheckboxRow();
947
670
  return params;
948
671
  });
@@ -952,7 +675,7 @@ hooks.add('tableEditModule', {
952
675
  */
953
676
  removeRadioRow() {
954
677
  const radioRecord = $xeTable.getRadioRecord();
955
- return editMethods.remove(radioRecord || []).then(params => {
678
+ return editMethods.remove(radioRecord || []).then((params) => {
956
679
  $xeTable.clearRadioRow();
957
680
  return params;
958
681
  });
@@ -962,7 +685,7 @@ hooks.add('tableEditModule', {
962
685
  */
963
686
  removeCurrentRow() {
964
687
  const currentRecord = $xeTable.getCurrentRecord();
965
- return editMethods.remove(currentRecord || []).then(params => {
688
+ return editMethods.remove(currentRecord || []).then((params) => {
966
689
  $xeTable.clearCurrentRow();
967
690
  return params;
968
691
  });
@@ -974,9 +697,8 @@ hooks.add('tableEditModule', {
974
697
  const removeRecords = editMethods.getRemoveRecords();
975
698
  const pendingRecords = $xeTable.getPendingRecords();
976
699
  const delRecords = removeRecords.concat(pendingRecords);
977
- // 如果已经被删除,则无需放到更新数组
978
- const updateRecords = editMethods.getUpdateRecords().filter(row => {
979
- return !delRecords.some(item => $xeTable.eqRow(item, row));
700
+ const updateRecords = editMethods.getUpdateRecords().filter((row) => {
701
+ return !delRecords.some((item) => $xeTable.eqRow(item, row));
980
702
  });
981
703
  return {
982
704
  insertRecords: editMethods.getInsertRecords(),
@@ -989,12 +711,9 @@ hooks.add('tableEditModule', {
989
711
  * 获取新增的临时数据
990
712
  */
991
713
  getInsertRecords() {
992
- const {
993
- fullAllDataRowIdData,
994
- insertRowMaps
995
- } = internalData;
714
+ const { fullAllDataRowIdData, insertRowMaps } = internalData;
996
715
  const insertRecords = [];
997
- _xeUtils.default.each(insertRowMaps, (row, rowid) => {
716
+ import_xe_utils.default.each(insertRowMaps, (row, rowid) => {
998
717
  if (fullAllDataRowIdData[rowid]) {
999
718
  insertRecords.push(row);
1000
719
  }
@@ -1005,11 +724,9 @@ hooks.add('tableEditModule', {
1005
724
  * 获取已删除的数据
1006
725
  */
1007
726
  getRemoveRecords() {
1008
- const {
1009
- removeRowMaps
1010
- } = internalData;
727
+ const { removeRowMaps } = internalData;
1011
728
  const removeRecords = [];
1012
- _xeUtils.default.each(removeRowMaps, row => {
729
+ import_xe_utils.default.each(removeRowMaps, (row) => {
1013
730
  removeRecords.push(row);
1014
731
  });
1015
732
  return removeRecords;
@@ -1020,29 +737,21 @@ hooks.add('tableEditModule', {
1020
737
  * 如果是树表格,子节点更改状态不会影响父节点的更新状态
1021
738
  */
1022
739
  getUpdateRecords() {
1023
- const {
1024
- keepSource,
1025
- treeConfig
1026
- } = props;
1027
- const {
1028
- tableFullData,
1029
- tableFullTreeData
1030
- } = internalData;
740
+ const { keepSource, treeConfig } = props;
741
+ const { tableFullData, tableFullTreeData } = internalData;
1031
742
  const treeOpts = computeTreeOpts.value;
1032
743
  const updateRecords = [];
1033
744
  if (keepSource) {
1034
745
  syncActivedCell();
1035
746
  if (treeConfig) {
1036
747
  const childrenField = treeOpts.children || treeOpts.childrenField;
1037
- _xeUtils.default.eachTree(tableFullTreeData, row => {
748
+ import_xe_utils.default.eachTree(tableFullTreeData, (row) => {
1038
749
  if ($xeTable.isUpdateByRow(row)) {
1039
750
  updateRecords.push(row);
1040
751
  }
1041
- }, {
1042
- children: childrenField
1043
- });
752
+ }, { children: childrenField });
1044
753
  } else {
1045
- tableFullData.forEach(row => {
754
+ tableFullData.forEach((row) => {
1046
755
  if ($xeTable.isUpdateByRow(row)) {
1047
756
  updateRecords.push(row);
1048
757
  }
@@ -1052,51 +761,28 @@ hooks.add('tableEditModule', {
1052
761
  return updateRecords;
1053
762
  },
1054
763
  getActiveRecord() {
1055
- warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditCell']);
1056
- const {
1057
- editStore
1058
- } = reactData;
1059
- const {
1060
- fullAllDataRowIdData
1061
- } = internalData;
1062
- const {
1063
- args,
1064
- row
1065
- } = editStore.actived;
1066
- if (args && row && fullAllDataRowIdData[(0, _util.getRowid)($xeTable, row)]) {
1067
- return Object.assign({}, args, {
1068
- row
1069
- });
764
+ warnLog("vxe.error.delFunc", ["getActiveRecord", "getEditCell"]);
765
+ const { editStore } = reactData;
766
+ const { fullAllDataRowIdData } = internalData;
767
+ const { args, row } = editStore.actived;
768
+ if (args && row && fullAllDataRowIdData[(0, import_util.getRowid)($xeTable, row)]) {
769
+ return Object.assign({}, args, { row });
1070
770
  }
1071
771
  return null;
1072
772
  },
1073
773
  getEditRecord() {
1074
- warnLog('vxe.error.delFunc', ['getEditRecord', 'getEditCell']);
1075
- const {
1076
- editStore
1077
- } = reactData;
1078
- const {
1079
- fullAllDataRowIdData
1080
- } = internalData;
1081
- const {
1082
- args,
1083
- row
1084
- } = editStore.actived;
1085
- if (args && row && fullAllDataRowIdData[(0, _util.getRowid)($xeTable, row)]) {
1086
- return Object.assign({}, args, {
1087
- row
1088
- });
774
+ warnLog("vxe.error.delFunc", ["getEditRecord", "getEditCell"]);
775
+ const { editStore } = reactData;
776
+ const { fullAllDataRowIdData } = internalData;
777
+ const { args, row } = editStore.actived;
778
+ if (args && row && fullAllDataRowIdData[(0, import_util.getRowid)($xeTable, row)]) {
779
+ return Object.assign({}, args, { row });
1089
780
  }
1090
781
  return null;
1091
782
  },
1092
783
  getEditCell() {
1093
- const {
1094
- editStore
1095
- } = reactData;
1096
- const {
1097
- row,
1098
- column
1099
- } = editStore.actived;
784
+ const { editStore } = reactData;
785
+ const { row, column } = editStore.actived;
1100
786
  if (column && row) {
1101
787
  return {
1102
788
  row,
@@ -1111,13 +797,8 @@ hooks.add('tableEditModule', {
1111
797
  * 获取选中的单元格
1112
798
  */
1113
799
  getSelectedCell() {
1114
- const {
1115
- editStore
1116
- } = reactData;
1117
- const {
1118
- row,
1119
- column
1120
- } = editStore.selected;
800
+ const { editStore } = reactData;
801
+ const { row, column } = editStore.selected;
1121
802
  if (row && column) {
1122
803
  return {
1123
804
  row,
@@ -1127,8 +808,7 @@ hooks.add('tableEditModule', {
1127
808
  return null;
1128
809
  },
1129
810
  clearActived(row) {
1130
- // 即将废弃
1131
- warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
811
+ warnLog("vxe.error.delFunc", ["clearActived", "clearEdit"]);
1132
812
  return $xeTable.clearEdit(row);
1133
813
  },
1134
814
  /**
@@ -1141,20 +821,15 @@ hooks.add('tableEditModule', {
1141
821
  * 清除所选中源状态
1142
822
  */
1143
823
  clearSelected() {
1144
- const {
1145
- editStore
1146
- } = reactData;
1147
- const {
1148
- selected
1149
- } = editStore;
824
+ const { editStore } = reactData;
825
+ const { selected } = editStore;
1150
826
  selected.row = null;
1151
827
  selected.column = null;
1152
828
  removeCellSelectedClass();
1153
- return (0, _vue.nextTick)();
829
+ return (0, import_vue.nextTick)();
1154
830
  },
1155
831
  isActiveByRow(row) {
1156
- warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
1157
- // 即将废弃
832
+ warnLog("vxe.error.delFunc", ["isActiveByRow", "isEditByRow"]);
1158
833
  return $xeTable.isEditByRow(row);
1159
834
  },
1160
835
  /**
@@ -1162,29 +837,24 @@ hooks.add('tableEditModule', {
1162
837
  * @param {Row} row 行对象
1163
838
  */
1164
839
  isEditByRow(row) {
1165
- const {
1166
- editStore
1167
- } = reactData;
840
+ const { editStore } = reactData;
1168
841
  return editStore.actived.row === row;
1169
842
  },
1170
843
  setActiveRow(row) {
1171
- warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
1172
- // 即将废弃
844
+ warnLog("vxe.error.delFunc", ["setActiveRow", "setEditRow"]);
1173
845
  return editMethods.setEditRow(row);
1174
846
  },
1175
847
  /**
1176
848
  * 激活行编辑
1177
849
  */
1178
850
  setEditRow(row, fieldOrColumn, options) {
1179
- const {
1180
- visibleColumn
1181
- } = internalData;
1182
- let column = _xeUtils.default.find(visibleColumn, column => (0, _utils.isEnableConf)(column.editRender));
851
+ const { visibleColumn } = internalData;
852
+ let column = import_xe_utils.default.find(visibleColumn, (column2) => (0, import_utils.isEnableConf)(column2.editRender));
1183
853
  let isPos = false;
1184
854
  if (fieldOrColumn) {
1185
855
  isPos = true;
1186
856
  if (fieldOrColumn !== true) {
1187
- column = _xeUtils.default.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
857
+ column = import_xe_utils.default.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
1188
858
  }
1189
859
  }
1190
860
  return handleEditCell(row, column, Object.assign({
@@ -1193,8 +863,7 @@ hooks.add('tableEditModule', {
1193
863
  }, options));
1194
864
  },
1195
865
  setActiveCell(row, fieldOrColumn) {
1196
- warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
1197
- // 即将废弃
866
+ warnLog("vxe.error.delFunc", ["setActiveCell", "setEditCell"]);
1198
867
  return editMethods.setEditCell(row, fieldOrColumn);
1199
868
  },
1200
869
  /**
@@ -1210,12 +879,10 @@ hooks.add('tableEditModule', {
1210
879
  * 只对 trigger=dblclick 有效,选中单元格
1211
880
  */
1212
881
  setSelectCell(row, fieldOrColumn) {
1213
- const {
1214
- tableData
1215
- } = reactData;
882
+ const { tableData } = reactData;
1216
883
  const editOpts = computeEditOpts.value;
1217
- const column = _xeUtils.default.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
1218
- if (row && column && editOpts.trigger !== 'manual') {
884
+ const column = import_xe_utils.default.isString(fieldOrColumn) ? $xeTable.getColumnByField(fieldOrColumn) : fieldOrColumn;
885
+ if (row && column && editOpts.trigger !== "manual") {
1219
886
  const rowIndex = $xeTable.findRowIndexOf(tableData, row);
1220
887
  if (rowIndex > -1 && column) {
1221
888
  const cell = $xeTable.getCellElement(row, column);
@@ -1234,28 +901,21 @@ hooks.add('tableEditModule', {
1234
901
  $xeTable.handleSelected(params, null);
1235
902
  }
1236
903
  }
1237
- return (0, _vue.nextTick)();
904
+ return (0, import_vue.nextTick)();
1238
905
  }
1239
906
  };
1240
907
  const handleCellFocus = (cell, params) => {
1241
- const {
1242
- editConfig
1243
- } = props;
1244
- const {
1245
- column
1246
- } = params;
1247
- const {
1248
- editRender
1249
- } = column;
908
+ const { editConfig } = props;
909
+ const { column } = params;
910
+ const { editRender } = column;
1250
911
  const editOpts = computeEditOpts.value;
1251
- if (editConfig && (0, _utils.isEnableConf)(editRender)) {
912
+ if (editConfig && (0, import_utils.isEnableConf)(editRender)) {
1252
913
  const rendererOpts = computeRendererOpts.value;
1253
914
  const renderName = editRender.name;
1254
915
  const compRender = renderName ? rendererOpts[renderName] || renderer.get(renderName) : null;
1255
916
  let autoFocus = editRender.autofocus || editRender.autoFocus;
1256
917
  let autoSelect = editRender.autoSelect || editRender.autoselect;
1257
918
  let inputElem = null;
1258
- // 是否启用聚焦
1259
919
  if (editOpts.autoFocus) {
1260
920
  if (!autoFocus && compRender) {
1261
921
  autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autofocus;
@@ -1263,13 +923,11 @@ hooks.add('tableEditModule', {
1263
923
  if (!autoSelect && compRender) {
1264
924
  autoSelect = compRender.tableAutoSelect || compRender.autoselect;
1265
925
  }
1266
- // 如果指定了聚焦 class
1267
- if (_xeUtils.default.isFunction(autoFocus)) {
926
+ if (import_xe_utils.default.isFunction(autoFocus)) {
1268
927
  inputElem = autoFocus(params);
1269
928
  } else if (autoFocus) {
1270
929
  if (autoFocus === true) {
1271
- // 自动匹配模式,会自动匹配第一个可输入元素
1272
- inputElem = cell.querySelector('input,textarea');
930
+ inputElem = cell.querySelector("input,textarea");
1273
931
  } else {
1274
932
  inputElem = cell.querySelector(autoFocus);
1275
933
  }
@@ -1309,23 +967,16 @@ hooks.add('tableEditModule', {
1309
967
  * 处理聚焦
1310
968
  */
1311
969
  handleFocus(params) {
1312
- const {
1313
- row,
1314
- column,
1315
- cell
1316
- } = params;
1317
- const {
1318
- editRender
1319
- } = column;
970
+ const { row, column, cell } = params;
971
+ const { editRender } = column;
1320
972
  const editOpts = computeEditOpts.value;
1321
- if ((0, _utils.isEnableConf)(editRender)) {
973
+ if ((0, import_utils.isEnableConf)(editRender)) {
1322
974
  const autoSelect = editRender.autoSelect || editRender.autoselect;
1323
975
  const inputElem = handleCellFocus(cell, params);
1324
976
  if (inputElem) {
1325
977
  if (autoSelect) {
1326
978
  inputElem.select();
1327
979
  } else {
1328
- // 保持一致行为,光标移到末端
1329
980
  if (browseObj.msie) {
1330
981
  const textRange = inputElem.createTextRange();
1331
982
  textRange.collapse(false);
@@ -1333,10 +984,8 @@ hooks.add('tableEditModule', {
1333
984
  }
1334
985
  }
1335
986
  } else {
1336
- // 是否自动定位
1337
987
  if (editOpts.autoPos) {
1338
988
  if (!column.fixed) {
1339
- // 显示到可视区中
1340
989
  $xeTable.scrollToRow(row, column);
1341
990
  }
1342
991
  }
@@ -1347,27 +996,16 @@ hooks.add('tableEditModule', {
1347
996
  * 处理选中源
1348
997
  */
1349
998
  handleSelected(params, evnt) {
1350
- const {
1351
- mouseConfig,
1352
- editConfig
1353
- } = props;
1354
- const {
1355
- editStore
1356
- } = reactData;
999
+ const { mouseConfig, editConfig } = props;
1000
+ const { editStore } = reactData;
1357
1001
  const mouseOpts = computeMouseOpts.value;
1358
1002
  const editOpts = computeEditOpts.value;
1359
- const {
1360
- actived,
1361
- selected
1362
- } = editStore;
1363
- const {
1364
- row,
1365
- column
1366
- } = params;
1367
- const isMouseSelected = (0, _utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.selected;
1003
+ const { actived, selected } = editStore;
1004
+ const { row, column } = params;
1005
+ const isMouseSelected = (0, import_utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.selected;
1368
1006
  const selectMethod = () => {
1369
1007
  if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
1370
- if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
1008
+ if (actived.row !== row || (editOpts.mode === "cell" ? actived.column !== column : false)) {
1371
1009
  handleClearEdit(evnt);
1372
1010
  $xeTable.clearSelected();
1373
1011
  if ($xeTable.clearCellAreas) {
@@ -1381,12 +1019,11 @@ hooks.add('tableEditModule', {
1381
1019
  editPrivateMethods.addCellSelectedClass();
1382
1020
  }
1383
1021
  $xeTable.focus();
1384
- // 如果是支持可复用控件
1385
- if (editConfig && editOpts.isReuseKeep && (0, _utils.isEnableConf)(editOpts) && (0, _utils.isEnableConf)(column.editRender)) {
1022
+ if (editConfig && editOpts.isReuseKeep && (0, import_utils.isEnableConf)(editOpts) && (0, import_utils.isEnableConf)(column.editRender)) {
1386
1023
  setTimeout(() => {
1387
1024
  const cell = $xeTable.getCellElement(row, column);
1388
1025
  if (cell) {
1389
- const hasReusekeep = cell.querySelector('.vxe-reusekeep-control');
1026
+ const hasReusekeep = cell.querySelector(".vxe-reusekeep-control");
1390
1027
  if (hasReusekeep) {
1391
1028
  handleCellFocus(cell, params);
1392
1029
  }
@@ -1394,35 +1031,28 @@ hooks.add('tableEditModule', {
1394
1031
  }, 0);
1395
1032
  }
1396
1033
  if (evnt) {
1397
- $xeTable.dispatchEvent('cell-selected', params, evnt);
1034
+ $xeTable.dispatchEvent("cell-selected", params, evnt);
1398
1035
  }
1399
1036
  }
1400
1037
  }
1401
- return (0, _vue.nextTick)();
1038
+ return (0, import_vue.nextTick)();
1402
1039
  };
1403
1040
  return selectMethod();
1404
1041
  },
1405
1042
  addCellSelectedClass() {
1406
- const {
1407
- editStore
1408
- } = reactData;
1409
- const {
1410
- selected
1411
- } = editStore;
1412
- const {
1413
- row,
1414
- column
1415
- } = selected;
1043
+ const { editStore } = reactData;
1044
+ const { selected } = editStore;
1045
+ const { row, column } = selected;
1416
1046
  removeCellSelectedClass();
1417
1047
  if (row && column) {
1418
1048
  const cell = $xeTable.getCellElement(row, column);
1419
1049
  if (cell) {
1420
- (0, _dom.addClass)(cell, 'col--selected');
1050
+ (0, import_dom.addClass)(cell, "col--selected");
1421
1051
  }
1422
1052
  }
1423
1053
  }
1424
1054
  };
1425
- return Object.assign(Object.assign({}, editMethods), editPrivateMethods);
1055
+ return { ...editMethods, ...editPrivateMethods };
1426
1056
  },
1427
1057
  setupGrid($xeGrid) {
1428
1058
  return $xeGrid.extendTableMethods(tableEditMethodKeys);
@@ -1430,4 +1060,4 @@ hooks.add('tableEditModule', {
1430
1060
  setupGantt($xeGantt) {
1431
1061
  return $xeGantt.extendTableMethods(tableEditMethodKeys);
1432
1062
  }
1433
- });
1063
+ });