vxe-pc-ui 3.0.0 → 3.0.2

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 (626) hide show
  1. package/README.md +23 -25
  2. package/es/button/src/button.js +3 -0
  3. package/es/calendar/index.js +12 -0
  4. package/es/calendar/src/calendar.js +1227 -0
  5. package/es/calendar/style.css +247 -0
  6. package/es/calendar/style.min.css +1 -0
  7. package/es/carousel/index.js +12 -0
  8. package/es/carousel/src/carousel-item.js +100 -0
  9. package/es/carousel/src/carousel.js +418 -0
  10. package/es/carousel/src/util.js +17 -0
  11. package/es/carousel/style.css +185 -0
  12. package/es/carousel/style.min.css +1 -0
  13. package/es/carousel-item/index.js +12 -0
  14. package/es/carousel-item/style.css +0 -0
  15. package/es/carousel-item/style.min.css +0 -0
  16. package/es/checkbox/index.js +12 -0
  17. package/es/checkbox/src/checkbox.js +164 -0
  18. package/es/checkbox/src/group.js +159 -0
  19. package/es/checkbox/style.css +117 -0
  20. package/es/checkbox/style.min.css +1 -0
  21. package/es/checkbox-group/index.js +12 -0
  22. package/es/checkbox-group/style.css +0 -0
  23. package/es/checkbox-group/style.min.css +0 -0
  24. package/es/collapse/index.js +12 -0
  25. package/es/collapse/src/collapse-pane.js +39 -0
  26. package/es/collapse/src/collapse.js +39 -0
  27. package/es/collapse/style.css +0 -0
  28. package/es/collapse/style.min.css +0 -0
  29. package/es/collapse-pane/index.js +12 -0
  30. package/es/collapse-pane/style.css +0 -0
  31. package/es/collapse-pane/style.min.css +0 -0
  32. package/es/components.js +66 -66
  33. package/es/date-picker/src/date-picker.js +20 -13
  34. package/es/drawer/src/drawer.js +17 -12
  35. package/es/form/index.js +13 -0
  36. package/es/form/render/index.js +461 -0
  37. package/es/form/src/form-config-item.js +201 -0
  38. package/es/form/src/form-gather.js +87 -0
  39. package/es/form/src/form-item.js +291 -0
  40. package/es/form/src/form.js +762 -0
  41. package/es/form/src/itemInfo.js +43 -0
  42. package/es/form/src/render.js +78 -0
  43. package/es/form/src/util.js +66 -0
  44. package/es/form/style.css +470 -0
  45. package/es/form/style.min.css +1 -0
  46. package/es/form-gather/index.js +12 -0
  47. package/es/form-gather/style.css +0 -0
  48. package/es/form-gather/style.min.css +0 -0
  49. package/es/form-item/index.js +12 -0
  50. package/es/form-item/style.css +0 -0
  51. package/es/form-item/style.min.css +0 -0
  52. package/es/icon/style.css +1 -1
  53. package/es/icon-picker/index.js +12 -0
  54. package/es/icon-picker/src/icon-picker.js +672 -0
  55. package/es/icon-picker/style.css +207 -0
  56. package/es/icon-picker/style.min.css +1 -0
  57. package/es/image/src/preview.js +1 -2
  58. package/es/input/index.js +12 -0
  59. package/es/input/src/input.js +2896 -0
  60. package/es/input/style.css +941 -0
  61. package/es/input/style.min.css +1 -0
  62. package/es/layout-footer/src/layout-footer.js +2 -1
  63. package/es/layout-header/src/layout-header.js +2 -1
  64. package/es/list/index.js +12 -0
  65. package/es/list/src/list.js +373 -0
  66. package/es/list/style.css +28 -0
  67. package/es/list/style.min.css +1 -0
  68. package/es/loading/src/loading.js +5 -0
  69. package/es/menu/src/menu.js +6 -2
  70. package/es/modal/src/modal.js +7 -4
  71. package/es/number-input/src/number-input.js +11 -7
  72. package/es/optgroup/index.js +12 -0
  73. package/es/optgroup/style.css +0 -0
  74. package/es/optgroup/style.min.css +0 -0
  75. package/es/option/index.js +12 -0
  76. package/es/option/style.css +0 -0
  77. package/es/option/style.min.css +0 -0
  78. package/es/pager/index.js +12 -0
  79. package/es/pager/src/pager.js +687 -0
  80. package/es/pager/style.css +303 -0
  81. package/es/pager/style.min.css +1 -0
  82. package/es/password-input/index.js +12 -0
  83. package/es/password-input/src/password-input.js +392 -0
  84. package/es/password-input/style.css +604 -0
  85. package/es/password-input/style.min.css +1 -0
  86. package/es/pulldown/src/pulldown.js +11 -3
  87. package/es/radio/src/button.js +6 -2
  88. package/es/radio/src/group.js +6 -2
  89. package/es/radio/src/radio.js +6 -2
  90. package/es/select/index.js +12 -0
  91. package/es/select/src/optgroup.js +90 -0
  92. package/es/select/src/option-info.js +16 -0
  93. package/es/select/src/option.js +86 -0
  94. package/es/select/src/select.js +1284 -0
  95. package/es/select/src/util.js +36 -0
  96. package/es/select/style.css +207 -0
  97. package/es/select/style.min.css +1 -0
  98. package/es/style.css +1 -1
  99. package/es/style.min.css +1 -1
  100. package/es/switch/src/switch.js +6 -2
  101. package/es/tab-pane/index.js +12 -0
  102. package/es/tab-pane/style.css +0 -0
  103. package/es/tab-pane/style.min.css +0 -0
  104. package/es/tabs/index.js +12 -0
  105. package/es/tabs/src/tab-pane.js +119 -0
  106. package/es/tabs/src/tabs.js +598 -0
  107. package/es/tabs/src/util.js +17 -0
  108. package/es/tabs/style.css +342 -0
  109. package/es/tabs/style.min.css +1 -0
  110. package/es/textarea/src/textarea.js +9 -5
  111. package/es/tooltip/src/tooltip.js +6 -1
  112. package/es/tree/index.js +12 -0
  113. package/es/tree/src/tree.js +1216 -0
  114. package/es/tree/style.css +219 -0
  115. package/es/tree/style.min.css +1 -0
  116. package/es/tree-select/index.js +12 -0
  117. package/es/tree-select/src/tree-select.js +685 -0
  118. package/es/tree-select/style.css +129 -0
  119. package/es/tree-select/style.min.css +1 -0
  120. package/es/ui/index.js +1 -1
  121. package/es/ui/src/log.js +1 -1
  122. package/es/ui/src/vn.js +1 -1
  123. package/es/upload/src/upload.js +9 -5
  124. package/es/vxe-calendar/index.js +3 -0
  125. package/es/vxe-calendar/style.css +247 -0
  126. package/es/vxe-calendar/style.min.css +1 -0
  127. package/es/vxe-carousel/index.js +3 -0
  128. package/es/vxe-carousel/style.css +185 -0
  129. package/es/vxe-carousel/style.min.css +1 -0
  130. package/es/vxe-carousel-item/index.js +3 -0
  131. package/es/vxe-carousel-item/style.css +0 -0
  132. package/es/vxe-carousel-item/style.min.css +0 -0
  133. package/es/vxe-checkbox/index.js +3 -0
  134. package/es/vxe-checkbox/style.css +117 -0
  135. package/es/vxe-checkbox/style.min.css +1 -0
  136. package/es/vxe-checkbox-group/index.js +3 -0
  137. package/es/vxe-checkbox-group/style.css +0 -0
  138. package/es/vxe-checkbox-group/style.min.css +0 -0
  139. package/es/vxe-collapse/index.js +3 -0
  140. package/es/vxe-collapse/style.css +0 -0
  141. package/es/vxe-collapse/style.min.css +0 -0
  142. package/es/vxe-collapse-pane/index.js +3 -0
  143. package/es/vxe-collapse-pane/style.css +0 -0
  144. package/es/vxe-collapse-pane/style.min.css +0 -0
  145. package/es/vxe-form/index.js +3 -0
  146. package/es/vxe-form/style.css +470 -0
  147. package/es/vxe-form/style.min.css +1 -0
  148. package/es/vxe-form-gather/index.js +3 -0
  149. package/es/vxe-form-gather/style.css +0 -0
  150. package/es/vxe-form-gather/style.min.css +0 -0
  151. package/es/vxe-form-item/index.js +3 -0
  152. package/es/vxe-form-item/style.css +0 -0
  153. package/es/vxe-form-item/style.min.css +0 -0
  154. package/es/vxe-icon-picker/index.js +3 -0
  155. package/es/vxe-icon-picker/style.css +207 -0
  156. package/es/vxe-icon-picker/style.min.css +1 -0
  157. package/es/vxe-input/index.js +3 -0
  158. package/es/vxe-input/style.css +941 -0
  159. package/es/vxe-input/style.min.css +1 -0
  160. package/es/vxe-list/index.js +3 -0
  161. package/es/vxe-list/style.css +28 -0
  162. package/es/vxe-list/style.min.css +1 -0
  163. package/es/vxe-optgroup/index.js +3 -0
  164. package/es/vxe-optgroup/style.css +0 -0
  165. package/es/vxe-optgroup/style.min.css +0 -0
  166. package/es/vxe-option/index.js +3 -0
  167. package/es/vxe-option/style.css +0 -0
  168. package/es/vxe-option/style.min.css +0 -0
  169. package/es/vxe-pager/index.js +3 -0
  170. package/es/vxe-pager/style.css +303 -0
  171. package/es/vxe-pager/style.min.css +1 -0
  172. package/es/vxe-password-input/index.js +3 -0
  173. package/es/vxe-password-input/style.css +604 -0
  174. package/es/vxe-password-input/style.min.css +1 -0
  175. package/es/vxe-select/index.js +3 -0
  176. package/es/vxe-select/style.css +207 -0
  177. package/es/vxe-select/style.min.css +1 -0
  178. package/es/vxe-tab-pane/index.js +3 -0
  179. package/es/vxe-tab-pane/style.css +0 -0
  180. package/es/vxe-tab-pane/style.min.css +0 -0
  181. package/es/vxe-tabs/index.js +3 -0
  182. package/es/vxe-tabs/style.css +342 -0
  183. package/es/vxe-tabs/style.min.css +1 -0
  184. package/es/vxe-tree/index.js +3 -0
  185. package/es/vxe-tree/style.css +219 -0
  186. package/es/vxe-tree/style.min.css +1 -0
  187. package/es/vxe-tree-select/index.js +3 -0
  188. package/es/vxe-tree-select/style.css +129 -0
  189. package/es/vxe-tree-select/style.min.css +1 -0
  190. package/lib/button/src/button.js +3 -0
  191. package/lib/button/src/button.min.js +1 -1
  192. package/lib/calendar/index.js +19 -0
  193. package/lib/calendar/index.min.js +1 -0
  194. package/lib/calendar/src/calendar.js +1286 -0
  195. package/lib/calendar/src/calendar.min.js +1 -0
  196. package/lib/calendar/style/index.js +1 -0
  197. package/lib/calendar/style/style.css +247 -0
  198. package/lib/calendar/style/style.min.css +1 -0
  199. package/lib/carousel/index.js +19 -0
  200. package/lib/carousel/index.min.js +1 -0
  201. package/lib/carousel/src/carousel-item.js +107 -0
  202. package/lib/carousel/src/carousel-item.min.js +1 -0
  203. package/lib/carousel/src/carousel.js +437 -0
  204. package/lib/carousel/src/carousel.min.js +1 -0
  205. package/lib/carousel/src/util.js +27 -0
  206. package/lib/carousel/src/util.min.js +1 -0
  207. package/lib/carousel/style/index.js +1 -0
  208. package/lib/carousel/style/style.css +185 -0
  209. package/lib/carousel/style/style.min.css +1 -0
  210. package/lib/carousel-item/index.js +19 -0
  211. package/lib/carousel-item/index.min.js +1 -0
  212. package/lib/carousel-item/style/index.js +1 -0
  213. package/lib/carousel-item/style/style.css +0 -0
  214. package/lib/carousel-item/style/style.min.css +0 -0
  215. package/lib/checkbox/index.js +19 -0
  216. package/lib/checkbox/index.min.js +1 -0
  217. package/lib/checkbox/src/checkbox.js +174 -0
  218. package/lib/checkbox/src/checkbox.min.js +1 -0
  219. package/lib/checkbox/src/group.js +169 -0
  220. package/lib/checkbox/src/group.min.js +1 -0
  221. package/lib/checkbox/style/index.js +1 -0
  222. package/lib/checkbox/style/style.css +117 -0
  223. package/lib/checkbox/style/style.min.css +1 -0
  224. package/lib/checkbox-group/index.js +19 -0
  225. package/lib/checkbox-group/index.min.js +1 -0
  226. package/lib/checkbox-group/style/index.js +1 -0
  227. package/lib/checkbox-group/style/style.css +0 -0
  228. package/lib/checkbox-group/style/style.min.css +0 -0
  229. package/lib/collapse/index.js +19 -0
  230. package/lib/collapse/index.min.js +1 -0
  231. package/lib/collapse/src/collapse-pane.js +48 -0
  232. package/lib/collapse/src/collapse-pane.min.js +1 -0
  233. package/lib/collapse/src/collapse.js +48 -0
  234. package/lib/collapse/src/collapse.min.js +1 -0
  235. package/lib/collapse/style/index.js +1 -0
  236. package/lib/collapse/style/style.css +0 -0
  237. package/lib/collapse/style/style.min.css +0 -0
  238. package/lib/collapse-pane/index.js +19 -0
  239. package/lib/collapse-pane/index.min.js +1 -0
  240. package/lib/collapse-pane/style/index.js +1 -0
  241. package/lib/collapse-pane/style/style.css +0 -0
  242. package/lib/collapse-pane/style/style.min.css +0 -0
  243. package/lib/components.js +271 -97
  244. package/lib/components.min.js +1 -1
  245. package/lib/date-picker/src/date-picker.js +20 -13
  246. package/lib/date-picker/src/date-picker.min.js +1 -1
  247. package/lib/drawer/src/drawer.js +17 -12
  248. package/lib/drawer/src/drawer.min.js +1 -1
  249. package/lib/form/index.js +20 -0
  250. package/lib/form/index.min.js +1 -0
  251. package/lib/form/render/index.js +509 -0
  252. package/lib/form/render/index.min.js +1 -0
  253. package/lib/form/src/form-config-item.js +210 -0
  254. package/lib/form/src/form-config-item.min.js +1 -0
  255. package/lib/form/src/form-gather.js +99 -0
  256. package/lib/form/src/form-gather.min.js +1 -0
  257. package/lib/form/src/form-item.js +299 -0
  258. package/lib/form/src/form-item.min.js +1 -0
  259. package/lib/form/src/form.js +856 -0
  260. package/lib/form/src/form.min.js +1 -0
  261. package/lib/form/src/itemInfo.js +60 -0
  262. package/lib/form/src/itemInfo.min.js +1 -0
  263. package/lib/form/src/render.js +94 -0
  264. package/lib/form/src/render.min.js +1 -0
  265. package/lib/form/src/util.js +93 -0
  266. package/lib/form/src/util.min.js +1 -0
  267. package/lib/form/style/index.js +1 -0
  268. package/lib/form/style/style.css +470 -0
  269. package/lib/form/style/style.min.css +1 -0
  270. package/lib/form-gather/index.js +19 -0
  271. package/lib/form-gather/index.min.js +1 -0
  272. package/lib/form-gather/style/index.js +1 -0
  273. package/lib/form-gather/style/style.css +0 -0
  274. package/lib/form-gather/style/style.min.css +0 -0
  275. package/lib/form-item/index.js +19 -0
  276. package/lib/form-item/index.min.js +1 -0
  277. package/lib/form-item/style/index.js +1 -0
  278. package/lib/form-item/style/style.css +0 -0
  279. package/lib/form-item/style/style.min.css +0 -0
  280. package/lib/icon/style/style.css +1 -1
  281. package/lib/icon/style/style.min.css +1 -1
  282. package/lib/icon-picker/index.js +19 -0
  283. package/lib/icon-picker/index.min.js +1 -0
  284. package/lib/icon-picker/src/icon-picker.js +650 -0
  285. package/lib/icon-picker/src/icon-picker.min.js +1 -0
  286. package/lib/icon-picker/style/index.js +1 -0
  287. package/lib/icon-picker/style/style.css +207 -0
  288. package/lib/icon-picker/style/style.min.css +1 -0
  289. package/lib/image/src/preview.js +1 -2
  290. package/lib/image/src/preview.min.js +1 -1
  291. package/lib/index.umd.js +23171 -8764
  292. package/lib/index.umd.min.js +1 -1
  293. package/lib/input/index.js +19 -0
  294. package/lib/input/index.min.js +1 -0
  295. package/lib/input/src/input.js +2901 -0
  296. package/lib/input/src/input.min.js +1 -0
  297. package/lib/input/style/index.js +1 -0
  298. package/lib/input/style/style.css +941 -0
  299. package/lib/input/style/style.min.css +1 -0
  300. package/lib/layout-footer/src/layout-footer.js +2 -1
  301. package/lib/layout-header/src/layout-header.js +2 -1
  302. package/lib/list/index.js +19 -0
  303. package/lib/list/index.min.js +1 -0
  304. package/lib/list/src/list.js +415 -0
  305. package/lib/list/src/list.min.js +1 -0
  306. package/lib/list/style/index.js +1 -0
  307. package/lib/list/style/style.css +28 -0
  308. package/lib/list/style/style.min.css +1 -0
  309. package/lib/loading/src/loading.js +5 -0
  310. package/lib/loading/src/loading.min.js +1 -1
  311. package/lib/menu/src/menu.js +6 -2
  312. package/lib/menu/src/menu.min.js +1 -1
  313. package/lib/modal/src/modal.js +7 -4
  314. package/lib/modal/src/modal.min.js +1 -1
  315. package/lib/number-input/src/number-input.js +11 -7
  316. package/lib/number-input/src/number-input.min.js +1 -1
  317. package/lib/optgroup/index.js +19 -0
  318. package/lib/optgroup/index.min.js +1 -0
  319. package/lib/optgroup/style/index.js +1 -0
  320. package/lib/optgroup/style/style.css +0 -0
  321. package/lib/optgroup/style/style.min.css +0 -0
  322. package/lib/option/index.js +19 -0
  323. package/lib/option/index.min.js +1 -0
  324. package/lib/option/style/index.js +1 -0
  325. package/lib/option/style/style.css +0 -0
  326. package/lib/option/style/style.min.css +0 -0
  327. package/lib/pager/index.js +19 -0
  328. package/lib/pager/index.min.js +1 -0
  329. package/lib/pager/src/pager.js +714 -0
  330. package/lib/pager/src/pager.min.js +1 -0
  331. package/lib/pager/style/index.js +1 -0
  332. package/lib/pager/style/style.css +303 -0
  333. package/lib/pager/style/style.min.css +1 -0
  334. package/lib/password-input/index.js +19 -0
  335. package/lib/password-input/index.min.js +1 -0
  336. package/lib/password-input/src/password-input.js +402 -0
  337. package/lib/password-input/src/password-input.min.js +1 -0
  338. package/lib/password-input/style/index.js +1 -0
  339. package/lib/password-input/style/style.css +604 -0
  340. package/lib/password-input/style/style.min.css +1 -0
  341. package/lib/pulldown/src/pulldown.js +11 -3
  342. package/lib/pulldown/src/pulldown.min.js +1 -1
  343. package/lib/radio/src/button.js +6 -2
  344. package/lib/radio/src/button.min.js +1 -1
  345. package/lib/radio/src/group.js +6 -2
  346. package/lib/radio/src/group.min.js +1 -1
  347. package/lib/radio/src/radio.js +6 -2
  348. package/lib/radio/src/radio.min.js +1 -1
  349. package/lib/select/index.js +19 -0
  350. package/lib/select/index.min.js +1 -0
  351. package/lib/select/src/optgroup.js +97 -0
  352. package/lib/select/src/optgroup.min.js +1 -0
  353. package/lib/select/src/option-info.js +33 -0
  354. package/lib/select/src/option-info.min.js +1 -0
  355. package/lib/select/src/option.js +93 -0
  356. package/lib/select/src/option.min.js +1 -0
  357. package/lib/select/src/select.js +1330 -0
  358. package/lib/select/src/select.min.js +1 -0
  359. package/lib/select/src/util.js +51 -0
  360. package/lib/select/src/util.min.js +1 -0
  361. package/lib/select/style/index.js +1 -0
  362. package/lib/select/style/style.css +207 -0
  363. package/lib/select/style/style.min.css +1 -0
  364. package/lib/style.css +1 -1
  365. package/lib/style.min.css +1 -1
  366. package/lib/switch/src/switch.js +6 -2
  367. package/lib/switch/src/switch.min.js +1 -1
  368. package/lib/tab-pane/index.js +19 -0
  369. package/lib/tab-pane/index.min.js +1 -0
  370. package/lib/tab-pane/style/index.js +1 -0
  371. package/lib/tab-pane/style/style.css +0 -0
  372. package/lib/tab-pane/style/style.min.css +0 -0
  373. package/lib/tabs/index.js +19 -0
  374. package/lib/tabs/index.min.js +1 -0
  375. package/lib/tabs/src/tab-pane.js +128 -0
  376. package/lib/tabs/src/tab-pane.min.js +1 -0
  377. package/lib/tabs/src/tabs.js +635 -0
  378. package/lib/tabs/src/tabs.min.js +1 -0
  379. package/lib/tabs/src/util.js +29 -0
  380. package/lib/tabs/src/util.min.js +1 -0
  381. package/lib/tabs/style/index.js +1 -0
  382. package/lib/tabs/style/style.css +342 -0
  383. package/lib/tabs/style/style.min.css +1 -0
  384. package/lib/textarea/src/textarea.js +9 -5
  385. package/lib/textarea/src/textarea.min.js +1 -1
  386. package/lib/tooltip/src/tooltip.js +6 -1
  387. package/lib/tooltip/src/tooltip.min.js +1 -1
  388. package/lib/tree/index.js +19 -0
  389. package/lib/tree/index.min.js +1 -0
  390. package/lib/tree/src/tree.js +1324 -0
  391. package/lib/tree/src/tree.min.js +1 -0
  392. package/lib/tree/style/index.js +1 -0
  393. package/lib/tree/style/style.css +219 -0
  394. package/lib/tree/style/style.min.css +1 -0
  395. package/lib/tree-select/index.js +19 -0
  396. package/lib/tree-select/index.min.js +1 -0
  397. package/lib/tree-select/src/tree-select.js +695 -0
  398. package/lib/tree-select/src/tree-select.min.js +1 -0
  399. package/lib/tree-select/style/index.js +1 -0
  400. package/lib/tree-select/style/style.css +129 -0
  401. package/lib/tree-select/style/style.min.css +1 -0
  402. package/lib/ui/index.js +1 -1
  403. package/lib/ui/index.min.js +1 -1
  404. package/lib/ui/src/log.js +1 -1
  405. package/lib/ui/src/log.min.js +1 -1
  406. package/lib/ui/src/vn.js +1 -1
  407. package/lib/ui/src/vn.min.js +1 -1
  408. package/lib/upload/src/upload.js +9 -5
  409. package/lib/upload/src/upload.min.js +1 -1
  410. package/lib/vxe-calendar/index.js +23 -0
  411. package/lib/vxe-calendar/index.min.js +1 -0
  412. package/lib/vxe-calendar/style/index.js +1 -0
  413. package/lib/vxe-calendar/style/style.css +247 -0
  414. package/lib/vxe-calendar/style/style.min.css +1 -0
  415. package/lib/vxe-carousel/index.js +23 -0
  416. package/lib/vxe-carousel/index.min.js +1 -0
  417. package/lib/vxe-carousel/style/index.js +1 -0
  418. package/lib/vxe-carousel/style/style.css +185 -0
  419. package/lib/vxe-carousel/style/style.min.css +1 -0
  420. package/lib/vxe-carousel-item/index.js +23 -0
  421. package/lib/vxe-carousel-item/index.min.js +1 -0
  422. package/lib/vxe-carousel-item/style/index.js +1 -0
  423. package/lib/vxe-carousel-item/style/style.css +0 -0
  424. package/lib/vxe-carousel-item/style/style.min.css +0 -0
  425. package/lib/vxe-checkbox/index.js +23 -0
  426. package/lib/vxe-checkbox/index.min.js +1 -0
  427. package/lib/vxe-checkbox/style/index.js +1 -0
  428. package/lib/vxe-checkbox/style/style.css +117 -0
  429. package/lib/vxe-checkbox/style/style.min.css +1 -0
  430. package/lib/vxe-checkbox-group/index.js +23 -0
  431. package/lib/vxe-checkbox-group/index.min.js +1 -0
  432. package/lib/vxe-checkbox-group/style/index.js +1 -0
  433. package/lib/vxe-checkbox-group/style/style.css +0 -0
  434. package/lib/vxe-checkbox-group/style/style.min.css +0 -0
  435. package/lib/vxe-collapse/index.js +23 -0
  436. package/lib/vxe-collapse/index.min.js +1 -0
  437. package/lib/vxe-collapse/style/index.js +1 -0
  438. package/lib/vxe-collapse/style/style.css +0 -0
  439. package/lib/vxe-collapse/style/style.min.css +0 -0
  440. package/lib/vxe-collapse-pane/index.js +23 -0
  441. package/lib/vxe-collapse-pane/index.min.js +1 -0
  442. package/lib/vxe-collapse-pane/style/index.js +1 -0
  443. package/lib/vxe-collapse-pane/style/style.css +0 -0
  444. package/lib/vxe-collapse-pane/style/style.min.css +0 -0
  445. package/lib/vxe-form/index.js +23 -0
  446. package/lib/vxe-form/index.min.js +1 -0
  447. package/lib/vxe-form/style/index.js +1 -0
  448. package/lib/vxe-form/style/style.css +470 -0
  449. package/lib/vxe-form/style/style.min.css +1 -0
  450. package/lib/vxe-form-gather/index.js +23 -0
  451. package/lib/vxe-form-gather/index.min.js +1 -0
  452. package/lib/vxe-form-gather/style/index.js +1 -0
  453. package/lib/vxe-form-gather/style/style.css +0 -0
  454. package/lib/vxe-form-gather/style/style.min.css +0 -0
  455. package/lib/vxe-form-item/index.js +23 -0
  456. package/lib/vxe-form-item/index.min.js +1 -0
  457. package/lib/vxe-form-item/style/index.js +1 -0
  458. package/lib/vxe-form-item/style/style.css +0 -0
  459. package/lib/vxe-form-item/style/style.min.css +0 -0
  460. package/lib/vxe-icon-picker/index.js +23 -0
  461. package/lib/vxe-icon-picker/index.min.js +1 -0
  462. package/lib/vxe-icon-picker/style/index.js +1 -0
  463. package/lib/vxe-icon-picker/style/style.css +207 -0
  464. package/lib/vxe-icon-picker/style/style.min.css +1 -0
  465. package/lib/vxe-input/index.js +23 -0
  466. package/lib/vxe-input/index.min.js +1 -0
  467. package/lib/vxe-input/style/index.js +1 -0
  468. package/lib/vxe-input/style/style.css +941 -0
  469. package/lib/vxe-input/style/style.min.css +1 -0
  470. package/lib/vxe-list/index.js +23 -0
  471. package/lib/vxe-list/index.min.js +1 -0
  472. package/lib/vxe-list/style/index.js +1 -0
  473. package/lib/vxe-list/style/style.css +28 -0
  474. package/lib/vxe-list/style/style.min.css +1 -0
  475. package/lib/vxe-optgroup/index.js +23 -0
  476. package/lib/vxe-optgroup/index.min.js +1 -0
  477. package/lib/vxe-optgroup/style/index.js +1 -0
  478. package/lib/vxe-optgroup/style/style.css +0 -0
  479. package/lib/vxe-optgroup/style/style.min.css +0 -0
  480. package/lib/vxe-option/index.js +23 -0
  481. package/lib/vxe-option/index.min.js +1 -0
  482. package/lib/vxe-option/style/index.js +1 -0
  483. package/lib/vxe-option/style/style.css +0 -0
  484. package/lib/vxe-option/style/style.min.css +0 -0
  485. package/lib/vxe-pager/index.js +23 -0
  486. package/lib/vxe-pager/index.min.js +1 -0
  487. package/lib/vxe-pager/style/index.js +1 -0
  488. package/lib/vxe-pager/style/style.css +303 -0
  489. package/lib/vxe-pager/style/style.min.css +1 -0
  490. package/lib/vxe-password-input/index.js +23 -0
  491. package/lib/vxe-password-input/index.min.js +1 -0
  492. package/lib/vxe-password-input/style/index.js +1 -0
  493. package/lib/vxe-password-input/style/style.css +604 -0
  494. package/lib/vxe-password-input/style/style.min.css +1 -0
  495. package/lib/vxe-select/index.js +23 -0
  496. package/lib/vxe-select/index.min.js +1 -0
  497. package/lib/vxe-select/style/index.js +1 -0
  498. package/lib/vxe-select/style/style.css +207 -0
  499. package/lib/vxe-select/style/style.min.css +1 -0
  500. package/lib/vxe-tab-pane/index.js +23 -0
  501. package/lib/vxe-tab-pane/index.min.js +1 -0
  502. package/lib/vxe-tab-pane/style/index.js +1 -0
  503. package/lib/vxe-tab-pane/style/style.css +0 -0
  504. package/lib/vxe-tab-pane/style/style.min.css +0 -0
  505. package/lib/vxe-tabs/index.js +23 -0
  506. package/lib/vxe-tabs/index.min.js +1 -0
  507. package/lib/vxe-tabs/style/index.js +1 -0
  508. package/lib/vxe-tabs/style/style.css +342 -0
  509. package/lib/vxe-tabs/style/style.min.css +1 -0
  510. package/lib/vxe-tree/index.js +23 -0
  511. package/lib/vxe-tree/index.min.js +1 -0
  512. package/lib/vxe-tree/style/index.js +1 -0
  513. package/lib/vxe-tree/style/style.css +219 -0
  514. package/lib/vxe-tree/style/style.min.css +1 -0
  515. package/lib/vxe-tree-select/index.js +23 -0
  516. package/lib/vxe-tree-select/index.min.js +1 -0
  517. package/lib/vxe-tree-select/style/index.js +1 -0
  518. package/lib/vxe-tree-select/style/style.css +129 -0
  519. package/lib/vxe-tree-select/style/style.min.css +1 -0
  520. package/package.json +1 -1
  521. package/packages/button/src/button.ts +3 -0
  522. package/packages/calendar/index.ts +16 -0
  523. package/packages/calendar/src/calendar.ts +1281 -0
  524. package/packages/carousel/index.ts +16 -0
  525. package/packages/carousel/src/carousel-item.ts +114 -0
  526. package/packages/carousel/src/carousel.ts +449 -0
  527. package/packages/carousel/src/util.ts +21 -0
  528. package/packages/carousel-item/index.ts +16 -0
  529. package/packages/checkbox/index.ts +16 -0
  530. package/packages/checkbox/src/checkbox.ts +182 -0
  531. package/packages/checkbox/src/group.ts +184 -0
  532. package/packages/checkbox-group/index.ts +16 -0
  533. package/packages/collapse/index.ts +16 -0
  534. package/packages/collapse/src/collapse-pane.ts +47 -0
  535. package/packages/collapse/src/collapse.ts +47 -0
  536. package/packages/collapse-pane/index.ts +16 -0
  537. package/packages/components.ts +66 -66
  538. package/packages/date-picker/src/date-picker.ts +21 -13
  539. package/packages/drawer/src/drawer.ts +18 -12
  540. package/packages/form/index.ts +17 -0
  541. package/packages/form/render/index.ts +499 -0
  542. package/packages/form/src/form-config-item.ts +219 -0
  543. package/packages/form/src/form-gather.ts +104 -0
  544. package/packages/form/src/form-item.ts +322 -0
  545. package/packages/form/src/form.ts +809 -0
  546. package/packages/form/src/itemInfo.ts +47 -0
  547. package/packages/form/src/render.ts +98 -0
  548. package/packages/form/src/util.ts +80 -0
  549. package/packages/form-gather/index.ts +16 -0
  550. package/packages/form-item/index.ts +16 -0
  551. package/packages/icon-picker/index.ts +16 -0
  552. package/packages/icon-picker/src/icon-picker.ts +716 -0
  553. package/packages/image/src/preview.ts +1 -2
  554. package/packages/input/index.ts +16 -0
  555. package/packages/input/src/input.ts +3000 -0
  556. package/packages/layout-footer/src/layout-footer.ts +5 -3
  557. package/packages/layout-header/src/layout-header.ts +2 -1
  558. package/packages/list/index.ts +16 -0
  559. package/packages/list/src/list.ts +403 -0
  560. package/packages/loading/src/loading.ts +6 -0
  561. package/packages/menu/src/menu.ts +7 -2
  562. package/packages/modal/src/modal.ts +8 -4
  563. package/packages/number-input/src/number-input.ts +12 -7
  564. package/packages/optgroup/index.ts +16 -0
  565. package/packages/option/index.ts +16 -0
  566. package/packages/pager/index.ts +16 -0
  567. package/packages/pager/src/pager.ts +743 -0
  568. package/packages/password-input/index.ts +16 -0
  569. package/packages/password-input/src/password-input.ts +432 -0
  570. package/packages/pulldown/src/pulldown.ts +12 -3
  571. package/packages/radio/src/button.ts +7 -2
  572. package/packages/radio/src/group.ts +7 -2
  573. package/packages/radio/src/radio.ts +7 -2
  574. package/packages/select/index.ts +16 -0
  575. package/packages/select/src/optgroup.ts +107 -0
  576. package/packages/select/src/option-info.ts +20 -0
  577. package/packages/select/src/option.ts +103 -0
  578. package/packages/select/src/select.ts +1341 -0
  579. package/packages/select/src/util.ts +47 -0
  580. package/packages/switch/src/switch.ts +7 -2
  581. package/packages/tab-pane/index.ts +16 -0
  582. package/packages/tabs/index.ts +16 -0
  583. package/packages/tabs/src/tab-pane.ts +136 -0
  584. package/packages/tabs/src/tabs.ts +636 -0
  585. package/packages/tabs/src/util.ts +21 -0
  586. package/packages/textarea/src/textarea.ts +10 -5
  587. package/packages/tooltip/src/tooltip.ts +7 -1
  588. package/packages/tree/index.ts +16 -0
  589. package/packages/tree/src/tree.ts +1292 -0
  590. package/packages/tree-select/index.ts +16 -0
  591. package/packages/tree-select/src/tree-select.ts +743 -0
  592. package/packages/ui/src/vn.ts +1 -1
  593. package/packages/upload/src/upload.ts +10 -5
  594. package/types/components/calendar.d.ts +6 -0
  595. package/types/components/carousel.d.ts +5 -0
  596. package/types/components/colgroup.d.ts +1 -0
  597. package/types/components/column.d.ts +1 -0
  598. package/types/components/drawer.d.ts +11 -10
  599. package/types/components/form-item.d.ts +1 -1
  600. package/types/components/form.d.ts +8 -1
  601. package/types/components/icon-picker.d.ts +4 -0
  602. package/types/components/input.d.ts +9 -1
  603. package/types/components/list.d.ts +1 -0
  604. package/types/components/optgroup.d.ts +10 -4
  605. package/types/components/table.d.ts +43 -4
  606. package/types/components/tabs.d.ts +4 -0
  607. package/types/components/toolbar.d.ts +5 -0
  608. package/types/components/tree-select.d.ts +4 -0
  609. package/types/ui/index.d.ts +0 -5
  610. package/types/ui/renderer.d.ts +37 -36
  611. package/types/handles/form-design.d.ts +0 -4
  612. package/types/handles/index.d.ts +0 -3
  613. package/types/handles/list-design.d.ts +0 -4
  614. package/types/handles/table.d.ts +0 -4
  615. /package/es/icon/style/{iconfont.1725630285930.ttf → iconfont.1725869586078.ttf} +0 -0
  616. /package/es/icon/style/{iconfont.1725630285930.woff → iconfont.1725869586078.woff} +0 -0
  617. /package/es/icon/style/{iconfont.1725630285930.woff2 → iconfont.1725869586078.woff2} +0 -0
  618. /package/es/{iconfont.1725630285930.ttf → iconfont.1725869586078.ttf} +0 -0
  619. /package/es/{iconfont.1725630285930.woff → iconfont.1725869586078.woff} +0 -0
  620. /package/es/{iconfont.1725630285930.woff2 → iconfont.1725869586078.woff2} +0 -0
  621. /package/lib/icon/style/{iconfont.1725630285930.ttf → iconfont.1725869586078.ttf} +0 -0
  622. /package/lib/icon/style/{iconfont.1725630285930.woff → iconfont.1725869586078.woff} +0 -0
  623. /package/lib/icon/style/{iconfont.1725630285930.woff2 → iconfont.1725869586078.woff2} +0 -0
  624. /package/lib/{iconfont.1725630285930.ttf → iconfont.1725869586078.ttf} +0 -0
  625. /package/lib/{iconfont.1725630285930.woff → iconfont.1725869586078.woff} +0 -0
  626. /package/lib/{iconfont.1725630285930.woff2 → iconfont.1725869586078.woff2} +0 -0
