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,41 +1,54 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
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 __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var grid_exports = {};
30
+ __export(grid_exports, {
31
+ default: () => grid_default
5
32
  });
6
- exports.default = void 0;
7
- var _vue = require("vue");
8
- var _comp = require("../../ui/src/comp");
9
- var _xeUtils = _interopRequireDefault(require("xe-utils"));
10
- var _utils = require("../../ui/src/utils");
11
- var _dom = require("../../ui/src/dom");
12
- var _ui = require("../../ui");
13
- var _props = require("./props");
14
- var _emits = require("./emits");
15
- var _vn = require("../../ui/src/vn");
16
- var _log = require("../../ui/src/log");
17
- var _emits2 = require("../../table/src/emits");
18
- var _props2 = require("../../table/src/props");
19
- var _table = _interopRequireDefault(require("../../table"));
20
- var _toolbar = _interopRequireDefault(require("../../toolbar"));
21
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
- const {
23
- warnLog,
24
- errLog
25
- } = (0, _log.createComponentLog)('grid');
26
- const {
27
- getConfig,
28
- getI18n,
29
- commands,
30
- hooks,
31
- useFns,
32
- createEvent,
33
- globalEvents,
34
- GLOBAL_EVENT_KEYS,
35
- renderEmptyElement
36
- } = _ui.VxeUI;
37
- const tableComponentPropKeys = Object.keys(_props2.tableProps);
38
- const tableComponentMethodKeys = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeRowChildren', 'getTreeRowLevel', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'recalcRowHeight', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'hasPendingByRow', 'isPendingByRow', 'getPendingRecords', 'clearPendingRow', 'setFilterByEvent', 'sort', 'setSort', 'setSortByEvent', 'clearSort', 'clearSortByEvent', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'clearFilterByEvent', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'getScrollData', 'scrollTo', 'scrollToStartRow', 'scrollToEndRow', 'scrollToRow', 'scrollToStartColumn', 'scrollToEndColumn', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'setMergeHeaderCells', 'removeMergeHeaderCells', 'getMergeHeaderCells', 'clearMergeHeaderCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'setCustomStoreData', 'getCustomStoreData', 'setRowGroupExpand', 'setRowGroupExpandByField', 'setAllRowGroupExpand', 'clearRowGroupExpand', 'isRowGroupExpandByRow', 'isRowGroupRecord', 'isAggregateRecord', 'isAggregateExpandByRow', 'getAggregateContentByRow', 'getAggregateRowChildren', 'setRowGroups', 'clearRowGroups', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'updateCellLabel', 'clearFormatterCache', 'getFooterCellLabel', 'updateFooterCellLabel', 'clearFooterFormatterCache', 'getUpdateCells', 'undo', 'redo', 'effectCellData', 'getCellElement', 'focus', 'blur', 'connect', 'connectToolbar'];
33
+ module.exports = __toCommonJS(grid_exports);
34
+ var import_vue = require("vue");
35
+ var import_comp = require("../../ui/src/comp");
36
+ var import_xe_utils = __toESM(require("xe-utils"));
37
+ var import_utils = require("../../ui/src/utils");
38
+ var import_dom = require("../../ui/src/dom");
39
+ var import_ui = require("../../ui");
40
+ var import_props = require("./props");
41
+ var import_emits = require("./emits");
42
+ var import_vn = require("../../ui/src/vn");
43
+ var import_log = require("../../ui/src/log");
44
+ var import_emits2 = require("../../table/src/emits");
45
+ var import_props2 = require("../../table/src/props");
46
+ var import_table = __toESM(require("../../table"));
47
+ var import_toolbar = __toESM(require("../../toolbar"));
48
+ const { warnLog, errLog } = (0, import_log.createComponentLog)("grid");
49
+ const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = import_ui.VxeUI;
50
+ const tableComponentPropKeys = Object.keys(import_props2.tableProps);
51
+ const tableComponentMethodKeys = ["clearAll", "syncData", "updateData", "loadData", "reloadData", "reloadRow", "loadColumn", "reloadColumn", "getRowNode", "getColumnNode", "getRowIndex", "getVTRowIndex", "getVMRowIndex", "getColumnIndex", "getVTColumnIndex", "getVMColumnIndex", "setRow", "createData", "createRow", "revertData", "clearData", "isRemoveByRow", "isInsertByRow", "isUpdateByRow", "getColumns", "getColumnById", "getColumnByField", "getTableColumn", "getFullColumns", "getData", "getCheckboxRecords", "getParentRow", "getTreeRowChildren", "getTreeRowLevel", "getTreeParentRow", "getRowSeq", "getRowById", "getRowid", "getTableData", "getFullData", "setColumnFixed", "clearColumnFixed", "setColumnWidth", "getColumnWidth", "recalcRowHeight", "setRowHeightConf", "getRowHeightConf", "setRowHeight", "getRowHeight", "hideColumn", "showColumn", "resetColumn", "refreshColumn", "refreshScroll", "recalculate", "closeTooltip", "isAllCheckboxChecked", "isAllCheckboxIndeterminate", "getCheckboxIndeterminateRecords", "setCheckboxRow", "setCheckboxRowKey", "isCheckedByCheckboxRow", "isCheckedByCheckboxRowKey", "isIndeterminateByCheckboxRow", "isIndeterminateByCheckboxRowKey", "toggleCheckboxRow", "setAllCheckboxRow", "getRadioReserveRecord", "clearRadioReserve", "getCheckboxReserveRecords", "clearCheckboxReserve", "toggleAllCheckboxRow", "clearCheckboxRow", "setCurrentRow", "isCheckedByRadioRow", "isCheckedByRadioRowKey", "setRadioRow", "setRadioRowKey", "clearCurrentRow", "clearRadioRow", "getCurrentRecord", "getRadioRecord", "getCurrentColumn", "setCurrentColumn", "clearCurrentColumn", "setPendingRow", "togglePendingRow", "hasPendingByRow", "isPendingByRow", "getPendingRecords", "clearPendingRow", "setFilterByEvent", "sort", "setSort", "setSortByEvent", "clearSort", "clearSortByEvent", "isSort", "getSortColumns", "closeFilter", "isFilter", "clearFilterByEvent", "isActiveFilterByColumn", "isRowExpandLoaded", "clearRowExpandLoaded", "reloadRowExpand", "reloadRowExpand", "toggleRowExpand", "setAllRowExpand", "setRowExpand", "isExpandByRow", "isRowExpandByRow", "clearRowExpand", "clearRowExpandReserve", "getRowExpandRecords", "getTreeExpandRecords", "isTreeExpandLoaded", "clearTreeExpandLoaded", "reloadTreeExpand", "reloadTreeChilds", "toggleTreeExpand", "setAllTreeExpand", "setTreeExpand", "isTreeExpandByRow", "clearTreeExpand", "clearTreeExpandReserve", "getScroll", "getScrollData", "scrollTo", "scrollToStartRow", "scrollToEndRow", "scrollToRow", "scrollToStartColumn", "scrollToEndColumn", "scrollToColumn", "clearScroll", "updateFooter", "updateStatus", "setMergeCells", "removeInsertRow", "removeMergeCells", "getMergeCells", "setMergeHeaderCells", "removeMergeHeaderCells", "getMergeHeaderCells", "clearMergeHeaderCells", "clearMergeCells", "setMergeFooterItems", "removeMergeFooterItems", "getMergeFooterItems", "clearMergeFooterItems", "setCustomStoreData", "getCustomStoreData", "setRowGroupExpand", "setRowGroupExpandByField", "setAllRowGroupExpand", "clearRowGroupExpand", "isRowGroupExpandByRow", "isRowGroupRecord", "isAggregateRecord", "isAggregateExpandByRow", "getAggregateContentByRow", "getAggregateRowChildren", "setRowGroups", "clearRowGroups", "openTooltip", "moveColumnTo", "moveRowTo", "getCellLabel", "updateCellLabel", "clearFormatterCache", "getFooterCellLabel", "updateFooterCellLabel", "clearFooterFormatterCache", "getUpdateCells", "undo", "redo", "effectCellData", "getCellElement", "focus", "blur", "connect", "connectToolbar"];
39
52
  function createReactData() {
40
53
  var _a;
41
54
  return {
@@ -50,7 +63,7 @@ function createReactData() {
50
63
  tZindex: 0,
51
64
  tablePage: {
52
65
  total: 0,
53
- pageSize: ((_a = getConfig().pager) === null || _a === void 0 ? void 0 : _a.pageSize) || 10,
66
+ pageSize: ((_a = getConfig().pager) == null ? void 0 : _a.pageSize) || 10,
54
67
  currentPage: 1
55
68
  }
56
69
  };
@@ -60,42 +73,34 @@ function createInternalData() {
60
73
  uFoot: false
61
74
  };
62
75
  }
63
- var _default = exports.default = (0, _comp.defineVxeComponent)({
64
- name: 'VxeGrid',
65
- props: _props.gridProps,
66
- emits: _emits.gridEmits,
76
+ var grid_default = (0, import_comp.defineVxeComponent)({
77
+ name: "VxeGrid",
78
+ props: import_props.gridProps,
79
+ emits: import_emits.gridEmits,
67
80
  setup(props, context) {
68
- const {
69
- slots,
70
- emit
71
- } = context;
72
- const xID = _xeUtils.default.uniqueId();
73
- // 使用已安装的组件,如果未安装则不渲染
74
- const VxeUIFormComponent = _ui.VxeUI.getComponent('VxeForm');
75
- const VxeUIPagerComponent = _ui.VxeUI.getComponent('VxePager');
76
- const defaultLayouts = [['Form'], ['Toolbar', 'Top', 'Table', 'Bottom', 'Pager']];
77
- const {
78
- computeSize
79
- } = useFns.useSize(props);
80
- const {
81
- computeIsVScrollbar
82
- } = useFns.useVScrollbar(props);
83
- const reactData = (0, _vue.reactive)(createReactData());
81
+ const { slots, emit } = context;
82
+ const xID = import_xe_utils.default.uniqueId();
83
+ const VxeUIFormComponent = import_ui.VxeUI.getComponent("VxeForm");
84
+ const VxeUIPagerComponent = import_ui.VxeUI.getComponent("VxePager");
85
+ const defaultLayouts = [["Form"], ["Toolbar", "Top", "Table", "Bottom", "Pager"]];
86
+ const { computeSize } = useFns.useSize(props);
87
+ const { computeIsVScrollbar } = useFns.useVScrollbar(props);
88
+ const reactData = (0, import_vue.reactive)(createReactData());
84
89
  const internalData = createInternalData();
85
- const refElem = (0, _vue.ref)();
86
- const refTable = (0, _vue.ref)();
87
- const refForm = (0, _vue.ref)();
88
- const refToolbar = (0, _vue.ref)();
89
- const refPager = (0, _vue.ref)();
90
- const refPopupContainerElem = (0, _vue.ref)();
91
- const refFormWrapper = (0, _vue.ref)();
92
- const refToolbarWrapper = (0, _vue.ref)();
93
- const refTopWrapper = (0, _vue.ref)();
94
- const refBottomWrapper = (0, _vue.ref)();
95
- const refPagerWrapper = (0, _vue.ref)();
96
- const extendTableMethods = methodKeys => {
90
+ const refElem = (0, import_vue.ref)();
91
+ const refTable = (0, import_vue.ref)();
92
+ const refForm = (0, import_vue.ref)();
93
+ const refToolbar = (0, import_vue.ref)();
94
+ const refPager = (0, import_vue.ref)();
95
+ const refPopupContainerElem = (0, import_vue.ref)();
96
+ const refFormWrapper = (0, import_vue.ref)();
97
+ const refToolbarWrapper = (0, import_vue.ref)();
98
+ const refTopWrapper = (0, import_vue.ref)();
99
+ const refBottomWrapper = (0, import_vue.ref)();
100
+ const refPagerWrapper = (0, import_vue.ref)();
101
+ const extendTableMethods = (methodKeys) => {
97
102
  const funcs = {};
98
- methodKeys.forEach(name => {
103
+ methodKeys.forEach((name) => {
99
104
  funcs[name] = (...args) => {
100
105
  const $xeTable = refTable.value;
101
106
  if ($xeTable && $xeTable[name]) {
@@ -106,7 +111,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
106
111
  return funcs;
107
112
  };
108
113
  const gridExtendTableMethods = extendTableMethods(tableComponentMethodKeys);
109
- tableComponentMethodKeys.forEach(name => {
114
+ tableComponentMethodKeys.forEach((name) => {
110
115
  gridExtendTableMethods[name] = (...args) => {
111
116
  const $xeTable = refTable.value;
112
117
  if ($xeTable && $xeTable[name]) {
@@ -114,105 +119,82 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
114
119
  }
115
120
  };
116
121
  });
117
- const computeProxyOpts = (0, _vue.computed)(() => {
118
- return _xeUtils.default.merge({}, _xeUtils.default.clone(getConfig().grid.proxyConfig, true), props.proxyConfig);
122
+ const computeProxyOpts = (0, import_vue.computed)(() => {
123
+ return import_xe_utils.default.merge({}, import_xe_utils.default.clone(getConfig().grid.proxyConfig, true), props.proxyConfig);
119
124
  });
120
- const computeIsRespMsg = (0, _vue.computed)(() => {
125
+ const computeIsRespMsg = (0, import_vue.computed)(() => {
121
126
  const proxyOpts = computeProxyOpts.value;
122
- return !!(_xeUtils.default.isBoolean(proxyOpts.message) ? proxyOpts.message : proxyOpts.showResponseMsg);
127
+ return !!(import_xe_utils.default.isBoolean(proxyOpts.message) ? proxyOpts.message : proxyOpts.showResponseMsg);
123
128
  });
124
- const computeIsActiveMsg = (0, _vue.computed)(() => {
129
+ const computeIsActiveMsg = (0, import_vue.computed)(() => {
125
130
  const proxyOpts = computeProxyOpts.value;
126
- return _xeUtils.default.isBoolean(proxyOpts.showActionMsg) ? proxyOpts.showActionMsg : !!proxyOpts.showActiveMsg;
131
+ return import_xe_utils.default.isBoolean(proxyOpts.showActionMsg) ? proxyOpts.showActionMsg : !!proxyOpts.showActiveMsg;
127
132
  });
128
- const computePagerOpts = (0, _vue.computed)(() => {
133
+ const computePagerOpts = (0, import_vue.computed)(() => {
129
134
  return Object.assign({}, getConfig().grid.pagerConfig, props.pagerConfig);
130
135
  });
131
- const computePagerProps = (0, _vue.computed)(() => {
136
+ const computePagerProps = (0, import_vue.computed)(() => {
132
137
  const pagerOpts = computePagerOpts.value;
133
- return Object.assign({}, pagerOpts, {
134
- enabled: undefined,
135
- slots: undefined
136
- });
138
+ return Object.assign({}, pagerOpts, { enabled: void 0, slots: void 0 });
137
139
  });
138
- const computeFormOpts = (0, _vue.computed)(() => {
140
+ const computeFormOpts = (0, import_vue.computed)(() => {
139
141
  return Object.assign({}, getConfig().grid.formConfig, props.formConfig);
140
142
  });
141
- const computeToolbarOpts = (0, _vue.computed)(() => {
143
+ const computeToolbarOpts = (0, import_vue.computed)(() => {
142
144
  return Object.assign({}, getConfig().grid.toolbarConfig, props.toolbarConfig);
143
145
  });
144
- const computeZoomOpts = (0, _vue.computed)(() => {
146
+ const computeZoomOpts = (0, import_vue.computed)(() => {
145
147
  return Object.assign({}, getConfig().grid.zoomConfig, props.zoomConfig);
146
148
  });
147
- const computeStyles = (0, _vue.computed)(() => {
148
- const {
149
- height,
150
- maxHeight
151
- } = props;
152
- const {
153
- isZMax,
154
- tZindex
155
- } = reactData;
149
+ const computeStyles = (0, import_vue.computed)(() => {
150
+ const { height, maxHeight } = props;
151
+ const { isZMax, tZindex } = reactData;
156
152
  const stys = {};
157
153
  if (isZMax) {
158
154
  stys.zIndex = tZindex;
159
155
  } else {
160
156
  if (height) {
161
- stys.height = height === 'auto' || height === '100%' ? '100%' : (0, _dom.toCssUnit)(height);
157
+ stys.height = height === "auto" || height === "100%" ? "100%" : (0, import_dom.toCssUnit)(height);
162
158
  }
163
159
  if (maxHeight) {
164
- stys.maxHeight = maxHeight === 'auto' || maxHeight === '100%' ? '100%' : (0, _dom.toCssUnit)(maxHeight);
160
+ stys.maxHeight = maxHeight === "auto" || maxHeight === "100%" ? "100%" : (0, import_dom.toCssUnit)(maxHeight);
165
161
  }
166
162
  }
167
163
  return stys;
168
164
  });
169
- const computeTableExtendProps = (0, _vue.computed)(() => {
165
+ const computeTableExtendProps = (0, import_vue.computed)(() => {
170
166
  const rest = {};
171
- tableComponentPropKeys.forEach(key => {
172
- if (props[key] !== undefined) {
167
+ tableComponentPropKeys.forEach((key) => {
168
+ if (props[key] !== void 0) {
173
169
  rest[key] = props[key];
174
170
  }
175
171
  });
176
172
  return rest;
177
173
  });
178
- const computeTableProps = (0, _vue.computed)(() => {
179
- const {
180
- showFooter,
181
- seqConfig,
182
- pagerConfig,
183
- editConfig,
184
- proxyConfig
185
- } = props;
186
- const {
187
- isZMax,
188
- tablePage,
189
- footerData
190
- } = reactData;
174
+ const computeTableProps = (0, import_vue.computed)(() => {
175
+ const { showFooter, seqConfig, pagerConfig, editConfig, proxyConfig } = props;
176
+ const { isZMax, tablePage, footerData } = reactData;
191
177
  const tableExtendProps = computeTableExtendProps.value;
192
178
  const proxyOpts = computeProxyOpts.value;
193
179
  const pagerOpts = computePagerOpts.value;
194
180
  const isLoading = computeIsLoading.value;
195
181
  const tProps = Object.assign({}, tableExtendProps);
196
182
  if (showFooter && !tProps.footerData) {
197
- // 如果未设置自己的标位数据,则使用代理的
198
183
  tProps.footerData = footerData;
199
184
  } else if (proxyOpts.footer && footerData.length) {
200
- // 如果代理标为数据,且未请求到数据,则用自己的
201
185
  tProps.footerData = footerData;
202
186
  }
203
187
  if (isZMax) {
204
188
  if (tProps.maxHeight) {
205
- tProps.maxHeight = '100%';
189
+ tProps.maxHeight = "100%";
206
190
  } else {
207
- tProps.height = '100%';
191
+ tProps.height = "100%";
208
192
  }
209
193
  }
210
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
194
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
211
195
  tProps.loading = isLoading;
212
- if (pagerConfig && proxyOpts.seq && (0, _utils.isEnableConf)(pagerOpts)) {
213
- tProps.seqConfig = Object.assign({}, seqConfig, {
214
- startIndex: (tablePage.currentPage - 1) * tablePage.pageSize
215
- });
196
+ if (pagerConfig && proxyOpts.seq && (0, import_utils.isEnableConf)(pagerOpts)) {
197
+ tProps.seqConfig = Object.assign({}, seqConfig, { startIndex: (tablePage.currentPage - 1) * tablePage.pageSize });
216
198
  }
217
199
  }
218
200
  if (editConfig) {
@@ -220,10 +202,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
220
202
  }
221
203
  return tProps;
222
204
  });
223
- const computeCurrLayoutConf = (0, _vue.computed)(() => {
224
- const {
225
- layouts
226
- } = props;
205
+ const computeCurrLayoutConf = (0, import_vue.computed)(() => {
206
+ const { layouts } = props;
227
207
  let confs = [];
228
208
  if (layouts && layouts.length) {
229
209
  confs = layouts;
@@ -234,7 +214,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
234
214
  let bodyKeys = [];
235
215
  let footKeys = [];
236
216
  if (confs.length) {
237
- if (_xeUtils.default.isArray(confs[0])) {
217
+ if (import_xe_utils.default.isArray(confs[0])) {
238
218
  headKeys = confs[0];
239
219
  bodyKeys = confs[1] || [];
240
220
  footKeys = confs[2] || [];
@@ -248,37 +228,28 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
248
228
  footKeys
249
229
  };
250
230
  });
251
- const computeCustomCurrentPageFlag = (0, _vue.computed)(() => {
231
+ const computeCustomCurrentPageFlag = (0, import_vue.computed)(() => {
252
232
  const pagerOpts = computePagerOpts.value;
253
233
  return pagerOpts.currentPage;
254
234
  });
255
- const computeCustomPageSizeFlag = (0, _vue.computed)(() => {
235
+ const computeCustomPageSizeFlag = (0, import_vue.computed)(() => {
256
236
  const pagerOpts = computePagerOpts.value;
257
237
  return pagerOpts.pageSize;
258
238
  });
259
- const computeCustomTotalFlag = (0, _vue.computed)(() => {
239
+ const computeCustomTotalFlag = (0, import_vue.computed)(() => {
260
240
  const pagerOpts = computePagerOpts.value;
261
241
  return pagerOpts.total;
262
242
  });
263
- const computePageCount = (0, _vue.computed)(() => {
264
- const {
265
- tablePage
266
- } = reactData;
243
+ const computePageCount = (0, import_vue.computed)(() => {
244
+ const { tablePage } = reactData;
267
245
  return Math.max(Math.ceil(tablePage.total / tablePage.pageSize), 1);
268
246
  });
269
- const computeIsLoading = (0, _vue.computed)(() => {
270
- const {
271
- loading,
272
- proxyConfig
273
- } = props;
274
- const {
275
- tableLoading
276
- } = reactData;
247
+ const computeIsLoading = (0, import_vue.computed)(() => {
248
+ const { loading, proxyConfig } = props;
249
+ const { tableLoading } = reactData;
277
250
  const proxyOpts = computeProxyOpts.value;
278
- const {
279
- showLoading
280
- } = proxyOpts;
281
- return loading || tableLoading && showLoading && proxyConfig && (0, _utils.isEnableConf)(proxyOpts);
251
+ const { showLoading } = proxyOpts;
252
+ return loading || tableLoading && showLoading && proxyConfig && (0, import_utils.isEnableConf)(proxyOpts);
282
253
  });
283
254
  const refMaps = {
284
255
  refElem,
@@ -299,7 +270,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
299
270
  };
300
271
  const $xeGrid = {
301
272
  xID,
302
- props: props,
273
+ props,
303
274
  context,
304
275
  reactData,
305
276
  internalData,
@@ -308,8 +279,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
308
279
  };
309
280
  const initToolbar = () => {
310
281
  const toolbarOpts = computeToolbarOpts.value;
311
- if (props.toolbarConfig && (0, _utils.isEnableConf)(toolbarOpts)) {
312
- (0, _vue.nextTick)(() => {
282
+ if (props.toolbarConfig && (0, import_utils.isEnableConf)(toolbarOpts)) {
283
+ (0, import_vue.nextTick)(() => {
313
284
  const $xeTable = refTable.value;
314
285
  const $xeToolbar = refToolbar.value;
315
286
  if ($xeTable && $xeToolbar) {
@@ -319,35 +290,23 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
319
290
  }
320
291
  };
321
292
  const getFormData = () => {
322
- const {
323
- proxyConfig
324
- } = props;
325
- const {
326
- formData
327
- } = reactData;
293
+ const { proxyConfig } = props;
294
+ const { formData } = reactData;
328
295
  const proxyOpts = computeProxyOpts.value;
329
296
  const formOpts = computeFormOpts.value;
330
- return proxyConfig && (0, _utils.isEnableConf)(proxyOpts) && proxyOpts.form ? formData : formOpts.data;
297
+ return proxyConfig && (0, import_utils.isEnableConf)(proxyOpts) && proxyOpts.form ? formData : formOpts.data;
331
298
  };
332
- const initPages = propKey => {
333
- const {
334
- tablePage
335
- } = reactData;
336
- const {
337
- pagerConfig
338
- } = props;
299
+ const initPages = (propKey) => {
300
+ const { tablePage } = reactData;
301
+ const { pagerConfig } = props;
339
302
  const pagerOpts = computePagerOpts.value;
340
- if (pagerConfig && (0, _utils.isEnableConf)(pagerOpts)) {
303
+ if (pagerConfig && (0, import_utils.isEnableConf)(pagerOpts)) {
341
304
  if (propKey) {
342
305
  if (pagerOpts[propKey]) {
343
- tablePage[propKey] = _xeUtils.default.toNumber(pagerOpts[propKey]);
306
+ tablePage[propKey] = import_xe_utils.default.toNumber(pagerOpts[propKey]);
344
307
  }
345
308
  } else {
346
- const {
347
- currentPage,
348
- pageSize,
349
- total
350
- } = pagerOpts;
309
+ const { currentPage, pageSize, total } = pagerOpts;
351
310
  if (currentPage) {
352
311
  tablePage.currentPage = currentPage;
353
312
  }
@@ -360,7 +319,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
360
319
  }
361
320
  }
362
321
  };
363
- const triggerPendingEvent = code => {
322
+ const triggerPendingEvent = (code) => {
364
323
  const isActiveMsg = computeIsActiveMsg.value;
365
324
  const $xeTable = refTable.value;
366
325
  const selectRecords = $xeTable ? $xeTable.getCheckboxRecords() : [];
@@ -371,12 +330,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
371
330
  $xeGrid.clearCheckboxRow();
372
331
  } else {
373
332
  if (isActiveMsg) {
374
- if (_ui.VxeUI.modal) {
375
- _ui.VxeUI.modal.message({
376
- id: code,
377
- content: getI18n('vxe.grid.selectOneRecord'),
378
- status: 'warning'
379
- });
333
+ if (import_ui.VxeUI.modal) {
334
+ import_ui.VxeUI.modal.message({ id: code, content: getI18n("vxe.grid.selectOneRecord"), status: "warning" });
380
335
  }
381
336
  }
382
337
  }
@@ -388,12 +343,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
388
343
  const $xeTable = refTable.value;
389
344
  let msg;
390
345
  if (rest && messageProp) {
391
- msg = _xeUtils.default.isFunction(messageProp) ? messageProp({
392
- data: rest,
393
- $table: $xeTable,
394
- $grid: $xeGrid,
395
- $gantt: null
396
- }) : _xeUtils.default.get(rest, messageProp);
346
+ msg = import_xe_utils.default.isFunction(messageProp) ? messageProp({ data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: null }) : import_xe_utils.default.get(rest, messageProp);
397
347
  }
398
348
  return msg || getI18n(defaultMsg);
399
349
  };
@@ -402,24 +352,16 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
402
352
  const selectRecords = $xeGrid.getCheckboxRecords();
403
353
  if (isActiveMsg) {
404
354
  if (selectRecords.length) {
405
- if (_ui.VxeUI.modal) {
406
- return _ui.VxeUI.modal.confirm({
407
- id: `cfm_${code}`,
408
- content: getI18n(alertKey),
409
- escClosable: true
410
- }).then(type => {
411
- if (type === 'confirm') {
355
+ if (import_ui.VxeUI.modal) {
356
+ return import_ui.VxeUI.modal.confirm({ id: `cfm_${code}`, content: getI18n(alertKey), escClosable: true }).then((type) => {
357
+ if (type === "confirm") {
412
358
  return callback();
413
359
  }
414
360
  });
415
361
  }
416
362
  } else {
417
- if (_ui.VxeUI.modal) {
418
- _ui.VxeUI.modal.message({
419
- id: `msg_${code}`,
420
- content: getI18n('vxe.grid.selectOneRecord'),
421
- status: 'warning'
422
- });
363
+ if (import_ui.VxeUI.modal) {
364
+ import_ui.VxeUI.modal.message({ id: `msg_${code}`, content: getI18n("vxe.grid.selectOneRecord"), status: "warning" });
423
365
  }
424
366
  }
425
367
  } else {
@@ -429,166 +371,134 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
429
371
  }
430
372
  return Promise.resolve();
431
373
  };
432
- const pageChangeEvent = params => {
433
- const {
434
- proxyConfig
435
- } = props;
436
- const {
437
- tablePage
438
- } = reactData;
439
- const {
440
- $event,
441
- currentPage,
442
- pageSize
443
- } = params;
374
+ const pageChangeEvent = (params) => {
375
+ const { proxyConfig } = props;
376
+ const { tablePage } = reactData;
377
+ const { $event, currentPage, pageSize } = params;
444
378
  const proxyOpts = computeProxyOpts.value;
445
379
  tablePage.currentPage = currentPage;
446
380
  tablePage.pageSize = pageSize;
447
- $xeGrid.dispatchEvent('page-change', params, $event);
448
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
449
- $xeGrid.commitProxy('query').then(rest => {
450
- $xeGrid.dispatchEvent('proxy-query', rest, $event);
381
+ $xeGrid.dispatchEvent("page-change", params, $event);
382
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
383
+ $xeGrid.commitProxy("query").then((rest) => {
384
+ $xeGrid.dispatchEvent("proxy-query", rest, $event);
451
385
  });
452
386
  }
453
387
  };
454
- const handleSortEvent = params => {
388
+ const handleSortEvent = (params) => {
455
389
  const $xeTable = refTable.value;
456
- const {
457
- proxyConfig
458
- } = props;
390
+ const { proxyConfig } = props;
459
391
  if (!$xeTable) {
460
392
  return;
461
393
  }
462
- const {
463
- computeSortOpts
464
- } = $xeTable.getComputeMaps();
394
+ const { computeSortOpts } = $xeTable.getComputeMaps();
465
395
  const proxyOpts = computeProxyOpts.value;
466
396
  const sortOpts = computeSortOpts.value;
467
- // 如果是服务端排序
468
397
  if (sortOpts.remote) {
469
398
  reactData.sortData = params.sortList;
470
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
399
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
471
400
  reactData.tablePage.currentPage = 1;
472
- $xeGrid.commitProxy('query').then(rest => {
473
- $xeGrid.dispatchEvent('proxy-query', rest, params.$event);
401
+ $xeGrid.commitProxy("query").then((rest) => {
402
+ $xeGrid.dispatchEvent("proxy-query", rest, params.$event);
474
403
  });
475
404
  }
476
405
  }
477
406
  };
478
- const sortChangeEvent = params => {
407
+ const sortChangeEvent = (params) => {
479
408
  handleSortEvent(params);
480
- $xeGrid.dispatchEvent('sort-change', params, params.$event);
409
+ $xeGrid.dispatchEvent("sort-change", params, params.$event);
481
410
  };
482
- const clearAllSortEvent = params => {
411
+ const clearAllSortEvent = (params) => {
483
412
  handleSortEvent(params);
484
- $xeGrid.dispatchEvent('clear-all-sort', params, params.$event);
413
+ $xeGrid.dispatchEvent("clear-all-sort", params, params.$event);
485
414
  };
486
- const handleFilterEvent = params => {
415
+ const handleFilterEvent = (params) => {
487
416
  const $xeTable = refTable.value;
488
- const {
489
- proxyConfig
490
- } = props;
417
+ const { proxyConfig } = props;
491
418
  if (!$xeTable) {
492
419
  return;
493
420
  }
494
- const {
495
- computeFilterOpts
496
- } = $xeTable.getComputeMaps();
421
+ const { computeFilterOpts } = $xeTable.getComputeMaps();
497
422
  const proxyOpts = computeProxyOpts.value;
498
423
  const filterOpts = computeFilterOpts.value;
499
- // 如果是服务端过滤
500
424
  if (filterOpts.remote) {
501
425
  reactData.filterData = params.filterList;
502
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
426
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
503
427
  reactData.tablePage.currentPage = 1;
504
428
  internalData.uFoot = true;
505
- $xeGrid.commitProxy('query').then(rest => {
506
- $xeGrid.dispatchEvent('proxy-query', rest, params.$event);
429
+ $xeGrid.commitProxy("query").then((rest) => {
430
+ $xeGrid.dispatchEvent("proxy-query", rest, params.$event);
507
431
  });
508
432
  internalData.uFoot = false;
509
433
  updateQueryFooter();
510
434
  }
511
435
  }
512
436
  };
513
- const filterChangeEvent = params => {
437
+ const filterChangeEvent = (params) => {
514
438
  handleFilterEvent(params);
515
- $xeGrid.dispatchEvent('filter-change', params, params.$event);
439
+ $xeGrid.dispatchEvent("filter-change", params, params.$event);
516
440
  };
517
- const clearAllFilterEvent = params => {
441
+ const clearAllFilterEvent = (params) => {
518
442
  handleFilterEvent(params);
519
- $xeGrid.dispatchEvent('clear-all-filter', params, params.$event);
443
+ $xeGrid.dispatchEvent("clear-all-filter", params, params.$event);
520
444
  };
521
- const submitFormEvent = params => {
522
- const {
523
- proxyConfig
524
- } = props;
445
+ const submitFormEvent = (params) => {
446
+ const { proxyConfig } = props;
525
447
  const proxyOpts = computeProxyOpts.value;
526
448
  const formOptions = proxyOpts.formOptions || {};
527
449
  if (reactData.tableLoading) {
528
450
  return;
529
451
  }
530
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
531
- $xeGrid.dispatchEvent('form-submit', params, params.$event);
452
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
453
+ $xeGrid.dispatchEvent("form-submit", params, params.$event);
532
454
  internalData.uFoot = true;
533
- $xeGrid.commitProxy(formOptions.submitMode || 'reload').then(rest => {
534
- $xeGrid.dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), {
535
- isReload: true
536
- }), params.$event);
455
+ $xeGrid.commitProxy(formOptions.submitMode || "reload").then((rest) => {
456
+ $xeGrid.dispatchEvent("proxy-query", { ...rest, isReload: true }, params.$event);
537
457
  });
538
458
  internalData.uFoot = false;
539
459
  updateQueryFooter();
540
460
  } else {
541
- $xeGrid.dispatchEvent('form-submit', params, params.$event);
461
+ $xeGrid.dispatchEvent("form-submit", params, params.$event);
542
462
  }
543
463
  };
544
- const resetFormEvent = params => {
464
+ const resetFormEvent = (params) => {
545
465
  const $xeTable = refTable.value;
546
- const {
547
- proxyConfig
548
- } = props;
549
- const {
550
- $event
551
- } = params;
466
+ const { proxyConfig } = props;
467
+ const { $event } = params;
552
468
  const proxyOpts = computeProxyOpts.value;
553
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
469
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
554
470
  const formOptions = proxyOpts.formOptions || {};
555
- $xeGrid.dispatchEvent('form-reset', params, $event);
471
+ $xeGrid.dispatchEvent("form-reset", params, $event);
556
472
  if ($xeTable) {
557
473
  $xeTable.clearScroll();
558
474
  }
559
475
  internalData.uFoot = true;
560
- $xeGrid.commitProxy(formOptions.resetMode === 'reset_form' ? 'query' : 'reload').then(rest => {
561
- $xeGrid.dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), {
562
- isReload: true
563
- }), $event);
476
+ $xeGrid.commitProxy(formOptions.resetMode === "reset_form" ? "query" : "reload").then((rest) => {
477
+ $xeGrid.dispatchEvent("proxy-query", { ...rest, isReload: true }, $event);
564
478
  });
565
479
  internalData.uFoot = false;
566
480
  updateQueryFooter();
567
481
  } else {
568
- $xeGrid.dispatchEvent('form-reset', params, $event);
482
+ $xeGrid.dispatchEvent("form-reset", params, $event);
569
483
  }
570
484
  };
571
- const submitInvalidEvent = params => {
572
- $xeGrid.dispatchEvent('form-submit-invalid', params, params.$event);
485
+ const submitInvalidEvent = (params) => {
486
+ $xeGrid.dispatchEvent("form-submit-invalid", params, params.$event);
573
487
  };
574
- const collapseEvent = params => {
575
- const {
576
- $event
577
- } = params;
578
- $xeGrid.dispatchEvent('form-toggle-collapse', params, $event);
579
- $xeGrid.dispatchEvent('form-collapse', params, $event);
488
+ const collapseEvent = (params) => {
489
+ const { $event } = params;
490
+ $xeGrid.dispatchEvent("form-toggle-collapse", params, $event);
491
+ $xeGrid.dispatchEvent("form-collapse", params, $event);
580
492
  };
581
- const handleZoom = isMax => {
582
- const {
583
- isZMax
584
- } = reactData;
493
+ const handleZoom = (isMax) => {
494
+ const { isZMax } = reactData;
585
495
  if (isMax ? !isZMax : isZMax) {
586
496
  reactData.isZMax = !isZMax;
587
- if (reactData.tZindex < (0, _utils.getLastZIndex)()) {
588
- reactData.tZindex = (0, _utils.nextZIndex)();
497
+ if (reactData.tZindex < (0, import_utils.getLastZIndex)()) {
498
+ reactData.tZindex = (0, import_utils.nextZIndex)();
589
499
  }
590
500
  }
591
- return (0, _vue.nextTick)().then(() => $xeGrid.recalculate(true)).then(() => {
501
+ return (0, import_vue.nextTick)().then(() => $xeGrid.recalculate(true)).then(() => {
592
502
  setTimeout(() => $xeGrid.recalculate(true), 15);
593
503
  return reactData.isZMax;
594
504
  });
@@ -596,11 +506,11 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
596
506
  const getFuncSlot = (optSlots, slotKey) => {
597
507
  const funcSlot = optSlots[slotKey];
598
508
  if (funcSlot) {
599
- if (_xeUtils.default.isString(funcSlot)) {
509
+ if (import_xe_utils.default.isString(funcSlot)) {
600
510
  if (slots[funcSlot]) {
601
511
  return slots[funcSlot];
602
512
  } else {
603
- errLog('vxe.error.notSlot', [funcSlot]);
513
+ errLog("vxe.error.notSlot", [funcSlot]);
604
514
  }
605
515
  } else {
606
516
  return funcSlot;
@@ -608,15 +518,15 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
608
518
  }
609
519
  return null;
610
520
  };
611
- const getConfigSlot = slotConfigs => {
521
+ const getConfigSlot = (slotConfigs) => {
612
522
  const slotConf = {};
613
- _xeUtils.default.objectMap(slotConfigs, (slotFunc, slotKey) => {
523
+ import_xe_utils.default.objectMap(slotConfigs, (slotFunc, slotKey) => {
614
524
  if (slotFunc) {
615
- if (_xeUtils.default.isString(slotFunc)) {
525
+ if (import_xe_utils.default.isString(slotFunc)) {
616
526
  if (slots[slotFunc]) {
617
527
  slotConf[slotKey] = slots[slotFunc];
618
528
  } else {
619
- errLog('vxe.error.notSlot', [slotFunc]);
529
+ errLog("vxe.error.notSlot", [slotFunc]);
620
530
  }
621
531
  } else {
622
532
  slotConf[slotKey] = slotFunc;
@@ -625,26 +535,15 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
625
535
  });
626
536
  return slotConf;
627
537
  };
628
- /**
629
- * 渲染表单
630
- */
631
538
  const renderForm = () => {
632
- const {
633
- formConfig,
634
- proxyConfig
635
- } = props;
636
- const {
637
- formData
638
- } = reactData;
539
+ const { formConfig, proxyConfig } = props;
540
+ const { formData } = reactData;
639
541
  const proxyOpts = computeProxyOpts.value;
640
542
  const formOpts = computeFormOpts.value;
641
- if (formConfig && (0, _utils.isEnableConf)(formOpts) || slots.form) {
543
+ if (formConfig && (0, import_utils.isEnableConf)(formOpts) || slots.form) {
642
544
  let slotVNs = [];
643
545
  if (slots.form) {
644
- slotVNs = slots.form({
645
- $grid: $xeGrid,
646
- $gantt: null
647
- });
546
+ slotVNs = slots.form({ $grid: $xeGrid, $gantt: null });
648
547
  } else {
649
548
  if (formOpts.items) {
650
549
  const formSlots = {};
@@ -652,19 +551,14 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
652
551
  formOpts.inited = true;
653
552
  const beforeItem = proxyOpts.beforeItem;
654
553
  if (proxyOpts && beforeItem) {
655
- formOpts.items.forEach(item => {
656
- beforeItem({
657
- $grid: $xeGrid,
658
- $gantt: null,
659
- item
660
- });
554
+ formOpts.items.forEach((item) => {
555
+ beforeItem({ $grid: $xeGrid, $gantt: null, item });
661
556
  });
662
557
  }
663
558
  }
664
- // 处理插槽
665
- formOpts.items.forEach(item => {
666
- _xeUtils.default.each(item.slots, func => {
667
- if (func && !_xeUtils.default.isFunction(func)) {
559
+ formOpts.items.forEach((item) => {
560
+ import_xe_utils.default.each(item.slots, (func) => {
561
+ if (func && !import_xe_utils.default.isFunction(func)) {
668
562
  if (slots[func]) {
669
563
  formSlots[func] = slots[func];
670
564
  }
@@ -672,53 +566,47 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
672
566
  });
673
567
  });
674
568
  if (VxeUIFormComponent) {
675
- slotVNs.push((0, _vue.h)(VxeUIFormComponent, Object.assign(Object.assign({
676
- ref: refForm
677
- }, Object.assign({}, formOpts, {
678
- data: proxyConfig && (0, _utils.isEnableConf)(proxyOpts) && proxyOpts.form ? formData : formOpts.data
679
- })), {
680
- onSubmit: submitFormEvent,
681
- onReset: resetFormEvent,
682
- onSubmitInvalid: submitInvalidEvent,
683
- onCollapse: collapseEvent
684
- }), formSlots));
569
+ slotVNs.push(
570
+ (0, import_vue.h)(VxeUIFormComponent, {
571
+ ref: refForm,
572
+ ...Object.assign({}, formOpts, {
573
+ data: proxyConfig && (0, import_utils.isEnableConf)(proxyOpts) && proxyOpts.form ? formData : formOpts.data
574
+ }),
575
+ onSubmit: submitFormEvent,
576
+ onReset: resetFormEvent,
577
+ onSubmitInvalid: submitInvalidEvent,
578
+ onCollapse: collapseEvent
579
+ }, formSlots)
580
+ );
685
581
  }
686
582
  }
687
583
  }
688
- return (0, _vue.h)('div', {
584
+ return (0, import_vue.h)("div", {
689
585
  ref: refFormWrapper,
690
- key: 'form',
691
- class: 'vxe-grid--form-wrapper'
586
+ key: "form",
587
+ class: "vxe-grid--form-wrapper"
692
588
  }, slotVNs);
693
589
  }
694
590
  return renderEmptyElement($xeGrid);
695
591
  };
696
- /**
697
- * 渲染工具栏
698
- */
699
592
  const renderToolbar = () => {
700
- const {
701
- toolbarConfig
702
- } = props;
593
+ const { toolbarConfig } = props;
703
594
  const toolbarOpts = computeToolbarOpts.value;
704
595
  const toolbarSlot = slots.toolbar;
705
- if (toolbarConfig && (0, _utils.isEnableConf)(toolbarOpts) || toolbarSlot) {
596
+ if (toolbarConfig && (0, import_utils.isEnableConf)(toolbarOpts) || toolbarSlot) {
706
597
  let slotVNs = [];
707
598
  if (toolbarSlot) {
708
- slotVNs = toolbarSlot({
709
- $grid: $xeGrid,
710
- $gantt: null
711
- });
599
+ slotVNs = toolbarSlot({ $grid: $xeGrid, $gantt: null });
712
600
  } else {
713
601
  const toolbarOptSlots = toolbarOpts.slots;
714
602
  const toolbarSlots = {};
715
603
  if (toolbarOptSlots) {
716
- const buttonsSlot = getFuncSlot(toolbarOptSlots, 'buttons');
717
- const buttonPrefixSlot = getFuncSlot(toolbarOptSlots, 'buttonPrefix');
718
- const buttonSuffixSlot = getFuncSlot(toolbarOptSlots, 'buttonSuffix');
719
- const toolsSlot = getFuncSlot(toolbarOptSlots, 'tools');
720
- const toolPrefixSlot = getFuncSlot(toolbarOptSlots, 'toolPrefix');
721
- const toolSuffixSlot = getFuncSlot(toolbarOptSlots, 'toolSuffix');
604
+ const buttonsSlot = getFuncSlot(toolbarOptSlots, "buttons");
605
+ const buttonPrefixSlot = getFuncSlot(toolbarOptSlots, "buttonPrefix");
606
+ const buttonSuffixSlot = getFuncSlot(toolbarOptSlots, "buttonSuffix");
607
+ const toolsSlot = getFuncSlot(toolbarOptSlots, "tools");
608
+ const toolPrefixSlot = getFuncSlot(toolbarOptSlots, "toolPrefix");
609
+ const toolSuffixSlot = getFuncSlot(toolbarOptSlots, "toolSuffix");
722
610
  if (buttonsSlot) {
723
611
  toolbarSlots.buttons = buttonsSlot;
724
612
  }
@@ -738,79 +626,64 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
738
626
  toolbarSlots.toolSuffix = toolSuffixSlot;
739
627
  }
740
628
  }
741
- slotVNs.push((0, _vue.h)(_toolbar.default, Object.assign(Object.assign({
742
- ref: refToolbar
743
- }, toolbarOpts), {
744
- slots: undefined
745
- }), toolbarSlots));
629
+ slotVNs.push(
630
+ (0, import_vue.h)(import_toolbar.default, {
631
+ ref: refToolbar,
632
+ ...toolbarOpts,
633
+ slots: void 0
634
+ }, toolbarSlots)
635
+ );
746
636
  }
747
- return (0, _vue.h)('div', {
637
+ return (0, import_vue.h)("div", {
748
638
  ref: refToolbarWrapper,
749
- key: 'toolbar',
750
- class: 'vxe-grid--toolbar-wrapper'
639
+ key: "toolbar",
640
+ class: "vxe-grid--toolbar-wrapper"
751
641
  }, slotVNs);
752
642
  }
753
643
  return renderEmptyElement($xeGrid);
754
644
  };
755
- /**
756
- * 渲染表格顶部区域
757
- */
758
645
  const renderTop = () => {
759
646
  const topSlot = slots.top;
760
647
  if (topSlot) {
761
- return (0, _vue.h)('div', {
648
+ return (0, import_vue.h)("div", {
762
649
  ref: refTopWrapper,
763
- key: 'top',
764
- class: 'vxe-grid--top-wrapper'
765
- }, topSlot({
766
- $grid: $xeGrid,
767
- $gantt: null
768
- }));
650
+ key: "top",
651
+ class: "vxe-grid--top-wrapper"
652
+ }, topSlot({ $grid: $xeGrid, $gantt: null }));
769
653
  }
770
654
  return renderEmptyElement($xeGrid);
771
655
  };
772
656
  const renderTableLeft = () => {
773
657
  const leftSlot = slots.left;
774
658
  if (leftSlot) {
775
- return (0, _vue.h)('div', {
776
- class: 'vxe-grid--left-wrapper'
777
- }, leftSlot({
778
- $grid: $xeGrid,
779
- $gantt: null
780
- }));
659
+ return (0, import_vue.h)("div", {
660
+ class: "vxe-grid--left-wrapper"
661
+ }, leftSlot({ $grid: $xeGrid, $gantt: null }));
781
662
  }
782
663
  return renderEmptyElement($xeGrid);
783
664
  };
784
665
  const renderTableRight = () => {
785
666
  const rightSlot = slots.right;
786
667
  if (rightSlot) {
787
- return (0, _vue.h)('div', {
788
- class: 'vxe-grid--right-wrapper'
789
- }, rightSlot({
790
- $grid: $xeGrid,
791
- $gantt: null
792
- }));
668
+ return (0, import_vue.h)("div", {
669
+ class: "vxe-grid--right-wrapper"
670
+ }, rightSlot({ $grid: $xeGrid, $gantt: null }));
793
671
  }
794
672
  return renderEmptyElement($xeGrid);
795
673
  };
796
- /**
797
- * 渲染表格
798
- */
799
674
  const renderTable = () => {
800
- const {
801
- proxyConfig
802
- } = props;
803
- const tableProps = computeTableProps.value;
675
+ const { proxyConfig } = props;
676
+ const tableProps2 = computeTableProps.value;
804
677
  const proxyOpts = computeProxyOpts.value;
805
678
  const tableOns = Object.assign({}, tableCompEvents);
806
679
  const emptySlot = slots.empty;
807
680
  const loadingSlot = slots.loading;
808
- const rowDragIconSlot = slots.rowDragIcon || slots['row-drag-icon'];
809
- const columnDragIconSlot = slots.columnDragIcon || slots['column-drag-icon'];
810
- const headerTooltipSlot = slots.headerTooltip || slots['header-tooltip'];
681
+ const rowDragIconSlot = slots.rowDragIcon || slots["row-drag-icon"];
682
+ const columnDragIconSlot = slots.columnDragIcon || slots["column-drag-icon"];
683
+ const headerTooltipSlot = slots.headerTooltip || slots["header-tooltip"];
811
684
  const tooltipSlot = slots.tooltip;
812
- const footerTooltipSlot = slots.footerTooltip || slots['footer-tooltip'];
813
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
685
+ const footerTooltipSlot = slots.footerTooltip || slots["footer-tooltip"];
686
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
814
687
  if (proxyOpts.sort) {
815
688
  tableOns.onSortChange = sortChangeEvent;
816
689
  tableOns.onClearAllSort = clearAllSortEvent;
@@ -842,83 +715,81 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
842
715
  if (footerTooltipSlot) {
843
716
  slotObj.footerTooltip = footerTooltipSlot;
844
717
  }
845
- return (0, _vue.h)('div', {
846
- class: 'vxe-grid--table-wrapper'
847
- }, [(0, _vue.h)(_table.default, Object.assign(Object.assign({
848
- ref: refTable
849
- }, tableProps), tableOns), slotObj)]);
718
+ return (0, import_vue.h)("div", {
719
+ class: "vxe-grid--table-wrapper"
720
+ }, [
721
+ (0, import_vue.h)(import_table.default, {
722
+ ref: refTable,
723
+ ...tableProps2,
724
+ ...tableOns
725
+ }, slotObj)
726
+ ]);
850
727
  };
851
- /**
852
- * 渲染表格底部区域
853
- */
854
728
  const renderBottom = () => {
855
729
  if (slots.bottom) {
856
- return (0, _vue.h)('div', {
730
+ return (0, import_vue.h)("div", {
857
731
  ref: refBottomWrapper,
858
- key: 'bottom',
859
- class: 'vxe-grid--bottom-wrapper'
860
- }, slots.bottom({
861
- $grid: $xeGrid,
862
- $gantt: null
863
- }));
732
+ key: "bottom",
733
+ class: "vxe-grid--bottom-wrapper"
734
+ }, slots.bottom({ $grid: $xeGrid, $gantt: null }));
864
735
  }
865
736
  return renderEmptyElement($xeGrid);
866
737
  };
867
- /**
868
- * 渲染分页
869
- */
870
738
  const renderPager = () => {
871
- const {
872
- proxyConfig,
873
- pagerConfig
874
- } = props;
739
+ const { proxyConfig, pagerConfig } = props;
875
740
  const proxyOpts = computeProxyOpts.value;
876
741
  const pagerOpts = computePagerOpts.value;
877
742
  const pagerProps = computePagerProps.value;
878
743
  const pagerSlot = slots.pager;
879
- if (pagerConfig && (0, _utils.isEnableConf)(pagerOpts) || slots.pager) {
880
- return (0, _vue.h)('div', {
744
+ if (pagerConfig && (0, import_utils.isEnableConf)(pagerOpts) || slots.pager) {
745
+ return (0, import_vue.h)("div", {
881
746
  ref: refPagerWrapper,
882
- key: 'pager',
883
- class: 'vxe-grid--pager-wrapper'
884
- }, pagerSlot ? pagerSlot({
885
- $grid: $xeGrid,
886
- $gantt: null
887
- }) : [VxeUIPagerComponent ? (0, _vue.h)(VxeUIPagerComponent, Object.assign(Object.assign(Object.assign({
888
- ref: refPager
889
- }, pagerProps), proxyConfig && (0, _utils.isEnableConf)(proxyOpts) ? reactData.tablePage : {}), {
890
- onPageChange: pageChangeEvent
891
- }), getConfigSlot(pagerOpts.slots)) : renderEmptyElement($xeGrid)]);
747
+ key: "pager",
748
+ class: "vxe-grid--pager-wrapper"
749
+ }, pagerSlot ? pagerSlot({ $grid: $xeGrid, $gantt: null }) : [
750
+ VxeUIPagerComponent ? (0, import_vue.h)(VxeUIPagerComponent, {
751
+ ref: refPager,
752
+ ...pagerProps,
753
+ ...proxyConfig && (0, import_utils.isEnableConf)(proxyOpts) ? reactData.tablePage : {},
754
+ onPageChange: pageChangeEvent
755
+ }, getConfigSlot(pagerOpts.slots)) : renderEmptyElement($xeGrid)
756
+ ]);
892
757
  }
893
758
  return renderEmptyElement($xeGrid);
894
759
  };
895
- const renderChildLayout = layoutKeys => {
760
+ const renderChildLayout = (layoutKeys) => {
896
761
  const childVNs = [];
897
- layoutKeys.forEach(key => {
762
+ layoutKeys.forEach((key) => {
898
763
  switch (key) {
899
- case 'Form':
764
+ case "Form":
900
765
  childVNs.push(renderForm());
901
766
  break;
902
- case 'Toolbar':
767
+ case "Toolbar":
903
768
  childVNs.push(renderToolbar());
904
769
  break;
905
- case 'Top':
770
+ case "Top":
906
771
  childVNs.push(renderTop());
907
772
  break;
908
- case 'Table':
909
- childVNs.push((0, _vue.h)('div', {
910
- key: 'table',
911
- class: 'vxe-grid--table-container'
912
- }, [renderTableLeft(), renderTable(), renderTableRight()]));
773
+ case "Table":
774
+ childVNs.push(
775
+ (0, import_vue.h)("div", {
776
+ key: "table",
777
+ class: "vxe-grid--table-container"
778
+ }, [
779
+ renderTableLeft(),
780
+ renderTable(),
781
+ renderTableRight()
782
+ ])
783
+ );
913
784
  break;
914
- case 'Bottom':
785
+ case "Bottom":
915
786
  childVNs.push(renderBottom());
916
787
  break;
917
- case 'Pager':
788
+ case "Pager":
918
789
  childVNs.push(renderPager());
919
790
  break;
920
791
  default:
921
- errLog('vxe.error.notProp', [`layouts -> ${key}`]);
792
+ errLog("vxe.error.notProp", [`layouts -> ${key}`]);
922
793
  break;
923
794
  }
924
795
  });
@@ -926,61 +797,57 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
926
797
  };
927
798
  const renderLayout = () => {
928
799
  const currLayoutConf = computeCurrLayoutConf.value;
929
- const {
930
- headKeys,
931
- bodyKeys,
932
- footKeys
933
- } = currLayoutConf;
934
- const asideLeftSlot = slots.asideLeft || slots['aside-left'];
935
- const asideRightSlot = slots.asideRight || slots['aside-right'];
936
- return [(0, _vue.h)('div', {
937
- class: 'vxe-grid--layout-header-wrapper'
938
- }, renderChildLayout(headKeys)), (0, _vue.h)('div', {
939
- class: 'vxe-grid--layout-body-wrapper'
940
- }, [asideLeftSlot ? (0, _vue.h)('div', {
941
- class: 'vxe-grid--layout-aside-left-wrapper'
942
- }, asideLeftSlot({})) : renderEmptyElement($xeGrid), (0, _vue.h)('div', {
943
- class: 'vxe-grid--layout-body-content-wrapper'
944
- }, renderChildLayout(bodyKeys)), asideRightSlot ? (0, _vue.h)('div', {
945
- class: 'vxe-grid--layout-aside-right-wrapper'
946
- }, asideRightSlot({})) : renderEmptyElement($xeGrid)]), (0, _vue.h)('div', {
947
- class: 'vxe-grid--layout-footer-wrapper'
948
- }, renderChildLayout(footKeys)), (0, _vue.h)('div', {
949
- ref: refPopupContainerElem
950
- })];
800
+ const { headKeys, bodyKeys, footKeys } = currLayoutConf;
801
+ const asideLeftSlot = slots.asideLeft || slots["aside-left"];
802
+ const asideRightSlot = slots.asideRight || slots["aside-right"];
803
+ return [
804
+ (0, import_vue.h)("div", {
805
+ class: "vxe-grid--layout-header-wrapper"
806
+ }, renderChildLayout(headKeys)),
807
+ (0, import_vue.h)("div", {
808
+ class: "vxe-grid--layout-body-wrapper"
809
+ }, [
810
+ asideLeftSlot ? (0, import_vue.h)("div", {
811
+ class: "vxe-grid--layout-aside-left-wrapper"
812
+ }, asideLeftSlot({})) : renderEmptyElement($xeGrid),
813
+ (0, import_vue.h)("div", {
814
+ class: "vxe-grid--layout-body-content-wrapper"
815
+ }, renderChildLayout(bodyKeys)),
816
+ asideRightSlot ? (0, import_vue.h)("div", {
817
+ class: "vxe-grid--layout-aside-right-wrapper"
818
+ }, asideRightSlot({})) : renderEmptyElement($xeGrid)
819
+ ]),
820
+ (0, import_vue.h)("div", {
821
+ class: "vxe-grid--layout-footer-wrapper"
822
+ }, renderChildLayout(footKeys)),
823
+ (0, import_vue.h)("div", {
824
+ ref: refPopupContainerElem
825
+ })
826
+ ];
951
827
  };
952
828
  const tableCompEvents = {};
953
- _emits2.tableEmits.forEach(name => {
954
- const type = _xeUtils.default.camelCase(`on-${name}`);
829
+ import_emits2.tableEmits.forEach((name) => {
830
+ const type = import_xe_utils.default.camelCase(`on-${name}`);
955
831
  tableCompEvents[type] = (...args) => emit(name, ...args);
956
832
  });
957
833
  const getDefaultFormData = () => {
958
834
  const formOpts = computeFormOpts.value;
959
835
  if (formOpts.items) {
960
836
  const fData = {};
961
- formOpts.items.forEach(item => {
962
- const {
963
- field,
964
- itemRender
965
- } = item;
837
+ formOpts.items.forEach((item) => {
838
+ const { field, itemRender } = item;
966
839
  if (field) {
967
840
  let itemValue = null;
968
841
  if (itemRender) {
969
- const {
970
- startField,
971
- endField,
972
- defaultValue
973
- } = itemRender;
974
- if (_xeUtils.default.isFunction(defaultValue)) {
975
- itemValue = defaultValue({
976
- item
977
- });
978
- } else if (!_xeUtils.default.isUndefined(defaultValue)) {
842
+ const { startField, endField, defaultValue } = itemRender;
843
+ if (import_xe_utils.default.isFunction(defaultValue)) {
844
+ itemValue = defaultValue({ item });
845
+ } else if (!import_xe_utils.default.isUndefined(defaultValue)) {
979
846
  itemValue = defaultValue;
980
847
  }
981
848
  if (startField && endField) {
982
- _xeUtils.default.set(fData, startField, null);
983
- _xeUtils.default.set(fData, endField, null);
849
+ import_xe_utils.default.set(fData, startField, null);
850
+ import_xe_utils.default.set(fData, endField, null);
984
851
  }
985
852
  }
986
853
  fData[field] = itemValue;
@@ -991,32 +858,25 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
991
858
  return {};
992
859
  };
993
860
  const initProxy = () => {
994
- const {
995
- proxyConfig,
996
- formConfig
997
- } = props;
998
- const {
999
- proxyInited
1000
- } = reactData;
861
+ const { proxyConfig, formConfig } = props;
862
+ const { proxyInited } = reactData;
1001
863
  const proxyOpts = computeProxyOpts.value;
1002
864
  const formOpts = computeFormOpts.value;
1003
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts)) {
1004
- if (formConfig && (0, _utils.isEnableConf)(formOpts) && proxyOpts.form && formOpts.items) {
865
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts)) {
866
+ if (formConfig && (0, import_utils.isEnableConf)(formOpts) && proxyOpts.form && formOpts.items) {
1005
867
  reactData.formData = getDefaultFormData();
1006
868
  }
1007
869
  if (!proxyInited) {
1008
870
  reactData.proxyInited = true;
1009
871
  if (proxyOpts.autoLoad !== false) {
1010
- (0, _vue.nextTick)().then(() => {
872
+ (0, import_vue.nextTick)().then(() => {
1011
873
  internalData.uFoot = true;
1012
- const rest = $xeGrid.commitProxy('initial');
874
+ const rest = $xeGrid.commitProxy("initial");
1013
875
  internalData.uFoot = false;
1014
876
  updateQueryFooter();
1015
877
  return rest;
1016
- }).then(rest => {
1017
- dispatchEvent('proxy-query', Object.assign(Object.assign({}, rest), {
1018
- isInited: true
1019
- }), new Event('initial'));
878
+ }).then((rest) => {
879
+ dispatchEvent("proxy-query", { ...rest, isInited: true }, new Event("initial"));
1020
880
  });
1021
881
  }
1022
882
  }
@@ -1024,14 +884,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1024
884
  };
1025
885
  const updateQueryFooter = () => {
1026
886
  const proxyOpts = computeProxyOpts.value;
1027
- const {
1028
- ajax
1029
- } = proxyOpts;
887
+ const { ajax } = proxyOpts;
1030
888
  if (ajax && ajax.queryFooter) {
1031
- return $xeGrid.commitProxy('queryFooter');
889
+ return $xeGrid.commitProxy("queryFooter");
1032
890
  }
1033
891
  };
1034
- const handleGlobalKeydownEvent = evnt => {
892
+ const handleGlobalKeydownEvent = (evnt) => {
1035
893
  const zoomOpts = computeZoomOpts.value;
1036
894
  const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
1037
895
  if (isEsc && reactData.isZMax && zoomOpts.escRestore !== false) {
@@ -1039,10 +897,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1039
897
  }
1040
898
  };
1041
899
  const dispatchEvent = (type, params, evnt) => {
1042
- emit(type, createEvent(evnt, {
1043
- $grid: $xeGrid,
1044
- $gantt: null
1045
- }, params));
900
+ emit(type, createEvent(evnt, { $grid: $xeGrid, $gantt: null }, params));
1046
901
  };
1047
902
  const gridMethods = {
1048
903
  dispatchEvent,
@@ -1054,48 +909,25 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1054
909
  * @param {String/Object} code 字符串或对象
1055
910
  */
1056
911
  commitProxy(proxyTarget, ...args) {
1057
- const {
1058
- showFooter,
1059
- proxyConfig,
1060
- toolbarConfig,
1061
- pagerConfig,
1062
- editRules,
1063
- validConfig
1064
- } = props;
1065
- const {
1066
- tablePage
1067
- } = reactData;
912
+ const { showFooter, proxyConfig, toolbarConfig, pagerConfig, editRules, validConfig } = props;
913
+ const { tablePage } = reactData;
1068
914
  const isActiveMsg = computeIsActiveMsg.value;
1069
915
  const isRespMsg = computeIsRespMsg.value;
1070
916
  const proxyOpts = computeProxyOpts.value;
1071
917
  const pagerOpts = computePagerOpts.value;
1072
918
  const toolbarOpts = computeToolbarOpts.value;
1073
- const {
1074
- beforeQuery: oldBeforeQuery,
1075
- afterQuery: oldAfterQuery,
1076
- beforeQueryFooter: oldBeforeQueryFooter,
1077
- afterQueryFooter: oldAfterQueryFooter,
1078
- beforeDelete: oldBeforeDelete,
1079
- afterDelete: oldAfterDelete,
1080
- beforeSave: oldBeforeSave,
1081
- afterSave: oldAfterSave,
1082
- ajax = {}
1083
- } = proxyOpts;
919
+ const { beforeQuery: oldBeforeQuery, afterQuery: oldAfterQuery, beforeQueryFooter: oldBeforeQueryFooter, afterQueryFooter: oldAfterQueryFooter, beforeDelete: oldBeforeDelete, afterDelete: oldAfterDelete, beforeSave: oldBeforeSave, afterSave: oldAfterSave, ajax = {} } = proxyOpts;
1084
920
  const resConfigs = proxyOpts.response || proxyOpts.props || {};
1085
921
  const $xeTable = refTable.value;
1086
922
  if (!$xeTable) {
1087
- return (0, _vue.nextTick)();
923
+ return (0, import_vue.nextTick)();
1088
924
  }
1089
925
  let formData = getFormData();
1090
926
  let button = null;
1091
927
  let code = null;
1092
- if (_xeUtils.default.isString(proxyTarget)) {
1093
- const {
1094
- buttons
1095
- } = toolbarOpts;
1096
- const matchObj = toolbarConfig && (0, _utils.isEnableConf)(toolbarOpts) && buttons ? _xeUtils.default.findTree(buttons, item => item.code === proxyTarget, {
1097
- children: 'dropdowns'
1098
- }) : null;
928
+ if (import_xe_utils.default.isString(proxyTarget)) {
929
+ const { buttons } = toolbarOpts;
930
+ const matchObj = toolbarConfig && (0, import_utils.isEnableConf)(toolbarOpts) && buttons ? import_xe_utils.default.findTree(buttons, (item) => item.code === proxyTarget, { children: "dropdowns" }) : null;
1099
931
  button = matchObj ? matchObj.item : null;
1100
932
  code = proxyTarget;
1101
933
  } else {
@@ -1104,595 +936,469 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1104
936
  }
1105
937
  const btnParams = button ? button.params : null;
1106
938
  switch (code) {
1107
- case 'insert':
939
+ case "insert":
1108
940
  return $xeTable.insert({});
1109
- case 'insert_edit':
1110
- return $xeTable.insert({}).then(({
1111
- row
1112
- }) => $xeTable.setEditRow(row, true));
941
+ case "insert_edit":
942
+ return $xeTable.insert({}).then(({ row }) => $xeTable.setEditRow(row, true));
1113
943
  // 已废弃
1114
- case 'insert_actived':
1115
- return $xeTable.insert({}).then(({
1116
- row
1117
- }) => $xeTable.setEditRow(row, true));
944
+ case "insert_actived":
945
+ return $xeTable.insert({}).then(({ row }) => $xeTable.setEditRow(row, true));
1118
946
  // 已废弃
1119
- case 'mark_cancel':
947
+ case "mark_cancel":
1120
948
  triggerPendingEvent(code);
1121
949
  break;
1122
- case 'remove':
1123
- return handleDeleteRow(code, 'vxe.grid.removeSelectRecord', () => $xeTable.removeCheckboxRow());
1124
- case 'import':
950
+ case "remove":
951
+ return handleDeleteRow(code, "vxe.grid.removeSelectRecord", () => $xeTable.removeCheckboxRow());
952
+ case "import":
1125
953
  $xeTable.importData(btnParams);
1126
954
  break;
1127
- case 'open_import':
955
+ case "open_import":
1128
956
  $xeTable.openImport(btnParams);
1129
957
  break;
1130
- case 'export':
958
+ case "export":
1131
959
  $xeTable.exportData(btnParams);
1132
960
  break;
1133
- case 'open_export':
961
+ case "open_export":
1134
962
  $xeTable.openExport(btnParams);
1135
963
  break;
1136
- case 'reset_custom':
964
+ case "reset_custom":
1137
965
  return $xeTable.resetCustom(true);
1138
- case 'initial':
1139
- case 'reload':
1140
- case 'query':
1141
- {
1142
- const bqMethod = ajax.beforeQuery;
1143
- const qMethod = ajax.query;
1144
- const aqMethod = ajax.afterQuery;
1145
- const qsMethod = ajax.querySuccess;
1146
- const qeMethod = ajax.queryError;
1147
- if (qMethod) {
1148
- const isInited = code === 'initial';
1149
- const isReload = code === 'reload';
1150
- if (!isInited && reactData.tableLoading) {
1151
- return (0, _vue.nextTick)();
966
+ case "initial":
967
+ case "reload":
968
+ case "query": {
969
+ const bqMethod = ajax.beforeQuery;
970
+ const qMethod = ajax.query;
971
+ const aqMethod = ajax.afterQuery;
972
+ const qsMethod = ajax.querySuccess;
973
+ const qeMethod = ajax.queryError;
974
+ if (qMethod) {
975
+ const isInited = code === "initial";
976
+ const isReload = code === "reload";
977
+ if (!isInited && reactData.tableLoading) {
978
+ return (0, import_vue.nextTick)();
979
+ }
980
+ let operPromise = null;
981
+ let sortList = [];
982
+ let filterList = [];
983
+ let pageParams = {};
984
+ if (pagerConfig) {
985
+ if (isInited || isReload) {
986
+ tablePage.currentPage = 1;
1152
987
  }
1153
- let operPromise = null;
1154
- let sortList = [];
1155
- let filterList = [];
1156
- let pageParams = {};
1157
- if (pagerConfig) {
1158
- if (isInited || isReload) {
1159
- // 重置分页
1160
- tablePage.currentPage = 1;
1161
- }
1162
- if ((0, _utils.isEnableConf)(pagerOpts)) {
1163
- pageParams = Object.assign({}, tablePage);
1164
- }
988
+ if ((0, import_utils.isEnableConf)(pagerOpts)) {
989
+ pageParams = { ...tablePage };
1165
990
  }
1166
- if (isInited) {
1167
- // 重置代理表单数据
1168
- if (proxyConfig && (0, _utils.isEnableConf)(proxyOpts) && proxyOpts.form) {
1169
- formData = getDefaultFormData();
1170
- reactData.formData = formData;
1171
- }
1172
- if ($xeTable) {
1173
- const tableInternalData = $xeTable.internalData;
1174
- const {
1175
- tableFullColumn,
1176
- fullColumnFieldData
1177
- } = tableInternalData;
1178
- const {
1179
- computeSortOpts
1180
- } = $xeTable.getComputeMaps();
1181
- const sortOpts = computeSortOpts.value;
1182
- let defaultSort = sortOpts.defaultSort;
1183
- tableFullColumn.forEach(column => {
1184
- column.order = null;
1185
- });
1186
- // 如果使用默认排序
1187
- if (defaultSort) {
1188
- if (!_xeUtils.default.isArray(defaultSort)) {
1189
- defaultSort = [defaultSort];
1190
- }
1191
- sortList = defaultSort.map(item => {
1192
- const {
1193
- field,
1194
- order
1195
- } = item;
1196
- const colRest = fullColumnFieldData[field];
1197
- if (colRest) {
1198
- const column = colRest.column;
1199
- if (column) {
1200
- column.order = order;
1201
- }
1202
- }
1203
- return {
1204
- field,
1205
- property: field,
1206
- order
1207
- };
1208
- });
991
+ }
992
+ if (isInited) {
993
+ if (proxyConfig && (0, import_utils.isEnableConf)(proxyOpts) && proxyOpts.form) {
994
+ formData = getDefaultFormData();
995
+ reactData.formData = formData;
996
+ }
997
+ if ($xeTable) {
998
+ const tableInternalData = $xeTable.internalData;
999
+ const { tableFullColumn, fullColumnFieldData } = tableInternalData;
1000
+ const { computeSortOpts } = $xeTable.getComputeMaps();
1001
+ const sortOpts = computeSortOpts.value;
1002
+ let defaultSort = sortOpts.defaultSort;
1003
+ tableFullColumn.forEach((column) => {
1004
+ column.order = null;
1005
+ });
1006
+ if (defaultSort) {
1007
+ if (!import_xe_utils.default.isArray(defaultSort)) {
1008
+ defaultSort = [defaultSort];
1209
1009
  }
1210
- filterList = $xeTable.getCheckedFilters();
1010
+ sortList = defaultSort.map((item) => {
1011
+ const { field, order } = item;
1012
+ const colRest = fullColumnFieldData[field];
1013
+ if (colRest) {
1014
+ const column = colRest.column;
1015
+ if (column) {
1016
+ column.order = order;
1017
+ }
1018
+ }
1019
+ return {
1020
+ field,
1021
+ property: field,
1022
+ order
1023
+ };
1024
+ });
1211
1025
  }
1212
- } else {
1213
- if ($xeTable) {
1214
- if (isReload) {
1215
- operPromise = $xeTable.clearAll();
1216
- } else {
1217
- sortList = $xeTable.getSortColumns();
1218
- filterList = $xeTable.getCheckedFilters();
1219
- }
1026
+ filterList = $xeTable.getCheckedFilters();
1027
+ }
1028
+ } else {
1029
+ if ($xeTable) {
1030
+ if (isReload) {
1031
+ operPromise = $xeTable.clearAll();
1032
+ } else {
1033
+ sortList = $xeTable.getSortColumns();
1034
+ filterList = $xeTable.getCheckedFilters();
1220
1035
  }
1221
1036
  }
1222
- const commitParams = {
1223
- $table: $xeTable,
1224
- $grid: $xeGrid,
1225
- $gantt: null,
1226
- code,
1227
- button,
1228
- isInited,
1229
- isReload,
1230
- page: pageParams,
1231
- sort: sortList.length ? sortList[0] : {},
1232
- sorts: sortList,
1233
- filters: filterList,
1234
- form: formData,
1235
- options: qMethod
1236
- };
1237
- const handleQuery = () => {
1238
- reactData.sortData = sortList;
1239
- reactData.filterData = filterList;
1240
- reactData.tableLoading = true;
1241
- return Promise.all([Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)), operPromise]).then(([rest]) => {
1242
- reactData.tableLoading = false;
1243
- if (aqMethod) {
1244
- aqMethod(Object.assign(Object.assign({}, commitParams), {
1245
- response: rest,
1246
- status: 'success'
1247
- }), ...args);
1248
- } else {
1249
- let tableData = [];
1250
- if (rest) {
1251
- const listProp = resConfigs.list;
1252
- const resultProp = resConfigs.result;
1253
- const reParams = {
1254
- data: rest,
1255
- $table: $xeTable,
1256
- $grid: $xeGrid,
1257
- $gantt: null
1258
- };
1259
- if (pagerConfig && (0, _utils.isEnableConf)(pagerOpts)) {
1260
- const totalProp = resConfigs.total;
1261
- const total = (_xeUtils.default.isFunction(totalProp) ? totalProp(reParams) : _xeUtils.default.get(rest, totalProp || 'page.total')) || 0;
1262
- tablePage.total = _xeUtils.default.toNumber(total);
1263
- tableData = (_xeUtils.default.isFunction(resultProp) ? resultProp(reParams) : _xeUtils.default.get(rest, resultProp || 'result')) || [];
1264
- // 检验当前页码,不能超出当前最大页数
1265
- const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1);
1266
- if (tablePage.currentPage > pageCount) {
1267
- tablePage.currentPage = pageCount;
1268
- }
1269
- } else {
1270
- if (_xeUtils.default.isArray(rest)) {
1271
- tableData = rest;
1272
- } else if (listProp) {
1273
- tableData = (_xeUtils.default.isFunction(listProp) ? listProp(reParams) : _xeUtils.default.get(rest, listProp)) || [];
1274
- }
1275
- }
1276
- if (showFooter) {
1277
- const fdProp = resConfigs.footerData;
1278
- const footerList = fdProp ? _xeUtils.default.isFunction(fdProp) ? fdProp(reParams) : _xeUtils.default.get(rest, fdProp) : [];
1279
- if (_xeUtils.default.isArray(footerList)) {
1280
- reactData.footerData = footerList;
1281
- }
1037
+ }
1038
+ const commitParams = {
1039
+ $table: $xeTable,
1040
+ $grid: $xeGrid,
1041
+ $gantt: null,
1042
+ code,
1043
+ button,
1044
+ isInited,
1045
+ isReload,
1046
+ page: pageParams,
1047
+ sort: sortList.length ? sortList[0] : {},
1048
+ sorts: sortList,
1049
+ filters: filterList,
1050
+ form: formData,
1051
+ options: qMethod
1052
+ };
1053
+ const handleQuery = () => {
1054
+ reactData.sortData = sortList;
1055
+ reactData.filterData = filterList;
1056
+ reactData.tableLoading = true;
1057
+ return Promise.all([
1058
+ Promise.resolve((oldBeforeQuery || qMethod)(commitParams, ...args)),
1059
+ operPromise
1060
+ ]).then(([rest]) => {
1061
+ reactData.tableLoading = false;
1062
+ if (aqMethod) {
1063
+ aqMethod({ ...commitParams, response: rest, status: "success" }, ...args);
1064
+ } else {
1065
+ let tableData = [];
1066
+ if (rest) {
1067
+ const listProp = resConfigs.list;
1068
+ const resultProp = resConfigs.result;
1069
+ const reParams = { data: rest, $table: $xeTable, $grid: $xeGrid, $gantt: null };
1070
+ if (pagerConfig && (0, import_utils.isEnableConf)(pagerOpts)) {
1071
+ const totalProp = resConfigs.total;
1072
+ const total = (import_xe_utils.default.isFunction(totalProp) ? totalProp(reParams) : import_xe_utils.default.get(rest, totalProp || "page.total")) || 0;
1073
+ tablePage.total = import_xe_utils.default.toNumber(total);
1074
+ tableData = (import_xe_utils.default.isFunction(resultProp) ? resultProp(reParams) : import_xe_utils.default.get(rest, resultProp || "result")) || [];
1075
+ const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1);
1076
+ if (tablePage.currentPage > pageCount) {
1077
+ tablePage.currentPage = pageCount;
1282
1078
  }
1283
- }
1284
- if ($xeTable) {
1285
- $xeTable.loadData(tableData);
1286
1079
  } else {
1287
- (0, _vue.nextTick)(() => {
1288
- const $xeTable = refTable.value;
1289
- if ($xeTable) {
1290
- $xeTable.loadData(tableData);
1291
- }
1292
- });
1080
+ if (import_xe_utils.default.isArray(rest)) {
1081
+ tableData = rest;
1082
+ } else if (listProp) {
1083
+ tableData = (import_xe_utils.default.isFunction(listProp) ? listProp(reParams) : import_xe_utils.default.get(rest, listProp)) || [];
1084
+ }
1293
1085
  }
1294
- if (oldAfterQuery) {
1295
- oldAfterQuery(Object.assign(Object.assign({}, commitParams), {
1296
- response: rest
1297
- }), ...args);
1086
+ if (showFooter) {
1087
+ const fdProp = resConfigs.footerData;
1088
+ const footerList = fdProp ? import_xe_utils.default.isFunction(fdProp) ? fdProp(reParams) : import_xe_utils.default.get(rest, fdProp) : [];
1089
+ if (import_xe_utils.default.isArray(footerList)) {
1090
+ reactData.footerData = footerList;
1091
+ }
1298
1092
  }
1299
1093
  }
1300
- if (qsMethod) {
1301
- qsMethod(Object.assign(Object.assign({}, commitParams), {
1302
- response: rest
1303
- }));
1304
- }
1305
- return {
1306
- status: true
1307
- };
1308
- }).catch(rest => {
1309
- reactData.tableLoading = false;
1310
- if (aqMethod) {
1311
- aqMethod(Object.assign(Object.assign({}, commitParams), {
1312
- response: rest,
1313
- status: 'error'
1314
- }), ...args);
1315
- }
1316
- if (qeMethod) {
1317
- qeMethod(Object.assign(Object.assign({}, commitParams), {
1318
- response: rest
1319
- }));
1094
+ if ($xeTable) {
1095
+ $xeTable.loadData(tableData);
1096
+ } else {
1097
+ (0, import_vue.nextTick)(() => {
1098
+ const $xeTable2 = refTable.value;
1099
+ if ($xeTable2) {
1100
+ $xeTable2.loadData(tableData);
1101
+ }
1102
+ });
1320
1103
  }
1321
- return {
1322
- status: false
1323
- };
1324
- });
1325
- };
1326
- if (bqMethod) {
1327
- return Promise.resolve(bqMethod(commitParams, ...args)).then(status => {
1328
- if (status !== false) {
1329
- return handleQuery();
1104
+ if (oldAfterQuery) {
1105
+ oldAfterQuery({ ...commitParams, response: rest }, ...args);
1330
1106
  }
1331
- });
1332
- }
1333
- return handleQuery();
1334
- } else {
1335
- errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
1107
+ }
1108
+ if (qsMethod) {
1109
+ qsMethod({ ...commitParams, response: rest });
1110
+ }
1111
+ return { status: true };
1112
+ }).catch((rest) => {
1113
+ reactData.tableLoading = false;
1114
+ if (aqMethod) {
1115
+ aqMethod({ ...commitParams, response: rest, status: "error" }, ...args);
1116
+ }
1117
+ if (qeMethod) {
1118
+ qeMethod({ ...commitParams, response: rest });
1119
+ }
1120
+ return { status: false };
1121
+ });
1122
+ };
1123
+ if (bqMethod) {
1124
+ return Promise.resolve(bqMethod(commitParams, ...args)).then((status) => {
1125
+ if (status !== false) {
1126
+ return handleQuery();
1127
+ }
1128
+ });
1336
1129
  }
1337
- break;
1130
+ return handleQuery();
1131
+ } else {
1132
+ errLog("vxe.error.notFunc", ["proxy-config.ajax.query"]);
1338
1133
  }
1339
- case 'queryFooter':
1340
- case 'query_footer':
1341
- {
1342
- const bqfMethod = ajax.beforeQueryFooter;
1343
- const qfMethod = ajax.queryFooter;
1344
- const aqfMethod = ajax.afterQueryFooter;
1345
- const qfSuccessMethod = ajax.queryFooterSuccess;
1346
- const qfErrorMethod = ajax.queryFooterError;
1347
- if (qfMethod) {
1348
- let filterList = [];
1349
- if ($xeTable) {
1350
- filterList = $xeTable.getCheckedFilters();
1351
- }
1352
- let pageParams = {};
1353
- if (pagerConfig) {
1354
- if ((0, _utils.isEnableConf)(pagerOpts)) {
1355
- pageParams = Object.assign({}, tablePage);
1356
- }
1134
+ break;
1135
+ }
1136
+ case "queryFooter":
1137
+ case "query_footer": {
1138
+ const bqfMethod = ajax.beforeQueryFooter;
1139
+ const qfMethod = ajax.queryFooter;
1140
+ const aqfMethod = ajax.afterQueryFooter;
1141
+ const qfSuccessMethod = ajax.queryFooterSuccess;
1142
+ const qfErrorMethod = ajax.queryFooterError;
1143
+ if (qfMethod) {
1144
+ let filterList = [];
1145
+ if ($xeTable) {
1146
+ filterList = $xeTable.getCheckedFilters();
1147
+ }
1148
+ let pageParams = {};
1149
+ if (pagerConfig) {
1150
+ if ((0, import_utils.isEnableConf)(pagerOpts)) {
1151
+ pageParams = { ...tablePage };
1357
1152
  }
1358
- const commitParams = {
1359
- $table: $xeTable,
1360
- $grid: $xeGrid,
1361
- $gantt: null,
1362
- code,
1363
- button,
1364
- page: pageParams,
1365
- filters: filterList,
1366
- form: formData,
1367
- options: qfMethod
1368
- };
1369
- const handleQueryFooter = () => {
1370
- return Promise.resolve((oldBeforeQueryFooter || qfMethod)(commitParams, ...args)).then(rest => {
1371
- if (aqfMethod) {
1372
- aqfMethod(Object.assign(Object.assign({}, commitParams), {
1373
- response: rest,
1374
- status: 'success'
1375
- }), ...args);
1376
- } else {
1377
- reactData.footerData = _xeUtils.default.isArray(rest) ? rest : [];
1378
- if (oldAfterQueryFooter) {
1379
- oldAfterQueryFooter(Object.assign(Object.assign({}, commitParams), {
1380
- response: rest
1381
- }), ...args);
1382
- }
1383
- }
1384
- if (qfSuccessMethod) {
1385
- qfSuccessMethod(Object.assign(Object.assign({}, commitParams), {
1386
- response: rest
1387
- }));
1388
- }
1389
- return {
1390
- status: true
1391
- };
1392
- }).catch(rest => {
1393
- if (aqfMethod) {
1394
- aqfMethod(Object.assign(Object.assign({}, commitParams), {
1395
- response: rest,
1396
- status: 'error'
1397
- }), ...args);
1398
- }
1399
- if (qfErrorMethod) {
1400
- qfErrorMethod(Object.assign(Object.assign({}, commitParams), {
1401
- response: rest
1402
- }));
1403
- }
1404
- return {
1405
- status: false
1406
- };
1407
- });
1408
- };
1409
- if (bqfMethod) {
1410
- return Promise.resolve(bqfMethod(commitParams, ...args)).then(status => {
1411
- if (status !== false) {
1412
- return handleQueryFooter();
1153
+ }
1154
+ const commitParams = {
1155
+ $table: $xeTable,
1156
+ $grid: $xeGrid,
1157
+ $gantt: null,
1158
+ code,
1159
+ button,
1160
+ page: pageParams,
1161
+ filters: filterList,
1162
+ form: formData,
1163
+ options: qfMethod
1164
+ };
1165
+ const handleQueryFooter = () => {
1166
+ return Promise.resolve((oldBeforeQueryFooter || qfMethod)(commitParams, ...args)).then((rest) => {
1167
+ if (aqfMethod) {
1168
+ aqfMethod({ ...commitParams, response: rest, status: "success" }, ...args);
1169
+ } else {
1170
+ reactData.footerData = import_xe_utils.default.isArray(rest) ? rest : [];
1171
+ if (oldAfterQueryFooter) {
1172
+ oldAfterQueryFooter({ ...commitParams, response: rest }, ...args);
1413
1173
  }
1414
- });
1415
- }
1416
- return handleQueryFooter();
1417
- } else {
1418
- errLog('vxe.error.notFunc', ['proxy-config.ajax.queryFooter']);
1174
+ }
1175
+ if (qfSuccessMethod) {
1176
+ qfSuccessMethod({ ...commitParams, response: rest });
1177
+ }
1178
+ return { status: true };
1179
+ }).catch((rest) => {
1180
+ if (aqfMethod) {
1181
+ aqfMethod({ ...commitParams, response: rest, status: "error" }, ...args);
1182
+ }
1183
+ if (qfErrorMethod) {
1184
+ qfErrorMethod({ ...commitParams, response: rest });
1185
+ }
1186
+ return { status: false };
1187
+ });
1188
+ };
1189
+ if (bqfMethod) {
1190
+ return Promise.resolve(bqfMethod(commitParams, ...args)).then((status) => {
1191
+ if (status !== false) {
1192
+ return handleQueryFooter();
1193
+ }
1194
+ });
1419
1195
  }
1420
- break;
1196
+ return handleQueryFooter();
1197
+ } else {
1198
+ errLog("vxe.error.notFunc", ["proxy-config.ajax.queryFooter"]);
1421
1199
  }
1422
- case 'delete':
1423
- {
1424
- const bdMethod = ajax.beforeDelete;
1425
- const dMethod = ajax.delete;
1426
- const adMethod = ajax.afterDelete;
1427
- const deleteSuccessMethods = ajax.deleteSuccess;
1428
- const deleteErrorMethods = ajax.deleteError;
1429
- if (dMethod) {
1430
- const selectRecords = $xeGrid.getCheckboxRecords();
1431
- const removeRecords = selectRecords.filter(row => !$xeTable.isInsertByRow(row));
1432
- const body = {
1433
- removeRecords
1434
- };
1435
- const commitParams = {
1436
- $table: $xeTable,
1437
- $grid: $xeGrid,
1438
- $gantt: null,
1439
- code,
1440
- button,
1441
- body,
1442
- form: formData,
1443
- options: dMethod
1444
- };
1445
- if (selectRecords.length) {
1446
- return handleDeleteRow(code, 'vxe.grid.deleteSelectRecord', () => {
1447
- if (!removeRecords.length) {
1448
- return $xeTable.remove(selectRecords);
1449
- }
1450
- const handleDelete = () => {
1451
- reactData.tableLoading = true;
1452
- return Promise.resolve((oldBeforeDelete || dMethod)(commitParams, ...args)).then(rest => {
1453
- reactData.tableLoading = false;
1454
- if (adMethod) {
1455
- adMethod(Object.assign(Object.assign({}, commitParams), {
1456
- response: rest,
1457
- status: 'success'
1458
- }), ...args);
1459
- } else {
1460
- $xeTable.setPendingRow(removeRecords, false);
1461
- if (isRespMsg) {
1462
- if (_ui.VxeUI.modal) {
1463
- _ui.VxeUI.modal.message({
1464
- content: getRespMsg(rest, 'vxe.grid.delSuccess'),
1465
- status: 'success'
1466
- });
1467
- }
1468
- }
1469
- if (oldAfterDelete) {
1470
- oldAfterDelete(Object.assign(Object.assign({}, commitParams), {
1471
- response: rest
1472
- }), ...args);
1473
- } else {
1474
- internalData.uFoot = true;
1475
- $xeGrid.commitProxy('query');
1476
- internalData.uFoot = false;
1477
- updateQueryFooter();
1200
+ break;
1201
+ }
1202
+ case "delete": {
1203
+ const bdMethod = ajax.beforeDelete;
1204
+ const dMethod = ajax.delete;
1205
+ const adMethod = ajax.afterDelete;
1206
+ const deleteSuccessMethods = ajax.deleteSuccess;
1207
+ const deleteErrorMethods = ajax.deleteError;
1208
+ if (dMethod) {
1209
+ const selectRecords = $xeGrid.getCheckboxRecords();
1210
+ const removeRecords = selectRecords.filter((row) => !$xeTable.isInsertByRow(row));
1211
+ const body = { removeRecords };
1212
+ const commitParams = {
1213
+ $table: $xeTable,
1214
+ $grid: $xeGrid,
1215
+ $gantt: null,
1216
+ code,
1217
+ button,
1218
+ body,
1219
+ form: formData,
1220
+ options: dMethod
1221
+ };
1222
+ if (selectRecords.length) {
1223
+ return handleDeleteRow(code, "vxe.grid.deleteSelectRecord", () => {
1224
+ if (!removeRecords.length) {
1225
+ return $xeTable.remove(selectRecords);
1226
+ }
1227
+ const handleDelete = () => {
1228
+ reactData.tableLoading = true;
1229
+ return Promise.resolve((oldBeforeDelete || dMethod)(commitParams, ...args)).then((rest) => {
1230
+ reactData.tableLoading = false;
1231
+ if (adMethod) {
1232
+ adMethod({ ...commitParams, response: rest, status: "success" }, ...args);
1233
+ } else {
1234
+ $xeTable.setPendingRow(removeRecords, false);
1235
+ if (isRespMsg) {
1236
+ if (import_ui.VxeUI.modal) {
1237
+ import_ui.VxeUI.modal.message({ content: getRespMsg(rest, "vxe.grid.delSuccess"), status: "success" });
1478
1238
  }
1479
1239
  }
1480
- if (deleteSuccessMethods) {
1481
- deleteSuccessMethods(Object.assign(Object.assign({}, commitParams), {
1482
- response: rest
1483
- }));
1484
- }
1485
- return {
1486
- status: true
1487
- };
1488
- }).catch(rest => {
1489
- reactData.tableLoading = false;
1490
- if (adMethod) {
1491
- adMethod(Object.assign(Object.assign({}, commitParams), {
1492
- response: rest,
1493
- status: 'error'
1494
- }), ...args);
1240
+ if (oldAfterDelete) {
1241
+ oldAfterDelete({ ...commitParams, response: rest }, ...args);
1495
1242
  } else {
1496
- if (isRespMsg) {
1497
- if (_ui.VxeUI.modal) {
1498
- _ui.VxeUI.modal.message({
1499
- id: code,
1500
- content: getRespMsg(rest, 'vxe.grid.operError'),
1501
- status: 'error'
1502
- });
1503
- }
1504
- }
1505
- }
1506
- if (deleteErrorMethods) {
1507
- deleteErrorMethods(Object.assign(Object.assign({}, commitParams), {
1508
- response: rest
1509
- }));
1243
+ internalData.uFoot = true;
1244
+ $xeGrid.commitProxy("query");
1245
+ internalData.uFoot = false;
1246
+ updateQueryFooter();
1510
1247
  }
1511
- return {
1512
- status: false
1513
- };
1514
- });
1515
- };
1516
- if (bdMethod) {
1517
- return Promise.resolve(bdMethod(commitParams, ...args)).then(status => {
1518
- if (status !== false) {
1519
- return handleDelete();
1248
+ }
1249
+ if (deleteSuccessMethods) {
1250
+ deleteSuccessMethods({ ...commitParams, response: rest });
1251
+ }
1252
+ return { status: true };
1253
+ }).catch((rest) => {
1254
+ reactData.tableLoading = false;
1255
+ if (adMethod) {
1256
+ adMethod({ ...commitParams, response: rest, status: "error" }, ...args);
1257
+ } else {
1258
+ if (isRespMsg) {
1259
+ if (import_ui.VxeUI.modal) {
1260
+ import_ui.VxeUI.modal.message({ id: code, content: getRespMsg(rest, "vxe.grid.operError"), status: "error" });
1261
+ }
1520
1262
  }
1521
- });
1522
- }
1523
- return handleDelete();
1524
- });
1525
- } else {
1526
- if (isActiveMsg) {
1527
- if (_ui.VxeUI.modal) {
1528
- _ui.VxeUI.modal.message({
1529
- id: code,
1530
- content: getI18n('vxe.grid.selectOneRecord'),
1531
- status: 'warning'
1532
- });
1533
- }
1263
+ }
1264
+ if (deleteErrorMethods) {
1265
+ deleteErrorMethods({ ...commitParams, response: rest });
1266
+ }
1267
+ return { status: false };
1268
+ });
1269
+ };
1270
+ if (bdMethod) {
1271
+ return Promise.resolve(bdMethod(commitParams, ...args)).then((status) => {
1272
+ if (status !== false) {
1273
+ return handleDelete();
1274
+ }
1275
+ });
1534
1276
  }
1535
- }
1277
+ return handleDelete();
1278
+ });
1536
1279
  } else {
1537
- errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
1280
+ if (isActiveMsg) {
1281
+ if (import_ui.VxeUI.modal) {
1282
+ import_ui.VxeUI.modal.message({ id: code, content: getI18n("vxe.grid.selectOneRecord"), status: "warning" });
1283
+ }
1284
+ }
1538
1285
  }
1539
- break;
1286
+ } else {
1287
+ errLog("vxe.error.notFunc", ["proxy-config.ajax.delete"]);
1540
1288
  }
1541
- case 'save':
1542
- {
1543
- const bSaveMethod = ajax.beforeSave;
1544
- const sMethod = ajax.save;
1545
- const aSaveMethod = ajax.afterSave;
1546
- const sSuccessMethod = ajax.saveSuccess;
1547
- const sErrorMethod = ajax.saveError;
1548
- if (sMethod) {
1549
- const body = $xeTable.getRecordset();
1550
- const {
1551
- insertRecords,
1552
- removeRecords,
1553
- updateRecords,
1554
- pendingRecords
1555
- } = body;
1556
- const commitParams = {
1557
- $table: $xeTable,
1558
- $grid: $xeGrid,
1559
- $gantt: null,
1560
- code,
1561
- button,
1562
- body,
1563
- form: formData,
1564
- options: sMethod
1565
- };
1566
- // 排除掉新增且标记为删除的数据
1567
- if (insertRecords.length) {
1568
- body.pendingRecords = pendingRecords.filter(row => $xeTable.findRowIndexOf(insertRecords, row) === -1);
1569
- }
1570
- // 排除已标记为删除的数据
1571
- if (pendingRecords.length) {
1572
- body.insertRecords = insertRecords.filter(row => $xeTable.findRowIndexOf(pendingRecords, row) === -1);
1573
- }
1574
- let restPromise = Promise.resolve();
1575
- if (editRules) {
1576
- // 只校验新增和修改的数据
1577
- restPromise = $xeTable[validConfig && validConfig.msgMode === 'full' ? 'fullValidate' : 'validate'](body.insertRecords.concat(updateRecords));
1289
+ break;
1290
+ }
1291
+ case "save": {
1292
+ const bSaveMethod = ajax.beforeSave;
1293
+ const sMethod = ajax.save;
1294
+ const aSaveMethod = ajax.afterSave;
1295
+ const sSuccessMethod = ajax.saveSuccess;
1296
+ const sErrorMethod = ajax.saveError;
1297
+ if (sMethod) {
1298
+ const body = $xeTable.getRecordset();
1299
+ const { insertRecords, removeRecords, updateRecords, pendingRecords } = body;
1300
+ const commitParams = {
1301
+ $table: $xeTable,
1302
+ $grid: $xeGrid,
1303
+ $gantt: null,
1304
+ code,
1305
+ button,
1306
+ body,
1307
+ form: formData,
1308
+ options: sMethod
1309
+ };
1310
+ if (insertRecords.length) {
1311
+ body.pendingRecords = pendingRecords.filter((row) => $xeTable.findRowIndexOf(insertRecords, row) === -1);
1312
+ }
1313
+ if (pendingRecords.length) {
1314
+ body.insertRecords = insertRecords.filter((row) => $xeTable.findRowIndexOf(pendingRecords, row) === -1);
1315
+ }
1316
+ let restPromise = Promise.resolve();
1317
+ if (editRules) {
1318
+ restPromise = $xeTable[validConfig && validConfig.msgMode === "full" ? "fullValidate" : "validate"](body.insertRecords.concat(updateRecords));
1319
+ }
1320
+ return restPromise.then((errMap) => {
1321
+ if (errMap) {
1322
+ return;
1578
1323
  }
1579
- return restPromise.then(errMap => {
1580
- if (errMap) {
1581
- // 如果校验不通过
1582
- return;
1583
- }
1584
- if (body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length) {
1585
- const handleSave = () => {
1586
- reactData.tableLoading = true;
1587
- return Promise.resolve((oldBeforeSave || sMethod)(commitParams, ...args)).then(rest => {
1588
- reactData.tableLoading = false;
1589
- if (aSaveMethod) {
1590
- aSaveMethod(Object.assign(Object.assign({}, commitParams), {
1591
- response: rest,
1592
- status: 'success'
1593
- }), ...args);
1594
- } else {
1595
- $xeTable.clearPendingRow();
1596
- if (isRespMsg) {
1597
- if (_ui.VxeUI.modal) {
1598
- _ui.VxeUI.modal.message({
1599
- content: getRespMsg(rest, 'vxe.grid.saveSuccess'),
1600
- status: 'success'
1601
- });
1602
- }
1603
- }
1604
- if (oldAfterSave) {
1605
- oldAfterSave(Object.assign(Object.assign({}, commitParams), {
1606
- response: rest
1607
- }), ...args);
1608
- } else {
1609
- internalData.uFoot = true;
1610
- $xeGrid.commitProxy('query');
1611
- internalData.uFoot = false;
1612
- updateQueryFooter();
1324
+ if (body.insertRecords.length || removeRecords.length || updateRecords.length || body.pendingRecords.length) {
1325
+ const handleSave = () => {
1326
+ reactData.tableLoading = true;
1327
+ return Promise.resolve((oldBeforeSave || sMethod)(commitParams, ...args)).then((rest) => {
1328
+ reactData.tableLoading = false;
1329
+ if (aSaveMethod) {
1330
+ aSaveMethod({ ...commitParams, response: rest, status: "success" }, ...args);
1331
+ } else {
1332
+ $xeTable.clearPendingRow();
1333
+ if (isRespMsg) {
1334
+ if (import_ui.VxeUI.modal) {
1335
+ import_ui.VxeUI.modal.message({ content: getRespMsg(rest, "vxe.grid.saveSuccess"), status: "success" });
1613
1336
  }
1614
1337
  }
1615
- if (sSuccessMethod) {
1616
- sSuccessMethod(Object.assign(Object.assign({}, commitParams), {
1617
- response: rest
1618
- }));
1619
- }
1620
- return {
1621
- status: true
1622
- };
1623
- }).catch(rest => {
1624
- reactData.tableLoading = false;
1625
- if (aSaveMethod) {
1626
- aSaveMethod(Object.assign(Object.assign({}, commitParams), {
1627
- response: rest,
1628
- status: 'error'
1629
- }), ...args);
1338
+ if (oldAfterSave) {
1339
+ oldAfterSave({ ...commitParams, response: rest }, ...args);
1630
1340
  } else {
1631
- if (isRespMsg) {
1632
- if (_ui.VxeUI.modal) {
1633
- _ui.VxeUI.modal.message({
1634
- id: code,
1635
- content: getRespMsg(rest, 'vxe.grid.operError'),
1636
- status: 'error'
1637
- });
1638
- }
1639
- }
1341
+ internalData.uFoot = true;
1342
+ $xeGrid.commitProxy("query");
1343
+ internalData.uFoot = false;
1344
+ updateQueryFooter();
1640
1345
  }
1641
- if (sErrorMethod) {
1642
- sErrorMethod(Object.assign(Object.assign({}, commitParams), {
1643
- response: rest
1644
- }));
1645
- }
1646
- return {
1647
- status: false
1648
- };
1649
- });
1650
- };
1651
- if (bSaveMethod) {
1652
- return Promise.resolve(bSaveMethod(commitParams, ...args)).then(status => {
1653
- if (status !== false) {
1654
- return handleSave();
1346
+ }
1347
+ if (sSuccessMethod) {
1348
+ sSuccessMethod({ ...commitParams, response: rest });
1349
+ }
1350
+ return { status: true };
1351
+ }).catch((rest) => {
1352
+ reactData.tableLoading = false;
1353
+ if (aSaveMethod) {
1354
+ aSaveMethod({ ...commitParams, response: rest, status: "error" }, ...args);
1355
+ } else {
1356
+ if (isRespMsg) {
1357
+ if (import_ui.VxeUI.modal) {
1358
+ import_ui.VxeUI.modal.message({ id: code, content: getRespMsg(rest, "vxe.grid.operError"), status: "error" });
1359
+ }
1655
1360
  }
1656
- });
1657
- }
1658
- return handleSave();
1659
- } else {
1660
- if (isActiveMsg) {
1661
- if (_ui.VxeUI.modal) {
1662
- _ui.VxeUI.modal.message({
1663
- id: code,
1664
- content: getI18n('vxe.grid.dataUnchanged'),
1665
- status: 'info'
1666
- });
1667
1361
  }
1668
- }
1362
+ if (sErrorMethod) {
1363
+ sErrorMethod({ ...commitParams, response: rest });
1364
+ }
1365
+ return { status: false };
1366
+ });
1367
+ };
1368
+ if (bSaveMethod) {
1369
+ return Promise.resolve(bSaveMethod(commitParams, ...args)).then((status) => {
1370
+ if (status !== false) {
1371
+ return handleSave();
1372
+ }
1373
+ });
1669
1374
  }
1670
- });
1671
- } else {
1672
- errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
1673
- }
1674
- break;
1675
- }
1676
- default:
1677
- {
1678
- const gCommandOpts = commands.get(code);
1679
- if (gCommandOpts) {
1680
- const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
1681
- if (tCommandMethod) {
1682
- tCommandMethod({
1683
- code,
1684
- button,
1685
- $grid: $xeGrid,
1686
- $table: $xeTable,
1687
- $gantt: null
1688
- }, ...args);
1375
+ return handleSave();
1689
1376
  } else {
1690
- errLog('vxe.error.notCommands', [code]);
1377
+ if (isActiveMsg) {
1378
+ if (import_ui.VxeUI.modal) {
1379
+ import_ui.VxeUI.modal.message({ id: code, content: getI18n("vxe.grid.dataUnchanged"), status: "info" });
1380
+ }
1381
+ }
1691
1382
  }
1383
+ });
1384
+ } else {
1385
+ errLog("vxe.error.notFunc", ["proxy-config.ajax.save"]);
1386
+ }
1387
+ break;
1388
+ }
1389
+ default: {
1390
+ const gCommandOpts = commands.get(code);
1391
+ if (gCommandOpts) {
1392
+ const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
1393
+ if (tCommandMethod) {
1394
+ tCommandMethod({ code, button, $grid: $xeGrid, $table: $xeTable, $gantt: null }, ...args);
1395
+ } else {
1396
+ errLog("vxe.error.notCommands", [code]);
1692
1397
  }
1693
1398
  }
1399
+ }
1694
1400
  }
1695
- return (0, _vue.nextTick)();
1401
+ return (0, import_vue.nextTick)();
1696
1402
  },
1697
1403
  getParams() {
1698
1404
  return props.params;
@@ -1719,20 +1425,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1719
1425
  */
1720
1426
  getFormItems(itemIndex) {
1721
1427
  const formOpts = computeFormOpts.value;
1722
- const {
1723
- formConfig
1724
- } = props;
1725
- const {
1726
- items
1727
- } = formOpts;
1428
+ const { formConfig } = props;
1429
+ const { items } = formOpts;
1728
1430
  const itemList = [];
1729
- _xeUtils.default.eachTree(formConfig && (0, _utils.isEnableConf)(formOpts) && items ? items : [], item => {
1431
+ import_xe_utils.default.eachTree(formConfig && (0, import_utils.isEnableConf)(formOpts) && items ? items : [], (item) => {
1730
1432
  itemList.push(item);
1731
- }, {
1732
- children: 'children'
1733
- });
1734
- // errLog('vxe.error.delFunc', ['getFormItems', 'getFormFlatItems'])
1735
- return _xeUtils.default.isUndefined(itemIndex) ? itemList : itemList[itemIndex];
1433
+ }, { children: "children" });
1434
+ return import_xe_utils.default.isUndefined(itemIndex) ? itemList : itemList[itemIndex];
1736
1435
  },
1737
1436
  getFormFlatItems() {
1738
1437
  const $form = refForm.value;
@@ -1760,7 +1459,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1760
1459
  if ($form) {
1761
1460
  return $form.reset();
1762
1461
  }
1763
- return (0, _vue.nextTick)();
1462
+ return (0, import_vue.nextTick)();
1764
1463
  },
1765
1464
  validateForm() {
1766
1465
  const $form = refForm.value;
@@ -1781,14 +1480,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1781
1480
  if ($form) {
1782
1481
  return $form.clearValidate(field);
1783
1482
  }
1784
- return (0, _vue.nextTick)();
1483
+ return (0, import_vue.nextTick)();
1785
1484
  },
1786
1485
  homePage() {
1787
- const {
1788
- tablePage
1789
- } = reactData;
1486
+ const { tablePage } = reactData;
1790
1487
  tablePage.currentPage = 1;
1791
- return (0, _vue.nextTick)();
1488
+ return (0, import_vue.nextTick)();
1792
1489
  },
1793
1490
  homePageByEvent(evnt) {
1794
1491
  const $pager = refPager.value;
@@ -1797,12 +1494,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1797
1494
  }
1798
1495
  },
1799
1496
  endPage() {
1800
- const {
1801
- tablePage
1802
- } = reactData;
1497
+ const { tablePage } = reactData;
1803
1498
  const pageCount = computePageCount.value;
1804
1499
  tablePage.currentPage = pageCount;
1805
- return (0, _vue.nextTick)();
1500
+ return (0, import_vue.nextTick)();
1806
1501
  },
1807
1502
  endPageByEvent(evnt) {
1808
1503
  const $pager = refPager.value;
@@ -1811,18 +1506,14 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1811
1506
  }
1812
1507
  },
1813
1508
  getCurrentPage() {
1814
- const {
1815
- tablePage
1816
- } = reactData;
1509
+ const { tablePage } = reactData;
1817
1510
  return tablePage.currentPage;
1818
1511
  },
1819
1512
  setCurrentPage(currentPage) {
1820
- const {
1821
- tablePage
1822
- } = reactData;
1513
+ const { tablePage } = reactData;
1823
1514
  const pageCount = computePageCount.value;
1824
- tablePage.currentPage = Math.min(pageCount, Math.max(1, _xeUtils.default.toNumber(currentPage)));
1825
- return (0, _vue.nextTick)();
1515
+ tablePage.currentPage = Math.min(pageCount, Math.max(1, import_xe_utils.default.toNumber(currentPage)));
1516
+ return (0, import_vue.nextTick)();
1826
1517
  },
1827
1518
  setCurrentPageByEvent(evnt, currentPage) {
1828
1519
  const $pager = refPager.value;
@@ -1831,17 +1522,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1831
1522
  }
1832
1523
  },
1833
1524
  getPageSize() {
1834
- const {
1835
- tablePage
1836
- } = reactData;
1525
+ const { tablePage } = reactData;
1837
1526
  return tablePage.pageSize;
1838
1527
  },
1839
1528
  setPageSize(pageSize) {
1840
- const {
1841
- tablePage
1842
- } = reactData;
1843
- tablePage.pageSize = Math.max(1, _xeUtils.default.toNumber(pageSize));
1844
- return (0, _vue.nextTick)();
1529
+ const { tablePage } = reactData;
1530
+ tablePage.pageSize = Math.max(1, import_xe_utils.default.toNumber(pageSize));
1531
+ return (0, import_vue.nextTick)();
1845
1532
  },
1846
1533
  setPageSizeByEvent(evnt, pageSize) {
1847
1534
  const $pager = refPager.value;
@@ -1852,9 +1539,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1852
1539
  getProxyInfo() {
1853
1540
  const $xeTable = refTable.value;
1854
1541
  if (props.proxyConfig) {
1855
- const {
1856
- sortData
1857
- } = reactData;
1542
+ const { sortData } = reactData;
1858
1543
  return {
1859
1544
  data: $xeTable ? $xeTable.getFullData() : [],
1860
1545
  filter: reactData.filterData,
@@ -1868,14 +1553,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1868
1553
  return null;
1869
1554
  },
1870
1555
  getCustomPagerData() {
1871
- const {
1872
- pagerConfig
1873
- } = props;
1874
- const {
1875
- tablePage
1876
- } = reactData;
1556
+ const { pagerConfig } = props;
1557
+ const { tablePage } = reactData;
1877
1558
  const pagerOpts = computePagerOpts.value;
1878
- if (pagerConfig && (0, _utils.isEnableConf)(pagerOpts)) {
1559
+ if (pagerConfig && (0, import_utils.isEnableConf)(pagerOpts)) {
1879
1560
  return {
1880
1561
  pSize: tablePage.pageSize
1881
1562
  };
@@ -1905,11 +1586,11 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1905
1586
  extendTableMethods,
1906
1587
  callSlot(slotFunc, params) {
1907
1588
  if (slotFunc) {
1908
- if (_xeUtils.default.isString(slotFunc)) {
1589
+ if (import_xe_utils.default.isString(slotFunc)) {
1909
1590
  slotFunc = slots[slotFunc] || null;
1910
1591
  }
1911
- if (_xeUtils.default.isFunction(slotFunc)) {
1912
- return (0, _vn.getSlotVNs)(slotFunc(params));
1592
+ if (import_xe_utils.default.isFunction(slotFunc)) {
1593
+ return (0, import_vn.getSlotVNs)(slotFunc(params));
1913
1594
  }
1914
1595
  }
1915
1596
  return [];
@@ -1918,12 +1599,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1918
1599
  * 获取需要排除的高度
1919
1600
  */
1920
1601
  getExcludeHeight() {
1921
- const {
1922
- height
1923
- } = props;
1924
- const {
1925
- isZMax
1926
- } = reactData;
1602
+ const { height } = props;
1603
+ const { isZMax } = reactData;
1927
1604
  const el = refElem.value;
1928
1605
  if (el) {
1929
1606
  const formWrapper = refFormWrapper.value;
@@ -1933,10 +1610,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1933
1610
  const pagerWrapper = refPagerWrapper.value;
1934
1611
  const parentEl = el.parentElement;
1935
1612
  let parentPaddingSize = 0;
1936
- if (parentEl && (height === '100%' || height === 'auto')) {
1937
- parentPaddingSize = isZMax ? 0 : (0, _dom.getPaddingTopBottomSize)(parentEl);
1613
+ if (parentEl && (height === "100%" || height === "auto")) {
1614
+ parentPaddingSize = isZMax ? 0 : (0, import_dom.getPaddingTopBottomSize)(parentEl);
1938
1615
  }
1939
- return parentPaddingSize + (0, _dom.getPaddingTopBottomSize)(el) + (0, _dom.getOffsetHeight)(formWrapper) + (0, _dom.getOffsetHeight)(toolbarWrapper) + (0, _dom.getOffsetHeight)(topWrapper) + (0, _dom.getOffsetHeight)(bottomWrapper) + (0, _dom.getOffsetHeight)(pagerWrapper);
1616
+ return parentPaddingSize + (0, import_dom.getPaddingTopBottomSize)(el) + (0, import_dom.getOffsetHeight)(formWrapper) + (0, import_dom.getOffsetHeight)(toolbarWrapper) + (0, import_dom.getOffsetHeight)(topWrapper) + (0, import_dom.getOffsetHeight)(bottomWrapper) + (0, import_dom.getOffsetHeight)(pagerWrapper);
1940
1617
  }
1941
1618
  return 0;
1942
1619
  },
@@ -1946,8 +1623,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1946
1623
  return null;
1947
1624
  }
1948
1625
  let parentEl = el.parentElement;
1949
- // 如果是虚拟滚动条
1950
- if (parentEl && (0, _dom.hasClass)(parentEl, 'vxe-scrollbar--view-inner')) {
1626
+ if (parentEl && (0, import_dom.hasClass)(parentEl, "vxe-scrollbar--view-inner")) {
1951
1627
  parentEl = parentEl.parentElement;
1952
1628
  }
1953
1629
  return parentEl;
@@ -1956,24 +1632,20 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1956
1632
  const el = refElem.value;
1957
1633
  if (el) {
1958
1634
  const parentEl = $xeGrid.getParentElem();
1959
- return (reactData.isZMax ? (0, _dom.getDomNode)().visibleHeight : parentEl ? _xeUtils.default.toNumber(getComputedStyle(parentEl).height) : 0) - gridPrivateMethods.getExcludeHeight();
1635
+ return (reactData.isZMax ? (0, import_dom.getDomNode)().visibleHeight : parentEl ? import_xe_utils.default.toNumber(getComputedStyle(parentEl).height) : 0) - gridPrivateMethods.getExcludeHeight();
1960
1636
  }
1961
1637
  return 0;
1962
1638
  },
1963
1639
  triggerToolbarCommitEvent(params, evnt) {
1964
- const {
1965
- code
1966
- } = params;
1640
+ const { code } = params;
1967
1641
  if (code) {
1968
- const isUf = ['reload', 'delete', 'save'].includes(code);
1642
+ const isUf = ["reload", "delete", "save"].includes(code);
1969
1643
  if (isUf) {
1970
1644
  internalData.uFoot = true;
1971
1645
  }
1972
- const rest = $xeGrid.commitProxy(params, evnt).then(rest => {
1973
- if (rest && rest.status && ['query', 'reload', 'delete', 'save'].includes(code)) {
1974
- $xeGrid.dispatchEvent(code === 'delete' || code === 'save' ? `proxy-${code}` : 'proxy-query', Object.assign(Object.assign({}, rest), {
1975
- isReload: code === 'reload'
1976
- }), evnt);
1646
+ const rest = $xeGrid.commitProxy(params, evnt).then((rest2) => {
1647
+ if (rest2 && rest2.status && ["query", "reload", "delete", "save"].includes(code)) {
1648
+ $xeGrid.dispatchEvent(code === "delete" || code === "save" ? `proxy-${code}` : "proxy-query", { ...rest2, isReload: code === "reload" }, evnt);
1977
1649
  }
1978
1650
  });
1979
1651
  internalData.uFoot = false;
@@ -1982,39 +1654,31 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
1982
1654
  }
1983
1655
  return rest;
1984
1656
  }
1985
- return (0, _vue.nextTick)();
1657
+ return (0, import_vue.nextTick)();
1986
1658
  },
1987
1659
  triggerToolbarBtnEvent(button, evnt) {
1988
1660
  $xeGrid.triggerToolbarCommitEvent(button, evnt);
1989
- $xeGrid.dispatchEvent('toolbar-button-click', {
1990
- code: button.code,
1991
- button
1992
- }, evnt);
1661
+ $xeGrid.dispatchEvent("toolbar-button-click", { code: button.code, button }, evnt);
1993
1662
  },
1994
1663
  triggerToolbarTolEvent(tool, evnt) {
1995
1664
  $xeGrid.triggerToolbarCommitEvent(tool, evnt);
1996
- $xeGrid.dispatchEvent('toolbar-tool-click', {
1997
- code: tool.code,
1998
- tool
1999
- }, evnt);
1665
+ $xeGrid.dispatchEvent("toolbar-tool-click", { code: tool.code, tool }, evnt);
2000
1666
  },
2001
1667
  triggerZoomEvent(evnt) {
2002
1668
  $xeGrid.zoom();
2003
- $xeGrid.dispatchEvent('zoom', {
2004
- type: reactData.isZMax ? 'max' : 'revert'
2005
- }, evnt);
1669
+ $xeGrid.dispatchEvent("zoom", { type: reactData.isZMax ? "max" : "revert" }, evnt);
2006
1670
  }
2007
1671
  };
2008
1672
  Object.assign($xeGrid, gridExtendTableMethods, gridMethods, gridPrivateMethods, {
2009
1673
  // 检查插槽
2010
1674
  loadColumn(columns) {
2011
1675
  const $xeTable = refTable.value;
2012
- _xeUtils.default.eachTree(columns, column => {
1676
+ import_xe_utils.default.eachTree(columns, (column) => {
2013
1677
  if (column.slots) {
2014
- _xeUtils.default.each(column.slots, func => {
2015
- if (func && !_xeUtils.default.isFunction(func)) {
1678
+ import_xe_utils.default.each(column.slots, (func) => {
1679
+ if (func && !import_xe_utils.default.isFunction(func)) {
2016
1680
  if (!slots[func]) {
2017
- errLog('vxe.error.notSlot', [func]);
1681
+ errLog("vxe.error.notSlot", [func]);
2018
1682
  }
2019
1683
  }
2020
1684
  });
@@ -2023,7 +1687,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
2023
1687
  if ($xeTable) {
2024
1688
  return $xeTable.loadColumn(columns);
2025
1689
  }
2026
- return (0, _vue.nextTick)();
1690
+ return (0, import_vue.nextTick)();
2027
1691
  },
2028
1692
  reloadColumn(columns) {
2029
1693
  $xeGrid.clearAll();
@@ -2034,78 +1698,69 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
2034
1698
  const vSize = computeSize.value;
2035
1699
  const styles = computeStyles.value;
2036
1700
  const isLoading = computeIsLoading.value;
2037
- return (0, _vue.h)('div', {
1701
+ return (0, import_vue.h)("div", {
2038
1702
  ref: refElem,
2039
- class: ['vxe-grid', {
1703
+ class: ["vxe-grid", {
2040
1704
  [`size--${vSize}`]: vSize,
2041
- 'is--animat': !!props.animat,
2042
- 'is--round': props.round,
2043
- 'is--maximize': reactData.isZMax,
2044
- 'is--loading': isLoading
1705
+ "is--animat": !!props.animat,
1706
+ "is--round": props.round,
1707
+ "is--maximize": reactData.isZMax,
1708
+ "is--loading": isLoading
2045
1709
  }],
2046
1710
  style: styles
2047
1711
  }, renderLayout());
2048
1712
  };
2049
- const columnFlag = (0, _vue.ref)(0);
2050
- (0, _vue.watch)(() => props.columns ? props.columns.length : -1, () => {
1713
+ const columnFlag = (0, import_vue.ref)(0);
1714
+ (0, import_vue.watch)(() => props.columns ? props.columns.length : -1, () => {
2051
1715
  columnFlag.value++;
2052
1716
  });
2053
- (0, _vue.watch)(() => props.columns, () => {
1717
+ (0, import_vue.watch)(() => props.columns, () => {
2054
1718
  columnFlag.value++;
2055
1719
  });
2056
- (0, _vue.watch)(columnFlag, () => {
2057
- (0, _vue.nextTick)(() => $xeGrid.loadColumn(props.columns || []));
1720
+ (0, import_vue.watch)(columnFlag, () => {
1721
+ (0, import_vue.nextTick)(() => $xeGrid.loadColumn(props.columns || []));
2058
1722
  });
2059
- (0, _vue.watch)(() => props.toolbarConfig, () => {
1723
+ (0, import_vue.watch)(() => props.toolbarConfig, () => {
2060
1724
  initToolbar();
2061
1725
  });
2062
- (0, _vue.watch)(computeCustomCurrentPageFlag, () => {
2063
- initPages('currentPage');
1726
+ (0, import_vue.watch)(computeCustomCurrentPageFlag, () => {
1727
+ initPages("currentPage");
2064
1728
  });
2065
- (0, _vue.watch)(computeCustomPageSizeFlag, () => {
2066
- initPages('pageSize');
1729
+ (0, import_vue.watch)(computeCustomPageSizeFlag, () => {
1730
+ initPages("pageSize");
2067
1731
  });
2068
- (0, _vue.watch)(computeCustomTotalFlag, () => {
2069
- initPages('total');
1732
+ (0, import_vue.watch)(computeCustomTotalFlag, () => {
1733
+ initPages("total");
2070
1734
  });
2071
- (0, _vue.watch)(() => props.proxyConfig, () => {
1735
+ (0, import_vue.watch)(() => props.proxyConfig, () => {
2072
1736
  initProxy();
2073
1737
  });
2074
- hooks.forEach(options => {
2075
- const {
2076
- setupGrid
2077
- } = options;
1738
+ hooks.forEach((options) => {
1739
+ const { setupGrid } = options;
2078
1740
  if (setupGrid) {
2079
1741
  const hookRest = setupGrid($xeGrid);
2080
- if (hookRest && _xeUtils.default.isObject(hookRest)) {
1742
+ if (hookRest && import_xe_utils.default.isObject(hookRest)) {
2081
1743
  Object.assign($xeGrid, hookRest);
2082
1744
  }
2083
1745
  }
2084
1746
  });
2085
1747
  initPages();
2086
- (0, _vue.onMounted)(() => {
2087
- (0, _vue.nextTick)(() => {
2088
- const {
2089
- columns
2090
- } = props;
1748
+ (0, import_vue.onMounted)(() => {
1749
+ (0, import_vue.nextTick)(() => {
1750
+ const { columns } = props;
2091
1751
  const proxyOpts = computeProxyOpts.value;
2092
1752
  if (props.formConfig) {
2093
1753
  if (!VxeUIFormComponent) {
2094
- errLog('vxe.error.reqComp', ['vxe-form']);
1754
+ errLog("vxe.error.reqComp", ["vxe-form"]);
2095
1755
  }
2096
1756
  }
2097
1757
  if (props.pagerConfig) {
2098
1758
  if (!VxeUIPagerComponent) {
2099
- errLog('vxe.error.reqComp', ['vxe-pager']);
1759
+ errLog("vxe.error.reqComp", ["vxe-pager"]);
2100
1760
  }
2101
1761
  }
2102
- // const { data, columns, proxyConfig } = props
2103
- // const formOpts = computeFormOpts.value
2104
- // if (isEnableConf(proxyConfig) && (data || (proxyOpts.form && formOpts.data))) {
2105
- // errLog('vxe.error.errConflicts', ['[grid] data', 'proxy-config'])
2106
- // }
2107
1762
  if (proxyOpts.props) {
2108
- warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response']);
1763
+ warnLog("vxe.error.delProp", ["proxy-config.props", "proxy-config.response"]);
2109
1764
  }
2110
1765
  if (columns && columns.length) {
2111
1766
  $xeGrid.loadColumn(columns);
@@ -2113,19 +1768,19 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
2113
1768
  initToolbar();
2114
1769
  initProxy();
2115
1770
  });
2116
- globalEvents.on($xeGrid, 'keydown', handleGlobalKeydownEvent);
1771
+ globalEvents.on($xeGrid, "keydown", handleGlobalKeydownEvent);
2117
1772
  });
2118
- (0, _vue.onBeforeUnmount)(() => {
2119
- globalEvents.off($xeGrid, 'keydown');
2120
- _xeUtils.default.assign(reactData, createReactData());
2121
- _xeUtils.default.assign(internalData, createInternalData());
1773
+ (0, import_vue.onBeforeUnmount)(() => {
1774
+ globalEvents.off($xeGrid, "keydown");
1775
+ import_xe_utils.default.assign(reactData, createReactData());
1776
+ import_xe_utils.default.assign(internalData, createInternalData());
2122
1777
  });
2123
1778
  $xeGrid.renderVN = renderVN;
2124
- (0, _vue.provide)('$xeGrid', $xeGrid);
2125
- (0, _vue.provide)('$xeGantt', null);
1779
+ (0, import_vue.provide)("$xeGrid", $xeGrid);
1780
+ (0, import_vue.provide)("$xeGantt", null);
2126
1781
  return $xeGrid;
2127
1782
  },
2128
1783
  render() {
2129
1784
  return this.renderVN();
2130
1785
  }
2131
- });
1786
+ });