vxe-pc-ui 3.14.5 → 3.14.6

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 (474) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +134 -134
  3. package/es/tree/src/tree.js +40 -5
  4. package/es/tree-select/src/tree-select.js +2 -0
  5. package/es/ui/index.js +1 -1
  6. package/es/ui/src/log.js +1 -1
  7. package/lib/index.umd.js +8406 -8476
  8. package/lib/index.umd.min.js +1 -1
  9. package/lib/tree/src/tree.js +40 -5
  10. package/lib/tree/src/tree.min.js +1 -1
  11. package/lib/tree-select/src/tree-select.js +2 -0
  12. package/lib/tree-select/src/tree-select.min.js +1 -1
  13. package/lib/ui/index.js +1 -1
  14. package/lib/ui/index.min.js +1 -1
  15. package/lib/ui/src/log.js +1 -1
  16. package/lib/ui/src/log.min.js +1 -1
  17. package/package.json +89 -89
  18. package/packages/alert/index.ts +16 -16
  19. package/packages/alert/src/alert.ts +106 -106
  20. package/packages/anchor/index.ts +16 -16
  21. package/packages/anchor/src/anchor-link.ts +158 -158
  22. package/packages/anchor/src/anchor.ts +267 -267
  23. package/packages/anchor/src/util.ts +23 -23
  24. package/packages/anchor-link/index.ts +16 -16
  25. package/packages/avatar/index.ts +16 -16
  26. package/packages/avatar/src/avatar.ts +141 -141
  27. package/packages/backtop/index.ts +16 -16
  28. package/packages/backtop/src/backtop.ts +330 -330
  29. package/packages/badge/index.ts +16 -16
  30. package/packages/badge/src/badge.ts +87 -87
  31. package/packages/breadcrumb/index.ts +16 -16
  32. package/packages/breadcrumb/src/breadcrumb-item.ts +118 -118
  33. package/packages/breadcrumb/src/breadcrumb.ts +89 -89
  34. package/packages/breadcrumb-item/index.ts +16 -16
  35. package/packages/button/index.ts +16 -16
  36. package/packages/button/src/button-group.ts +113 -113
  37. package/packages/button/src/button.ts +956 -956
  38. package/packages/button-group/index.ts +16 -16
  39. package/packages/calendar/index.ts +16 -16
  40. package/packages/calendar/src/calendar.ts +1527 -1527
  41. package/packages/card/index.ts +16 -16
  42. package/packages/card/src/card.ts +162 -162
  43. package/packages/carousel/index.ts +16 -16
  44. package/packages/carousel/src/carousel-item.ts +117 -117
  45. package/packages/carousel/src/carousel.ts +460 -460
  46. package/packages/carousel/src/util.ts +21 -21
  47. package/packages/carousel-item/index.ts +16 -16
  48. package/packages/cascader/index.ts +16 -16
  49. package/packages/cascader/src/cascader.ts +943 -943
  50. package/packages/checkbox/index.ts +16 -16
  51. package/packages/checkbox/src/button.ts +185 -185
  52. package/packages/checkbox/src/checkbox.ts +189 -189
  53. package/packages/checkbox/src/group.ts +259 -259
  54. package/packages/checkbox-button/index.ts +16 -16
  55. package/packages/checkbox-group/index.ts +16 -16
  56. package/packages/col/index.ts +16 -16
  57. package/packages/collapse/index.ts +16 -16
  58. package/packages/collapse/src/collapse-pane.ts +136 -136
  59. package/packages/collapse/src/collapse.ts +259 -259
  60. package/packages/collapse/src/util.ts +21 -21
  61. package/packages/collapse-pane/index.ts +16 -16
  62. package/packages/color-picker/index.ts +16 -16
  63. package/packages/color-picker/src/color-picker.ts +1286 -1286
  64. package/packages/color-picker/src/util.ts +198 -198
  65. package/packages/components.ts +307 -307
  66. package/packages/context-menu/index.ts +54 -54
  67. package/packages/context-menu/src/context-menu.ts +727 -727
  68. package/packages/countdown/index.ts +16 -16
  69. package/packages/countdown/src/countdown.ts +276 -276
  70. package/packages/date-panel/index.ts +16 -16
  71. package/packages/date-panel/src/date-panel.ts +2024 -2024
  72. package/packages/date-panel/src/util.ts +244 -244
  73. package/packages/date-picker/index.ts +17 -17
  74. package/packages/date-picker/src/date-picker.ts +1249 -1249
  75. package/packages/date-range-picker/index.ts +16 -16
  76. package/packages/date-range-picker/src/date-range-picker.ts +1480 -1480
  77. package/packages/drawer/index.ts +87 -87
  78. package/packages/drawer/src/drawer.ts +767 -767
  79. package/packages/dynamics/index.ts +127 -127
  80. package/packages/empty/index.ts +16 -16
  81. package/packages/empty/src/empty.ts +80 -80
  82. package/packages/form/index.ts +16 -16
  83. package/packages/form/render/index.ts +617 -617
  84. package/packages/form/src/form-config-item.ts +84 -84
  85. package/packages/form/src/form-group.ts +125 -125
  86. package/packages/form/src/form-item.ts +217 -217
  87. package/packages/form/src/form.ts +1032 -1032
  88. package/packages/form/src/itemInfo.ts +80 -80
  89. package/packages/form/src/render.ts +398 -398
  90. package/packages/form/src/util.ts +92 -92
  91. package/packages/form-gather/index.ts +18 -18
  92. package/packages/form-group/index.ts +16 -16
  93. package/packages/form-item/index.ts +16 -16
  94. package/packages/icon/index.ts +16 -16
  95. package/packages/icon/src/icon.ts +75 -75
  96. package/packages/icon-picker/index.ts +16 -16
  97. package/packages/icon-picker/src/icon-picker.ts +753 -753
  98. package/packages/image/index.ts +16 -16
  99. package/packages/image/src/group.ts +162 -162
  100. package/packages/image/src/image.ts +303 -303
  101. package/packages/image/src/preview.ts +737 -737
  102. package/packages/image/src/util.ts +62 -62
  103. package/packages/image-group/index.ts +16 -16
  104. package/packages/image-preview/index.ts +19 -19
  105. package/packages/index.ts +8 -8
  106. package/packages/input/index.ts +16 -16
  107. package/packages/input/src/input.ts +3187 -3187
  108. package/packages/language/ar-EG.ts +840 -840
  109. package/packages/language/de-DE.ts +840 -840
  110. package/packages/language/en-US.ts +840 -840
  111. package/packages/language/es-ES.ts +840 -840
  112. package/packages/language/fr-FR.ts +840 -840
  113. package/packages/language/hu-HU.ts +840 -840
  114. package/packages/language/hy-AM.ts +840 -840
  115. package/packages/language/id-ID.ts +840 -840
  116. package/packages/language/it-IT.ts +840 -840
  117. package/packages/language/ja-JP.ts +840 -840
  118. package/packages/language/ko-KR.ts +840 -840
  119. package/packages/language/ms-MY.ts +840 -840
  120. package/packages/language/nb-NO.ts +840 -840
  121. package/packages/language/pt-BR.ts +840 -840
  122. package/packages/language/ru-RU.ts +840 -840
  123. package/packages/language/th-TH.ts +840 -840
  124. package/packages/language/ug-CN.ts +840 -840
  125. package/packages/language/uk-UA.ts +840 -840
  126. package/packages/language/uz-UZ.ts +840 -840
  127. package/packages/language/vi-VN.ts +840 -840
  128. package/packages/language/zh-CHT.ts +840 -840
  129. package/packages/language/zh-CN.ts +840 -840
  130. package/packages/language/zh-HK.ts +3 -3
  131. package/packages/language/zh-MO.ts +3 -3
  132. package/packages/language/zh-TC.ts +3 -3
  133. package/packages/language/zh-TW.ts +3 -3
  134. package/packages/layout-aside/index.ts +16 -16
  135. package/packages/layout-aside/src/layout-aside.ts +115 -115
  136. package/packages/layout-body/index.ts +16 -16
  137. package/packages/layout-body/src/layout-body.ts +137 -137
  138. package/packages/layout-container/index.ts +16 -16
  139. package/packages/layout-container/src/layout-container.ts +65 -65
  140. package/packages/layout-footer/index.ts +16 -16
  141. package/packages/layout-footer/src/layout-footer.ts +53 -53
  142. package/packages/layout-header/index.ts +16 -16
  143. package/packages/layout-header/src/layout-header.ts +49 -49
  144. package/packages/link/index.ts +16 -16
  145. package/packages/link/src/link.ts +153 -153
  146. package/packages/list/index.ts +16 -16
  147. package/packages/list/src/list.ts +492 -492
  148. package/packages/loading/index.ts +34 -34
  149. package/packages/loading/src/loading.ts +162 -162
  150. package/packages/mention/index.ts +16 -16
  151. package/packages/mention/src/mention.ts +54 -54
  152. package/packages/menu/index.ts +16 -16
  153. package/packages/menu/src/menu.ts +632 -632
  154. package/packages/modal/index.ts +150 -150
  155. package/packages/modal/src/modal.ts +1668 -1668
  156. package/packages/notice-bar/index.ts +16 -16
  157. package/packages/notice-bar/src/notice-bar.ts +182 -182
  158. package/packages/number-input/index.ts +16 -16
  159. package/packages/number-input/src/number-input.ts +1255 -1255
  160. package/packages/number-input/src/util.ts +12 -12
  161. package/packages/optgroup/index.ts +16 -16
  162. package/packages/option/index.ts +16 -16
  163. package/packages/pager/index.ts +16 -16
  164. package/packages/pager/src/pager.ts +913 -913
  165. package/packages/password-input/index.ts +16 -16
  166. package/packages/password-input/src/password-input.ts +466 -466
  167. package/packages/print/index.ts +18 -18
  168. package/packages/print/src/page-break.ts +78 -78
  169. package/packages/print/src/print.ts +266 -266
  170. package/packages/print/src/util.ts +284 -284
  171. package/packages/print-page-break/index.ts +14 -14
  172. package/packages/pulldown/index.ts +16 -16
  173. package/packages/pulldown/src/pulldown.ts +533 -533
  174. package/packages/radio/index.ts +16 -16
  175. package/packages/radio/src/button.ts +221 -221
  176. package/packages/radio/src/group.ts +252 -252
  177. package/packages/radio/src/radio.ts +228 -228
  178. package/packages/radio-button/index.ts +16 -16
  179. package/packages/radio-group/index.ts +16 -16
  180. package/packages/rate/index.ts +16 -16
  181. package/packages/rate/src/rate.ts +199 -199
  182. package/packages/result/index.ts +16 -16
  183. package/packages/result/src/result.ts +93 -93
  184. package/packages/row/index.ts +16 -16
  185. package/packages/row/src/col.ts +130 -130
  186. package/packages/row/src/row.ts +106 -106
  187. package/packages/segmented/index.ts +16 -16
  188. package/packages/segmented/src/segmented.ts +281 -281
  189. package/packages/select/index.ts +16 -16
  190. package/packages/select/src/optgroup.ts +107 -107
  191. package/packages/select/src/option-info.ts +20 -20
  192. package/packages/select/src/option.ts +103 -103
  193. package/packages/select/src/select.ts +2001 -2001
  194. package/packages/select/src/util.ts +47 -47
  195. package/packages/slider/index.ts +16 -16
  196. package/packages/slider/src/slider.ts +332 -332
  197. package/packages/split/index.ts +16 -16
  198. package/packages/split-pane/index.ts +17 -17
  199. package/packages/splitter/index.ts +16 -16
  200. package/packages/splitter/src/splitter-panel.ts +171 -171
  201. package/packages/splitter/src/splitter.ts +1032 -1032
  202. package/packages/splitter/src/util.ts +21 -21
  203. package/packages/splitter-panel/index.ts +16 -16
  204. package/packages/steps/index.ts +16 -16
  205. package/packages/steps/src/steps.ts +57 -57
  206. package/packages/switch/index.ts +16 -16
  207. package/packages/switch/src/switch.ts +279 -279
  208. package/packages/tab-pane/index.ts +16 -16
  209. package/packages/table-select/index.ts +16 -16
  210. package/packages/table-select/src/table-select.ts +904 -904
  211. package/packages/tabs/index.ts +16 -16
  212. package/packages/tabs/src/tab-pane.ts +137 -137
  213. package/packages/tabs/src/tabs.ts +1014 -1014
  214. package/packages/tabs/src/util.ts +21 -21
  215. package/packages/tag/index.ts +16 -16
  216. package/packages/tag/src/tag.ts +195 -195
  217. package/packages/text/index.ts +16 -16
  218. package/packages/text/src/text.ts +267 -267
  219. package/packages/text-ellipsis/index.ts +16 -16
  220. package/packages/text-ellipsis/src/text-ellipsis.ts +291 -291
  221. package/packages/textarea/index.ts +16 -16
  222. package/packages/textarea/src/textarea.ts +436 -436
  223. package/packages/timeline/index.ts +16 -16
  224. package/packages/timeline/src/timeline-item.ts +41 -41
  225. package/packages/timeline/src/timeline.ts +54 -54
  226. package/packages/timeline-item/index.ts +16 -16
  227. package/packages/tip/index.ts +19 -19
  228. package/packages/tip/src/tip.ts +112 -112
  229. package/packages/tooltip/index.ts +16 -16
  230. package/packages/tooltip/src/tooltip.ts +669 -669
  231. package/packages/tour/index.ts +16 -16
  232. package/packages/tour/src/tour.ts +54 -54
  233. package/packages/tree/index.ts +16 -16
  234. package/packages/tree/src/store.ts +15 -15
  235. package/packages/tree/src/tree.ts +3122 -3080
  236. package/packages/tree/src/util.ts +44 -44
  237. package/packages/tree-select/index.ts +16 -16
  238. package/packages/tree-select/src/tree-select.ts +1118 -1116
  239. package/packages/ui/index.ts +697 -697
  240. package/packages/ui/src/anime.ts +52 -52
  241. package/packages/ui/src/comp.ts +3 -3
  242. package/packages/ui/src/dom.ts +279 -279
  243. package/packages/ui/src/log.ts +6 -6
  244. package/packages/ui/src/utils.ts +49 -49
  245. package/packages/ui/src/vn.ts +60 -60
  246. package/packages/upload/index.ts +20 -20
  247. package/packages/upload/src/upload.ts +2129 -2129
  248. package/packages/upload/src/util.ts +109 -109
  249. package/packages/vxe-u-i/index.ts +4 -4
  250. package/packages/watermark/index.ts +31 -31
  251. package/packages/watermark/src/util.ts +176 -176
  252. package/packages/watermark/src/watermark.ts +166 -166
  253. package/styles/all.scss +90 -90
  254. package/styles/base.scss +16 -16
  255. package/styles/components/alert.scss +101 -101
  256. package/styles/components/anchor.scss +44 -44
  257. package/styles/components/avatar.scss +115 -115
  258. package/styles/components/backtop.scss +82 -82
  259. package/styles/components/badge.scss +45 -45
  260. package/styles/components/breadcrumb.scss +29 -29
  261. package/styles/components/button-group.scss +30 -30
  262. package/styles/components/button.scss +415 -415
  263. package/styles/components/calendar.scss +471 -471
  264. package/styles/components/card.scss +121 -121
  265. package/styles/components/carousel.scss +184 -184
  266. package/styles/components/cascader.scss +140 -140
  267. package/styles/components/checkbox-button.scss +57 -57
  268. package/styles/components/checkbox.scss +81 -81
  269. package/styles/components/collapse.scss +56 -56
  270. package/styles/components/color-picker.scss +409 -409
  271. package/styles/components/context-menu.scss +102 -102
  272. package/styles/components/countdown.scss +35 -35
  273. package/styles/components/date-panel.scss +505 -505
  274. package/styles/components/date-picker.scss +247 -247
  275. package/styles/components/date-range-picker.scss +252 -252
  276. package/styles/components/drawer.scss +298 -298
  277. package/styles/components/empty.scss +79 -79
  278. package/styles/components/form.scss +668 -668
  279. package/styles/components/icon-picker.scss +211 -211
  280. package/styles/components/icon.scss +1048 -1048
  281. package/styles/components/image-group.scss +2 -2
  282. package/styles/components/image-preview.scss +215 -215
  283. package/styles/components/image.scss +16 -16
  284. package/styles/components/input.scss +846 -846
  285. package/styles/components/layout-aside.scss +22 -22
  286. package/styles/components/layout-body.scss +14 -14
  287. package/styles/components/layout-container.scss +13 -13
  288. package/styles/components/layout-footer.scss +14 -14
  289. package/styles/components/layout-header.scss +11 -11
  290. package/styles/components/link.scss +115 -115
  291. package/styles/components/list.scss +40 -40
  292. package/styles/components/loading.scss +137 -137
  293. package/styles/components/menu.scss +150 -150
  294. package/styles/components/modal.scss +480 -480
  295. package/styles/components/notice-bar.scss +91 -91
  296. package/styles/components/number-input.scss +283 -283
  297. package/styles/components/old-icon.scss +4 -4
  298. package/styles/components/pager.scss +282 -282
  299. package/styles/components/password-input.scss +374 -374
  300. package/styles/components/print.scss +3 -3
  301. package/styles/components/pulldown.scss +75 -75
  302. package/styles/components/radio-button.scss +57 -57
  303. package/styles/components/radio.scss +79 -79
  304. package/styles/components/rate.scss +76 -76
  305. package/styles/components/result.scss +91 -91
  306. package/styles/components/row.scss +69 -69
  307. package/styles/components/segmented.scss +215 -215
  308. package/styles/components/select.scss +244 -244
  309. package/styles/components/slider.scss +139 -139
  310. package/styles/components/split.scss +1 -1
  311. package/styles/components/splitter.scss +318 -318
  312. package/styles/components/switch.scss +128 -128
  313. package/styles/components/table-select.scss +105 -105
  314. package/styles/components/tabs.scss +745 -745
  315. package/styles/components/tag.scss +184 -184
  316. package/styles/components/text-ellipsis.scss +130 -130
  317. package/styles/components/text.scss +123 -123
  318. package/styles/components/textarea.scss +106 -106
  319. package/styles/components/tip.scss +97 -97
  320. package/styles/components/tooltip.scss +141 -141
  321. package/styles/components/tree-select.scss +166 -166
  322. package/styles/components/tree.scss +294 -294
  323. package/styles/components/upload.scss +497 -497
  324. package/styles/components/watermark.scss +26 -26
  325. package/styles/helpers/baseMixin.scss +95 -95
  326. package/styles/helpers/baseVar.scss +3 -3
  327. package/styles/helpers/placement.scss +38 -38
  328. package/styles/theme/base.scss +214 -214
  329. package/styles/theme/dark.scss +119 -119
  330. package/styles/theme/light.scss +118 -118
  331. package/styles/variable.scss +111 -111
  332. package/types/all.d.ts +328 -328
  333. package/types/components/alert.d.ts +80 -80
  334. package/types/components/anchor-link.d.ts +84 -84
  335. package/types/components/anchor.d.ts +84 -84
  336. package/types/components/avatar.d.ts +81 -81
  337. package/types/components/backtop.d.ts +115 -115
  338. package/types/components/badge.d.ts +69 -69
  339. package/types/components/breadcrumb-item.d.ts +73 -73
  340. package/types/components/breadcrumb.d.ts +80 -80
  341. package/types/components/button-group.d.ts +113 -113
  342. package/types/components/button.d.ts +314 -314
  343. package/types/components/calendar.d.ts +254 -254
  344. package/types/components/card.d.ts +86 -86
  345. package/types/components/carousel-item.d.ts +68 -68
  346. package/types/components/carousel.d.ts +126 -126
  347. package/types/components/cascader.d.ts +250 -250
  348. package/types/components/checkbox-button.d.ts +93 -93
  349. package/types/components/checkbox-group.d.ts +135 -135
  350. package/types/components/checkbox.d.ts +115 -115
  351. package/types/components/col.d.ts +73 -73
  352. package/types/components/colgroup.d.ts +131 -131
  353. package/types/components/collapse-pane.d.ts +82 -82
  354. package/types/components/collapse.d.ts +115 -115
  355. package/types/components/color-picker.d.ts +164 -164
  356. package/types/components/column.d.ts +852 -852
  357. package/types/components/context-menu.d.ts +301 -301
  358. package/types/components/countdown.d.ts +99 -99
  359. package/types/components/date-panel.d.ts +269 -269
  360. package/types/components/date-picker.d.ts +322 -322
  361. package/types/components/date-range-picker.d.ts +336 -336
  362. package/types/components/drawer.d.ts +295 -295
  363. package/types/components/empty.d.ts +71 -71
  364. package/types/components/flow-design.d.ts +78 -78
  365. package/types/components/flow-view.d.ts +78 -78
  366. package/types/components/form-design.d.ts +364 -364
  367. package/types/components/form-gather.d.ts +72 -72
  368. package/types/components/form-group.d.ts +63 -63
  369. package/types/components/form-item.d.ts +405 -405
  370. package/types/components/form-view.d.ts +175 -175
  371. package/types/components/form.d.ts +463 -463
  372. package/types/components/gantt-module/gantt-view.d.ts +171 -171
  373. package/types/components/gantt-module/index.d.ts +1 -1
  374. package/types/components/gantt-plugins/extend-gantt-chart.d.ts +132 -132
  375. package/types/components/gantt-plugins/index.d.ts +1 -1
  376. package/types/components/gantt.d.ts +1201 -1201
  377. package/types/components/grid.d.ts +1038 -1038
  378. package/types/components/icon-picker.d.ts +185 -185
  379. package/types/components/icon.d.ts +80 -80
  380. package/types/components/image-group.d.ts +120 -120
  381. package/types/components/image-preview.d.ts +159 -159
  382. package/types/components/image.d.ts +166 -166
  383. package/types/components/input.d.ts +425 -425
  384. package/types/components/layout-aside.d.ts +73 -73
  385. package/types/components/layout-body.d.ts +84 -84
  386. package/types/components/layout-container.d.ts +66 -66
  387. package/types/components/layout-footer.d.ts +66 -66
  388. package/types/components/layout-header.d.ts +64 -64
  389. package/types/components/link.d.ts +104 -104
  390. package/types/components/list-design.d.ts +177 -177
  391. package/types/components/list-view.d.ts +190 -190
  392. package/types/components/list.d.ts +196 -196
  393. package/types/components/loading.d.ts +96 -96
  394. package/types/components/mention.d.ts +70 -70
  395. package/types/components/menu.d.ts +203 -203
  396. package/types/components/modal.d.ts +540 -540
  397. package/types/components/notice-bar.d.ts +95 -95
  398. package/types/components/number-input.d.ts +300 -300
  399. package/types/components/optgroup.d.ts +81 -81
  400. package/types/components/option.d.ts +95 -95
  401. package/types/components/pager.d.ts +322 -322
  402. package/types/components/password-input.d.ts +129 -129
  403. package/types/components/print-page-break.d.ts +62 -62
  404. package/types/components/print.d.ts +199 -199
  405. package/types/components/pulldown.d.ts +226 -226
  406. package/types/components/radio-button.d.ts +104 -104
  407. package/types/components/radio-group.d.ts +136 -136
  408. package/types/components/radio.d.ts +121 -121
  409. package/types/components/rate.d.ts +75 -75
  410. package/types/components/result.d.ts +77 -77
  411. package/types/components/row.d.ts +72 -72
  412. package/types/components/segmented.d.ts +117 -117
  413. package/types/components/select.d.ts +519 -519
  414. package/types/components/slider.d.ts +117 -117
  415. package/types/components/split-pane.d.ts +135 -135
  416. package/types/components/split.d.ts +318 -318
  417. package/types/components/splitter-panel.d.ts +98 -98
  418. package/types/components/splitter.d.ts +283 -283
  419. package/types/components/steps.d.ts +61 -61
  420. package/types/components/switch.d.ts +124 -124
  421. package/types/components/tab-pane.d.ts +107 -107
  422. package/types/components/table-module/custom.d.ts +115 -115
  423. package/types/components/table-module/edit.d.ts +245 -245
  424. package/types/components/table-module/export.d.ts +96 -96
  425. package/types/components/table-module/filter.d.ts +140 -140
  426. package/types/components/table-module/index.d.ts +7 -7
  427. package/types/components/table-module/keyboard.d.ts +26 -26
  428. package/types/components/table-module/menu.d.ts +26 -26
  429. package/types/components/table-module/validator.d.ts +53 -53
  430. package/types/components/table-plugins/extend-cell-area.d.ts +768 -768
  431. package/types/components/table-plugins/extend-pivot-table.d.ts +68 -68
  432. package/types/components/table-plugins/filters-combination.d.ts +15 -15
  433. package/types/components/table-plugins/filters-complex-input.d.ts +9 -9
  434. package/types/components/table-plugins/index.d.ts +4 -4
  435. package/types/components/table-select.d.ts +216 -216
  436. package/types/components/table.d.ts +7496 -7496
  437. package/types/components/tabs.d.ts +324 -324
  438. package/types/components/tag.d.ts +107 -107
  439. package/types/components/text-ellipsis.d.ts +105 -105
  440. package/types/components/text.d.ts +115 -115
  441. package/types/components/textarea.d.ts +237 -237
  442. package/types/components/timeline-item.d.ts +68 -68
  443. package/types/components/timeline.d.ts +70 -70
  444. package/types/components/tip.d.ts +76 -76
  445. package/types/components/toolbar.d.ts +329 -329
  446. package/types/components/tooltip.d.ts +169 -169
  447. package/types/components/tour.d.ts +70 -70
  448. package/types/components/tree-select.d.ts +299 -299
  449. package/types/components/tree.d.ts +836 -826
  450. package/types/components/upload.d.ts +432 -432
  451. package/types/components/watermark.d.ts +113 -113
  452. package/types/index.d.ts +4 -4
  453. package/types/ui/commands.d.ts +57 -57
  454. package/types/ui/formats.d.ts +62 -62
  455. package/types/ui/global-config.d.ts +254 -254
  456. package/types/ui/global-icon.d.ts +292 -292
  457. package/types/ui/hooks.d.ts +11 -11
  458. package/types/ui/index.d.ts +95 -95
  459. package/types/ui/interceptor.d.ts +54 -54
  460. package/types/ui/menus.d.ts +77 -77
  461. package/types/ui/renderer.d.ts +1042 -1042
  462. package/types/ui/validators.d.ts +38 -38
  463. /package/es/icon/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
  464. /package/es/icon/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
  465. /package/es/icon/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
  466. /package/es/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
  467. /package/es/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
  468. /package/es/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
  469. /package/lib/icon/style/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
  470. /package/lib/icon/style/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
  471. /package/lib/icon/style/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
  472. /package/lib/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
  473. /package/lib/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
  474. /package/lib/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