@@ -0,0 +1,650 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _comp = require("../../ui/src/comp");
8
+ var _xeUtils = _interopRequireDefault(require("xe-utils"));
9
+ var _ui = require("../../ui");
10
+ var _dom = require("../../ui/src/dom");
11
+ var _utils = require("../../ui/src/utils");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
+ var _default2 = exports.default = (0, _comp.defineVxeComponent)({
18
+ name: 'VxeIconPicker',
19
+ mixins: [_ui.globalMixins.sizeMixin],
20
+ model: {
21
+ prop: 'value',
22
+ event: 'modelValue'
23
+ },
24
+ props: {
25
+ value: String,
26
+ placeholder: String,
27
+ clearable: Boolean,
28
+ size: {
29
+ type: String,
30
+ default: function _default() {
31
+ return (0, _ui.getConfig)().iconPicker.size || (0, _ui.getConfig)().size;
32
+ }
33
+ },
34
+ className: [String, Function],
35
+ popupClassName: [String, Function],
36
+ showIconTitle: {
37
+ type: Boolean,
38
+ default: function _default() {
39
+ return (0, _ui.getConfig)().iconPicker.showIconTitle;
40
+ }
41
+ },
42
+ readonly: {
43
+ type: Boolean,
44
+ default: null
45
+ },
46
+ disabled: {
47
+ type: Boolean,
48
+ default: null
49
+ },
50
+ icons: Array,
51
+ placement: String,
52
+ transfer: {
53
+ type: Boolean,
54
+ default: null
55
+ }
56
+ },
57
+ inject: {
58
+ $xeModal: {
59
+ default: null
60
+ },
61
+ $xeDrawer: {
62
+ default: null
63
+ },
64
+ $xeTable: {
65
+ default: null
66
+ },
67
+ $xeForm: {
68
+ default: null
69
+ },
70
+ formItemInfo: {
71
+ from: 'xeFormItemInfo',
72
+ default: null
73
+ }
74
+ },
75
+ provide: function provide() {
76
+ var $xeIconPicker = this;
77
+ return {
78
+ $xeIconPicker: $xeIconPicker
79
+ };
80
+ },
81
+ data: function data() {
82
+ var reactData = {
83
+ initialized: false,
84
+ selectIcon: '',
85
+ panelIndex: 0,
86
+ panelStyle: {},
87
+ panelPlacement: null,
88
+ visiblePanel: false,
89
+ isAniVisible: false,
90
+ isActivated: false
91
+ };
92
+ var internalData = {
93
+ hpTimeout: undefined
94
+ };
95
+ return {
96
+ xID: _xeUtils.default.uniqueId(),
97
+ reactData: reactData,
98
+ internalData: internalData
99
+ };
100
+ },
101
+ computed: Object.assign(Object.assign({}, {}), {
102
+ computeFormReadonly: function computeFormReadonly() {
103
+ var $xeIconPicker = this;
104
+ var props = $xeIconPicker;
105
+ var $xeForm = $xeIconPicker.$xeForm;
106
+ var readonly = props.readonly;
107
+ if (readonly === null) {
108
+ if ($xeForm) {
109
+ return $xeForm.readonly;
110
+ }
111
+ return false;
112
+ }
113
+ return readonly;
114
+ },
115
+ computeIsDisabled: function computeIsDisabled() {
116
+ var $xeIconPicker = this;
117
+ var props = $xeIconPicker;
118
+ var $xeForm = $xeIconPicker.$xeForm;
119
+ var disabled = props.disabled;
120
+ if (disabled === null) {
121
+ if ($xeForm) {
122
+ return $xeForm.disabled;
123
+ }
124
+ return false;
125
+ }
126
+ return disabled;
127
+ },
128
+ computeBtnTransfer: function computeBtnTransfer() {
129
+ var $xeIconPicker = this;
130
+ var props = $xeIconPicker;
131
+ var $xeTable = $xeIconPicker.$xeTable;
132
+ var $xeModal = $xeIconPicker.$xeModal;
133
+ var $xeDrawer = $xeIconPicker.$xeDrawer;
134
+ var $xeForm = $xeIconPicker.$xeForm;
135
+ var transfer = props.transfer;
136
+ if (transfer === null) {
137
+ var globalTransfer = (0, _ui.getConfig)().iconPicker.transfer;
138
+ if (_xeUtils.default.isBoolean(globalTransfer)) {
139
+ return globalTransfer;
140
+ }
141
+ if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
142
+ return true;
143
+ }
144
+ }
145
+ return transfer;
146
+ },
147
+ computeInpPlaceholder: function computeInpPlaceholder() {
148
+ var $xeIconPicker = this;
149
+ var props = $xeIconPicker;
150
+ var placeholder = props.placeholder;
151
+ if (placeholder) {
152
+ return (0, _utils.getFuncText)(placeholder);
153
+ }
154
+ var globalPlaceholder = (0, _ui.getConfig)().select.placeholder;
155
+ if (globalPlaceholder) {
156
+ return (0, _utils.getFuncText)(globalPlaceholder);
157
+ }
158
+ return (0, _ui.getI18n)('vxe.base.pleaseSelect');
159
+ },
160
+ computeIconList: function computeIconList() {
161
+ var $xeIconPicker = this;
162
+ var props = $xeIconPicker;
163
+ var icons = props.icons;
164
+ if (!icons || !icons.length) {
165
+ icons = (0, _ui.getConfig)().iconPicker.icons || [];
166
+ }
167
+ return icons.map(function (name) {
168
+ return {
169
+ title: name,
170
+ icon: "vxe-icon-".concat(name)
171
+ };
172
+ });
173
+ },
174
+ computeIconGroupList: function computeIconGroupList() {
175
+ var $xeIconPicker = this;
176
+ var iconList = $xeIconPicker.computeIconList;
177
+ return _xeUtils.default.chunk(iconList, 4);
178
+ }
179
+ }),
180
+ methods: {
181
+ //
182
+ // Method
183
+ //
184
+ dispatchEvent: function dispatchEvent(type, params, evnt) {
185
+ var $xeIconPicker = this;
186
+ $xeIconPicker.$emit(type, (0, _ui.createEvent)(evnt, {
187
+ $iconPicker: $xeIconPicker
188
+ }, params));
189
+ },
190
+ emitModel: function emitModel(value) {
191
+ var $xeDrawer = this;
192
+ $xeDrawer.$emit('modelValue', value);
193
+ },
194
+ isPanelVisible: function isPanelVisible() {
195
+ var $xeIconPicker = this;
196
+ var reactData = $xeIconPicker.reactData;
197
+ return reactData.visiblePanel;
198
+ },
199
+ togglePanel: function togglePanel() {
200
+ var $xeIconPicker = this;
201
+ var reactData = $xeIconPicker.reactData;
202
+ if (reactData.visiblePanel) {
203
+ $xeIconPicker.hideOptionPanel();
204
+ } else {
205
+ $xeIconPicker.showOptionPanel();
206
+ }
207
+ return $xeIconPicker.$nextTick();
208
+ },
209
+ hidePanel: function hidePanel() {
210
+ var $xeIconPicker = this;
211
+ var reactData = $xeIconPicker.reactData;
212
+ if (reactData.visiblePanel) {
213
+ $xeIconPicker.hideOptionPanel();
214
+ }
215
+ return $xeIconPicker.$nextTick();
216
+ },
217
+ showPanel: function showPanel() {
218
+ var $xeIconPicker = this;
219
+ var reactData = $xeIconPicker.reactData;
220
+ if (!reactData.visiblePanel) {
221
+ $xeIconPicker.showOptionPanel();
222
+ }
223
+ return $xeIconPicker.$nextTick();
224
+ },
225
+ focus: function focus() {
226
+ var $xeIconPicker = this;
227
+ var reactData = $xeIconPicker.reactData;
228
+ var $input = $xeIconPicker.$refs.refInput;
229
+ reactData.isActivated = true;
230
+ $input.blur();
231
+ return $xeIconPicker.$nextTick();
232
+ },
233
+ blur: function blur() {
234
+ var $xeIconPicker = this;
235
+ var reactData = $xeIconPicker.reactData;
236
+ var $input = $xeIconPicker.$refs.refInput;
237
+ $input.blur();
238
+ reactData.isActivated = false;
239
+ return $xeIconPicker.$nextTick();
240
+ },
241
+ updateZindex: function updateZindex() {
242
+ var $xeIconPicker = this;
243
+ var reactData = $xeIconPicker.reactData;
244
+ if (reactData.panelIndex < (0, _utils.getLastZIndex)()) {
245
+ reactData.panelIndex = (0, _utils.nextZIndex)();
246
+ }
247
+ },
248
+ updatePlacement: function updatePlacement() {
249
+ var $xeIconPicker = this;
250
+ var props = $xeIconPicker;
251
+ var reactData = $xeIconPicker.reactData;
252
+ return $xeIconPicker.$nextTick().then(function () {
253
+ var placement = props.placement;
254
+ var panelIndex = reactData.panelIndex;
255
+ var el = $xeIconPicker.$refs.refElem;
256
+ var panelElem = $xeIconPicker.$refs.refOptionPanel;
257
+ var btnTransfer = $xeIconPicker.computeBtnTransfer;
258
+ if (panelElem && el) {
259
+ var targetHeight = el.offsetHeight;
260
+ var targetWidth = el.offsetWidth;
261
+ var panelHeight = panelElem.offsetHeight;
262
+ var panelWidth = panelElem.offsetWidth;
263
+ var marginSize = 5;
264
+ var panelStyle = {
265
+ zIndex: panelIndex
266
+ };
267
+ var _getAbsolutePos = (0, _dom.getAbsolutePos)(el),
268
+ boundingTop = _getAbsolutePos.boundingTop,
269
+ boundingLeft = _getAbsolutePos.boundingLeft,
270
+ visibleHeight = _getAbsolutePos.visibleHeight,
271
+ visibleWidth = _getAbsolutePos.visibleWidth;
272
+ var panelPlacement = 'bottom';
273
+ if (btnTransfer) {
274
+ var left = boundingLeft;
275
+ var top = boundingTop + targetHeight;
276
+ if (placement === 'top') {
277
+ panelPlacement = 'top';
278
+ top = boundingTop - panelHeight;
279
+ } else if (!placement) {
280
+ // 如果下面不够放,则向上
281
+ if (top + panelHeight + marginSize > visibleHeight) {
282
+ panelPlacement = 'top';
283
+ top = boundingTop - panelHeight;
284
+ }
285
+ // 如果上面不够放,则向下(优先)
286
+ if (top < marginSize) {
287
+ panelPlacement = 'bottom';
288
+ top = boundingTop + targetHeight;
289
+ }
290
+ }
291
+ // 如果溢出右边
292
+ if (left + panelWidth + marginSize > visibleWidth) {
293
+ left -= left + panelWidth + marginSize - visibleWidth;
294
+ }
295
+ // 如果溢出左边
296
+ if (left < marginSize) {
297
+ left = marginSize;
298
+ }
299
+ Object.assign(panelStyle, {
300
+ left: "".concat(left, "px"),
301
+ top: "".concat(top, "px"),
302
+ minWidth: "".concat(targetWidth, "px")
303
+ });
304
+ } else {
305
+ if (placement === 'top') {
306
+ panelPlacement = 'top';
307
+ panelStyle.bottom = "".concat(targetHeight, "px");
308
+ } else if (!placement) {
309
+ // 如果下面不够放,则向上
310
+ if (boundingTop + targetHeight + panelHeight > visibleHeight) {
311
+ // 如果上面不够放,则向下(优先)
312
+ if (boundingTop - targetHeight - panelHeight > marginSize) {
313
+ panelPlacement = 'top';
314
+ panelStyle.bottom = "".concat(targetHeight, "px");
315
+ }
316
+ }
317
+ }
318
+ }
319
+ reactData.panelStyle = panelStyle;
320
+ reactData.panelPlacement = panelPlacement;
321
+ return $xeIconPicker.$nextTick();
322
+ }
323
+ });
324
+ },
325
+ showOptionPanel: function showOptionPanel() {
326
+ var $xeIconPicker = this;
327
+ var reactData = $xeIconPicker.reactData;
328
+ var internalData = $xeIconPicker.internalData;
329
+ var hpTimeout = internalData.hpTimeout;
330
+ var isDisabled = $xeIconPicker.computeIsDisabled;
331
+ if (!isDisabled) {
332
+ if (hpTimeout) {
333
+ clearTimeout(hpTimeout);
334
+ internalData.hpTimeout = undefined;
335
+ }
336
+ var btnTransfer = $xeIconPicker.computeBtnTransfer;
337
+ var panelElem = $xeIconPicker.$refs.refOptionPanel;
338
+ if (!reactData.initialized) {
339
+ reactData.initialized = true;
340
+ if (btnTransfer) {
341
+ if (panelElem) {
342
+ document.body.appendChild(panelElem);
343
+ }
344
+ }
345
+ }
346
+ reactData.isActivated = true;
347
+ reactData.isAniVisible = true;
348
+ setTimeout(function () {
349
+ reactData.visiblePanel = true;
350
+ }, 10);
351
+ $xeIconPicker.updateZindex();
352
+ $xeIconPicker.updatePlacement();
353
+ }
354
+ },
355
+ hideOptionPanel: function hideOptionPanel() {
356
+ var $xeIconPicker = this;
357
+ var reactData = $xeIconPicker.reactData;
358
+ var internalData = $xeIconPicker.internalData;
359
+ reactData.visiblePanel = false;
360
+ internalData.hpTimeout = window.setTimeout(function () {
361
+ reactData.isAniVisible = false;
362
+ }, 350);
363
+ },
364
+ changeEvent: function changeEvent(evnt, selectValue) {
365
+ var $xeIconPicker = this;
366
+ var props = $xeIconPicker;
367
+ var reactData = $xeIconPicker.reactData;
368
+ var $xeForm = $xeIconPicker.$xeForm;
369
+ var formItemInfo = $xeIconPicker.formItemInfo;
370
+ reactData.selectIcon = selectValue;
371
+ if (selectValue !== props.value) {
372
+ $xeIconPicker.emitModel(selectValue);
373
+ $xeIconPicker.dispatchEvent('change', {
374
+ value: selectValue
375
+ }, evnt);
376
+ // 自动更新校验状态
377
+ if ($xeForm && formItemInfo) {
378
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
379
+ }
380
+ }
381
+ },
382
+ focusEvent: function focusEvent() {
383
+ var $xeIconPicker = this;
384
+ var reactData = $xeIconPicker.reactData;
385
+ var isDisabled = $xeIconPicker.computeIsDisabled;
386
+ if (!isDisabled) {
387
+ if (!reactData.visiblePanel) {
388
+ $xeIconPicker.showOptionPanel();
389
+ }
390
+ }
391
+ },
392
+ blurEvent: function blurEvent() {
393
+ var $xeIconPicker = this;
394
+ var reactData = $xeIconPicker.reactData;
395
+ reactData.isActivated = false;
396
+ },
397
+ clearValueEvent: function clearValueEvent(evnt, selectValue) {
398
+ var $xeIconPicker = this;
399
+ $xeIconPicker.changeEvent(evnt, selectValue);
400
+ $xeIconPicker.dispatchEvent('clear', {
401
+ value: selectValue
402
+ }, evnt);
403
+ },
404
+ clearEvent: function clearEvent(params, evnt) {
405
+ var $xeIconPicker = this;
406
+ $xeIconPicker.clearValueEvent(evnt, null);
407
+ $xeIconPicker.hideOptionPanel();
408
+ },
409
+ togglePanelEvent: function togglePanelEvent(evnt) {
410
+ var $xeIconPicker = this;
411
+ var reactData = $xeIconPicker.reactData;
412
+ evnt.preventDefault();
413
+ if (reactData.visiblePanel) {
414
+ $xeIconPicker.hideOptionPanel();
415
+ } else {
416
+ $xeIconPicker.showOptionPanel();
417
+ }
418
+ },
419
+ clickEvent: function clickEvent(evnt) {
420
+ var $xeIconPicker = this;
421
+ $xeIconPicker.togglePanelEvent(evnt);
422
+ $xeIconPicker.dispatchEvent('click', {}, evnt);
423
+ },
424
+ handleGlobalMousewheelEvent: function handleGlobalMousewheelEvent(evnt) {
425
+ var $xeIconPicker = this;
426
+ var reactData = $xeIconPicker.reactData;
427
+ var visiblePanel = reactData.visiblePanel;
428
+ var isDisabled = $xeIconPicker.computeIsDisabled;
429
+ if (!isDisabled) {
430
+ if (visiblePanel) {
431
+ var panelElem = $xeIconPicker.$refs.refOptionPanel;
432
+ if ((0, _dom.getEventTargetNode)(evnt, panelElem).flag) {
433
+ $xeIconPicker.updatePlacement();
434
+ } else {
435
+ $xeIconPicker.hideOptionPanel();
436
+ }
437
+ }
438
+ }
439
+ },
440
+ handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
441
+ var $xeIconPicker = this;
442
+ var reactData = $xeIconPicker.reactData;
443
+ var visiblePanel = reactData.visiblePanel;
444
+ var isDisabled = $xeIconPicker.computeIsDisabled;
445
+ if (!isDisabled) {
446
+ var el = $xeIconPicker.$refs.refElem;
447
+ var panelElem = $xeIconPicker.$refs.refOptionPanel;
448
+ reactData.isActivated = (0, _dom.getEventTargetNode)(evnt, el).flag || (0, _dom.getEventTargetNode)(evnt, panelElem).flag;
449
+ if (visiblePanel && !reactData.isActivated) {
450
+ $xeIconPicker.hideOptionPanel();
451
+ }
452
+ }
453
+ },
454
+ handleGlobalKeydownEvent: function handleGlobalKeydownEvent(evnt) {
455
+ var $xeIconPicker = this;
456
+ var props = $xeIconPicker;
457
+ var reactData = $xeIconPicker.reactData;
458
+ var clearable = props.clearable;
459
+ var visiblePanel = reactData.visiblePanel;
460
+ var isDisabled = $xeIconPicker.computeIsDisabled;
461
+ if (!isDisabled) {
462
+ var isTab = _ui.globalEvents.hasKey(evnt, _ui.GLOBAL_EVENT_KEYS.TAB);
463
+ var isEnter = _ui.globalEvents.hasKey(evnt, _ui.GLOBAL_EVENT_KEYS.ENTER);
464
+ var isEsc = _ui.globalEvents.hasKey(evnt, _ui.GLOBAL_EVENT_KEYS.ESCAPE);
465
+ var isUpArrow = _ui.globalEvents.hasKey(evnt, _ui.GLOBAL_EVENT_KEYS.ARROW_UP);
466
+ var isDwArrow = _ui.globalEvents.hasKey(evnt, _ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);
467
+ var isDel = _ui.globalEvents.hasKey(evnt, _ui.GLOBAL_EVENT_KEYS.DELETE);
468
+ var isSpacebar = _ui.globalEvents.hasKey(evnt, _ui.GLOBAL_EVENT_KEYS.SPACEBAR);
469
+ if (isTab) {
470
+ reactData.isActivated = false;
471
+ }
472
+ if (visiblePanel) {
473
+ if (isEsc || isTab) {
474
+ $xeIconPicker.hideOptionPanel();
475
+ } else if (isEnter) {
476
+ evnt.preventDefault();
477
+ evnt.stopPropagation();
478
+ // changeOptionEvent(evnt, currentValue, currentOption)
479
+ } else if (isUpArrow || isDwArrow) {
480
+ evnt.preventDefault();
481
+ // let { firstOption, offsetOption } = findOffsetOption(currentValue, isUpArrow)
482
+ // if (!offsetOption && !findVisibleOption(currentValue)) {
483
+ // offsetOption = firstOption
484
+ // }
485
+ // setCurrentOption(offsetOption)
486
+ // scrollToOption(offsetOption, isDwArrow)
487
+ } else if (isSpacebar) {
488
+ evnt.preventDefault();
489
+ }
490
+ } else if ((isUpArrow || isDwArrow || isEnter || isSpacebar) && reactData.isActivated) {
491
+ evnt.preventDefault();
492
+ $xeIconPicker.showOptionPanel();
493
+ }
494
+ if (reactData.isActivated) {
495
+ if (isDel && clearable) {
496
+ $xeIconPicker.clearValueEvent(evnt, null);
497
+ }
498
+ }
499
+ }
500
+ },
501
+ handleGlobalBlurEvent: function handleGlobalBlurEvent() {
502
+ var $xeIconPicker = this;
503
+ $xeIconPicker.hideOptionPanel();
504
+ },
505
+ handleClickIconEvent: function handleClickIconEvent(evnt, item) {
506
+ var $xeIconPicker = this;
507
+ var value = item.icon;
508
+ $xeIconPicker.changeEvent(evnt, value);
509
+ $xeIconPicker.hideOptionPanel();
510
+ },
511
+ //
512
+ // Render
513
+ //
514
+ renderIconWrapper: function renderIconWrapper(h) {
515
+ var $xeIconPicker = this;
516
+ var props = $xeIconPicker;
517
+ var showIconTitle = props.showIconTitle;
518
+ var iconGroupList = $xeIconPicker.computeIconGroupList;
519
+ var isDisabled = $xeIconPicker.computeIsDisabled;
520
+ return h('div', {
521
+ class: 'vxe-ico-picker--list-wrapper'
522
+ }, iconGroupList.map(function (list) {
523
+ return h('div', {
524
+ class: 'vxe-ico-picker--list'
525
+ }, list.map(function (item) {
526
+ return h('div', {
527
+ class: 'vxe-ico-picker--item',
528
+ on: {
529
+ click: function click(evnt) {
530
+ if (!isDisabled) {
531
+ $xeIconPicker.handleClickIconEvent(evnt, item);
532
+ }
533
+ }
534
+ }
535
+ }, [h('div', {
536
+ class: 'vxe-ico-picker--item-icon'
537
+ }, [h('i', {
538
+ class: item.icon || ''
539
+ })]), showIconTitle ? h('div', {
540
+ class: 'vxe-ico-picker--item-title'
541
+ }, "".concat(item.title || '')) : (0, _ui.renderEmptyElement)($xeIconPicker)]);
542
+ }));
543
+ }));
544
+ },
545
+ renderVN: function renderVN(h) {
546
+ var $xeIconPicker = this;
547
+ var props = $xeIconPicker;
548
+ var reactData = $xeIconPicker.reactData;
549
+ var className = props.className,
550
+ popupClassName = props.popupClassName,
551
+ clearable = props.clearable;
552
+ var initialized = reactData.initialized,
553
+ isActivated = reactData.isActivated,
554
+ visiblePanel = reactData.visiblePanel,
555
+ selectIcon = reactData.selectIcon;
556
+ var vSize = $xeIconPicker.computeSize;
557
+ var isDisabled = $xeIconPicker.computeIsDisabled;
558
+ var btnTransfer = $xeIconPicker.computeBtnTransfer;
559
+ var formReadonly = $xeIconPicker.computeFormReadonly;
560
+ var inpPlaceholder = $xeIconPicker.computeInpPlaceholder;
561
+ if (formReadonly) {
562
+ return h('div', {
563
+ ref: 'refElem',
564
+ class: ['vxe-ico-picker--readonly', className]
565
+ }, [h('i', {
566
+ class: selectIcon
567
+ })]);
568
+ }
569
+ return h('div', {
570
+ ref: 'refElem',
571
+ class: ['vxe-ico-picker', className ? _xeUtils.default.isFunction(className) ? className({
572
+ $iconPicker: $xeIconPicker
573
+ }) : className : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'show--clear', clearable && !isDisabled && !!selectIcon), 'is--visible', visiblePanel), 'is--disabled', isDisabled), 'is--active', isActivated)]
574
+ }, [h('div', {
575
+ class: 'vxe-ico-picker--inner',
576
+ on: {
577
+ click: $xeIconPicker.clickEvent
578
+ }
579
+ }, [h('input', {
580
+ ref: 'refInput',
581
+ class: 'vxe-ico-picker--input',
582
+ on: {
583
+ focus: $xeIconPicker.focusEvent,
584
+ blur: $xeIconPicker.blurEvent
585
+ }
586
+ }), selectIcon ? h('div', {
587
+ class: 'vxe-ico-picker--icon'
588
+ }, [h('i', {
589
+ class: selectIcon
590
+ })]) : h('div', {
591
+ class: 'vxe-ico-picker--placeholder'
592
+ }, inpPlaceholder), h('div', {
593
+ class: 'vxe-ico-picker--suffix'
594
+ }, [h('div', {
595
+ class: 'vxe-ico-picker--clear-icon',
596
+ on: {
597
+ click: $xeIconPicker.clearEvent
598
+ }
599
+ }, [h('i', {
600
+ class: (0, _ui.getIcon)().INPUT_CLEAR
601
+ })]), h('div', {
602
+ class: 'vxe-ico-picker--suffix-icon'
603
+ }, [h('i', {
604
+ class: visiblePanel ? (0, _ui.getIcon)().ICON_PICKER_OPEN : (0, _ui.getIcon)().ICON_PICKER_CLOSE
605
+ })])])]), h('div', {
606
+ ref: 'refOptionPanel',
607
+ class: ['vxe-table--ignore-clear vxe-ico-picker--panel', popupClassName ? _xeUtils.default.isFunction(popupClassName) ? popupClassName({
608
+ $iconPicker: $xeIconPicker
609
+ }) : popupClassName : '', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--transfer', btnTransfer), 'ani--leave', reactData.isAniVisible), 'ani--enter', visiblePanel)],
610
+ attrs: {
611
+ placement: reactData.panelPlacement
612
+ },
613
+ style: reactData.panelStyle
614
+ }, initialized ? [initialized ? h('div', {
615
+ class: 'vxe-ico-picker--panel-wrapper'
616
+ }, [$xeIconPicker.renderIconWrapper(h)]) : (0, _ui.renderEmptyElement)($xeIconPicker)] : [])]);
617
+ }
618
+ },
619
+ watch: {
620
+ value: function value(val) {
621
+ var $xeIconPicker = this;
622
+ var reactData = $xeIconPicker.reactData;
623
+ reactData.selectIcon = "".concat(val || '');
624
+ }
625
+ },
626
+ created: function created() {
627
+ var $xeIconPicker = this;
628
+ var props = $xeIconPicker;
629
+ var reactData = $xeIconPicker.reactData;
630
+ reactData.selectIcon = "".concat(props.value || '');
631
+ _ui.globalEvents.on($xeIconPicker, 'mousewheel', $xeIconPicker.handleGlobalMousewheelEvent);
632
+ _ui.globalEvents.on($xeIconPicker, 'mousedown', $xeIconPicker.handleGlobalMousedownEvent);
633
+ _ui.globalEvents.on($xeIconPicker, 'keydown', $xeIconPicker.handleGlobalKeydownEvent);
634
+ _ui.globalEvents.on($xeIconPicker, 'blur', $xeIconPicker.handleGlobalBlurEvent);
635
+ },
636
+ beforeDestroy: function beforeDestroy() {
637
+ var $xeIconPicker = this;
638
+ var panelElem = $xeIconPicker.$refs.refOptionPanel;
639
+ if (panelElem && panelElem.parentNode) {
640
+ panelElem.parentNode.removeChild(panelElem);
641
+ }
642
+ _ui.globalEvents.off($xeIconPicker, 'mousewheel');
643
+ _ui.globalEvents.off($xeIconPicker, 'mousedown');
644
+ _ui.globalEvents.off($xeIconPicker, 'keydown');
645
+ _ui.globalEvents.off($xeIconPicker, 'blur');
646
+ },
647
+ render: function render(h) {
648
+ return this.renderVN(h);
649
+ }
650
+ });
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0===i)return("string"===t?String:Number)(e);i=i.call(e,t||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeIconPicker",mixins:[_ui.globalMixins.sizeMixin],model:{prop:"value",event:"modelValue"},props:{value:String,placeholder:String,clearable:Boolean,size:{type:String,default:function(){return(0,_ui.getConfig)().iconPicker.size||(0,_ui.getConfig)().size}},className:[String,Function],popupClassName:[String,Function],showIconTitle:{type:Boolean,default:function(){return(0,_ui.getConfig)().iconPicker.showIconTitle}},readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},icons:Array,placement:String,transfer:{type:Boolean,default:null}},inject:{$xeModal:{default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null},formItemInfo:{from:"xeFormItemInfo",default:null}},provide:function(){return{$xeIconPicker:this}},data:function(){var e={hpTimeout:void 0};return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,selectIcon:"",panelIndex:0,panelStyle:{},panelPlacement:null,visiblePanel:!1,isAniVisible:!1,isActivated:!1},internalData:e}},computed:Object.assign(Object.assign({},{}),{computeFormReadonly:function(){var e=this.$xeForm,t=this.readonly;return null===t?!!e&&e.readonly:t},computeIsDisabled:function(){var e=this.$xeForm,t=this.disabled;return null===t?!!e&&e.disabled:t},computeBtnTransfer:function(){var e=this,t=e.$xeTable,i=e.$xeModal,n=e.$xeDrawer,o=e.$xeForm,e=e.transfer;if(null===e){var a=(0,_ui.getConfig)().iconPicker.transfer;if(_xeUtils.default.isBoolean(a))return a;if(t||i||n||o)return!0}return e},computeInpPlaceholder:function(){var e=this.placeholder;return(e=e||(0,_ui.getConfig)().select.placeholder)?(0,_utils.getFuncText)(e):(0,_ui.getI18n)("vxe.base.pleaseSelect")},computeIconList:function(){var e=this.icons;return(e=e&&e.length?e:(0,_ui.getConfig)().iconPicker.icons||[]).map(function(e){return{title:e,icon:"vxe-icon-".concat(e)}})},computeIconGroupList:function(){var e=this.computeIconList;return _xeUtils.default.chunk(e,4)}}),methods:{dispatchEvent:function(e,t,i){this.$emit(e,(0,_ui.createEvent)(i,{$iconPicker:this},t))},emitModel:function(e){this.$emit("modelValue",e)},isPanelVisible:function(){return this.reactData.visiblePanel},togglePanel:function(){return this.reactData.visiblePanel?this.hideOptionPanel():this.showOptionPanel(),this.$nextTick()},hidePanel:function(){return this.reactData.visiblePanel&&this.hideOptionPanel(),this.$nextTick()},showPanel:function(){return this.reactData.visiblePanel||this.showOptionPanel(),this.$nextTick()},focus:function(){var e=this.reactData,t=this.$refs.refInput;return e.isActivated=!0,t.blur(),this.$nextTick()},blur:function(){var e=this.reactData;return this.$refs.refInput.blur(),e.isActivated=!1,this.$nextTick()},updateZindex:function(){var e=this.reactData;e.panelIndex<(0,_utils.getLastZIndex)()&&(e.panelIndex=(0,_utils.nextZIndex)())},updatePlacement:function(){var p=this,d=p,v=p.reactData;return p.$nextTick().then(function(){var e,t,i,n,o,a,l,r=d.placement,c=v.panelIndex,s=p.$refs.refElem,u=p.$refs.refOptionPanel,f=p.computeBtnTransfer;if(u&&s)return e=s.offsetHeight,t=s.offsetWidth,i=u.offsetHeight,u=u.offsetWidth,c={zIndex:c},n=(s=(0,_dom.getAbsolutePos)(s)).boundingTop,o=s.visibleHeight,a=s.visibleWidth,l="bottom",f?(f=n+e,"top"===r?(l="top",f=n-i):r||(o<f+i+5&&(l="top",f=n-i),f<5&&(l="bottom",f=n+e)),a<(s=s.boundingLeft)+u+5&&(s-=s+u+5-a),s<5&&(s=5),Object.assign(c,{left:"".concat(s,"px"),top:"".concat(f,"px"),minWidth:"".concat(t,"px")})):"top"===r?(l="top",c.bottom="".concat(e,"px")):r||o<n+e+i&&5<n-e-i&&(l="top",c.bottom="".concat(e,"px")),v.panelStyle=c,v.panelPlacement=l,p.$nextTick()})},showOptionPanel:function(){var e=this,t=e.reactData,i=e.internalData,n=i.hpTimeout;e.computeIsDisabled||(n&&(clearTimeout(n),i.hpTimeout=void 0),n=e.computeBtnTransfer,i=e.$refs.refOptionPanel,t.initialized||(t.initialized=!0,n&&i&&document.body.appendChild(i)),t.isActivated=!0,t.isAniVisible=!0,setTimeout(function(){t.visiblePanel=!0},10),e.updateZindex(),e.updatePlacement())},hideOptionPanel:function(){var e=this.reactData,t=this.internalData;e.visiblePanel=!1,t.hpTimeout=window.setTimeout(function(){e.isAniVisible=!1},350)},changeEvent:function(e,t){var i=this,n=i,o=i.reactData,a=i.$xeForm,l=i.formItemInfo;(o.selectIcon=t)!==n.value&&(i.emitModel(t),i.dispatchEvent("change",{value:t},e),a)&&l&&a.triggerItemEvent(e,l.itemConfig.field,t)},focusEvent:function(){var e=this.reactData;this.computeIsDisabled||e.visiblePanel||this.showOptionPanel()},blurEvent:function(){this.reactData.isActivated=!1},clearValueEvent:function(e,t){this.changeEvent(e,t),this.dispatchEvent("clear",{value:t},e)},clearEvent:function(e,t){this.clearValueEvent(t,null),this.hideOptionPanel()},togglePanelEvent:function(e){var t=this.reactData;e.preventDefault(),t.visiblePanel?this.hideOptionPanel():this.showOptionPanel()},clickEvent:function(e){this.togglePanelEvent(e),this.dispatchEvent("click",{},e)},handleGlobalMousewheelEvent:function(e){var t=this,i=t.reactData.visiblePanel;t.computeIsDisabled||i&&(i=t.$refs.refOptionPanel,(0,_dom.getEventTargetNode)(e,i).flag?t.updatePlacement():t.hideOptionPanel())},handleGlobalMousedownEvent:function(e){var t,i,n=this,o=n.reactData,a=o.visiblePanel;n.computeIsDisabled||(t=n.$refs.refElem,i=n.$refs.refOptionPanel,o.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,i).flag,a&&!o.isActivated&&n.hideOptionPanel())},handleGlobalKeydownEvent:function(e){var t,i,n,o,a,l,r,c=this,s=c.reactData,u=c.clearable,f=s.visiblePanel;c.computeIsDisabled||(t=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.TAB),i=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ENTER),n=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE),o=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),a=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),l=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.DELETE),r=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.SPACEBAR),t&&(s.isActivated=!1),f?n||t?c.hideOptionPanel():i?(e.preventDefault(),e.stopPropagation()):(o||a||r)&&e.preventDefault():(o||a||i||r)&&s.isActivated&&(e.preventDefault(),c.showOptionPanel()),s.isActivated&&l&&u&&c.clearValueEvent(e,null))},handleGlobalBlurEvent:function(){this.hideOptionPanel()},handleClickIconEvent:function(e,t){t=t.icon;this.changeEvent(e,t),this.hideOptionPanel()},renderIconWrapper:function(i){var n=this,o=n.showIconTitle,e=n.computeIconGroupList,a=n.computeIsDisabled;return i("div",{class:"vxe-ico-picker--list-wrapper"},e.map(function(e){return i("div",{class:"vxe-ico-picker--list"},e.map(function(t){return i("div",{class:"vxe-ico-picker--item",on:{click:function(e){a||n.handleClickIconEvent(e,t)}}},[i("div",{class:"vxe-ico-picker--item-icon"},[i("i",{class:t.icon||""})]),o?i("div",{class:"vxe-ico-picker--item-title"},"".concat(t.title||"")):(0,_ui.renderEmptyElement)(n)])}))}))},renderVN:function(e){var t=this,i=t.reactData,n=t.className,o=t.popupClassName,a=t.clearable,l=i.initialized,r=i.isActivated,c=i.visiblePanel,s=i.selectIcon,u=t.computeSize,f=t.computeIsDisabled,p=t.computeBtnTransfer,d=t.computeInpPlaceholder;return t.computeFormReadonly?e("div",{ref:"refElem",class:["vxe-ico-picker--readonly",n]},[e("i",{class:s})]):e("div",{ref:"refElem",class:["vxe-ico-picker",n?_xeUtils.default.isFunction(n)?n({$iconPicker:t}):n:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(u),u),"show--clear",a&&!f&&!!s),"is--visible",c),"is--disabled",f),"is--active",r)]},[e("div",{class:"vxe-ico-picker--inner",on:{click:t.clickEvent}},[e("input",{ref:"refInput",class:"vxe-ico-picker--input",on:{focus:t.focusEvent,blur:t.blurEvent}}),s?e("div",{class:"vxe-ico-picker--icon"},[e("i",{class:s})]):e("div",{class:"vxe-ico-picker--placeholder"},d),e("div",{class:"vxe-ico-picker--suffix"},[e("div",{class:"vxe-ico-picker--clear-icon",on:{click:t.clearEvent}},[e("i",{class:(0,_ui.getIcon)().INPUT_CLEAR})]),e("div",{class:"vxe-ico-picker--suffix-icon"},[e("i",{class:c?(0,_ui.getIcon)().ICON_PICKER_OPEN:(0,_ui.getIcon)().ICON_PICKER_CLOSE})])])]),e("div",{ref:"refOptionPanel",class:["vxe-table--ignore-clear vxe-ico-picker--panel",o?_xeUtils.default.isFunction(o)?o({$iconPicker:t}):o:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(u),u),"is--transfer",p),"ani--leave",i.isAniVisible),"ani--enter",c)],attrs:{placement:i.panelPlacement},style:i.panelStyle},l?[l?e("div",{class:"vxe-ico-picker--panel-wrapper"},[t.renderIconWrapper(e)]):(0,_ui.renderEmptyElement)(t)]:[])])}},watch:{value:function(e){this.reactData.selectIcon="".concat(e||"")}},created:function(){var e=this;e.reactData.selectIcon="".concat(e.value||""),_ui.globalEvents.on(e,"mousewheel",e.handleGlobalMousewheelEvent),_ui.globalEvents.on(e,"mousedown",e.handleGlobalMousedownEvent),_ui.globalEvents.on(e,"keydown",e.handleGlobalKeydownEvent),_ui.globalEvents.on(e,"blur",e.handleGlobalBlurEvent)},beforeDestroy:function(){var e=this,t=e.$refs.refOptionPanel;t&&t.parentNode&&t.parentNode.removeChild(t),_ui.globalEvents.off(e,"mousewheel"),_ui.globalEvents.off(e,"mousedown"),_ui.globalEvents.off(e,"keydown"),_ui.globalEvents.off(e,"blur")},render:function(e){return this.renderVN(e)}});
@@ -0,0 +1 @@
1
+ require('./style.css')