vxe-table 4.3.4 → 4.3.6-beta.0

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 (521) hide show
  1. package/es/button/style.css +465 -341
  2. package/es/checkbox/style.css +156 -127
  3. package/es/checkbox-group/style.css +1 -1
  4. package/es/colgroup/style.css +1 -1
  5. package/es/column/style.css +1 -1
  6. package/es/edit/style.css +1 -1
  7. package/es/export/src/hook.js +1 -0
  8. package/es/export/style.css +136 -108
  9. package/es/filter/src/hook.js +1 -1
  10. package/es/filter/style.css +103 -82
  11. package/es/footer/src/footer.js +3 -3
  12. package/es/form/src/form.js +5 -4
  13. package/es/form/style.css +201 -168
  14. package/es/form-gather/style.css +1 -1
  15. package/es/form-item/style.css +1 -1
  16. package/es/grid/style.css +61 -50
  17. package/es/header/src/header.js +10 -5
  18. package/es/icon/style/iconfont.1669214286403.ttf +0 -0
  19. package/es/icon/style/iconfont.1669214286403.woff +0 -0
  20. package/es/icon/style/iconfont.1669214286403.woff2 +0 -0
  21. package/es/icon/style.css +406 -178
  22. package/es/iconfont.1669214286403.ttf +0 -0
  23. package/es/iconfont.1669214286403.woff +0 -0
  24. package/es/iconfont.1669214286403.woff2 +0 -0
  25. package/es/input/style.css +771 -595
  26. package/es/keyboard/style.css +1 -1
  27. package/es/list/src/list.js +7 -1
  28. package/es/list/style.css +19 -14
  29. package/es/loading/style.css +52 -48
  30. package/es/locale/lang/en-US.js +0 -1
  31. package/es/locale/lang/ja-JP.js +0 -1
  32. package/es/locale/lang/zh-CN.js +0 -1
  33. package/es/locale/lang/zh-TC.js +0 -1
  34. package/es/menu/style.css +79 -59
  35. package/es/modal/style.css +311 -247
  36. package/es/optgroup/style.css +1 -1
  37. package/es/option/style.css +1 -1
  38. package/es/pager/style.css +307 -257
  39. package/es/pulldown/src/pulldown.js +9 -3
  40. package/es/pulldown/style.css +42 -31
  41. package/es/radio/style.css +184 -151
  42. package/es/radio-button/style.css +1 -1
  43. package/es/radio-group/style.css +1 -1
  44. package/es/select/style.css +108 -79
  45. package/es/style.css +1 -1
  46. package/es/style.min.css +1 -1
  47. package/es/switch/style.css +87 -67
  48. package/es/table/src/column.js +2 -0
  49. package/es/table/src/columnInfo.js +1 -0
  50. package/es/table/src/table.js +36 -40
  51. package/es/table/style.css +1025 -835
  52. package/es/textarea/style.css +57 -41
  53. package/es/toolbar/style.css +216 -174
  54. package/es/tools/log.js +1 -1
  55. package/es/tooltip/style.css +87 -63
  56. package/es/v-x-e-table/index.js +1 -1
  57. package/es/v-x-e-table/style.css +458 -226
  58. package/es/validator/style.css +1 -1
  59. package/es/vxe-button/style.css +465 -341
  60. package/es/vxe-checkbox/style.css +156 -127
  61. package/es/vxe-checkbox-group/style.css +1 -1
  62. package/es/vxe-colgroup/style.css +1 -1
  63. package/es/vxe-column/style.css +1 -1
  64. package/es/vxe-form/style.css +201 -168
  65. package/es/vxe-form-gather/style.css +1 -1
  66. package/es/vxe-form-item/style.css +1 -1
  67. package/es/vxe-grid/style.css +61 -50
  68. package/es/vxe-icon/style.css +406 -178
  69. package/es/vxe-input/style.css +771 -595
  70. package/es/vxe-list/style.css +19 -14
  71. package/es/vxe-loading/style.css +52 -48
  72. package/es/vxe-modal/style.css +311 -247
  73. package/es/vxe-module-edit/style.css +1 -1
  74. package/es/vxe-module-export/style.css +136 -108
  75. package/es/vxe-module-filter/style.css +103 -82
  76. package/es/vxe-module-keyboard/style.css +1 -1
  77. package/es/vxe-module-menu/style.css +79 -59
  78. package/es/vxe-module-validator/style.css +1 -1
  79. package/es/vxe-optgroup/style.css +1 -1
  80. package/es/vxe-option/style.css +1 -1
  81. package/es/vxe-pager/style.css +307 -257
  82. package/es/vxe-pulldown/style.css +42 -31
  83. package/es/vxe-radio/style.css +184 -151
  84. package/es/vxe-radio-button/style.css +1 -1
  85. package/es/vxe-radio-group/style.css +1 -1
  86. package/es/vxe-select/style.css +108 -79
  87. package/es/vxe-switch/style.css +87 -67
  88. package/es/vxe-table/style.css +1025 -835
  89. package/es/vxe-textarea/style.css +57 -41
  90. package/es/vxe-toolbar/style.css +216 -174
  91. package/es/vxe-tooltip/style.css +87 -63
  92. package/lib/all.js +45 -115
  93. package/lib/all.min.js +1 -1
  94. package/lib/button/index.js +1 -7
  95. package/lib/button/index.min.js +1 -1
  96. package/lib/button/src/button.js +48 -113
  97. package/lib/button/src/button.min.js +1 -1
  98. package/lib/button/style/style.css +465 -341
  99. package/lib/button/style/style.min.css +1 -1
  100. package/lib/checkbox/index.js +1 -7
  101. package/lib/checkbox/index.min.js +1 -1
  102. package/lib/checkbox/src/checkbox.js +12 -32
  103. package/lib/checkbox/src/checkbox.min.js +1 -1
  104. package/lib/checkbox/src/group.js +13 -28
  105. package/lib/checkbox/src/group.min.js +1 -1
  106. package/lib/checkbox/style/style.css +156 -127
  107. package/lib/checkbox/style/style.min.css +1 -1
  108. package/lib/checkbox-group/index.js +1 -7
  109. package/lib/checkbox-group/index.min.js +1 -1
  110. package/lib/checkbox-group/style/style.css +1 -1
  111. package/lib/colgroup/index.js +5 -12
  112. package/lib/colgroup/index.min.js +1 -1
  113. package/lib/colgroup/style/style.css +1 -1
  114. package/lib/column/index.js +5 -12
  115. package/lib/column/index.min.js +1 -1
  116. package/lib/column/style/style.css +1 -1
  117. package/lib/dynamics/index.js +1 -5
  118. package/lib/dynamics/index.min.js +1 -1
  119. package/lib/edit/index.js +1 -5
  120. package/lib/edit/index.min.js +1 -1
  121. package/lib/edit/src/hook.js +102 -248
  122. package/lib/edit/src/hook.min.js +1 -1
  123. package/lib/edit/style/style.css +1 -1
  124. package/lib/export/index.js +4 -19
  125. package/lib/export/index.min.js +1 -1
  126. package/lib/export/src/export-panel.js +38 -77
  127. package/lib/export/src/export-panel.min.js +1 -1
  128. package/lib/export/src/hook.js +127 -380
  129. package/lib/export/src/hook.min.js +1 -1
  130. package/lib/export/src/import-panel.js +17 -39
  131. package/lib/export/src/import-panel.min.js +1 -1
  132. package/lib/export/src/util.js +10 -52
  133. package/lib/export/src/util.min.js +1 -1
  134. package/lib/export/style/style.css +136 -108
  135. package/lib/export/style/style.min.css +1 -1
  136. package/lib/filter/index.js +1 -10
  137. package/lib/filter/index.min.js +1 -1
  138. package/lib/filter/src/hook.js +31 -82
  139. package/lib/filter/src/hook.min.js +1 -1
  140. package/lib/filter/src/panel.js +25 -52
  141. package/lib/filter/src/panel.min.js +1 -1
  142. package/lib/filter/style/style.css +103 -82
  143. package/lib/filter/style/style.min.css +1 -1
  144. package/lib/footer/index.js +1 -7
  145. package/lib/footer/index.min.js +1 -1
  146. package/lib/footer/src/footer.js +54 -99
  147. package/lib/footer/src/footer.min.js +1 -1
  148. package/lib/form/index.js +1 -7
  149. package/lib/form/index.min.js +1 -1
  150. package/lib/form/src/form-config-item.js +27 -56
  151. package/lib/form/src/form-config-item.min.js +1 -1
  152. package/lib/form/src/form-gather.js +3 -12
  153. package/lib/form/src/form-gather.min.js +1 -1
  154. package/lib/form/src/form-item.js +23 -52
  155. package/lib/form/src/form-item.min.js +1 -1
  156. package/lib/form/src/form.js +78 -185
  157. package/lib/form/src/form.min.js +1 -1
  158. package/lib/form/src/itemInfo.js +1 -9
  159. package/lib/form/src/render.js +7 -26
  160. package/lib/form/src/render.min.js +1 -1
  161. package/lib/form/src/util.js +4 -28
  162. package/lib/form/src/util.min.js +1 -1
  163. package/lib/form/style/style.css +201 -168
  164. package/lib/form/style/style.min.css +1 -1
  165. package/lib/form-gather/index.js +1 -7
  166. package/lib/form-gather/index.min.js +1 -1
  167. package/lib/form-gather/style/style.css +1 -1
  168. package/lib/form-item/index.js +1 -7
  169. package/lib/form-item/index.min.js +1 -1
  170. package/lib/form-item/style/style.css +1 -1
  171. package/lib/grid/index.js +1 -7
  172. package/lib/grid/index.min.js +1 -1
  173. package/lib/grid/src/grid.js +97 -315
  174. package/lib/grid/src/grid.min.js +1 -1
  175. package/lib/grid/style/style.css +61 -50
  176. package/lib/grid/style/style.min.css +1 -1
  177. package/lib/header/index.js +1 -7
  178. package/lib/header/index.min.js +1 -1
  179. package/lib/header/src/header.js +57 -92
  180. package/lib/header/src/header.min.js +1 -1
  181. package/lib/header/src/util.js +3 -14
  182. package/lib/header/src/util.min.js +1 -1
  183. package/lib/hooks/size.js +0 -2
  184. package/lib/icon/index.js +1 -7
  185. package/lib/icon/index.min.js +1 -1
  186. package/lib/icon/src/icon.js +2 -7
  187. package/lib/icon/style/iconfont.1669214286403.ttf +0 -0
  188. package/lib/icon/style/iconfont.1669214286403.woff +0 -0
  189. package/lib/icon/style/iconfont.1669214286403.woff2 +0 -0
  190. package/lib/icon/style/style.css +406 -178
  191. package/lib/icon/style/style.min.css +719 -1
  192. package/lib/iconfont.1669214286403.ttf +0 -0
  193. package/lib/iconfont.1669214286403.woff +0 -0
  194. package/lib/iconfont.1669214286403.woff2 +0 -0
  195. package/lib/index.common.js +3 -10
  196. package/lib/index.common.min.js +1 -1
  197. package/lib/index.umd.js +14514 -23890
  198. package/lib/index.umd.min.js +1 -1
  199. package/lib/input/index.js +1 -7
  200. package/lib/input/index.min.js +1 -1
  201. package/lib/input/src/date.js +0 -10
  202. package/lib/input/src/date.min.js +1 -1
  203. package/lib/input/src/input.js +217 -553
  204. package/lib/input/src/input.min.js +1 -1
  205. package/lib/input/src/number.js +0 -5
  206. package/lib/input/style/style.css +771 -595
  207. package/lib/input/style/style.min.css +1 -1
  208. package/lib/keyboard/index.js +1 -5
  209. package/lib/keyboard/index.min.js +1 -1
  210. package/lib/keyboard/src/hook.js +40 -106
  211. package/lib/keyboard/src/hook.min.js +1 -1
  212. package/lib/keyboard/style/style.css +1 -1
  213. package/lib/list/index.js +1 -7
  214. package/lib/list/index.min.js +1 -1
  215. package/lib/list/src/list.js +39 -91
  216. package/lib/list/src/list.min.js +1 -1
  217. package/lib/list/style/style.css +19 -14
  218. package/lib/loading/index.js +1 -4
  219. package/lib/loading/index.min.js +1 -1
  220. package/lib/loading/src/loading.js +1 -6
  221. package/lib/loading/style/style.css +52 -48
  222. package/lib/loading/style/style.min.css +1 -1
  223. package/lib/locale/lang/en-US.js +0 -1
  224. package/lib/locale/lang/en-US.min.js +1 -1
  225. package/lib/locale/lang/en-US.umd.js +0 -1
  226. package/lib/locale/lang/ja-JP.js +0 -1
  227. package/lib/locale/lang/ja-JP.min.js +1 -1
  228. package/lib/locale/lang/ja-JP.umd.js +0 -1
  229. package/lib/locale/lang/zh-CN.js +0 -1
  230. package/lib/locale/lang/zh-CN.min.js +1 -1
  231. package/lib/locale/lang/zh-CN.umd.js +0 -1
  232. package/lib/locale/lang/zh-HK.js +0 -3
  233. package/lib/locale/lang/zh-HK.min.js +1 -1
  234. package/lib/locale/lang/zh-HK.umd.js +0 -1
  235. package/lib/locale/lang/zh-MO.js +0 -3
  236. package/lib/locale/lang/zh-MO.min.js +1 -1
  237. package/lib/locale/lang/zh-MO.umd.js +0 -1
  238. package/lib/locale/lang/zh-TC.js +0 -1
  239. package/lib/locale/lang/zh-TC.min.js +1 -1
  240. package/lib/locale/lang/zh-TC.umd.js +0 -1
  241. package/lib/locale/lang/zh-TW.js +0 -3
  242. package/lib/locale/lang/zh-TW.min.js +1 -1
  243. package/lib/locale/lang/zh-TW.umd.js +0 -1
  244. package/lib/menu/index.js +1 -10
  245. package/lib/menu/index.min.js +1 -1
  246. package/lib/menu/src/hooks.js +45 -109
  247. package/lib/menu/src/hooks.min.js +1 -1
  248. package/lib/menu/src/panel.js +10 -19
  249. package/lib/menu/src/panel.min.js +1 -1
  250. package/lib/menu/style/style.css +79 -59
  251. package/lib/menu/style/style.min.css +1 -1
  252. package/lib/modal/index.js +5 -36
  253. package/lib/modal/index.min.js +1 -1
  254. package/lib/modal/src/modal.js +128 -315
  255. package/lib/modal/src/modal.min.js +1 -1
  256. package/lib/modal/style/style.css +311 -247
  257. package/lib/modal/style/style.min.css +1 -1
  258. package/lib/optgroup/index.js +1 -7
  259. package/lib/optgroup/index.min.js +1 -1
  260. package/lib/optgroup/style/style.css +1 -1
  261. package/lib/option/index.js +1 -7
  262. package/lib/option/index.min.js +1 -1
  263. package/lib/option/style/style.css +1 -1
  264. package/lib/pager/index.js +1 -7
  265. package/lib/pager/index.min.js +1 -1
  266. package/lib/pager/src/pager.js +74 -151
  267. package/lib/pager/src/pager.min.js +1 -1
  268. package/lib/pager/style/style.css +307 -257
  269. package/lib/pager/style/style.min.css +1 -1
  270. package/lib/pulldown/index.js +1 -7
  271. package/lib/pulldown/index.min.js +1 -1
  272. package/lib/pulldown/src/pulldown.js +46 -90
  273. package/lib/pulldown/src/pulldown.min.js +1 -1
  274. package/lib/pulldown/style/style.css +42 -31
  275. package/lib/pulldown/style/style.min.css +1 -1
  276. package/lib/radio/index.js +1 -7
  277. package/lib/radio/index.min.js +1 -1
  278. package/lib/radio/src/button.js +14 -32
  279. package/lib/radio/src/button.min.js +1 -1
  280. package/lib/radio/src/group.js +11 -22
  281. package/lib/radio/src/group.min.js +1 -1
  282. package/lib/radio/src/radio.js +15 -34
  283. package/lib/radio/src/radio.min.js +1 -1
  284. package/lib/radio/style/style.css +184 -151
  285. package/lib/radio/style/style.min.css +1 -1
  286. package/lib/radio-button/index.js +1 -7
  287. package/lib/radio-button/index.min.js +1 -1
  288. package/lib/radio-button/style/style.css +1 -1
  289. package/lib/radio-group/index.js +1 -7
  290. package/lib/radio-group/index.min.js +1 -1
  291. package/lib/radio-group/style/style.css +1 -1
  292. package/lib/select/index.js +1 -7
  293. package/lib/select/index.min.js +1 -1
  294. package/lib/select/src/optgroup.js +1 -5
  295. package/lib/select/src/option.js +1 -5
  296. package/lib/select/src/optionInfo.js +1 -9
  297. package/lib/select/src/select.js +103 -256
  298. package/lib/select/src/select.min.js +1 -1
  299. package/lib/select/src/util.js +0 -13
  300. package/lib/select/src/util.min.js +1 -1
  301. package/lib/select/style/style.css +108 -79
  302. package/lib/select/style/style.min.css +1 -1
  303. package/lib/style.css +1 -1
  304. package/lib/style.min.css +1 -1
  305. package/lib/switch/index.js +1 -7
  306. package/lib/switch/index.min.js +1 -1
  307. package/lib/switch/src/switch.js +16 -35
  308. package/lib/switch/src/switch.min.js +1 -1
  309. package/lib/switch/style/style.css +87 -67
  310. package/lib/switch/style/style.min.css +1 -1
  311. package/lib/table/index.js +1 -7
  312. package/lib/table/index.min.js +1 -1
  313. package/lib/table/src/body.js +143 -262
  314. package/lib/table/src/body.min.js +1 -1
  315. package/lib/table/src/cell.js +138 -259
  316. package/lib/table/src/cell.min.js +1 -1
  317. package/lib/table/src/column.js +4 -13
  318. package/lib/table/src/column.min.js +1 -1
  319. package/lib/table/src/columnInfo.js +6 -35
  320. package/lib/table/src/columnInfo.min.js +1 -1
  321. package/lib/table/src/group.js +2 -15
  322. package/lib/table/src/group.min.js +1 -1
  323. package/lib/table/src/props.js +25 -29
  324. package/lib/table/src/props.min.js +1 -1
  325. package/lib/table/src/table.js +670 -1620
  326. package/lib/table/src/table.min.js +1 -1
  327. package/lib/table/src/util.js +32 -102
  328. package/lib/table/src/util.min.js +1 -1
  329. package/lib/table/style/style.css +1025 -835
  330. package/lib/table/style/style.min.css +1 -1
  331. package/lib/textarea/index.js +1 -7
  332. package/lib/textarea/index.min.js +1 -1
  333. package/lib/textarea/src/textarea.js +31 -71
  334. package/lib/textarea/src/textarea.min.js +1 -1
  335. package/lib/textarea/style/style.css +57 -41
  336. package/lib/textarea/style/style.min.css +1 -1
  337. package/lib/toolbar/index.js +1 -7
  338. package/lib/toolbar/index.min.js +1 -1
  339. package/lib/toolbar/src/toolbar.js +60 -167
  340. package/lib/toolbar/src/toolbar.min.js +1 -1
  341. package/lib/toolbar/style/style.css +216 -174
  342. package/lib/toolbar/style/style.min.css +1 -1
  343. package/lib/tools/dom.js +6 -48
  344. package/lib/tools/dom.min.js +1 -1
  345. package/lib/tools/event.js +8 -20
  346. package/lib/tools/event.min.js +1 -1
  347. package/lib/tools/log.js +1 -6
  348. package/lib/tools/log.min.js +1 -1
  349. package/lib/tools/resize.js +3 -27
  350. package/lib/tools/utils.js +0 -16
  351. package/lib/tools/utils.min.js +1 -1
  352. package/lib/tools/vn.js +0 -5
  353. package/lib/tooltip/index.js +1 -8
  354. package/lib/tooltip/index.min.js +1 -1
  355. package/lib/tooltip/src/tooltip.js +47 -111
  356. package/lib/tooltip/src/tooltip.min.js +1 -1
  357. package/lib/tooltip/style/style.css +87 -63
  358. package/lib/v-x-e-table/index.js +13 -44
  359. package/lib/v-x-e-table/index.min.js +1 -1
  360. package/lib/v-x-e-table/src/commands.js +0 -4
  361. package/lib/v-x-e-table/src/conf.js +31 -19
  362. package/lib/v-x-e-table/src/formats.js +0 -4
  363. package/lib/v-x-e-table/src/hooks.js +0 -3
  364. package/lib/v-x-e-table/src/interceptor.js +6 -18
  365. package/lib/v-x-e-table/src/interceptor.min.js +1 -1
  366. package/lib/v-x-e-table/src/menus.js +0 -4
  367. package/lib/v-x-e-table/src/renderer.js +66 -199
  368. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  369. package/lib/v-x-e-table/src/setup.js +1 -6
  370. package/lib/v-x-e-table/src/store.js +3 -19
  371. package/lib/v-x-e-table/style/style.css +458 -226
  372. package/lib/v-x-e-table/style/style.min.css +1 -1
  373. package/lib/validator/index.js +1 -5
  374. package/lib/validator/index.min.js +1 -1
  375. package/lib/validator/src/hook.js +50 -116
  376. package/lib/validator/src/hook.min.js +1 -1
  377. package/lib/validator/style/style.css +1 -1
  378. package/lib/vxe-button/index.js +3 -10
  379. package/lib/vxe-button/index.min.js +1 -1
  380. package/lib/vxe-button/style/style.css +465 -341
  381. package/lib/vxe-button/style/style.min.css +1 -1
  382. package/lib/vxe-checkbox/index.js +3 -10
  383. package/lib/vxe-checkbox/index.min.js +1 -1
  384. package/lib/vxe-checkbox/style/style.css +156 -127
  385. package/lib/vxe-checkbox/style/style.min.css +1 -1
  386. package/lib/vxe-checkbox-group/index.js +3 -10
  387. package/lib/vxe-checkbox-group/index.min.js +1 -1
  388. package/lib/vxe-checkbox-group/style/style.css +1 -1
  389. package/lib/vxe-colgroup/index.js +3 -10
  390. package/lib/vxe-colgroup/index.min.js +1 -1
  391. package/lib/vxe-colgroup/style/style.css +1 -1
  392. package/lib/vxe-column/index.js +3 -10
  393. package/lib/vxe-column/index.min.js +1 -1
  394. package/lib/vxe-column/style/style.css +1 -1
  395. package/lib/vxe-form/index.js +3 -10
  396. package/lib/vxe-form/index.min.js +1 -1
  397. package/lib/vxe-form/style/style.css +201 -168
  398. package/lib/vxe-form/style/style.min.css +1 -1
  399. package/lib/vxe-form-gather/index.js +3 -10
  400. package/lib/vxe-form-gather/index.min.js +1 -1
  401. package/lib/vxe-form-gather/style/style.css +1 -1
  402. package/lib/vxe-form-item/index.js +3 -10
  403. package/lib/vxe-form-item/index.min.js +1 -1
  404. package/lib/vxe-form-item/style/style.css +1 -1
  405. package/lib/vxe-grid/index.js +3 -10
  406. package/lib/vxe-grid/index.min.js +1 -1
  407. package/lib/vxe-grid/style/style.css +61 -50
  408. package/lib/vxe-grid/style/style.min.css +1 -1
  409. package/lib/vxe-icon/index.js +3 -10
  410. package/lib/vxe-icon/index.min.js +1 -1
  411. package/lib/vxe-icon/style/style.css +406 -178
  412. package/lib/vxe-icon/style/style.min.css +1 -1
  413. package/lib/vxe-input/index.js +3 -10
  414. package/lib/vxe-input/index.min.js +1 -1
  415. package/lib/vxe-input/style/style.css +771 -595
  416. package/lib/vxe-input/style/style.min.css +1 -1
  417. package/lib/vxe-list/index.js +3 -10
  418. package/lib/vxe-list/index.min.js +1 -1
  419. package/lib/vxe-list/style/style.css +19 -14
  420. package/lib/vxe-loading/index.js +3 -10
  421. package/lib/vxe-loading/index.min.js +1 -1
  422. package/lib/vxe-loading/style/style.css +52 -48
  423. package/lib/vxe-loading/style/style.min.css +1 -1
  424. package/lib/vxe-modal/index.js +3 -10
  425. package/lib/vxe-modal/index.min.js +1 -1
  426. package/lib/vxe-modal/style/style.css +311 -247
  427. package/lib/vxe-modal/style/style.min.css +1 -1
  428. package/lib/vxe-module-edit/index.js +3 -10
  429. package/lib/vxe-module-edit/index.min.js +1 -1
  430. package/lib/vxe-module-edit/style/style.css +1 -1
  431. package/lib/vxe-module-export/index.js +3 -10
  432. package/lib/vxe-module-export/index.min.js +1 -1
  433. package/lib/vxe-module-export/style/style.css +136 -108
  434. package/lib/vxe-module-export/style/style.min.css +1 -1
  435. package/lib/vxe-module-filter/index.js +3 -10
  436. package/lib/vxe-module-filter/index.min.js +1 -1
  437. package/lib/vxe-module-filter/style/style.css +103 -82
  438. package/lib/vxe-module-filter/style/style.min.css +1 -1
  439. package/lib/vxe-module-keyboard/index.js +3 -10
  440. package/lib/vxe-module-keyboard/index.min.js +1 -1
  441. package/lib/vxe-module-keyboard/style/style.css +1 -1
  442. package/lib/vxe-module-menu/index.js +3 -10
  443. package/lib/vxe-module-menu/index.min.js +1 -1
  444. package/lib/vxe-module-menu/style/style.css +79 -59
  445. package/lib/vxe-module-menu/style/style.min.css +1 -1
  446. package/lib/vxe-module-validator/index.js +3 -10
  447. package/lib/vxe-module-validator/index.min.js +1 -1
  448. package/lib/vxe-module-validator/style/style.css +1 -1
  449. package/lib/vxe-optgroup/index.js +3 -10
  450. package/lib/vxe-optgroup/index.min.js +1 -1
  451. package/lib/vxe-optgroup/style/style.css +1 -1
  452. package/lib/vxe-option/index.js +3 -10
  453. package/lib/vxe-option/index.min.js +1 -1
  454. package/lib/vxe-option/style/style.css +1 -1
  455. package/lib/vxe-pager/index.js +3 -10
  456. package/lib/vxe-pager/index.min.js +1 -1
  457. package/lib/vxe-pager/style/style.css +307 -257
  458. package/lib/vxe-pager/style/style.min.css +1 -1
  459. package/lib/vxe-pulldown/index.js +3 -10
  460. package/lib/vxe-pulldown/index.min.js +1 -1
  461. package/lib/vxe-pulldown/style/style.css +42 -31
  462. package/lib/vxe-pulldown/style/style.min.css +1 -1
  463. package/lib/vxe-radio/index.js +3 -10
  464. package/lib/vxe-radio/index.min.js +1 -1
  465. package/lib/vxe-radio/style/style.css +184 -151
  466. package/lib/vxe-radio/style/style.min.css +1 -1
  467. package/lib/vxe-radio-button/index.js +3 -10
  468. package/lib/vxe-radio-button/index.min.js +1 -1
  469. package/lib/vxe-radio-button/style/style.css +1 -1
  470. package/lib/vxe-radio-group/index.js +3 -10
  471. package/lib/vxe-radio-group/index.min.js +1 -1
  472. package/lib/vxe-radio-group/style/style.css +1 -1
  473. package/lib/vxe-select/index.js +3 -10
  474. package/lib/vxe-select/index.min.js +1 -1
  475. package/lib/vxe-select/style/style.css +108 -79
  476. package/lib/vxe-select/style/style.min.css +1 -1
  477. package/lib/vxe-switch/index.js +3 -10
  478. package/lib/vxe-switch/index.min.js +1 -1
  479. package/lib/vxe-switch/style/style.css +87 -67
  480. package/lib/vxe-switch/style/style.min.css +1 -1
  481. package/lib/vxe-table/index.js +3 -10
  482. package/lib/vxe-table/index.min.js +1 -1
  483. package/lib/vxe-table/style/style.css +1025 -835
  484. package/lib/vxe-table/style/style.min.css +1 -1
  485. package/lib/vxe-textarea/index.js +3 -10
  486. package/lib/vxe-textarea/index.min.js +1 -1
  487. package/lib/vxe-textarea/style/style.css +57 -41
  488. package/lib/vxe-textarea/style/style.min.css +1 -1
  489. package/lib/vxe-toolbar/index.js +3 -10
  490. package/lib/vxe-toolbar/index.min.js +1 -1
  491. package/lib/vxe-toolbar/style/style.css +216 -174
  492. package/lib/vxe-toolbar/style/style.min.css +1 -1
  493. package/lib/vxe-tooltip/index.js +3 -10
  494. package/lib/vxe-tooltip/index.min.js +1 -1
  495. package/lib/vxe-tooltip/style/style.css +87 -63
  496. package/package.json +27 -33
  497. package/packages/export/src/hook.ts +1 -0
  498. package/packages/filter/src/hook.ts +1 -1
  499. package/packages/footer/src/footer.ts +3 -3
  500. package/packages/form/src/form.ts +5 -4
  501. package/packages/header/src/header.ts +13 -9
  502. package/packages/list/src/list.ts +8 -2
  503. package/packages/locale/lang/en-US.ts +0 -1
  504. package/packages/locale/lang/ja-JP.ts +0 -1
  505. package/packages/locale/lang/zh-CN.ts +0 -1
  506. package/packages/locale/lang/zh-TC.ts +0 -1
  507. package/packages/pulldown/src/pulldown.ts +11 -5
  508. package/packages/table/src/column.ts +2 -0
  509. package/packages/table/src/columnInfo.ts +1 -0
  510. package/packages/table/src/table.ts +117 -113
  511. package/packages/table/src/util.ts +1 -1
  512. package/styles/icon/iconfont.ttf +0 -0
  513. package/styles/icon/iconfont.woff +0 -0
  514. package/styles/icon/iconfont.woff2 +0 -0
  515. package/styles/icon.scss +78 -2
  516. package/styles/table.scss +1 -1
  517. package/styles/variable.scss +2 -2
  518. package/types/column.d.ts +6 -1
  519. package/types/list.d.ts +4 -4
  520. package/types/pulldown.d.ts +61 -61
  521. package/types/table.d.ts +11 -1