@@ -1,466 +1,466 @@
1
- import { CreateElement, PropType, VNode } from 'vue'
2
- import { defineVxeComponent } from '../../ui/src/comp'
3
- import XEUtils from 'xe-utils'
4
- import { getConfig, getIcon, getI18n, createEvent, globalMixins, renderEmptyElement } from '../../ui'
5
- import { getFuncText } from '../../ui/src/utils'
6
- import { getSlotVNs } from '../../ui/src/vn'
7
-
8
- import type { VxePasswordInputEmits, VxeComponentSizeType, PasswordInputReactData, ValueOf, VxePasswordInputPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
9
-
10
- export default /* define-vxe-component start */ defineVxeComponent({
11
- name: 'VxePasswordInput',
12
- mixins: [
13
- globalMixins.sizeMixin
14
- ],
15
- model: {
16
- prop: 'value',
17
- event: 'modelValue'
18
- },
19
- props: {
20
- value: String as PropType<VxePasswordInputPropTypes.ModelValue>,
21
- immediate: {
22
- type: Boolean as PropType<VxePasswordInputPropTypes.Immediate>,
23
- default: true
24
- },
25
- name: String as PropType<VxePasswordInputPropTypes.Name>,
26
- clearable: {
27
- type: Boolean as PropType<VxePasswordInputPropTypes.Clearable>,
28
- default: () => getConfig().passwordInput.clearable
29
- },
30
- readonly: Boolean as PropType<VxePasswordInputPropTypes.Readonly>,
31
- disabled: Boolean as PropType<VxePasswordInputPropTypes.Disabled>,
32
- maxLength: [String, Number] as PropType<VxePasswordInputPropTypes.MaxLength>,
33
- placeholder: String as PropType<VxePasswordInputPropTypes.Placeholder>,
34
- autoComplete: {
35
- type: String as PropType<VxePasswordInputPropTypes.AutoComplete>,
36
- default: 'off'
37
- },
38
- className: String as PropType<VxePasswordInputPropTypes.ClassName>,
39
- size: {
40
- type: String as PropType<VxePasswordInputPropTypes.Size>,
41
- default: () => getConfig().passwordInput.size || getConfig().size
42
- },
43
- prefixIcon: String as PropType<VxePasswordInputPropTypes.PrefixIcon>,
44
- suffixIcon: String as PropType<VxePasswordInputPropTypes.SuffixIcon>,
45
- controls: {
46
- type: Boolean as PropType<VxePasswordInputPropTypes.Controls>,
47
- default: () => getConfig().passwordInput.controls
48
- },
49
-
50
- // 已废弃
51
- autocomplete: String as PropType<VxePasswordInputPropTypes.Autocomplete>
52
- },
53
- inject: {
54
- $xeForm: {
55
- default: null
56
- },
57
- formItemInfo: {
58
- from: 'xeFormItemInfo',
59
- default: null
60
- }
61
- },
62
- data () {
63
- const xID = XEUtils.uniqueId()
64
- const reactData: PasswordInputReactData = {
65
- showPwd: false,
66
- isActivated: false,
67
- inputValue: ''
68
- }
69
- return {
70
- xID,
71
- reactData
72
- }
73
- },
74
- computed: {
75
- ...({} as {
76
- computeSize(): VxeComponentSizeType
77
- $xeForm(): (VxeFormConstructor & VxeFormPrivateMethods) | null
78
- formItemInfo(): VxeFormDefines.ProvideItemInfo | null
79
- }),
80
- computeIsClearable () {
81
- const $xePasswordInput = this
82
- const props = $xePasswordInput
83
-
84
- return props.clearable
85
- },
86
- computeInpReadonly () {
87
- const $xePasswordInput = this
88
- const props = $xePasswordInput
89
-
90
- const { readonly } = props
91
- return readonly
92
- },
93
- computeInpPlaceholder () {
94
- const $xePasswordInput = this
95
- const props = $xePasswordInput
96
-
97
- const { placeholder } = props
98
- if (placeholder) {
99
- return getFuncText(placeholder)
100
- }
101
- const globalPlaceholder = getConfig().passwordInput.placeholder
102
- if (globalPlaceholder) {
103
- return getFuncText(globalPlaceholder)
104
- }
105
- return getI18n('vxe.base.pleaseInput')
106
- },
107
- computeInputType () {
108
- const $xePasswordInput = this
109
- const reactData = $xePasswordInput.reactData
110
-
111
- const { showPwd } = reactData
112
- if (showPwd) {
113
- return 'text'
114
- }
115
- return 'password'
116
- },
117
- computeInpImmediate () {
118
- const $xePasswordInput = this
119
- const props = $xePasswordInput
120
-
121
- const { immediate } = props
122
- return immediate
123
- }
124
- },
125
- methods: {
126
- //
127
- // Method
128
- //
129
- dispatchEvent (type: ValueOf<VxePasswordInputEmits>, params: Record<string, any>, evnt: Event | null) {
130
- const $xePasswordInput = this
131
- $xePasswordInput.$emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params))
132
- },
133
- emitModel (value: any) {
134
- const $xePasswordInput = this
135
-
136
- const { _events } = $xePasswordInput as any
137
- if (_events && _events.modelValue) {
138
- $xePasswordInput.$emit('modelValue', value)
139
- } else {
140
- $xePasswordInput.$emit('model-value', value)
141
- }
142
- },
143
- focus () {
144
- const $xePasswordInput = this
145
- const reactData = $xePasswordInput.reactData
146
-
147
- const inputElem = $xePasswordInput.$refs.refInputTarget as HTMLInputElement
148
- reactData.isActivated = true
149
- inputElem.focus()
150
- return $xePasswordInput.$nextTick()
151
- },
152
- blur () {
153
- const $xePasswordInput = this
154
- const reactData = $xePasswordInput.reactData
155
-
156
- const inputElem = $xePasswordInput.$refs.refInputTarget as HTMLInputElement
157
- inputElem.blur()
158
- reactData.isActivated = false
159
- return $xePasswordInput.$nextTick()
160
- },
161
- select () {
162
- const $xePasswordInput = this
163
- const reactData = $xePasswordInput.reactData
164
-
165
- const inputElem = $xePasswordInput.$refs.refInputTarget as HTMLInputElement
166
- inputElem.select()
167
- reactData.isActivated = false
168
- return $xePasswordInput.$nextTick()
169
- },
170
- triggerEvent (evnt: Event & { type: 'input' | 'change' | 'click' | 'focus' | 'blur' }) {
171
- const $xePasswordInput = this
172
- const reactData = $xePasswordInput.reactData
173
-
174
- const { inputValue } = reactData
175
- $xePasswordInput.dispatchEvent(evnt.type, { value: inputValue }, evnt)
176
- },
177
- emitInputEvent (value: any, evnt: Event) {
178
- const $xePasswordInput = this
179
- const reactData = $xePasswordInput.reactData
180
-
181
- const inpImmediate = $xePasswordInput.computeInpImmediate
182
- reactData.inputValue = value
183
- if (inpImmediate) {
184
- $xePasswordInput.handleChange(value, evnt)
185
- } else {
186
- $xePasswordInput.dispatchEvent('input', { value }, evnt)
187
- }
188
- },
189
- inputEvent (evnt: Event & { type: 'input' }) {
190
- const $xePasswordInput = this
191
-
192
- const inputElem = evnt.target as HTMLInputElement
193
- const value = inputElem.value
194
- $xePasswordInput.emitInputEvent(value, evnt)
195
- },
196
- handleChange (value: string, evnt: Event | { type: string }) {
197
- const $xePasswordInput = this
198
- const props = $xePasswordInput
199
- const reactData = $xePasswordInput.reactData
200
- const $xeForm = $xePasswordInput.$xeForm
201
- const formItemInfo = $xePasswordInput.formItemInfo
202
-
203
- reactData.inputValue = value
204
- $xePasswordInput.emitModel(value)
205
- $xePasswordInput.dispatchEvent('input', { value }, evnt as any)
206
- if (XEUtils.toValueString(props.value) !== value) {
207
- $xePasswordInput.dispatchEvent('change', { value }, evnt as any)
208
- // 自动更新校验状态
209
- if ($xeForm && formItemInfo) {
210
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value)
211
- }
212
- }
213
- },
214
- changeEvent (evnt: Event & { type: 'change' }) {
215
- const $xePasswordInput = this
216
- const reactData = $xePasswordInput.reactData
217
- const $xeForm = $xePasswordInput.$xeForm
218
- const formItemInfo = $xePasswordInput.formItemInfo
219
-
220
- $xePasswordInput.triggerEvent(evnt)
221
- $xePasswordInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt)
222
- // 自动更新校验状态
223
- if ($xeForm && formItemInfo) {
224
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, reactData.inputValue)
225
- }
226
- },
227
- focusEvent (evnt: Event & { type: 'focus' }) {
228
- const $xePasswordInput = this
229
- const reactData = $xePasswordInput.reactData
230
-
231
- reactData.isActivated = true
232
- $xePasswordInput.triggerEvent(evnt)
233
- },
234
- blurEvent (evnt: Event & { type: 'blur' }) {
235
- const $xePasswordInput = this
236
- const reactData = $xePasswordInput.reactData
237
- const $xeForm = $xePasswordInput.$xeForm
238
- const formItemInfo = $xePasswordInput.formItemInfo
239
-
240
- const { inputValue } = reactData
241
- const value = inputValue
242
- $xePasswordInput.dispatchEvent('blur', { value }, evnt)
243
- // 自动更新校验状态
244
- if ($xeForm && formItemInfo) {
245
- $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value)
246
- }
247
- },
248
- passwordToggleEvent (evnt: Event) {
249
- const $xePasswordInput = this
250
- const props = $xePasswordInput
251
- const reactData = $xePasswordInput.reactData
252
-
253
- const { readonly, disabled } = props
254
- const { showPwd } = reactData
255
- if (!disabled && !readonly) {
256
- reactData.showPwd = !showPwd
257
- }
258
- $xePasswordInput.dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt)
259
- },
260
- clickEvent (evnt: Event & { type: 'click' }) {
261
- const $xePasswordInput = this
262
-
263
- $xePasswordInput.triggerEvent(evnt)
264
- },
265
- clearValueEvent (evnt: Event, value: VxePasswordInputPropTypes.ModelValue) {
266
- const $xePasswordInput = this
267
-
268
- $xePasswordInput.focus()
269
- $xePasswordInput.handleChange('', evnt)
270
- $xePasswordInput.dispatchEvent('clear', { value }, evnt)
271
- $xePasswordInput.dispatchEvent('lazy-change', { value }, evnt)
272
- },
273
- clickSuffixEvent (evnt: Event) {
274
- const $xePasswordInput = this
275
- const props = $xePasswordInput
276
- const reactData = $xePasswordInput.reactData
277
-
278
- const { disabled } = props
279
- if (!disabled) {
280
- const { inputValue } = reactData
281
- $xePasswordInput.dispatchEvent('suffix-click', { value: inputValue }, evnt)
282
- }
283
- },
284
- clickPrefixEvent (evnt: Event) {
285
- const $xePasswordInput = this
286
- const props = $xePasswordInput
287
- const reactData = $xePasswordInput.reactData
288
-
289
- const { disabled } = props
290
- if (!disabled) {
291
- const { inputValue } = reactData
292
- $xePasswordInput.dispatchEvent('prefix-click', { value: inputValue }, evnt)
293
- }
294
- },
295
-
296
- //
297
- // Render
298
- //
299
- renderPasswordIcon (h: CreateElement) {
300
- const $xePasswordInput = this
301
- const reactData = $xePasswordInput.reactData
302
-
303
- const { showPwd } = reactData
304
- return h('div', {
305
- class: 'vxe-password-input--control-icon',
306
- on: {
307
- click: $xePasswordInput.passwordToggleEvent
308
- }
309
- }, [
310
- h('i', {
311
- class: ['vxe-password-input--password-icon', showPwd ? getIcon().PASSWORD_INPUT_SHOW_PWD : getIcon().PASSWORD_INPUT_HIDE_PWD]
312
- })
313
- ])
314
- },
315
- renderPrefixIcon (h: CreateElement) {
316
- const $xePasswordInput = this
317
- const props = $xePasswordInput
318
- const slots = $xePasswordInput.$scopedSlots
319
-
320
- const { prefixIcon } = props
321
- const prefixSlot = slots.prefix
322
- return prefixSlot || prefixIcon
323
- ? h('div', {
324
- class: 'vxe-password-input--prefix',
325
- on: {
326
- click: $xePasswordInput.clickPrefixEvent
327
- }
328
- }, [
329
- h('div', {
330
- class: 'vxe-password-input--prefix-icon'
331
- }, prefixSlot
332
- ? getSlotVNs(prefixSlot({}))
333
- : [
334
- h('i', {
335
- class: prefixIcon
336
- })
337
- ])
338
- ])
339
- : null
340
- },
341
- renderSuffixIcon (h: CreateElement) {
342
- const $xePasswordInput = this
343
- const props = $xePasswordInput
344
- const slots = $xePasswordInput.$scopedSlots
345
- const reactData = $xePasswordInput.reactData
346
-
347
- const { disabled, suffixIcon, controls } = props
348
- const { inputValue } = reactData
349
- const suffixSlot = slots.suffix
350
- const isClearable = $xePasswordInput.computeIsClearable
351
- return isClearable || controls || suffixSlot || suffixIcon
352
- ? h('div', {
353
- class: ['vxe-password-input--suffix', {
354
- 'is--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
355
- }]
356
- }, [
357
- isClearable
358
- ? h('div', {
359
- class: 'vxe-password-input--clear-icon',
360
- on: {
361
- click: $xePasswordInput.clearValueEvent
362
- }
363
- }, [
364
- h('i', {
365
- class: getIcon().INPUT_CLEAR
366
- })
367
- ])
368
- : renderEmptyElement($xePasswordInput),
369
- controls ? $xePasswordInput.renderPasswordIcon(h) : renderEmptyElement($xePasswordInput),
370
- suffixSlot || suffixIcon
371
- ? h('div', {
372
- class: 'vxe-password-input--suffix-icon',
373
- on: {
374
- click: $xePasswordInput.clickSuffixEvent
375
- }
376
- }, suffixSlot
377
- ? getSlotVNs(suffixSlot({}))
378
- : [
379
- h('i', {
380
- class: suffixIcon
381
- })
382
- ])
383
- : renderEmptyElement($xePasswordInput)
384
- ])
385
- : null
386
- },
387
- renderVN (h: CreateElement): VNode {
388
- const $xePasswordInput = this
389
- const props = $xePasswordInput
390
- const reactData = $xePasswordInput.reactData
391
-
392
- const { className, name, disabled, readonly, autocomplete, autoComplete, maxLength } = props
393
- const { inputValue, isActivated } = reactData
394
- const vSize = $xePasswordInput.computeSize
395
- const inpReadonly = $xePasswordInput.computeInpReadonly
396
- const inputType = $xePasswordInput.computeInputType
397
- const inpPlaceholder = $xePasswordInput.computeInpPlaceholder
398
- const isClearable = $xePasswordInput.computeIsClearable
399
- const prefix = $xePasswordInput.renderPrefixIcon(h)
400
- const suffix = $xePasswordInput.renderSuffixIcon(h)
401
- return h('div', {
402
- ref: 'refElem',
403
- class: ['vxe-password-input', className, {
404
- [`size--${vSize}`]: vSize,
405
- 'is--prefix': !!prefix,
406
- 'is--suffix': !!suffix,
407
- 'is--readonly': readonly,
408
- 'is--disabled': disabled,
409
- 'is--active': isActivated,
410
- 'show--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
411
- }],
412
- attrs: {
413
- spellcheck: false
414
- }
415
- }, [
416
- prefix || renderEmptyElement($xePasswordInput),
417
- h('div', {
418
- class: 'vxe-password-input--wrapper'
419
- }, [
420
- h('input', {
421
- ref: 'refInputTarget',
422
- class: 'vxe-password-input--inner',
423
- domProps: {
424
- value: inputValue
425
- },
426
- attrs: {
427
- name,
428
- type: inputType,
429
- placeholder: inpPlaceholder,
430
- readonly: inpReadonly,
431
- disabled,
432
- autocomplete: autocomplete || autoComplete,
433
- maxlength: maxLength
434
- },
435
- on: {
436
- click: $xePasswordInput.clickEvent,
437
- input: $xePasswordInput.inputEvent,
438
- change: $xePasswordInput.changeEvent,
439
- focus: $xePasswordInput.focusEvent,
440
- blur: $xePasswordInput.blurEvent
441
- }
442
- })
443
- ]),
444
- suffix || renderEmptyElement($xePasswordInput)
445
- ])
446
- }
447
- },
448
- watch: {
449
- value (val) {
450
- const $xePasswordInput = this
451
- const reactData = $xePasswordInput.reactData
452
-
453
- reactData.inputValue = val
454
- }
455
- },
456
- created () {
457
- const $xePasswordInput = this
458
- const props = $xePasswordInput
459
- const reactData = $xePasswordInput.reactData
460
-
461
- reactData.inputValue = props.value
462
- },
463
- render (this: any, h) {
464
- return this.renderVN(h)
465
- }
466
- }) /* define-vxe-component end */
1
+ import { CreateElement, PropType, VNode } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import XEUtils from 'xe-utils'
4
+ import { getConfig, getIcon, getI18n, createEvent, globalMixins, renderEmptyElement } from '../../ui'
5
+ import { getFuncText } from '../../ui/src/utils'
6
+ import { getSlotVNs } from '../../ui/src/vn'
7
+
8
+ import type { VxePasswordInputEmits, VxeComponentSizeType, PasswordInputReactData, ValueOf, VxePasswordInputPropTypes, VxeFormConstructor, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
9
+
10
+ export default /* define-vxe-component start */ defineVxeComponent({
11
+ name: 'VxePasswordInput',
12
+ mixins: [
13
+ globalMixins.sizeMixin
14
+ ],
15
+ model: {
16
+ prop: 'value',
17
+ event: 'modelValue'
18
+ },
19
+ props: {
20
+ value: String as PropType<VxePasswordInputPropTypes.ModelValue>,
21
+ immediate: {
22
+ type: Boolean as PropType<VxePasswordInputPropTypes.Immediate>,
23
+ default: true
24
+ },
25
+ name: String as PropType<VxePasswordInputPropTypes.Name>,
26
+ clearable: {
27
+ type: Boolean as PropType<VxePasswordInputPropTypes.Clearable>,
28
+ default: () => getConfig().passwordInput.clearable
29
+ },
30
+ readonly: Boolean as PropType<VxePasswordInputPropTypes.Readonly>,
31
+ disabled: Boolean as PropType<VxePasswordInputPropTypes.Disabled>,
32
+ maxLength: [String, Number] as PropType<VxePasswordInputPropTypes.MaxLength>,
33
+ placeholder: String as PropType<VxePasswordInputPropTypes.Placeholder>,
34
+ autoComplete: {
35
+ type: String as PropType<VxePasswordInputPropTypes.AutoComplete>,
36
+ default: 'off'
37
+ },
38
+ className: String as PropType<VxePasswordInputPropTypes.ClassName>,
39
+ size: {
40
+ type: String as PropType<VxePasswordInputPropTypes.Size>,
41
+ default: () => getConfig().passwordInput.size || getConfig().size
42
+ },
43
+ prefixIcon: String as PropType<VxePasswordInputPropTypes.PrefixIcon>,
44
+ suffixIcon: String as PropType<VxePasswordInputPropTypes.SuffixIcon>,
45
+ controls: {
46
+ type: Boolean as PropType<VxePasswordInputPropTypes.Controls>,
47
+ default: () => getConfig().passwordInput.controls
48
+ },
49
+
50
+ // 已废弃
51
+ autocomplete: String as PropType<VxePasswordInputPropTypes.Autocomplete>
52
+ },
53
+ inject: {
54
+ $xeForm: {
55
+ default: null
56
+ },
57
+ formItemInfo: {
58
+ from: 'xeFormItemInfo',
59
+ default: null
60
+ }
61
+ },
62
+ data () {
63
+ const xID = XEUtils.uniqueId()
64
+ const reactData: PasswordInputReactData = {
65
+ showPwd: false,
66
+ isActivated: false,
67
+ inputValue: ''
68
+ }
69
+ return {
70
+ xID,
71
+ reactData
72
+ }
73
+ },
74
+ computed: {
75
+ ...({} as {
76
+ computeSize(): VxeComponentSizeType
77
+ $xeForm(): (VxeFormConstructor & VxeFormPrivateMethods) | null
78
+ formItemInfo(): VxeFormDefines.ProvideItemInfo | null
79
+ }),
80
+ computeIsClearable () {
81
+ const $xePasswordInput = this
82
+ const props = $xePasswordInput
83
+
84
+ return props.clearable
85
+ },
86
+ computeInpReadonly () {
87
+ const $xePasswordInput = this
88
+ const props = $xePasswordInput
89
+
90
+ const { readonly } = props
91
+ return readonly
92
+ },
93
+ computeInpPlaceholder () {
94
+ const $xePasswordInput = this
95
+ const props = $xePasswordInput
96
+
97
+ const { placeholder } = props
98
+ if (placeholder) {
99
+ return getFuncText(placeholder)
100
+ }
101
+ const globalPlaceholder = getConfig().passwordInput.placeholder
102
+ if (globalPlaceholder) {
103
+ return getFuncText(globalPlaceholder)
104
+ }
105
+ return getI18n('vxe.base.pleaseInput')
106
+ },
107
+ computeInputType () {
108
+ const $xePasswordInput = this
109
+ const reactData = $xePasswordInput.reactData
110
+
111
+ const { showPwd } = reactData
112
+ if (showPwd) {
113
+ return 'text'
114
+ }
115
+ return 'password'
116
+ },
117
+ computeInpImmediate () {
118
+ const $xePasswordInput = this
119
+ const props = $xePasswordInput
120
+
121
+ const { immediate } = props
122
+ return immediate
123
+ }
124
+ },
125
+ methods: {
126
+ //
127
+ // Method
128
+ //
129
+ dispatchEvent (type: ValueOf<VxePasswordInputEmits>, params: Record<string, any>, evnt: Event | null) {
130
+ const $xePasswordInput = this
131
+ $xePasswordInput.$emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params))
132
+ },
133
+ emitModel (value: any) {
134
+ const $xePasswordInput = this
135
+
136
+ const { _events } = $xePasswordInput as any
137
+ if (_events && _events.modelValue) {
138
+ $xePasswordInput.$emit('modelValue', value)
139
+ } else {
140
+ $xePasswordInput.$emit('model-value', value)
141
+ }
142
+ },
143
+ focus () {
144
+ const $xePasswordInput = this
145
+ const reactData = $xePasswordInput.reactData
146
+
147
+ const inputElem = $xePasswordInput.$refs.refInputTarget as HTMLInputElement
148
+ reactData.isActivated = true
149
+ inputElem.focus()
150
+ return $xePasswordInput.$nextTick()
151
+ },
152
+ blur () {
153
+ const $xePasswordInput = this
154
+ const reactData = $xePasswordInput.reactData
155
+
156
+ const inputElem = $xePasswordInput.$refs.refInputTarget as HTMLInputElement
157
+ inputElem.blur()
158
+ reactData.isActivated = false
159
+ return $xePasswordInput.$nextTick()
160
+ },
161
+ select () {
162
+ const $xePasswordInput = this
163
+ const reactData = $xePasswordInput.reactData
164
+
165
+ const inputElem = $xePasswordInput.$refs.refInputTarget as HTMLInputElement
166
+ inputElem.select()
167
+ reactData.isActivated = false
168
+ return $xePasswordInput.$nextTick()
169
+ },
170
+ triggerEvent (evnt: Event & { type: 'input' | 'change' | 'click' | 'focus' | 'blur' }) {
171
+ const $xePasswordInput = this
172
+ const reactData = $xePasswordInput.reactData
173
+
174
+ const { inputValue } = reactData
175
+ $xePasswordInput.dispatchEvent(evnt.type, { value: inputValue }, evnt)
176
+ },
177
+ emitInputEvent (value: any, evnt: Event) {
178
+ const $xePasswordInput = this
179
+ const reactData = $xePasswordInput.reactData
180
+
181
+ const inpImmediate = $xePasswordInput.computeInpImmediate
182
+ reactData.inputValue = value
183
+ if (inpImmediate) {
184
+ $xePasswordInput.handleChange(value, evnt)
185
+ } else {
186
+ $xePasswordInput.dispatchEvent('input', { value }, evnt)
187
+ }
188
+ },
189
+ inputEvent (evnt: Event & { type: 'input' }) {
190
+ const $xePasswordInput = this
191
+
192
+ const inputElem = evnt.target as HTMLInputElement
193
+ const value = inputElem.value
194
+ $xePasswordInput.emitInputEvent(value, evnt)
195
+ },
196
+ handleChange (value: string, evnt: Event | { type: string }) {
197
+ const $xePasswordInput = this
198
+ const props = $xePasswordInput
199
+ const reactData = $xePasswordInput.reactData
200
+ const $xeForm = $xePasswordInput.$xeForm
201
+ const formItemInfo = $xePasswordInput.formItemInfo
202
+
203
+ reactData.inputValue = value
204
+ $xePasswordInput.emitModel(value)
205
+ $xePasswordInput.dispatchEvent('input', { value }, evnt as any)
206
+ if (XEUtils.toValueString(props.value) !== value) {
207
+ $xePasswordInput.dispatchEvent('change', { value }, evnt as any)
208
+ // 自动更新校验状态
209
+ if ($xeForm && formItemInfo) {
210
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value)
211
+ }
212
+ }
213
+ },
214
+ changeEvent (evnt: Event & { type: 'change' }) {
215
+ const $xePasswordInput = this
216
+ const reactData = $xePasswordInput.reactData
217
+ const $xeForm = $xePasswordInput.$xeForm
218
+ const formItemInfo = $xePasswordInput.formItemInfo
219
+
220
+ $xePasswordInput.triggerEvent(evnt)
221
+ $xePasswordInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt)
222
+ // 自动更新校验状态
223
+ if ($xeForm && formItemInfo) {
224
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, reactData.inputValue)
225
+ }
226
+ },
227
+ focusEvent (evnt: Event & { type: 'focus' }) {
228
+ const $xePasswordInput = this
229
+ const reactData = $xePasswordInput.reactData
230
+
231
+ reactData.isActivated = true
232
+ $xePasswordInput.triggerEvent(evnt)
233
+ },
234
+ blurEvent (evnt: Event & { type: 'blur' }) {
235
+ const $xePasswordInput = this
236
+ const reactData = $xePasswordInput.reactData
237
+ const $xeForm = $xePasswordInput.$xeForm
238
+ const formItemInfo = $xePasswordInput.formItemInfo
239
+
240
+ const { inputValue } = reactData
241
+ const value = inputValue
242
+ $xePasswordInput.dispatchEvent('blur', { value }, evnt)
243
+ // 自动更新校验状态
244
+ if ($xeForm && formItemInfo) {
245
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value)
246
+ }
247
+ },
248
+ passwordToggleEvent (evnt: Event) {
249
+ const $xePasswordInput = this
250
+ const props = $xePasswordInput
251
+ const reactData = $xePasswordInput.reactData
252
+
253
+ const { readonly, disabled } = props
254
+ const { showPwd } = reactData
255
+ if (!disabled && !readonly) {
256
+ reactData.showPwd = !showPwd
257
+ }
258
+ $xePasswordInput.dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt)
259
+ },
260
+ clickEvent (evnt: Event & { type: 'click' }) {
261
+ const $xePasswordInput = this
262
+
263
+ $xePasswordInput.triggerEvent(evnt)
264
+ },
265
+ clearValueEvent (evnt: Event, value: VxePasswordInputPropTypes.ModelValue) {
266
+ const $xePasswordInput = this
267
+
268
+ $xePasswordInput.focus()
269
+ $xePasswordInput.handleChange('', evnt)
270
+ $xePasswordInput.dispatchEvent('clear', { value }, evnt)
271
+ $xePasswordInput.dispatchEvent('lazy-change', { value }, evnt)
272
+ },
273
+ clickSuffixEvent (evnt: Event) {
274
+ const $xePasswordInput = this
275
+ const props = $xePasswordInput
276
+ const reactData = $xePasswordInput.reactData
277
+
278
+ const { disabled } = props
279
+ if (!disabled) {
280
+ const { inputValue } = reactData
281
+ $xePasswordInput.dispatchEvent('suffix-click', { value: inputValue }, evnt)
282
+ }
283
+ },
284
+ clickPrefixEvent (evnt: Event) {
285
+ const $xePasswordInput = this
286
+ const props = $xePasswordInput
287
+ const reactData = $xePasswordInput.reactData
288
+
289
+ const { disabled } = props
290
+ if (!disabled) {
291
+ const { inputValue } = reactData
292
+ $xePasswordInput.dispatchEvent('prefix-click', { value: inputValue }, evnt)
293
+ }
294
+ },
295
+
296
+ //
297
+ // Render
298
+ //
299
+ renderPasswordIcon (h: CreateElement) {
300
+ const $xePasswordInput = this
301
+ const reactData = $xePasswordInput.reactData
302
+
303
+ const { showPwd } = reactData
304
+ return h('div', {
305
+ class: 'vxe-password-input--control-icon',
306
+ on: {
307
+ click: $xePasswordInput.passwordToggleEvent
308
+ }
309
+ }, [
310
+ h('i', {
311
+ class: ['vxe-password-input--password-icon', showPwd ? getIcon().PASSWORD_INPUT_SHOW_PWD : getIcon().PASSWORD_INPUT_HIDE_PWD]
312
+ })
313
+ ])
314
+ },
315
+ renderPrefixIcon (h: CreateElement) {
316
+ const $xePasswordInput = this
317
+ const props = $xePasswordInput
318
+ const slots = $xePasswordInput.$scopedSlots
319
+
320
+ const { prefixIcon } = props
321
+ const prefixSlot = slots.prefix
322
+ return prefixSlot || prefixIcon
323
+ ? h('div', {
324
+ class: 'vxe-password-input--prefix',
325
+ on: {
326
+ click: $xePasswordInput.clickPrefixEvent
327
+ }
328
+ }, [
329
+ h('div', {
330
+ class: 'vxe-password-input--prefix-icon'
331
+ }, prefixSlot
332
+ ? getSlotVNs(prefixSlot({}))
333
+ : [
334
+ h('i', {
335
+ class: prefixIcon
336
+ })
337
+ ])
338
+ ])
339
+ : null
340
+ },
341
+ renderSuffixIcon (h: CreateElement) {
342
+ const $xePasswordInput = this
343
+ const props = $xePasswordInput
344
+ const slots = $xePasswordInput.$scopedSlots
345
+ const reactData = $xePasswordInput.reactData
346
+
347
+ const { disabled, suffixIcon, controls } = props
348
+ const { inputValue } = reactData
349
+ const suffixSlot = slots.suffix
350
+ const isClearable = $xePasswordInput.computeIsClearable
351
+ return isClearable || controls || suffixSlot || suffixIcon
352
+ ? h('div', {
353
+ class: ['vxe-password-input--suffix', {
354
+ 'is--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
355
+ }]
356
+ }, [
357
+ isClearable
358
+ ? h('div', {
359
+ class: 'vxe-password-input--clear-icon',
360
+ on: {
361
+ click: $xePasswordInput.clearValueEvent
362
+ }
363
+ }, [
364
+ h('i', {
365
+ class: getIcon().INPUT_CLEAR
366
+ })
367
+ ])
368
+ : renderEmptyElement($xePasswordInput),
369
+ controls ? $xePasswordInput.renderPasswordIcon(h) : renderEmptyElement($xePasswordInput),
370
+ suffixSlot || suffixIcon
371
+ ? h('div', {
372
+ class: 'vxe-password-input--suffix-icon',
373
+ on: {
374
+ click: $xePasswordInput.clickSuffixEvent
375
+ }
376
+ }, suffixSlot
377
+ ? getSlotVNs(suffixSlot({}))
378
+ : [
379
+ h('i', {
380
+ class: suffixIcon
381
+ })
382
+ ])
383
+ : renderEmptyElement($xePasswordInput)
384
+ ])
385
+ : null
386
+ },
387
+ renderVN (h: CreateElement): VNode {
388
+ const $xePasswordInput = this
389
+ const props = $xePasswordInput
390
+ const reactData = $xePasswordInput.reactData
391
+
392
+ const { className, name, disabled, readonly, autocomplete, autoComplete, maxLength } = props
393
+ const { inputValue, isActivated } = reactData
394
+ const vSize = $xePasswordInput.computeSize
395
+ const inpReadonly = $xePasswordInput.computeInpReadonly
396
+ const inputType = $xePasswordInput.computeInputType
397
+ const inpPlaceholder = $xePasswordInput.computeInpPlaceholder
398
+ const isClearable = $xePasswordInput.computeIsClearable
399
+ const prefix = $xePasswordInput.renderPrefixIcon(h)
400
+ const suffix = $xePasswordInput.renderSuffixIcon(h)
401
+ return h('div', {
402
+ ref: 'refElem',
403
+ class: ['vxe-password-input', className, {
404
+ [`size--${vSize}`]: vSize,
405
+ 'is--prefix': !!prefix,
406
+ 'is--suffix': !!suffix,
407
+ 'is--readonly': readonly,
408
+ 'is--disabled': disabled,
409
+ 'is--active': isActivated,
410
+ 'show--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
411
+ }],
412
+ attrs: {
413
+ spellcheck: false
414
+ }
415
+ }, [
416
+ prefix || renderEmptyElement($xePasswordInput),
417
+ h('div', {
418
+ class: 'vxe-password-input--wrapper'
419
+ }, [
420
+ h('input', {
421
+ ref: 'refInputTarget',
422
+ class: 'vxe-password-input--inner',
423
+ domProps: {
424
+ value: inputValue
425
+ },
426
+ attrs: {
427
+ name,
428
+ type: inputType,
429
+ placeholder: inpPlaceholder,
430
+ readonly: inpReadonly,
431
+ disabled,
432
+ autocomplete: autocomplete || autoComplete,
433
+ maxlength: maxLength
434
+ },
435
+ on: {
436
+ click: $xePasswordInput.clickEvent,
437
+ input: $xePasswordInput.inputEvent,
438
+ change: $xePasswordInput.changeEvent,
439
+ focus: $xePasswordInput.focusEvent,
440
+ blur: $xePasswordInput.blurEvent
441
+ }
442
+ })
443
+ ]),
444
+ suffix || renderEmptyElement($xePasswordInput)
445
+ ])
446
+ }
447
+ },
448
+ watch: {
449
+ value (val) {
450
+ const $xePasswordInput = this
451
+ const reactData = $xePasswordInput.reactData
452
+
453
+ reactData.inputValue = val
454
+ }
455
+ },
456
+ created () {
457
+ const $xePasswordInput = this
458
+ const props = $xePasswordInput
459
+ const reactData = $xePasswordInput.reactData
460
+
461
+ reactData.inputValue = props.value
462
+ },
463
+ render (this: any, h) {
464
+ return this.renderVN(h)
465
+ }
466
+ }) /* define-vxe-component end */