@@ -25,36 +25,28 @@ exports.setCellValue = setCellValue;
25
25
  exports.toFilters = toFilters;
26
26
  exports.toTreePathSeq = toTreePathSeq;
27
27
  exports.watchColumn = watchColumn;
28
-
29
28
  var _vue = require("vue");
30
-
31
29
  var _xeUtils = _interopRequireDefault(require("xe-utils"));
32
-
33
30
  var _columnInfo = require("./columnInfo");
34
-
35
31
  var _dom = require("../../tools/dom");
36
-
37
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38
-
39
33
  function restoreScrollLocation($xetable, scrollLeft, scrollTop) {
40
34
  var internalData = $xetable.internalData;
41
35
  return $xetable.clearScroll().then(function () {
42
36
  if (scrollLeft || scrollTop) {
43
37
  // 重置最后滚动状态
44
38
  internalData.lastScrollLeft = 0;
45
- internalData.lastScrollTop = 0; // 还原滚动状态
46
-
39
+ internalData.lastScrollTop = 0;
40
+ // 还原滚动状态
47
41
  return $xetable.scrollTo(scrollLeft, scrollTop);
48
42
  }
49
43
  });
50
44
  }
51
-
52
45
  function removeScrollListener(scrollElem) {
53
46
  if (scrollElem && scrollElem._onscroll) {
54
47
  scrollElem.onscroll = null;
55
48
  }
56
49
  }
57
-
58
50
  function restoreScrollListener(scrollElem) {
59
51
  if (scrollElem && scrollElem._onscroll) {
60
52
  scrollElem.onscroll = scrollElem._onscroll;
@@ -63,78 +55,58 @@ function restoreScrollListener(scrollElem) {
63
55
  /**
64
56
  * 生成行的唯一主键
65
57
  */
66
-
67
-
68
58
  function getRowUniqueId() {
69
59
  return _xeUtils.default.uniqueId('row_');
70
- } // 行主键 key
71
-
72
-
60
+ }
61
+ // 行主键 key
73
62
  function getRowkey($xetable) {
74
63
  var props = $xetable.props;
75
64
  var computeRowOpts = $xetable.getComputeMaps().computeRowOpts;
76
65
  var rowId = props.rowId;
77
66
  var rowOpts = computeRowOpts.value;
78
67
  return rowId || rowOpts.keyField || '_X_ROW_KEY';
79
- } // 行主键 value
80
-
81
-
68
+ }
69
+ // 行主键 value
82
70
  function getRowid($xetable, row) {
83
71
  var rowid = _xeUtils.default.get(row, getRowkey($xetable));
84
-
85
72
  return _xeUtils.default.eqNull(rowid) ? '' : encodeURIComponent(rowid);
86
73
  }
87
-
88
- var handleFieldOrColumn = function handleFieldOrColumn($xetable, fieldOrColumn) {
74
+ var handleFieldOrColumn = function ($xetable, fieldOrColumn) {
89
75
  if (fieldOrColumn) {
90
76
  return _xeUtils.default.isString(fieldOrColumn) ? $xetable.getColumnByField(fieldOrColumn) : fieldOrColumn;
91
77
  }
92
-
93
78
  return null;
94
79
  };
95
-
96
80
  exports.handleFieldOrColumn = handleFieldOrColumn;
97
-
98
81
  function getPaddingLeftRightSize(elem) {
99
82
  if (elem) {
100
83
  var computedStyle = getComputedStyle(elem);
101
-
102
84
  var paddingLeft = _xeUtils.default.toNumber(computedStyle.paddingLeft);
103
-
104
85
  var paddingRight = _xeUtils.default.toNumber(computedStyle.paddingRight);
105
-
106
86
  return paddingLeft + paddingRight;
107
87
  }
108
-
109
88
  return 0;
110
89
  }
111
-
112
90
  function getElemenMarginWidth(elem) {
113
91
  if (elem) {
114
92
  var computedStyle = getComputedStyle(elem);
115
-
116
93
  var marginLeft = _xeUtils.default.toNumber(computedStyle.marginLeft);
117
-
118
94
  var marginRight = _xeUtils.default.toNumber(computedStyle.marginRight);
119
-
120
95
  return elem.offsetWidth + marginLeft + marginRight;
121
96
  }
122
-
123
97
  return 0;
124
98
  }
125
-
126
99
  function queryCellElement(cell, selector) {
127
100
  return cell.querySelector('.vxe-cell' + selector);
128
101
  }
129
-
130
102
  function toFilters(filters) {
131
103
  if (filters && _xeUtils.default.isArray(filters)) {
132
104
  return filters.map(function (_a) {
133
105
  var label = _a.label,
134
- value = _a.value,
135
- data = _a.data,
136
- resetValue = _a.resetValue,
137
- checked = _a.checked;
106
+ value = _a.value,
107
+ data = _a.data,
108
+ resetValue = _a.resetValue,
109
+ checked = _a.checked;
138
110
  return {
139
111
  label: label,
140
112
  value: value,
@@ -145,55 +117,46 @@ function toFilters(filters) {
145
117
  };
146
118
  });
147
119
  }
148
-
149
120
  return filters;
150
121
  }
151
-
152
122
  function toTreePathSeq(path) {
153
123
  return path.map(function (num, i) {
154
124
  return i % 2 === 0 ? Number(num) + 1 : '.';
155
125
  }).join('');
156
126
  }
157
-
158
127
  function getCellValue(row, column) {
159
128
  return _xeUtils.default.get(row, column.field);
160
129
  }
161
-
162
130
  function setCellValue(row, column, value) {
163
131
  return _xeUtils.default.set(row, column.field, value);
164
132
  }
165
-
166
133
  function getColMinWidth(params) {
167
134
  var $table = params.$table,
168
- column = params.column,
169
- cell = params.cell;
135
+ column = params.column,
136
+ cell = params.cell;
170
137
  var tableProps = $table.props;
171
138
  var computeResizableOpts = $table.getComputeMaps().computeResizableOpts;
172
139
  var resizableOpts = computeResizableOpts.value;
173
- var reMinWidth = resizableOpts.minWidth; // 如果自定义调整宽度逻辑
174
-
140
+ var reMinWidth = resizableOpts.minWidth;
141
+ // 如果自定义调整宽度逻辑
175
142
  if (reMinWidth) {
176
143
  var customMinWidth = _xeUtils.default.isFunction(reMinWidth) ? reMinWidth(params) : reMinWidth;
177
-
178
144
  if (customMinWidth !== 'auto') {
179
145
  return Math.max(1, _xeUtils.default.toNumber(customMinWidth));
180
146
  }
181
147
  }
182
-
183
148
  var allColumnHeaderOverflow = tableProps.showHeaderOverflow;
184
149
  var showHeaderOverflow = column.showHeaderOverflow,
185
- colMinWidth = column.minWidth;
150
+ colMinWidth = column.minWidth;
186
151
  var headOverflow = _xeUtils.default.isUndefined(showHeaderOverflow) || _xeUtils.default.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
187
152
  var showEllipsis = headOverflow === 'ellipsis';
188
153
  var showTitle = headOverflow === 'title';
189
154
  var showTooltip = headOverflow === true || headOverflow === 'tooltip';
190
155
  var hasEllipsis = showTitle || showTooltip || showEllipsis;
191
-
192
156
  var minTitleWidth = _xeUtils.default.floor((_xeUtils.default.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.6);
193
-
194
157
  var paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryCellElement(cell, ''));
195
- var mWidth = minTitleWidth + paddingLeftRight; // 默认最小宽处理
196
-
158
+ var mWidth = minTitleWidth + paddingLeftRight;
159
+ // 默认最小宽处理
197
160
  if (hasEllipsis) {
198
161
  var checkboxIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '--title>.vxe-cell--checkbox'));
199
162
  var requiredIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--required-icon'));
@@ -202,14 +165,12 @@ function getColMinWidth(params) {
202
165
  var sortIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--sort'));
203
166
  var filterIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--filter'));
204
167
  mWidth += checkboxIconWidth + requiredIconWidth + editIconWidth + helpIconWidth + filterIconWidth + sortIconWidth;
205
- } // 如果设置最小宽
206
-
207
-
168
+ }
169
+ // 如果设置最小宽
208
170
  if (colMinWidth) {
209
171
  var refTableBody = $table.getRefMaps().refTableBody;
210
172
  var tableBody = refTableBody.value;
211
173
  var bodyElem = tableBody ? tableBody.$el : null;
212
-
213
174
  if (bodyElem) {
214
175
  if ((0, _dom.isScale)(colMinWidth)) {
215
176
  var bodyWidth = bodyElem.clientWidth - 1;
@@ -220,18 +181,14 @@ function getColMinWidth(params) {
220
181
  }
221
182
  }
222
183
  }
223
-
224
184
  return mWidth;
225
185
  }
226
-
227
186
  function isColumnInfo(column) {
228
187
  return column && (column.constructor === _columnInfo.ColumnInfo || column instanceof _columnInfo.ColumnInfo);
229
188
  }
230
-
231
189
  function createColumn($xetable, options, renderOptions) {
232
190
  return isColumnInfo(options) ? options : (0, _vue.reactive)(new _columnInfo.ColumnInfo($xetable, options, renderOptions));
233
191
  }
234
-
235
192
  function watchColumn(props, column) {
236
193
  Object.keys(props).forEach(function (name) {
237
194
  (0, _vue.watch)(function () {
@@ -241,45 +198,37 @@ function watchColumn(props, column) {
241
198
  });
242
199
  });
243
200
  }
244
-
245
201
  function assemColumn($xetable, elem, column, colgroup) {
246
202
  var reactData = $xetable.reactData;
247
203
  var staticColumns = reactData.staticColumns;
248
204
  var parentElem = elem.parentNode;
249
205
  var parentColumn = colgroup ? colgroup.column : null;
250
206
  var parentCols = parentColumn ? parentColumn.children : staticColumns;
251
-
252
207
  if (parentElem && parentCols) {
253
208
  parentCols.splice(_xeUtils.default.arrayIndexOf(parentElem.children, elem), 0, column);
254
209
  reactData.staticColumns = staticColumns.slice(0);
255
210
  }
256
211
  }
257
-
258
212
  function destroyColumn($xetable, column) {
259
213
  var reactData = $xetable.reactData;
260
214
  var staticColumns = reactData.staticColumns;
261
-
262
215
  var matchObj = _xeUtils.default.findTree(staticColumns, function (item) {
263
216
  return item.id === column.id;
264
217
  }, {
265
218
  children: 'children'
266
219
  });
267
-
268
220
  if (matchObj) {
269
221
  matchObj.items.splice(matchObj.index, 1);
270
222
  }
271
-
272
223
  reactData.staticColumns = staticColumns.slice(0);
273
224
  }
274
-
275
225
  function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
276
226
  for (var mIndex = 0; mIndex < mergeList.length; mIndex++) {
277
227
  var _a = mergeList[mIndex],
278
- mergeRowIndex = _a.row,
279
- mergeColIndex = _a.col,
280
- mergeRowspan = _a.rowspan,
281
- mergeColspan = _a.colspan;
282
-
228
+ mergeRowIndex = _a.row,
229
+ mergeColIndex = _a.col,
230
+ mergeRowspan = _a.rowspan,
231
+ mergeColspan = _a.colspan;
283
232
  if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
284
233
  if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
285
234
  return {
@@ -287,7 +236,6 @@ function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
287
236
  colspan: mergeColspan
288
237
  };
289
238
  }
290
-
291
239
  if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
292
240
  return {
293
241
  rowspan: 0,
@@ -297,10 +245,9 @@ function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
297
245
  }
298
246
  }
299
247
  }
300
-
301
248
  function clearTableDefaultStatus($xetable) {
302
249
  var props = $xetable.props,
303
- internalData = $xetable.internalData;
250
+ internalData = $xetable.internalData;
304
251
  internalData.initStatus = false;
305
252
  $xetable.clearSort();
306
253
  $xetable.clearCurrentRow();
@@ -312,51 +259,42 @@ function clearTableDefaultStatus($xetable) {
312
259
  $xetable.clearRowExpand();
313
260
  $xetable.clearTreeExpand();
314
261
  $xetable.clearTreeExpandReserve();
315
-
316
262
  if ($xetable.clearFilter) {
317
263
  $xetable.clearFilter();
318
264
  }
319
-
320
265
  if ($xetable.clearSelected && (props.keyboardConfig || props.mouseConfig)) {
321
266
  $xetable.clearSelected();
322
267
  }
323
-
324
268
  if ($xetable.clearCellAreas && props.mouseConfig) {
325
269
  $xetable.clearCellAreas();
326
270
  $xetable.clearCopyCellArea();
327
271
  }
328
-
329
272
  return $xetable.clearScroll();
330
273
  }
331
-
332
274
  function clearTableAllStatus($xetable) {
333
275
  if ($xetable.clearFilter) {
334
276
  $xetable.clearFilter();
335
277
  }
336
-
337
278
  return clearTableDefaultStatus($xetable);
338
279
  }
339
-
340
280
  function rowToVisible($xetable, row) {
341
281
  var reactData = $xetable.reactData,
342
- internalData = $xetable.internalData;
282
+ internalData = $xetable.internalData;
343
283
  var refTableBody = $xetable.getRefMaps().refTableBody;
344
284
  var scrollYLoad = reactData.scrollYLoad;
345
285
  var afterFullData = internalData.afterFullData,
346
- scrollYStore = internalData.scrollYStore;
286
+ scrollYStore = internalData.scrollYStore;
347
287
  var tableBody = refTableBody.value;
348
288
  var bodyElem = tableBody ? tableBody.$el : null;
349
-
350
289
  if (bodyElem) {
351
290
  var trElem = bodyElem.querySelector("[rowid=\"".concat(getRowid($xetable, row), "\"]"));
352
-
353
291
  if (trElem) {
354
292
  var bodyHeight = bodyElem.clientHeight;
355
293
  var bodySrcollTop = bodyElem.scrollTop;
356
294
  var trOffsetParent = trElem.offsetParent;
357
295
  var trOffsetTop = trElem.offsetTop + (trOffsetParent ? trOffsetParent.offsetTop : 0);
358
- var trHeight = trElem.clientHeight; // 检测行是否在可视区中
359
-
296
+ var trHeight = trElem.clientHeight;
297
+ // 检测行是否在可视区中
360
298
  if (trOffsetTop < bodySrcollTop || trOffsetTop > bodySrcollTop + bodyHeight) {
361
299
  // 向上定位
362
300
  return $xetable.scrollTo(null, trOffsetTop);
@@ -371,29 +309,25 @@ function rowToVisible($xetable, row) {
371
309
  }
372
310
  }
373
311
  }
374
-
375
312
  return Promise.resolve();
376
313
  }
377
-
378
314
  function colToVisible($xetable, column) {
379
315
  var reactData = $xetable.reactData,
380
- internalData = $xetable.internalData;
316
+ internalData = $xetable.internalData;
381
317
  var refTableBody = $xetable.getRefMaps().refTableBody;
382
318
  var scrollXLoad = reactData.scrollXLoad;
383
319
  var visibleColumn = internalData.visibleColumn;
384
320
  var tableBody = refTableBody.value;
385
321
  var bodyElem = tableBody ? tableBody.$el : null;
386
-
387
322
  if (bodyElem) {
388
323
  var tdElem = bodyElem.querySelector(".".concat(column.id));
389
-
390
324
  if (tdElem) {
391
325
  var bodyWidth = bodyElem.clientWidth;
392
326
  var bodySrcollLeft = bodyElem.scrollLeft;
393
327
  var tdOffsetParent = tdElem.offsetParent;
394
328
  var tdOffsetLeft = tdElem.offsetLeft + (tdOffsetParent ? tdOffsetParent.offsetLeft : 0);
395
- var tdWidth = tdElem.clientWidth; // 检测行是否在可视区中
396
-
329
+ var tdWidth = tdElem.clientWidth;
330
+ // 检测行是否在可视区中
397
331
  if (tdOffsetLeft < bodySrcollLeft || tdOffsetLeft > bodySrcollLeft + bodyWidth) {
398
332
  // 向左定位
399
333
  return $xetable.scrollTo(tdOffsetLeft);
@@ -405,19 +339,15 @@ function colToVisible($xetable, column) {
405
339
  // 如果是虚拟渲染跨行滚动
406
340
  if (scrollXLoad) {
407
341
  var scrollLeft = 0;
408
-
409
342
  for (var index = 0; index < visibleColumn.length; index++) {
410
343
  if (visibleColumn[index] === column) {
411
344
  break;
412
345
  }
413
-
414
346
  scrollLeft += visibleColumn[index].renderWidth;
415
347
  }
416
-
417
348
  return $xetable.scrollTo(scrollLeft);
418
349
  }
419
350
  }
420
351
  }
421
-
422
352
  return Promise.resolve();
423
353
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assemColumn=assemColumn,exports.clearTableAllStatus=clearTableAllStatus,exports.clearTableDefaultStatus=clearTableDefaultStatus,exports.colToVisible=colToVisible,exports.createColumn=createColumn,exports.destroyColumn=destroyColumn,exports.getCellValue=getCellValue,exports.getColMinWidth=getColMinWidth,exports.getRowUniqueId=getRowUniqueId,exports.getRowid=getRowid,exports.getRowkey=getRowkey,exports.handleFieldOrColumn=void 0,exports.isColumnInfo=isColumnInfo,exports.mergeBodyMethod=mergeBodyMethod,exports.removeScrollListener=removeScrollListener,exports.restoreScrollListener=restoreScrollListener,exports.restoreScrollLocation=restoreScrollLocation,exports.rowToVisible=rowToVisible,exports.setCellValue=setCellValue,exports.toFilters=toFilters,exports.toTreePathSeq=toTreePathSeq,exports.watchColumn=watchColumn;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_columnInfo=require("./columnInfo"),_dom=require("../../tools/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function restoreScrollLocation(e,t,l){var r=e.internalData;return e.clearScroll().then(function(){if(t||l)return r.lastScrollLeft=0,r.lastScrollTop=0,e.scrollTo(t,l)})}function removeScrollListener(e){e&&e._onscroll&&(e.onscroll=null)}function restoreScrollListener(e){e&&e._onscroll&&(e.onscroll=e._onscroll)}function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}function getRowkey(e){var t=e.props,e=e.getComputeMaps().computeRowOpts,t=t.rowId,e=e.value;return t||e.keyField||"_X_ROW_KEY"}function getRowid(e,t){e=_xeUtils.default.get(t,getRowkey(e));return _xeUtils.default.eqNull(e)?"":encodeURIComponent(e)}var handleFieldOrColumn=function(e,t){return t?_xeUtils.default.isString(t)?e.getColumnByField(t):t:null};function getPaddingLeftRightSize(e){if(e){e=getComputedStyle(e);return _xeUtils.default.toNumber(e.paddingLeft)+_xeUtils.default.toNumber(e.paddingRight)}return 0}function getElemenMarginWidth(e){if(e){var t=getComputedStyle(e),l=_xeUtils.default.toNumber(t.marginLeft),t=_xeUtils.default.toNumber(t.marginRight);return e.offsetWidth+l+t}return 0}function queryCellElement(e,t){return e.querySelector(".vxe-cell"+t)}function toFilters(e){return e&&_xeUtils.default.isArray(e)?e.map(function(e){var t=e.label,l=e.value,r=e.data,o=e.resetValue,e=e.checked;return{label:t,value:l,data:r,resetValue:o,checked:!!e,_checked:!!e}}):e}function toTreePathSeq(e){return e.map(function(e,t){return t%2==0?Number(e)+1:"."}).join("")}function getCellValue(e,t){return _xeUtils.default.get(e,t.field)}function setCellValue(e,t,l){return _xeUtils.default.set(e,t.field,l)}function getColMinWidth(e){var t=e.$table,l=e.column,r=e.cell,o=t.props,n=t.getComputeMaps().computeResizableOpts.value.minWidth;if(n){var i=_xeUtils.default.isFunction(n)?n(e):n;if("auto"!==i)return Math.max(1,_xeUtils.default.toNumber(i))}var a=o.showHeaderOverflow,u=l.showHeaderOverflow,e=l.minWidth,n=_xeUtils.default.isUndefined(u)||_xeUtils.default.isNull(u)?a:u,i="title"===n||(!0===n||"tooltip"===n)||"ellipsis"===n,o=_xeUtils.default.floor(1.6*(_xeUtils.default.toNumber(getComputedStyle(r).fontSize)||14))+(getPaddingLeftRightSize(r)+getPaddingLeftRightSize(queryCellElement(r,"")));if(i&&(l=getPaddingLeftRightSize(queryCellElement(r,"--title>.vxe-cell--checkbox")),a=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--required-icon")),u=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--edit-icon")),n=getElemenMarginWidth(queryCellElement(r,">.vxe-cell-help-icon")),i=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--sort")),o+=l+a+u+n+getElemenMarginWidth(queryCellElement(r,">.vxe-cell--filter"))+i),e){t=t.getRefMaps().refTableBody.value,t=t?t.$el:null;if(t){if((0,_dom.isScale)(e)){t=(t.clientWidth-1)/100;return Math.max(o,Math.floor(_xeUtils.default.toInteger(e)*t))}if((0,_dom.isPx)(e))return Math.max(o,_xeUtils.default.toInteger(e))}}return o}function isColumnInfo(e){return e&&(e.constructor===_columnInfo.ColumnInfo||e instanceof _columnInfo.ColumnInfo)}function createColumn(e,t,l){return isColumnInfo(t)?t:(0,_vue.reactive)(new _columnInfo.ColumnInfo(e,t,l))}function watchColumn(e,l){Object.keys(e).forEach(function(t){(0,_vue.watch)(function(){return e[t]},function(e){l.update(t,e)})})}function assemColumn(e,t,l,r){var o=e.reactData,n=o.staticColumns,e=t.parentNode,r=r?r.column:null,r=r?r.children:n;e&&r&&(r.splice(_xeUtils.default.arrayIndexOf(e.children,t),0,l),o.staticColumns=n.slice(0))}function destroyColumn(e,t){var l=e.reactData,r=l.staticColumns,e=_xeUtils.default.findTree(r,function(e){return e.id===t.id},{children:"children"});e&&e.items.splice(e.index,1),l.staticColumns=r.slice(0)}function mergeBodyMethod(e,t,l){for(var r=0;r<e.length;r++){var o=e[r],n=o.row,i=o.col,a=o.rowspan,o=o.colspan;if(-1<i&&-1<n&&a&&o){if(n===t&&i===l)return{rowspan:a,colspan:o};if(n<=t&&t<n+a&&i<=l&&l<i+o)return{rowspan:0,colspan:0}}}}function clearTableDefaultStatus(e){var t=e.props;return e.internalData.initStatus=!1,e.clearSort(),e.clearCurrentRow(),e.clearCurrentColumn(),e.clearRadioRow(),e.clearRadioReserve(),e.clearCheckboxRow(),e.clearCheckboxReserve(),e.clearRowExpand(),e.clearTreeExpand(),e.clearTreeExpandReserve(),e.clearFilter&&e.clearFilter(),e.clearSelected&&(t.keyboardConfig||t.mouseConfig)&&e.clearSelected(),e.clearCellAreas&&t.mouseConfig&&(e.clearCellAreas(),e.clearCopyCellArea()),e.clearScroll()}function clearTableAllStatus(e){return e.clearFilter&&e.clearFilter(),clearTableDefaultStatus(e)}function rowToVisible(e,t){var l=e.reactData,r=e.internalData,o=e.getRefMaps().refTableBody,n=l.scrollYLoad,i=r.afterFullData,a=r.scrollYStore,u=o.value,l=u?u.$el:null;if(l){r=l.querySelector('[rowid="'.concat(getRowid(e,t),'"]'));if(r){o=l.clientHeight,u=l.scrollTop,l=r.offsetParent,l=r.offsetTop+(l?l.offsetTop:0),r=r.clientHeight;if(l<u||u+o<l)return e.scrollTo(null,l);if(o+u<=l+r)return e.scrollTo(null,u+r)}else if(n)return e.scrollTo(null,(i.indexOf(t)-1)*a.rowHeight)}return Promise.resolve()}function colToVisible(e,t){var l=e.reactData,r=e.internalData,o=e.getRefMaps().refTableBody,n=l.scrollXLoad,i=r.visibleColumn,a=o.value,l=a?a.$el:null;if(l){r=l.querySelector(".".concat(t.id));if(r){o=l.clientWidth,a=l.scrollLeft,l=r.offsetParent,l=r.offsetLeft+(l?l.offsetLeft:0),r=r.clientWidth;if(l<a||a+o<l)return e.scrollTo(l);if(o+a<=l+r)return e.scrollTo(a+r)}else if(n){for(var u=0,s=0;s<i.length&&i[s]!==t;s++)u+=i[s].renderWidth;return e.scrollTo(u)}}return Promise.resolve()}exports.handleFieldOrColumn=handleFieldOrColumn;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assemColumn=assemColumn,exports.clearTableAllStatus=clearTableAllStatus,exports.clearTableDefaultStatus=clearTableDefaultStatus,exports.colToVisible=colToVisible,exports.createColumn=createColumn,exports.destroyColumn=destroyColumn,exports.getCellValue=getCellValue,exports.getColMinWidth=getColMinWidth,exports.getRowUniqueId=getRowUniqueId,exports.getRowid=getRowid,exports.getRowkey=getRowkey,exports.handleFieldOrColumn=void 0,exports.isColumnInfo=isColumnInfo,exports.mergeBodyMethod=mergeBodyMethod,exports.removeScrollListener=removeScrollListener,exports.restoreScrollListener=restoreScrollListener,exports.restoreScrollLocation=restoreScrollLocation,exports.rowToVisible=rowToVisible,exports.setCellValue=setCellValue,exports.toFilters=toFilters,exports.toTreePathSeq=toTreePathSeq,exports.watchColumn=watchColumn;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_columnInfo=require("./columnInfo"),_dom=require("../../tools/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function restoreScrollLocation(e,t,l){var r=e.internalData;return e.clearScroll().then(function(){if(t||l)return r.lastScrollLeft=0,r.lastScrollTop=0,e.scrollTo(t,l)})}function removeScrollListener(e){e&&e._onscroll&&(e.onscroll=null)}function restoreScrollListener(e){e&&e._onscroll&&(e.onscroll=e._onscroll)}function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}function getRowkey(e){var t=e.props,e=e.getComputeMaps().computeRowOpts,t=t.rowId,e=e.value;return t||e.keyField||"_X_ROW_KEY"}function getRowid(e,t){t=_xeUtils.default.get(t,getRowkey(e));return _xeUtils.default.eqNull(t)?"":encodeURIComponent(t)}var handleFieldOrColumn=function(e,t){return t?_xeUtils.default.isString(t)?e.getColumnByField(t):t:null};function getPaddingLeftRightSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingLeft)+_xeUtils.default.toNumber(e.paddingRight)):0}function getElemenMarginWidth(e){var t,l;return e?(l=getComputedStyle(e),t=_xeUtils.default.toNumber(l.marginLeft),l=_xeUtils.default.toNumber(l.marginRight),e.offsetWidth+t+l):0}function queryCellElement(e,t){return e.querySelector(".vxe-cell"+t)}function toFilters(e){return e&&_xeUtils.default.isArray(e)?e.map(function(e){var t=e.label,l=e.value,r=e.data,o=e.resetValue,e=e.checked;return{label:t,value:l,data:r,resetValue:o,checked:!!e,_checked:!!e}}):e}function toTreePathSeq(e){return e.map(function(e,t){return t%2==0?Number(e)+1:"."}).join("")}function getCellValue(e,t){return _xeUtils.default.get(e,t.field)}function setCellValue(e,t,l){return _xeUtils.default.set(e,t.field,l)}function getColMinWidth(e){var t=e.$table,l=e.column,r=e.cell,o=t.props,n=t.getComputeMaps().computeResizableOpts.value.minWidth;if(n){e=_xeUtils.default.isFunction(n)?n(e):n;if("auto"!==e)return Math.max(1,_xeUtils.default.toNumber(e))}var i,a,n=o.showHeaderOverflow,e=l.showHeaderOverflow,o=l.minWidth,l=_xeUtils.default.isUndefined(e)||_xeUtils.default.isNull(e)?n:e,n="title"===l||(!0===l||"tooltip"===l)||"ellipsis"===l,e=_xeUtils.default.floor(1.6*(_xeUtils.default.toNumber(getComputedStyle(r).fontSize)||14))+(getPaddingLeftRightSize(r)+getPaddingLeftRightSize(queryCellElement(r,"")));if(n&&(l=getPaddingLeftRightSize(queryCellElement(r,"--title>.vxe-cell--checkbox")),n=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--required-icon")),u=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--edit-icon")),i=getElemenMarginWidth(queryCellElement(r,">.vxe-cell-help-icon")),a=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--sort")),e+=l+n+u+i+getElemenMarginWidth(queryCellElement(r,">.vxe-cell--filter"))+a),o){var u,l=t.getRefMaps().refTableBody.value,n=l?l.$el:null;if(n){if((0,_dom.isScale)(o))return u=(n.clientWidth-1)/100,Math.max(e,Math.floor(_xeUtils.default.toInteger(o)*u));if((0,_dom.isPx)(o))return Math.max(e,_xeUtils.default.toInteger(o))}}return e}function isColumnInfo(e){return e&&(e.constructor===_columnInfo.ColumnInfo||e instanceof _columnInfo.ColumnInfo)}function createColumn(e,t,l){return isColumnInfo(t)?t:(0,_vue.reactive)(new _columnInfo.ColumnInfo(e,t,l))}function watchColumn(e,l){Object.keys(e).forEach(function(t){(0,_vue.watch)(function(){return e[t]},function(e){l.update(t,e)})})}function assemColumn(e,t,l,r){var e=e.reactData,o=e.staticColumns,n=t.parentNode,r=r?r.column:null,r=r?r.children:o;n&&r&&(r.splice(_xeUtils.default.arrayIndexOf(n.children,t),0,l),e.staticColumns=o.slice(0))}function destroyColumn(e,t){var e=e.reactData,l=e.staticColumns,r=_xeUtils.default.findTree(l,function(e){return e.id===t.id},{children:"children"});r&&r.items.splice(r.index,1),e.staticColumns=l.slice(0)}function mergeBodyMethod(e,t,l){for(var r=0;r<e.length;r++){var o=e[r],n=o.row,i=o.col,a=o.rowspan,o=o.colspan;if(-1<i&&-1<n&&a&&o){if(n===t&&i===l)return{rowspan:a,colspan:o};if(n<=t&&t<n+a&&i<=l&&l<i+o)return{rowspan:0,colspan:0}}}}function clearTableDefaultStatus(e){var t=e.props;return e.internalData.initStatus=!1,e.clearSort(),e.clearCurrentRow(),e.clearCurrentColumn(),e.clearRadioRow(),e.clearRadioReserve(),e.clearCheckboxRow(),e.clearCheckboxReserve(),e.clearRowExpand(),e.clearTreeExpand(),e.clearTreeExpandReserve(),e.clearFilter&&e.clearFilter(),e.clearSelected&&(t.keyboardConfig||t.mouseConfig)&&e.clearSelected(),e.clearCellAreas&&t.mouseConfig&&(e.clearCellAreas(),e.clearCopyCellArea()),e.clearScroll()}function clearTableAllStatus(e){return e.clearFilter&&e.clearFilter(),clearTableDefaultStatus(e)}function rowToVisible(e,t){var l=e.reactData,r=e.internalData,o=e.getRefMaps().refTableBody,l=l.scrollYLoad,n=r.afterFullData,r=r.scrollYStore,o=o.value,o=o?o.$el:null;if(o){var i=o.querySelector('[rowid="'.concat(getRowid(e,t),'"]'));if(i){var a=o.clientHeight,o=o.scrollTop,u=i.offsetParent,u=i.offsetTop+(u?u.offsetTop:0),i=i.clientHeight;if(u<o||o+a<u)return e.scrollTo(null,u);if(a+o<=u+i)return e.scrollTo(null,o+i)}else if(l)return e.scrollTo(null,(n.indexOf(t)-1)*r.rowHeight)}return Promise.resolve()}function colToVisible(e,t){var l=e.reactData,r=e.internalData,o=e.getRefMaps().refTableBody,l=l.scrollXLoad,n=r.visibleColumn,r=o.value,o=r?r.$el:null;if(o){r=o.querySelector(".".concat(t.id));if(r){var i=o.clientWidth,o=o.scrollLeft,a=r.offsetParent,a=r.offsetLeft+(a?a.offsetLeft:0),r=r.clientWidth;if(a<o||o+i<a)return e.scrollTo(a);if(i+o<=a+r)return e.scrollTo(o+r)}else if(l){for(var u=0,s=0;s<n.length&&n[s]!==t;s++)u+=n[s].renderWidth;return e.scrollTo(u)}}return Promise.resolve()}exports.handleFieldOrColumn=handleFieldOrColumn;