element-plus-mobile 0.1.1 → 0.1.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 (652) hide show
  1. package/README.md +1 -1
  2. package/attributes.json +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.full.js +594 -905
  5. package/dist/index.full.min.js +8 -8
  6. package/dist/index.full.min.js.map +1 -1
  7. package/dist/index.full.min.mjs +8 -8
  8. package/dist/index.full.min.mjs.map +1 -1
  9. package/dist/index.full.mjs +593 -904
  10. package/dist/locale/af.js +1 -1
  11. package/dist/locale/af.min.js +1 -1
  12. package/dist/locale/af.min.mjs +1 -1
  13. package/dist/locale/af.mjs +1 -1
  14. package/dist/locale/ar-eg.js +1 -1
  15. package/dist/locale/ar-eg.min.js +1 -1
  16. package/dist/locale/ar-eg.min.mjs +1 -1
  17. package/dist/locale/ar-eg.mjs +1 -1
  18. package/dist/locale/ar.js +1 -1
  19. package/dist/locale/ar.min.js +1 -1
  20. package/dist/locale/ar.min.mjs +1 -1
  21. package/dist/locale/ar.mjs +1 -1
  22. package/dist/locale/az.js +1 -1
  23. package/dist/locale/az.min.js +1 -1
  24. package/dist/locale/az.min.mjs +1 -1
  25. package/dist/locale/az.mjs +1 -1
  26. package/dist/locale/bg.js +1 -1
  27. package/dist/locale/bg.min.js +1 -1
  28. package/dist/locale/bg.min.mjs +1 -1
  29. package/dist/locale/bg.mjs +1 -1
  30. package/dist/locale/bn.js +1 -1
  31. package/dist/locale/bn.min.js +1 -1
  32. package/dist/locale/bn.min.mjs +1 -1
  33. package/dist/locale/bn.mjs +1 -1
  34. package/dist/locale/ca.js +1 -1
  35. package/dist/locale/ca.min.js +1 -1
  36. package/dist/locale/ca.min.mjs +1 -1
  37. package/dist/locale/ca.mjs +1 -1
  38. package/dist/locale/ckb.js +1 -1
  39. package/dist/locale/ckb.min.js +1 -1
  40. package/dist/locale/ckb.min.mjs +1 -1
  41. package/dist/locale/ckb.mjs +1 -1
  42. package/dist/locale/cs.js +1 -1
  43. package/dist/locale/cs.min.js +1 -1
  44. package/dist/locale/cs.min.mjs +1 -1
  45. package/dist/locale/cs.mjs +1 -1
  46. package/dist/locale/da.js +1 -1
  47. package/dist/locale/da.min.js +1 -1
  48. package/dist/locale/da.min.mjs +1 -1
  49. package/dist/locale/da.mjs +1 -1
  50. package/dist/locale/de.js +1 -1
  51. package/dist/locale/de.min.js +1 -1
  52. package/dist/locale/de.min.mjs +1 -1
  53. package/dist/locale/de.mjs +1 -1
  54. package/dist/locale/el.js +1 -1
  55. package/dist/locale/el.min.js +1 -1
  56. package/dist/locale/el.min.mjs +1 -1
  57. package/dist/locale/el.mjs +1 -1
  58. package/dist/locale/en.js +1 -1
  59. package/dist/locale/en.min.js +1 -1
  60. package/dist/locale/en.min.mjs +1 -1
  61. package/dist/locale/en.mjs +1 -1
  62. package/dist/locale/eo.js +1 -1
  63. package/dist/locale/eo.min.js +1 -1
  64. package/dist/locale/eo.min.mjs +1 -1
  65. package/dist/locale/eo.mjs +1 -1
  66. package/dist/locale/es.js +1 -1
  67. package/dist/locale/es.min.js +1 -1
  68. package/dist/locale/es.min.mjs +1 -1
  69. package/dist/locale/es.mjs +1 -1
  70. package/dist/locale/et.js +1 -1
  71. package/dist/locale/et.min.js +1 -1
  72. package/dist/locale/et.min.mjs +1 -1
  73. package/dist/locale/et.mjs +1 -1
  74. package/dist/locale/eu.js +1 -1
  75. package/dist/locale/eu.min.js +1 -1
  76. package/dist/locale/eu.min.mjs +1 -1
  77. package/dist/locale/eu.mjs +1 -1
  78. package/dist/locale/fa.js +1 -1
  79. package/dist/locale/fa.min.js +1 -1
  80. package/dist/locale/fa.min.mjs +1 -1
  81. package/dist/locale/fa.mjs +1 -1
  82. package/dist/locale/fi.js +1 -1
  83. package/dist/locale/fi.min.js +1 -1
  84. package/dist/locale/fi.min.mjs +1 -1
  85. package/dist/locale/fi.mjs +1 -1
  86. package/dist/locale/fr.js +1 -1
  87. package/dist/locale/fr.min.js +1 -1
  88. package/dist/locale/fr.min.mjs +1 -1
  89. package/dist/locale/fr.mjs +1 -1
  90. package/dist/locale/he.js +1 -1
  91. package/dist/locale/he.min.js +1 -1
  92. package/dist/locale/he.min.mjs +1 -1
  93. package/dist/locale/he.mjs +1 -1
  94. package/dist/locale/hi.js +1 -1
  95. package/dist/locale/hi.min.js +1 -1
  96. package/dist/locale/hi.min.mjs +1 -1
  97. package/dist/locale/hi.mjs +1 -1
  98. package/dist/locale/hr.js +1 -1
  99. package/dist/locale/hr.min.js +1 -1
  100. package/dist/locale/hr.min.mjs +1 -1
  101. package/dist/locale/hr.mjs +1 -1
  102. package/dist/locale/hu.js +1 -1
  103. package/dist/locale/hu.min.js +1 -1
  104. package/dist/locale/hu.min.mjs +1 -1
  105. package/dist/locale/hu.mjs +1 -1
  106. package/dist/locale/hy-am.js +1 -1
  107. package/dist/locale/hy-am.min.js +1 -1
  108. package/dist/locale/hy-am.min.mjs +1 -1
  109. package/dist/locale/hy-am.mjs +1 -1
  110. package/dist/locale/id.js +1 -1
  111. package/dist/locale/id.min.js +1 -1
  112. package/dist/locale/id.min.mjs +1 -1
  113. package/dist/locale/id.mjs +1 -1
  114. package/dist/locale/it.js +1 -1
  115. package/dist/locale/it.min.js +1 -1
  116. package/dist/locale/it.min.mjs +1 -1
  117. package/dist/locale/it.mjs +1 -1
  118. package/dist/locale/ja.js +1 -1
  119. package/dist/locale/ja.min.js +1 -1
  120. package/dist/locale/ja.min.mjs +1 -1
  121. package/dist/locale/ja.mjs +1 -1
  122. package/dist/locale/kk.js +1 -1
  123. package/dist/locale/kk.min.js +1 -1
  124. package/dist/locale/kk.min.mjs +1 -1
  125. package/dist/locale/kk.mjs +1 -1
  126. package/dist/locale/km.js +1 -1
  127. package/dist/locale/km.min.js +1 -1
  128. package/dist/locale/km.min.mjs +1 -1
  129. package/dist/locale/km.mjs +1 -1
  130. package/dist/locale/ko.js +1 -1
  131. package/dist/locale/ko.min.js +1 -1
  132. package/dist/locale/ko.min.mjs +1 -1
  133. package/dist/locale/ko.mjs +1 -1
  134. package/dist/locale/ku.js +1 -1
  135. package/dist/locale/ku.min.js +1 -1
  136. package/dist/locale/ku.min.mjs +1 -1
  137. package/dist/locale/ku.mjs +1 -1
  138. package/dist/locale/ky.js +1 -1
  139. package/dist/locale/ky.min.js +1 -1
  140. package/dist/locale/ky.min.mjs +1 -1
  141. package/dist/locale/ky.mjs +1 -1
  142. package/dist/locale/lo.js +1 -1
  143. package/dist/locale/lo.min.js +1 -1
  144. package/dist/locale/lo.min.mjs +1 -1
  145. package/dist/locale/lo.mjs +1 -1
  146. package/dist/locale/lt.js +1 -1
  147. package/dist/locale/lt.min.js +1 -1
  148. package/dist/locale/lt.min.mjs +1 -1
  149. package/dist/locale/lt.mjs +1 -1
  150. package/dist/locale/lv.js +1 -1
  151. package/dist/locale/lv.min.js +1 -1
  152. package/dist/locale/lv.min.mjs +1 -1
  153. package/dist/locale/lv.mjs +1 -1
  154. package/dist/locale/mg.js +1 -1
  155. package/dist/locale/mg.min.js +1 -1
  156. package/dist/locale/mg.min.mjs +1 -1
  157. package/dist/locale/mg.mjs +1 -1
  158. package/dist/locale/mn.js +1 -1
  159. package/dist/locale/mn.min.js +1 -1
  160. package/dist/locale/mn.min.mjs +1 -1
  161. package/dist/locale/mn.mjs +1 -1
  162. package/dist/locale/ms.js +1 -1
  163. package/dist/locale/ms.min.js +1 -1
  164. package/dist/locale/ms.min.mjs +1 -1
  165. package/dist/locale/ms.mjs +1 -1
  166. package/dist/locale/my.js +1 -1
  167. package/dist/locale/my.min.js +1 -1
  168. package/dist/locale/my.min.mjs +1 -1
  169. package/dist/locale/my.mjs +1 -1
  170. package/dist/locale/nb-no.js +1 -1
  171. package/dist/locale/nb-no.min.js +1 -1
  172. package/dist/locale/nb-no.min.mjs +1 -1
  173. package/dist/locale/nb-no.mjs +1 -1
  174. package/dist/locale/nl.js +1 -1
  175. package/dist/locale/nl.min.js +1 -1
  176. package/dist/locale/nl.min.mjs +1 -1
  177. package/dist/locale/nl.mjs +1 -1
  178. package/dist/locale/no.js +1 -1
  179. package/dist/locale/no.min.js +1 -1
  180. package/dist/locale/no.min.mjs +1 -1
  181. package/dist/locale/no.mjs +1 -1
  182. package/dist/locale/pa.js +1 -1
  183. package/dist/locale/pa.min.js +1 -1
  184. package/dist/locale/pa.min.mjs +1 -1
  185. package/dist/locale/pa.mjs +1 -1
  186. package/dist/locale/pl.js +1 -1
  187. package/dist/locale/pl.min.js +1 -1
  188. package/dist/locale/pl.min.mjs +1 -1
  189. package/dist/locale/pl.mjs +1 -1
  190. package/dist/locale/pt-br.js +1 -1
  191. package/dist/locale/pt-br.min.js +1 -1
  192. package/dist/locale/pt-br.min.mjs +1 -1
  193. package/dist/locale/pt-br.mjs +1 -1
  194. package/dist/locale/pt.js +1 -1
  195. package/dist/locale/pt.min.js +1 -1
  196. package/dist/locale/pt.min.mjs +1 -1
  197. package/dist/locale/pt.mjs +1 -1
  198. package/dist/locale/ro.js +1 -1
  199. package/dist/locale/ro.min.js +1 -1
  200. package/dist/locale/ro.min.mjs +1 -1
  201. package/dist/locale/ro.mjs +1 -1
  202. package/dist/locale/ru.js +1 -1
  203. package/dist/locale/ru.min.js +1 -1
  204. package/dist/locale/ru.min.mjs +1 -1
  205. package/dist/locale/ru.mjs +1 -1
  206. package/dist/locale/sk.js +1 -1
  207. package/dist/locale/sk.min.js +1 -1
  208. package/dist/locale/sk.min.mjs +1 -1
  209. package/dist/locale/sk.mjs +1 -1
  210. package/dist/locale/sl.js +1 -1
  211. package/dist/locale/sl.min.js +1 -1
  212. package/dist/locale/sl.min.mjs +1 -1
  213. package/dist/locale/sl.mjs +1 -1
  214. package/dist/locale/sr.js +1 -1
  215. package/dist/locale/sr.min.js +1 -1
  216. package/dist/locale/sr.min.mjs +1 -1
  217. package/dist/locale/sr.mjs +1 -1
  218. package/dist/locale/sv.js +1 -1
  219. package/dist/locale/sv.min.js +1 -1
  220. package/dist/locale/sv.min.mjs +1 -1
  221. package/dist/locale/sv.mjs +1 -1
  222. package/dist/locale/sw.js +1 -1
  223. package/dist/locale/sw.min.js +1 -1
  224. package/dist/locale/sw.min.mjs +1 -1
  225. package/dist/locale/sw.mjs +1 -1
  226. package/dist/locale/ta.js +1 -1
  227. package/dist/locale/ta.min.js +1 -1
  228. package/dist/locale/ta.min.mjs +1 -1
  229. package/dist/locale/ta.mjs +1 -1
  230. package/dist/locale/te.js +1 -1
  231. package/dist/locale/te.min.js +1 -1
  232. package/dist/locale/te.min.mjs +1 -1
  233. package/dist/locale/te.mjs +1 -1
  234. package/dist/locale/th.js +1 -1
  235. package/dist/locale/th.min.js +1 -1
  236. package/dist/locale/th.min.mjs +1 -1
  237. package/dist/locale/th.mjs +1 -1
  238. package/dist/locale/tk.js +1 -1
  239. package/dist/locale/tk.min.js +1 -1
  240. package/dist/locale/tk.min.mjs +1 -1
  241. package/dist/locale/tk.mjs +1 -1
  242. package/dist/locale/tr.js +1 -1
  243. package/dist/locale/tr.min.js +1 -1
  244. package/dist/locale/tr.min.mjs +1 -1
  245. package/dist/locale/tr.mjs +1 -1
  246. package/dist/locale/ug-cn.js +1 -1
  247. package/dist/locale/ug-cn.min.js +1 -1
  248. package/dist/locale/ug-cn.min.mjs +1 -1
  249. package/dist/locale/ug-cn.mjs +1 -1
  250. package/dist/locale/uk.js +1 -1
  251. package/dist/locale/uk.min.js +1 -1
  252. package/dist/locale/uk.min.mjs +1 -1
  253. package/dist/locale/uk.mjs +1 -1
  254. package/dist/locale/uz-uz.js +1 -1
  255. package/dist/locale/uz-uz.min.js +1 -1
  256. package/dist/locale/uz-uz.min.mjs +1 -1
  257. package/dist/locale/uz-uz.mjs +1 -1
  258. package/dist/locale/vi.js +1 -1
  259. package/dist/locale/vi.min.js +1 -1
  260. package/dist/locale/vi.min.mjs +1 -1
  261. package/dist/locale/vi.mjs +1 -1
  262. package/dist/locale/zh-cn.js +1 -1
  263. package/dist/locale/zh-cn.min.js +1 -1
  264. package/dist/locale/zh-cn.min.mjs +1 -1
  265. package/dist/locale/zh-cn.mjs +1 -1
  266. package/dist/locale/zh-hk.js +1 -1
  267. package/dist/locale/zh-hk.min.js +1 -1
  268. package/dist/locale/zh-hk.min.mjs +1 -1
  269. package/dist/locale/zh-hk.mjs +1 -1
  270. package/dist/locale/zh-mo.js +1 -1
  271. package/dist/locale/zh-mo.min.js +1 -1
  272. package/dist/locale/zh-mo.min.mjs +1 -1
  273. package/dist/locale/zh-mo.mjs +1 -1
  274. package/dist/locale/zh-tw.js +1 -1
  275. package/dist/locale/zh-tw.min.js +1 -1
  276. package/dist/locale/zh-tw.min.mjs +1 -1
  277. package/dist/locale/zh-tw.mjs +1 -1
  278. package/es/component.mjs +3 -3
  279. package/es/components/button/src/button-custom.mjs +49 -1
  280. package/es/components/button/src/button-custom.mjs.map +1 -1
  281. package/es/components/button/src/button-group.mjs +1 -1
  282. package/es/components/button/src/button-group.mjs.map +1 -1
  283. package/es/components/button/src/button-group.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  284. package/es/components/button/src/button-group2.mjs.map +1 -1
  285. package/es/components/cascader/src/cascader.d.ts +3 -131
  286. package/es/components/cascader/src/cascader.mjs +15 -24
  287. package/es/components/cascader/src/cascader.mjs.map +1 -1
  288. package/es/components/cascader/src/cascader.vue.d.ts +0 -6
  289. package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +12 -37
  290. package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  291. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  292. package/es/components/cascader-panel/src/index.mjs.map +1 -1
  293. package/es/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.mjs +8 -0
  294. package/es/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  295. package/es/components/color-picker/src/color-picker.d.ts +0 -16
  296. package/es/components/color-picker/src/color-picker.mjs +0 -3
  297. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  298. package/es/components/color-picker/src/color-picker.vue.d.ts +0 -1
  299. package/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs +4 -14
  300. package/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  301. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  302. package/es/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
  303. package/es/components/date-picker/src/date-picker.d.ts +0 -3
  304. package/es/components/date-picker/src/props.d.ts +0 -1
  305. package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs +1 -1
  306. package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs +1 -1
  307. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +1 -1
  308. package/es/components/form/index.d.ts +2 -2
  309. package/es/components/form/src/form-item.d.ts +0 -15
  310. package/es/components/form/src/form-item.mjs +0 -11
  311. package/es/components/form/src/form-item.mjs.map +1 -1
  312. package/es/components/form/src/form-item.vue.d.ts +5 -6
  313. package/es/components/form/src/form-item.vue_vue_type_script_setup_true_lang.mjs +15 -46
  314. package/es/components/form/src/form-item.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  315. package/es/components/form/src/form-item2.mjs.map +1 -1
  316. package/es/components/form/src/form.d.ts +0 -20
  317. package/es/components/form/src/form.mjs +0 -15
  318. package/es/components/form/src/form.mjs.map +1 -1
  319. package/es/components/form/src/form.vue.d.ts +0 -2
  320. package/es/components/form/src/form.vue_vue_type_script_setup_true_lang.mjs +3 -19
  321. package/es/components/form/src/form.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  322. package/es/components/form/src/form2.mjs.map +1 -1
  323. package/es/components/form/src/types.d.ts +2 -5
  324. package/es/components/form/src/utils.mjs +1 -32
  325. package/es/components/form/src/utils.mjs.map +1 -1
  326. package/es/components/index.d.ts +2 -2
  327. package/es/components/index.mjs +6 -6
  328. package/es/components/input-number/src/input-number.d.ts +0 -5
  329. package/es/components/input-number/src/input-number.mjs +0 -1
  330. package/es/components/input-number/src/input-number.mjs.map +1 -1
  331. package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs +2 -4
  332. package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  333. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  334. package/es/components/link/src/link.d.ts +2 -2
  335. package/es/components/link/src/link.mjs +3 -9
  336. package/es/components/link/src/link.mjs.map +1 -1
  337. package/es/components/link/src/link.vue.d.ts +1 -1
  338. package/es/components/link/src/link.vue_vue_type_script_setup_true_lang.mjs +2 -13
  339. package/es/components/link/src/link.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  340. package/es/components/link/src/link2.mjs.map +1 -1
  341. package/es/components/menu/src/menu.mjs +1 -1
  342. package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs +1 -1
  343. package/es/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.mjs +26 -77
  344. package/es/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  345. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  346. package/es/components/select/src/select-dropdown.mjs +7 -10
  347. package/es/components/select/src/select-dropdown.mjs.map +1 -1
  348. package/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs +4 -22
  349. package/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs.map +1 -1
  350. package/es/components/select/src/select.d.ts +1 -21
  351. package/es/components/select/src/select.mjs +0 -32
  352. package/es/components/select/src/select.mjs.map +1 -1
  353. package/es/components/select/src/select.vue.d.ts +0 -40
  354. package/es/components/select/src/select.vue_vue_type_script_lang.mjs +1 -1
  355. package/es/components/select/src/select.vue_vue_type_script_lang.mjs.map +1 -1
  356. package/es/components/select/src/select2.mjs +8 -44
  357. package/es/components/select/src/select2.mjs.map +1 -1
  358. package/es/components/select/src/useSelect.mjs +12 -26
  359. package/es/components/select/src/useSelect.mjs.map +1 -1
  360. package/es/components/select-v2/src/defaults.d.ts +1 -21
  361. package/es/components/select-v2/src/defaults.mjs +1 -38
  362. package/es/components/select-v2/src/defaults.mjs.map +1 -1
  363. package/es/components/select-v2/src/select.mjs +8 -44
  364. package/es/components/select-v2/src/select.mjs.map +1 -1
  365. package/es/components/select-v2/src/select.vue.d.ts +0 -38
  366. package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs +1 -1
  367. package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs.map +1 -1
  368. package/es/components/select-v2/src/useSelect.mjs +20 -60
  369. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  370. package/es/components/space/src/space.d.ts +21 -7
  371. package/es/components/space/src/space.mjs +2 -5
  372. package/es/components/space/src/space.mjs.map +1 -1
  373. package/es/components/space/src/use-space.mjs +7 -4
  374. package/es/components/space/src/use-space.mjs.map +1 -1
  375. package/es/components/splitter/src/split-bar.mjs.map +1 -1
  376. package/es/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.mjs +51 -58
  377. package/es/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  378. package/es/components/splitter/src/splitter.d.ts +1 -1
  379. package/es/components/splitter/src/splitter.mjs +1 -1
  380. package/es/components/splitter/src/splitter.mjs.map +1 -1
  381. package/es/components/splitter/src/splitter.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  382. package/es/components/splitter/src/splitter2.mjs.map +1 -1
  383. package/es/components/table/src/table.vue_vue_type_script_lang.mjs +1 -1
  384. package/es/components/time-picker/src/common/picker.mjs.map +1 -1
  385. package/es/components/time-picker/src/common/picker.vue.d.ts +0 -3
  386. package/es/components/time-picker/src/common/picker.vue_vue_type_script_setup_true_lang.mjs +4 -3
  387. package/es/components/time-picker/src/common/picker.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  388. package/es/components/time-picker/src/common/props.d.ts +0 -1
  389. package/es/components/time-picker/src/common/props.mjs +0 -1
  390. package/es/components/time-picker/src/common/props.mjs.map +1 -1
  391. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs +1 -1
  392. package/es/components/time-picker/src/time-picker.d.ts +0 -3
  393. package/es/components/time-picker/src/time-picker.mjs +2 -3
  394. package/es/components/time-picker/src/time-picker.mjs.map +1 -1
  395. package/es/components/time-select/src/time-select.d.ts +0 -7
  396. package/es/components/time-select/src/time-select.mjs +0 -4
  397. package/es/components/time-select/src/time-select.mjs.map +1 -1
  398. package/es/components/time-select/src/time-select.vue.d.ts +0 -3
  399. package/es/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.mjs +0 -2
  400. package/es/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  401. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  402. package/es/components/transfer/src/composables/index.d.ts +2 -1
  403. package/es/components/transfer/src/composables/index.mjs +2 -1
  404. package/es/components/transfer/src/composables/use-tab.d.ts +15 -0
  405. package/es/components/transfer/src/composables/use-tab.mjs +47 -0
  406. package/es/components/transfer/src/composables/use-tab.mjs.map +1 -0
  407. package/es/components/transfer/src/transfer-panel.d.ts +2 -3
  408. package/es/components/transfer/src/transfer-panel.vue.d.ts +4 -31
  409. package/es/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.mjs +40 -67
  410. package/es/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  411. package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
  412. package/es/components/transfer/src/transfer.vue.d.ts +359 -5
  413. package/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs +162 -55
  414. package/es/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  415. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  416. package/es/components/tree-select/src/tree-select.vue.d.ts +0 -37
  417. package/es/components/tree-select/src/tree.mjs +16 -3
  418. package/es/components/tree-select/src/tree.mjs.map +1 -1
  419. package/es/index.d.ts +2 -2
  420. package/es/index.mjs +11 -11
  421. package/es/plugin.mjs +1 -1
  422. package/es/version.mjs +1 -1
  423. package/es/version.mjs.map +1 -1
  424. package/lib/component.js +107 -107
  425. package/lib/components/button/src/button-custom.js +49 -1
  426. package/lib/components/button/src/button-custom.js.map +1 -1
  427. package/lib/components/button/src/button-group.js +1 -1
  428. package/lib/components/button/src/button-group.js.map +1 -1
  429. package/lib/components/button/src/button-group.vue_vue_type_script_setup_true_lang.js.map +1 -1
  430. package/lib/components/button/src/button-group2.js.map +1 -1
  431. package/lib/components/cascader/src/cascader.d.ts +3 -131
  432. package/lib/components/cascader/src/cascader.js +19 -29
  433. package/lib/components/cascader/src/cascader.js.map +1 -1
  434. package/lib/components/cascader/src/cascader.vue.d.ts +0 -6
  435. package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +36 -61
  436. package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  437. package/lib/components/cascader/src/cascader2.js.map +1 -1
  438. package/lib/components/cascader-panel/src/index.js.map +1 -1
  439. package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js +8 -0
  440. package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js.map +1 -1
  441. package/lib/components/color-picker/src/color-picker.d.ts +0 -16
  442. package/lib/components/color-picker/src/color-picker.js +0 -3
  443. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  444. package/lib/components/color-picker/src/color-picker.vue.d.ts +0 -1
  445. package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js +21 -31
  446. package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  447. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  448. package/lib/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
  449. package/lib/components/date-picker/src/date-picker.d.ts +0 -3
  450. package/lib/components/date-picker/src/props.d.ts +0 -1
  451. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js +18 -18
  452. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js.map +1 -1
  453. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js +23 -23
  454. package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js.map +1 -1
  455. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +1 -1
  456. package/lib/components/form/index.d.ts +2 -2
  457. package/lib/components/form/src/form-item.d.ts +0 -15
  458. package/lib/components/form/src/form-item.js +0 -11
  459. package/lib/components/form/src/form-item.js.map +1 -1
  460. package/lib/components/form/src/form-item.vue.d.ts +5 -6
  461. package/lib/components/form/src/form-item.vue_vue_type_script_setup_true_lang.js +14 -45
  462. package/lib/components/form/src/form-item.vue_vue_type_script_setup_true_lang.js.map +1 -1
  463. package/lib/components/form/src/form-item2.js.map +1 -1
  464. package/lib/components/form/src/form.d.ts +0 -20
  465. package/lib/components/form/src/form.js +0 -15
  466. package/lib/components/form/src/form.js.map +1 -1
  467. package/lib/components/form/src/form.vue.d.ts +0 -2
  468. package/lib/components/form/src/form.vue_vue_type_script_setup_true_lang.js +2 -18
  469. package/lib/components/form/src/form.vue_vue_type_script_setup_true_lang.js.map +1 -1
  470. package/lib/components/form/src/form2.js.map +1 -1
  471. package/lib/components/form/src/types.d.ts +2 -5
  472. package/lib/components/form/src/utils.js +0 -32
  473. package/lib/components/form/src/utils.js.map +1 -1
  474. package/lib/components/index.d.ts +2 -2
  475. package/lib/components/index.js +123 -123
  476. package/lib/components/input-number/src/input-number.d.ts +0 -5
  477. package/lib/components/input-number/src/input-number.js +0 -1
  478. package/lib/components/input-number/src/input-number.js.map +1 -1
  479. package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js +13 -15
  480. package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js.map +1 -1
  481. package/lib/components/input-number/src/input-number2.js.map +1 -1
  482. package/lib/components/link/src/link.d.ts +2 -2
  483. package/lib/components/link/src/link.js +3 -9
  484. package/lib/components/link/src/link.js.map +1 -1
  485. package/lib/components/link/src/link.vue.d.ts +1 -1
  486. package/lib/components/link/src/link.vue_vue_type_script_setup_true_lang.js +6 -17
  487. package/lib/components/link/src/link.vue_vue_type_script_setup_true_lang.js.map +1 -1
  488. package/lib/components/link/src/link2.js.map +1 -1
  489. package/lib/components/menu/src/menu.js +7 -7
  490. package/lib/components/menu/src/menu.js.map +1 -1
  491. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js +19 -19
  492. package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
  493. package/lib/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.js +26 -77
  494. package/lib/components/scrollbar/src/thumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
  495. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  496. package/lib/components/select/src/select-dropdown.js +6 -9
  497. package/lib/components/select/src/select-dropdown.js.map +1 -1
  498. package/lib/components/select/src/select-dropdown.vue_vue_type_script_lang.js +3 -21
  499. package/lib/components/select/src/select-dropdown.vue_vue_type_script_lang.js.map +1 -1
  500. package/lib/components/select/src/select.d.ts +1 -21
  501. package/lib/components/select/src/select.js +10 -43
  502. package/lib/components/select/src/select.js.map +1 -1
  503. package/lib/components/select/src/select.vue.d.ts +0 -40
  504. package/lib/components/select/src/select.vue_vue_type_script_lang.js +12 -12
  505. package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
  506. package/lib/components/select/src/select2.js +8 -44
  507. package/lib/components/select/src/select2.js.map +1 -1
  508. package/lib/components/select/src/useSelect.js +11 -25
  509. package/lib/components/select/src/useSelect.js.map +1 -1
  510. package/lib/components/select-v2/src/defaults.d.ts +1 -21
  511. package/lib/components/select-v2/src/defaults.js +12 -50
  512. package/lib/components/select-v2/src/defaults.js.map +1 -1
  513. package/lib/components/select-v2/src/select.js +8 -44
  514. package/lib/components/select-v2/src/select.js.map +1 -1
  515. package/lib/components/select-v2/src/select.vue.d.ts +0 -38
  516. package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js +12 -12
  517. package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
  518. package/lib/components/select-v2/src/useSelect.js +19 -59
  519. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  520. package/lib/components/space/src/space.d.ts +21 -7
  521. package/lib/components/space/src/space.js +2 -5
  522. package/lib/components/space/src/space.js.map +1 -1
  523. package/lib/components/space/src/use-space.js +7 -4
  524. package/lib/components/space/src/use-space.js.map +1 -1
  525. package/lib/components/splitter/src/split-bar.js.map +1 -1
  526. package/lib/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.js +50 -57
  527. package/lib/components/splitter/src/split-bar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  528. package/lib/components/splitter/src/splitter.d.ts +1 -1
  529. package/lib/components/splitter/src/splitter.js +1 -1
  530. package/lib/components/splitter/src/splitter.js.map +1 -1
  531. package/lib/components/splitter/src/splitter.vue_vue_type_script_setup_true_lang.js.map +1 -1
  532. package/lib/components/splitter/src/splitter2.js.map +1 -1
  533. package/lib/components/table/src/table.vue_vue_type_script_lang.js +8 -8
  534. package/lib/components/table/src/table.vue_vue_type_script_lang.js.map +1 -1
  535. package/lib/components/time-picker/src/common/picker.js.map +1 -1
  536. package/lib/components/time-picker/src/common/picker.vue.d.ts +0 -3
  537. package/lib/components/time-picker/src/common/picker.vue_vue_type_script_setup_true_lang.js +4 -3
  538. package/lib/components/time-picker/src/common/picker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  539. package/lib/components/time-picker/src/common/props.d.ts +0 -1
  540. package/lib/components/time-picker/src/common/props.js +0 -1
  541. package/lib/components/time-picker/src/common/props.js.map +1 -1
  542. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js +10 -10
  543. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  544. package/lib/components/time-picker/src/time-picker.d.ts +0 -3
  545. package/lib/components/time-picker/src/time-picker.js +0 -1
  546. package/lib/components/time-picker/src/time-picker.js.map +1 -1
  547. package/lib/components/time-select/src/time-select.d.ts +0 -7
  548. package/lib/components/time-select/src/time-select.js +0 -4
  549. package/lib/components/time-select/src/time-select.js.map +1 -1
  550. package/lib/components/time-select/src/time-select.vue.d.ts +0 -3
  551. package/lib/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.js +0 -2
  552. package/lib/components/time-select/src/time-select.vue_vue_type_script_setup_true_lang.js.map +1 -1
  553. package/lib/components/time-select/src/time-select2.js.map +1 -1
  554. package/lib/components/transfer/src/composables/index.d.ts +2 -1
  555. package/lib/components/transfer/src/composables/index.js +3 -1
  556. package/lib/components/transfer/src/composables/use-tab.d.ts +15 -0
  557. package/lib/components/transfer/src/composables/use-tab.js +49 -0
  558. package/lib/components/transfer/src/composables/use-tab.js.map +1 -0
  559. package/lib/components/transfer/src/transfer-panel.d.ts +2 -3
  560. package/lib/components/transfer/src/transfer-panel.vue.d.ts +4 -31
  561. package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.js +40 -67
  562. package/lib/components/transfer/src/transfer-panel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  563. package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
  564. package/lib/components/transfer/src/transfer.vue.d.ts +359 -5
  565. package/lib/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.js +161 -54
  566. package/lib/components/transfer/src/transfer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  567. package/lib/components/transfer/src/transfer2.js.map +1 -1
  568. package/lib/components/tree-select/src/tree-select.vue.d.ts +0 -37
  569. package/lib/components/tree-select/src/tree.js +15 -2
  570. package/lib/components/tree-select/src/tree.js.map +1 -1
  571. package/lib/index.d.ts +2 -2
  572. package/lib/index.js +265 -265
  573. package/lib/plugin.js +12 -12
  574. package/lib/version.js +1 -1
  575. package/lib/version.js.map +1 -1
  576. package/package.json +3 -3
  577. package/tags.json +1 -1
  578. package/theme-chalk/display.css +1 -1
  579. package/theme-chalk/el-cascader-panel.css +1 -1
  580. package/theme-chalk/el-cascader.css +1 -1
  581. package/theme-chalk/el-checkbox-group.css +1 -1
  582. package/theme-chalk/el-checkbox.css +1 -1
  583. package/theme-chalk/el-color-picker-panel.css +1 -1
  584. package/theme-chalk/el-color-picker.css +1 -1
  585. package/theme-chalk/el-date-picker-panel.css +1 -1
  586. package/theme-chalk/el-form-item.css +1 -1
  587. package/theme-chalk/el-form.css +1 -1
  588. package/theme-chalk/el-input-number.css +1 -1
  589. package/theme-chalk/el-input.css +1 -1
  590. package/theme-chalk/el-link.css +1 -1
  591. package/theme-chalk/el-option.css +1 -1
  592. package/theme-chalk/el-radio-group.css +1 -1
  593. package/theme-chalk/el-radio.css +1 -1
  594. package/theme-chalk/el-rate.css +1 -1
  595. package/theme-chalk/el-scrollbar.css +1 -1
  596. package/theme-chalk/el-segmented.css +1 -1
  597. package/theme-chalk/el-select-dropdown-v2.css +1 -1
  598. package/theme-chalk/el-select-dropdown.css +1 -1
  599. package/theme-chalk/el-select-v2.css +1 -1
  600. package/theme-chalk/el-select.css +1 -1
  601. package/theme-chalk/el-slider.css +1 -1
  602. package/theme-chalk/el-space.css +1 -1
  603. package/theme-chalk/el-splitter.css +1 -1
  604. package/theme-chalk/el-switch.css +1 -1
  605. package/theme-chalk/el-text.css +1 -1
  606. package/theme-chalk/el-time-picker.css +1 -1
  607. package/theme-chalk/el-time-select.css +1 -1
  608. package/theme-chalk/el-transfer.css +1 -1
  609. package/theme-chalk/el-upload.css +1 -1
  610. package/theme-chalk/index.css +1 -1
  611. package/theme-chalk/src/cascader-panel.scss +61 -0
  612. package/theme-chalk/src/cascader.scss +69 -0
  613. package/theme-chalk/src/checkbox-group.scss +6 -10
  614. package/theme-chalk/src/checkbox.scss +21 -23
  615. package/theme-chalk/src/color-picker-panel.scss +91 -16
  616. package/theme-chalk/src/color-picker.scss +64 -6
  617. package/theme-chalk/src/common/var.scss +10 -17
  618. package/theme-chalk/src/date-picker/date-picker.scss +75 -0
  619. package/theme-chalk/src/date-picker/date-range-picker.scss +95 -0
  620. package/theme-chalk/src/date-picker/picker-panel.scss +95 -1
  621. package/theme-chalk/src/date-picker/picker.scss +93 -0
  622. package/theme-chalk/src/date-picker/time-picker.scss +49 -0
  623. package/theme-chalk/src/date-picker/time-range-picker.scss +29 -0
  624. package/theme-chalk/src/date-picker/time-spinner.scss +35 -0
  625. package/theme-chalk/src/form-item.scss +20 -122
  626. package/theme-chalk/src/form.scss +0 -29
  627. package/theme-chalk/src/input-number.scss +24 -123
  628. package/theme-chalk/src/input.scss +18 -57
  629. package/theme-chalk/src/link.scss +0 -13
  630. package/theme-chalk/src/option.scss +11 -31
  631. package/theme-chalk/src/radio-group.scss +4 -6
  632. package/theme-chalk/src/radio.scss +21 -23
  633. package/theme-chalk/src/rate.scss +15 -17
  634. package/theme-chalk/src/scrollbar.scss +0 -2
  635. package/theme-chalk/src/segmented.scss +7 -9
  636. package/theme-chalk/src/select-dropdown.scss +35 -62
  637. package/theme-chalk/src/select.scss +37 -65
  638. package/theme-chalk/src/slider.scss +44 -45
  639. package/theme-chalk/src/space.scss +17 -8
  640. package/theme-chalk/src/splitter.scss +49 -81
  641. package/theme-chalk/src/switch.scss +36 -54
  642. package/theme-chalk/src/text.scss +0 -1
  643. package/theme-chalk/src/time-select.scss +17 -0
  644. package/theme-chalk/src/transfer.scss +223 -120
  645. package/theme-chalk/src/upload.scss +176 -2
  646. package/web-types.json +1 -1
  647. package/es/components/form/src/form-label-wrap.mjs +0 -72
  648. package/es/components/form/src/form-label-wrap.mjs.map +0 -1
  649. package/es/components/form/src/utils.d.ts +0 -13
  650. package/lib/components/form/src/form-label-wrap.js +0 -73
  651. package/lib/components/form/src/form-label-wrap.js.map +0 -1
  652. package/lib/components/form/src/utils.d.ts +0 -13
@@ -1 +1 @@
1
- {"version":3,"file":"form-item2.js","names":[],"sources":["../../../../../../packages/components/form/src/form-item.vue"],"sourcesContent":["<template>\n <div\n ref=\"formItemRef\"\n :class=\"formItemClasses\"\n :role=\"isGroup ? 'group' : undefined\"\n :aria-labelledby=\"isGroup ? labelId : undefined\"\n >\n <form-label-wrap\n :is-auto-width=\"labelStyle.width === 'auto'\"\n :update-all=\"formContext?.labelWidth === 'auto'\"\n >\n <component\n :is=\"labelFor ? 'label' : 'div'\"\n v-if=\"!!(label || $slots.label)\"\n :id=\"labelId\"\n :for=\"labelFor\"\n :class=\"ns.e('label')\"\n :style=\"labelStyle\"\n >\n <slot name=\"label\" :label=\"currentLabel\">\n {{ currentLabel }}\n </slot>\n </component>\n </form-label-wrap>\n\n <div :class=\"ns.e('content')\" :style=\"contentStyle\">\n <slot />\n <transition-group :name=\"`${ns.namespace.value}-zoom-in-top`\">\n <slot v-if=\"shouldShowError\" name=\"error\" :error=\"validateMessage\">\n <div :class=\"validateClasses\">\n {{ validateMessage }}\n </div>\n </slot>\n </transition-group>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n useSlots,\n watch,\n} from 'vue'\nimport AsyncValidator from 'async-validator'\nimport { refDebounced } from '@vueuse/core'\nimport {\n addUnit,\n ensureArray,\n getProp,\n isArray,\n isBoolean,\n isFunction,\n} from '@element-plus/utils'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport FormLabelWrap from './form-label-wrap'\nimport { formContextKey, formItemContextKey } from './constants'\nimport { cloneDeep } from 'lodash-unified'\n\nimport type { CSSProperties } from 'vue'\nimport type { RuleItem } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type {\n FormItemContext,\n FormItemRule,\n FormValidateFailure,\n} from './types'\nimport type { FormItemProps, FormItemValidateState } from './form-item'\n\ndefineOptions({\n name: 'ElFormItem',\n})\nconst props = withDefaults(defineProps<FormItemProps>(), {\n labelPosition: '',\n showMessage: true,\n required: undefined,\n inlineMessage: undefined,\n})\nconst slots = useSlots()\n\nconst formContext = inject(formContextKey, undefined)\nconst parentFormItemContext = inject(formItemContextKey, undefined)\n\nconst _size = useFormSize(undefined, { formItem: false })\nconst ns = useNamespace('form-item')\n\nconst labelId = useId().value\nconst inputIds = ref<string[]>([])\n\nconst validateState = ref<FormItemValidateState>('')\nconst validateStateDebounced = refDebounced(validateState, 100)\nconst validateMessage = ref('')\nconst formItemRef = ref<HTMLDivElement>()\n// special inline value.\nlet initialValue: any = undefined\nlet isResettingField = false\n\nconst labelPosition = computed(() =>\n formContext?.isMobile\n ? 'top'\n : props.labelPosition || formContext?.labelPosition\n)\n\nconst labelStyle = computed<CSSProperties>(() => {\n if (labelPosition.value === 'top' || formContext?.isMobile) {\n return {}\n }\n\n const labelWidth = addUnit(props.labelWidth ?? formContext?.labelWidth)\n return { width: labelWidth }\n})\n\nconst contentStyle = computed<CSSProperties>(() => {\n if (\n labelPosition.value === 'top' ||\n formContext?.inline ||\n formContext?.isMobile\n ) {\n return {}\n }\n if (!props.label && !props.labelWidth && isNested) {\n return {}\n }\n const labelWidth = addUnit(props.labelWidth ?? formContext?.labelWidth)\n if (!props.label && !slots.label) {\n return { marginLeft: labelWidth }\n }\n return {}\n})\n\nconst formItemClasses = computed(() => [\n ns.b(),\n ns.m(_size.value),\n ns.is('error', validateState.value === 'error'),\n ns.is('validating', validateState.value === 'validating'),\n ns.is('success', validateState.value === 'success'),\n ns.is('required', isRequired.value || props.required),\n ns.is('no-asterisk', formContext?.hideRequiredAsterisk),\n ns.is('mobile', !!formContext?.isMobile),\n formContext?.requireAsteriskPosition === 'right'\n ? 'asterisk-right'\n : 'asterisk-left',\n {\n [ns.m('feedback')]: formContext?.statusIcon,\n [ns.m(`label-${labelPosition.value}`)]: labelPosition.value,\n },\n])\n\nconst _inlineMessage = computed(() =>\n formContext?.isMobile\n ? false\n : isBoolean(props.inlineMessage)\n ? props.inlineMessage\n : formContext?.inlineMessage || false\n)\n\nconst validateClasses = computed(() => [\n ns.e('error'),\n { [ns.em('error', 'inline')]: _inlineMessage.value },\n])\n\nconst propString = computed(() => {\n if (!props.prop) return ''\n return isArray(props.prop) ? props.prop.join('.') : props.prop\n})\n\nconst hasLabel = computed<boolean>(() => {\n return !!(props.label || slots.label)\n})\n\nconst labelFor = computed<string | undefined>(() => {\n return (\n props.for ?? (inputIds.value.length === 1 ? inputIds.value[0] : undefined)\n )\n})\n\nconst isGroup = computed<boolean>(() => {\n return !labelFor.value && hasLabel.value\n})\n\nconst isNested = !!parentFormItemContext\n\nconst fieldValue = computed(() => {\n const model = formContext?.model\n if (!model || !props.prop) {\n return\n }\n return getProp(model, props.prop).value\n})\n\nconst normalizedRules = computed(() => {\n const { required } = props\n\n const rules: FormItemRule[] = []\n\n if (props.rules) {\n rules.push(...ensureArray(props.rules))\n }\n\n const formRules = formContext?.rules\n if (formRules && props.prop) {\n const _rules = getProp<Arrayable<FormItemRule> | undefined>(\n formRules,\n props.prop\n ).value\n if (_rules) {\n rules.push(...ensureArray(_rules))\n }\n }\n\n if (required !== undefined) {\n const requiredRules = rules\n .map((rule, i) => [rule, i] as const)\n .filter(([rule]) => 'required' in rule)\n\n if (requiredRules.length > 0) {\n for (const [rule, i] of requiredRules) {\n if (rule.required === required) continue\n rules[i] = { ...rule, required }\n }\n } else {\n rules.push({ required })\n }\n }\n\n return rules\n})\n\nconst validateEnabled = computed(() => normalizedRules.value.length > 0)\n\nconst getFilteredRule = (trigger: string) => {\n const rules = normalizedRules.value\n return (\n rules\n .filter((rule) => {\n if (!rule.trigger || !trigger) return true\n if (isArray(rule.trigger)) {\n return rule.trigger.includes(trigger)\n } else {\n return rule.trigger === trigger\n }\n })\n // exclude trigger\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n .map(({ trigger, ...rule }): RuleItem => rule)\n )\n}\n\nconst isRequired = computed(() =>\n normalizedRules.value.some((rule) => rule.required)\n)\n\nconst shouldShowError = computed(\n () =>\n validateStateDebounced.value === 'error' &&\n props.showMessage &&\n (formContext?.showMessage ?? true)\n)\n\nconst currentLabel = computed(\n () => `${props.label || ''}${formContext?.labelSuffix || ''}`\n)\n\nconst setValidationState = (state: FormItemValidateState) => {\n validateState.value = state\n}\n\nconst onValidationFailed = (error: FormValidateFailure) => {\n const { errors, fields } = error\n if (!errors || !fields) {\n console.error(error)\n }\n\n setValidationState('error')\n validateMessage.value = errors\n ? (errors?.[0]?.message ?? `${props.prop} is required`)\n : ''\n\n formContext?.emit('validate', props.prop!, false, validateMessage.value)\n}\n\nconst onValidationSucceeded = () => {\n setValidationState('success')\n formContext?.emit('validate', props.prop!, true, '')\n}\n\nconst doValidate = async (rules: RuleItem[]): Promise<true> => {\n const modelName = propString.value\n const validator = new AsyncValidator({\n [modelName]: rules,\n })\n return validator\n .validate({ [modelName]: fieldValue.value }, { firstFields: true })\n .then(() => {\n onValidationSucceeded()\n return true as const\n })\n .catch((err: FormValidateFailure) => {\n onValidationFailed(err)\n return Promise.reject(err)\n })\n}\n\nconst validate: FormItemContext['validate'] = async (trigger, callback) => {\n // skip validation if its resetting\n if (isResettingField || !props.prop) {\n return false\n }\n\n const hasCallback = isFunction(callback)\n if (!validateEnabled.value) {\n callback?.(false)\n return false\n }\n\n const rules = getFilteredRule(trigger)\n if (rules.length === 0) {\n callback?.(true)\n return true\n }\n\n setValidationState('validating')\n\n return doValidate(rules)\n .then(() => {\n callback?.(true)\n return true as const\n })\n .catch((err: FormValidateFailure) => {\n const { fields } = err\n callback?.(false, fields)\n return hasCallback ? false : Promise.reject(fields)\n })\n}\n\nconst clearValidate: FormItemContext['clearValidate'] = () => {\n setValidationState('')\n validateMessage.value = ''\n isResettingField = false\n}\n\nconst resetField: FormItemContext['resetField'] = async () => {\n const model = formContext?.model\n if (!model || !props.prop) return\n\n const computedValue = getProp(model, props.prop)\n\n // prevent validation from being triggered\n isResettingField = true\n\n computedValue.value = cloneDeep(initialValue)\n\n await nextTick()\n clearValidate()\n\n isResettingField = false\n}\n\nconst addInputId: FormItemContext['addInputId'] = (id: string) => {\n if (!inputIds.value.includes(id)) {\n inputIds.value.push(id)\n }\n}\n\nconst removeInputId: FormItemContext['removeInputId'] = (id: string) => {\n inputIds.value = inputIds.value.filter((listId) => listId !== id)\n}\n\nconst setInitialValue: FormItemContext['setInitialValue'] = (value: any) => {\n initialValue = cloneDeep(value)\n}\n\nconst getInitialValue: FormItemContext['getInitialValue'] = () => initialValue\n\nwatch(\n () => props.error,\n (val) => {\n validateMessage.value = val || ''\n setValidationState(val ? 'error' : '')\n },\n { immediate: true }\n)\n\nwatch(\n () => props.validateStatus,\n (val) => setValidationState(val || '')\n)\n\nconst context: FormItemContext = reactive({\n ...toRefs(props),\n $el: formItemRef,\n size: _size,\n validateMessage,\n validateState,\n labelId,\n inputIds,\n isGroup,\n hasLabel,\n fieldValue,\n addInputId,\n removeInputId,\n resetField,\n clearValidate,\n validate,\n propString,\n setInitialValue,\n getInitialValue,\n})\n\nprovide(formItemContextKey, context)\n\nwatch(propString, (newPropString, oldPropString) => {\n if (!formContext || !oldPropString) return\n formContext.removeField(context, oldPropString)\n if (newPropString) {\n setInitialValue(fieldValue.value)\n formContext.addField(context)\n }\n})\n\nonMounted(() => {\n if (props.prop) {\n setInitialValue(fieldValue.value)\n formContext?.addField(context)\n }\n})\n\nonBeforeUnmount(() => {\n formContext?.removeField(context)\n})\n\ndefineExpose({\n /**\n * @description Form item size.\n */\n size: _size,\n /**\n * @description Validation message.\n */\n validateMessage,\n /**\n * @description Validation state.\n */\n validateState,\n /**\n * @description Validate form item.\n */\n validate,\n /**\n * @description Remove validation status of the field.\n */\n clearValidate,\n /**\n * @description Reset current field and remove validation result.\n */\n resetField,\n /**\n * @description Set initial value for this field. When `resetField` is called, the field will reset to this value.\n */\n setInitialValue,\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"form-item2.js","names":[],"sources":["../../../../../../packages/components/form/src/form-item.vue"],"sourcesContent":["<template>\n <div\n ref=\"formItemRef\"\n :class=\"formItemClasses\"\n :role=\"isGroup ? 'group' : undefined\"\n :aria-labelledby=\"isGroup ? labelId : undefined\"\n >\n <component\n :is=\"labelFor ? 'label' : 'div'\"\n v-if=\"!!(label || $slots.label)\"\n :id=\"labelId\"\n :for=\"labelFor\"\n :class=\"ns.e('label')\"\n >\n <slot name=\"label\" :label=\"currentLabel\">\n {{ currentLabel }}\n </slot>\n </component>\n\n <div :class=\"ns.e('content')\">\n <slot />\n <transition-group :name=\"`${ns.namespace.value}-zoom-in-top`\">\n <slot v-if=\"shouldShowError\" name=\"error\" :error=\"validateMessage\">\n <div :class=\"validateClasses\">\n {{ validateMessage }}\n </div>\n </slot>\n </transition-group>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n useSlots,\n watch,\n} from 'vue'\nimport AsyncValidator from 'async-validator'\nimport { refDebounced } from '@vueuse/core'\nimport {\n ensureArray,\n getProp,\n isArray,\n isBoolean,\n isFunction,\n} from '@element-plus/utils'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey, formItemContextKey } from './constants'\nimport { cloneDeep } from 'lodash-unified'\n\nimport type { RuleItem } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type {\n FormItemContext,\n FormItemRule,\n FormValidateFailure,\n} from './types'\nimport type { FormItemProps, FormItemValidateState } from './form-item'\n\ndefineOptions({\n name: 'ElFormItem',\n})\nconst props = withDefaults(defineProps<FormItemProps>(), {\n showMessage: true,\n required: undefined,\n inlineMessage: undefined,\n})\nconst slots = useSlots()\n\nconst formContext = inject(formContextKey, undefined)\n\nconst _size = useFormSize(undefined, { formItem: false })\nconst ns = useNamespace('form-item')\n\nconst labelId = useId().value\nconst inputIds = ref<string[]>([])\n\nconst validateState = ref<FormItemValidateState>('')\nconst validateStateDebounced = refDebounced(validateState, 100)\nconst validateMessage = ref('')\nconst formItemRef = ref<HTMLDivElement>()\n// special inline value.\nlet initialValue: any = undefined\nlet isResettingField = false\n\nconst formItemClasses = computed(() => [\n ns.b(),\n ns.m(_size.value),\n ns.is('error', validateState.value === 'error'),\n ns.is('validating', validateState.value === 'validating'),\n ns.is('success', validateState.value === 'success'),\n ns.is('required', isRequired.value || props.required),\n ns.is('no-asterisk', formContext?.hideRequiredAsterisk),\n formContext?.requireAsteriskPosition === 'right'\n ? 'asterisk-right'\n : 'asterisk-left',\n {\n [ns.m('feedback')]: formContext?.statusIcon,\n },\n])\n\nconst _inlineMessage = computed(() =>\n isBoolean(props.inlineMessage)\n ? props.inlineMessage\n : formContext?.inlineMessage || false\n)\n\nconst validateClasses = computed(() => [\n ns.e('error'),\n { [ns.em('error', 'inline')]: _inlineMessage.value },\n])\n\nconst propString = computed(() => {\n if (!props.prop) return ''\n return isArray(props.prop) ? props.prop.join('.') : props.prop\n})\n\nconst hasLabel = computed<boolean>(() => {\n return !!(props.label || slots.label)\n})\n\nconst labelFor = computed<string | undefined>(() => {\n return (\n props.for ?? (inputIds.value.length === 1 ? inputIds.value[0] : undefined)\n )\n})\n\nconst isGroup = computed<boolean>(() => {\n return !labelFor.value && hasLabel.value\n})\n\nconst fieldValue = computed(() => {\n const model = formContext?.model\n if (!model || !props.prop) {\n return\n }\n return getProp(model, props.prop).value\n})\n\nconst normalizedRules = computed(() => {\n const { required } = props\n\n const rules: FormItemRule[] = []\n\n if (props.rules) {\n rules.push(...ensureArray(props.rules))\n }\n\n const formRules = formContext?.rules\n if (formRules && props.prop) {\n const _rules = getProp<Arrayable<FormItemRule> | undefined>(\n formRules,\n props.prop\n ).value\n if (_rules) {\n rules.push(...ensureArray(_rules))\n }\n }\n\n if (required !== undefined) {\n const requiredRules = rules\n .map((rule, i) => [rule, i] as const)\n .filter(([rule]) => 'required' in rule)\n\n if (requiredRules.length > 0) {\n for (const [rule, i] of requiredRules) {\n if (rule.required === required) continue\n rules[i] = { ...rule, required }\n }\n } else {\n rules.push({ required })\n }\n }\n\n return rules\n})\n\nconst validateEnabled = computed(() => normalizedRules.value.length > 0)\n\nconst getFilteredRule = (trigger: string) => {\n const rules = normalizedRules.value\n return (\n rules\n .filter((rule) => {\n if (!rule.trigger || !trigger) return true\n if (isArray(rule.trigger)) {\n return rule.trigger.includes(trigger)\n } else {\n return rule.trigger === trigger\n }\n })\n // exclude trigger\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n .map(({ trigger, ...rule }): RuleItem => rule)\n )\n}\n\nconst isRequired = computed(() =>\n normalizedRules.value.some((rule) => rule.required)\n)\n\nconst shouldShowError = computed(\n () =>\n validateStateDebounced.value === 'error' &&\n props.showMessage &&\n (formContext?.showMessage ?? true)\n)\n\nconst currentLabel = computed(\n () => `${props.label || ''}${formContext?.labelSuffix || ''}`\n)\n\nconst setValidationState = (state: FormItemValidateState) => {\n validateState.value = state\n}\n\nconst onValidationFailed = (error: FormValidateFailure) => {\n const { errors, fields } = error\n if (!errors || !fields) {\n console.error(error)\n }\n\n setValidationState('error')\n validateMessage.value = errors\n ? (errors?.[0]?.message ?? `${props.prop} is required`)\n : ''\n\n formContext?.emit('validate', props.prop!, false, validateMessage.value)\n}\n\nconst onValidationSucceeded = () => {\n setValidationState('success')\n formContext?.emit('validate', props.prop!, true, '')\n}\n\nconst doValidate = async (rules: RuleItem[]): Promise<true> => {\n const modelName = propString.value\n const validator = new AsyncValidator({\n [modelName]: rules,\n })\n return validator\n .validate({ [modelName]: fieldValue.value }, { firstFields: true })\n .then(() => {\n onValidationSucceeded()\n return true as const\n })\n .catch((err: FormValidateFailure) => {\n onValidationFailed(err)\n return Promise.reject(err)\n })\n}\n\nconst validate: FormItemContext['validate'] = async (trigger, callback) => {\n // skip validation if its resetting\n if (isResettingField || !props.prop) {\n return false\n }\n\n const hasCallback = isFunction(callback)\n if (!validateEnabled.value) {\n callback?.(false)\n return false\n }\n\n const rules = getFilteredRule(trigger)\n if (rules.length === 0) {\n callback?.(true)\n return true\n }\n\n setValidationState('validating')\n\n return doValidate(rules)\n .then(() => {\n callback?.(true)\n return true as const\n })\n .catch((err: FormValidateFailure) => {\n const { fields } = err\n callback?.(false, fields)\n return hasCallback ? false : Promise.reject(fields)\n })\n}\n\nconst clearValidate: FormItemContext['clearValidate'] = () => {\n setValidationState('')\n validateMessage.value = ''\n isResettingField = false\n}\n\nconst resetField: FormItemContext['resetField'] = async () => {\n const model = formContext?.model\n if (!model || !props.prop) return\n\n const computedValue = getProp(model, props.prop)\n\n // prevent validation from being triggered\n isResettingField = true\n\n computedValue.value = cloneDeep(initialValue)\n\n await nextTick()\n clearValidate()\n\n isResettingField = false\n}\n\nconst addInputId: FormItemContext['addInputId'] = (id: string) => {\n if (!inputIds.value.includes(id)) {\n inputIds.value.push(id)\n }\n}\n\nconst removeInputId: FormItemContext['removeInputId'] = (id: string) => {\n inputIds.value = inputIds.value.filter((listId) => listId !== id)\n}\n\nconst setInitialValue: FormItemContext['setInitialValue'] = (value: any) => {\n initialValue = cloneDeep(value)\n}\n\nconst getInitialValue: FormItemContext['getInitialValue'] = () => initialValue\n\nwatch(\n () => props.error,\n (val) => {\n validateMessage.value = val || ''\n setValidationState(val ? 'error' : '')\n },\n { immediate: true }\n)\n\nwatch(\n () => props.validateStatus,\n (val) => setValidationState(val || '')\n)\n\nconst context: FormItemContext = reactive({\n ...toRefs(props),\n $el: formItemRef,\n size: _size,\n validateMessage,\n validateState,\n labelId,\n inputIds,\n isGroup,\n hasLabel,\n fieldValue,\n addInputId,\n removeInputId,\n resetField,\n clearValidate,\n validate,\n propString,\n setInitialValue,\n getInitialValue,\n})\n\nprovide(formItemContextKey, context)\n\nwatch(propString, (newPropString, oldPropString) => {\n if (!formContext || !oldPropString) return\n formContext.removeField(context, oldPropString)\n if (newPropString) {\n setInitialValue(fieldValue.value)\n formContext.addField(context)\n }\n})\n\nonMounted(() => {\n if (props.prop) {\n setInitialValue(fieldValue.value)\n formContext?.addField(context)\n }\n})\n\nonBeforeUnmount(() => {\n formContext?.removeField(context)\n})\n\ndefineExpose({\n /**\n * @description Form item size.\n */\n size: _size,\n /**\n * @description Validation message.\n */\n validateMessage,\n /**\n * @description Validation state.\n */\n validateState,\n /**\n * @description Validate form item.\n */\n validate,\n /**\n * @description Remove validation status of the field.\n */\n clearValidate,\n /**\n * @description Reset current field and remove validation result.\n */\n resetField,\n /**\n * @description Set initial value for this field. When `resetField` is called, the field will reset to this value.\n */\n setInitialValue,\n})\n</script>\n"],"mappings":""}
@@ -39,30 +39,14 @@ interface FormProps extends FormMetaProps {
39
39
  * @description Validation rules of form.
40
40
  */
41
41
  rules?: FormRules;
42
- /**
43
- * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.
44
- */
45
- labelPosition?: 'left' | 'right' | 'top';
46
42
  /**
47
43
  * @description Position of asterisk.
48
44
  */
49
45
  requireAsteriskPosition?: 'left' | 'right';
50
- /**
51
- * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.
52
- */
53
- labelWidth?: string | number;
54
46
  /**
55
47
  * @description Suffix of the label.
56
48
  */
57
49
  labelSuffix?: string;
58
- /**
59
- * @description Whether the form is inline.
60
- */
61
- inline?: boolean;
62
- /**
63
- * @description Force the form to use the mobile layout regardless of viewport width.
64
- */
65
- mobile?: boolean;
66
50
  /**
67
51
  * @description Whether to display the error message inline with the form item.
68
52
  */
@@ -103,12 +87,8 @@ declare const formProps: {
103
87
  readonly validator: ((val: unknown) => boolean) | undefined;
104
88
  __epPropKey: true;
105
89
  };
106
- readonly labelPosition: EpPropFinalized<StringConstructor, "top" | "left" | "right", unknown, "right", boolean>;
107
90
  readonly requireAsteriskPosition: EpPropFinalized<StringConstructor, "left" | "right", unknown, "left", boolean>;
108
- readonly labelWidth: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
109
91
  readonly labelSuffix: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
110
- readonly inline: BooleanConstructor;
111
- readonly mobile: BooleanConstructor;
112
92
  readonly inlineMessage: BooleanConstructor;
113
93
  readonly statusIcon: BooleanConstructor;
114
94
  readonly showMessage: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
@@ -23,30 +23,15 @@ const formProps = require_runtime$1.buildProps({
23
23
  ...formMetaProps,
24
24
  model: Object,
25
25
  rules: { type: require_runtime$1.definePropType(Object) },
26
- labelPosition: {
27
- type: String,
28
- values: [
29
- "left",
30
- "right",
31
- "top"
32
- ],
33
- default: "right"
34
- },
35
26
  requireAsteriskPosition: {
36
27
  type: String,
37
28
  values: ["left", "right"],
38
29
  default: "left"
39
30
  },
40
- labelWidth: {
41
- type: [String, Number],
42
- default: ""
43
- },
44
31
  labelSuffix: {
45
32
  type: String,
46
33
  default: ""
47
34
  },
48
- inline: Boolean,
49
- mobile: Boolean,
50
35
  inlineMessage: Boolean,
51
36
  statusIcon: Boolean,
52
37
  showMessage: {
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","names":["buildProps","componentSizes","definePropType","isBoolean"],"sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport interface FormMetaProps {\n /**\n * @description Control the size of components in this form.\n */\n size?: ComponentSize\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.\n */\nexport const formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport interface FormProps extends FormMetaProps {\n /**\n * @description Data of form component.\n */\n model?: Record<string, any>\n /**\n * @description Validation rules of form.\n */\n rules?: FormRules\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition?: 'left' | 'right' | 'top'\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition?: 'left' | 'right'\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth?: string | number\n /**\n * @description Suffix of the label.\n */\n labelSuffix?: string\n /**\n * @description Whether the form is inline.\n */\n inline?: boolean\n /**\n * @description Force the form to use the mobile layout regardless of viewport width.\n */\n mobile?: boolean\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage?: boolean\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon?: boolean\n /**\n * @description Whether to show the error message.\n */\n showMessage?: boolean\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange?: boolean\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk?: boolean\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError?: boolean\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions?: ScrollIntoViewOptions | boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormProps` instead.\n */\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Force the form to use the mobile layout regardless of viewport width.\n */\n mobile: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: definePropType<ScrollIntoViewOptions | boolean>([Object, Boolean]),\n default: true,\n },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormProps` instead.\n */\nexport type FormPropsPublic = ExtractPublicPropTypes<typeof formProps>\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.\n */\nexport type FormMetaPropsPublic = ExtractPublicPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"mappings":";;;;;;;;;;;AA4BA,MAAa,gBAAgBA,6BAAW;CAItC,MAAM;EACJ,MAAM;EACN,QAAQC;EACT;CAID,UAAU;CACX,CAAU;;;;AAoEX,MAAa,YAAYD,6BAAW;CAClC,GAAG;CAIH,OAAO;CAIP,OAAO,EACL,MAAME,iCAA0B,OAAO,EACxC;CAID,eAAe;EACb,MAAM;EACN,QAAQ;GAAC;GAAQ;GAAS;GAAM;EAChC,SAAS;EACV;CAID,yBAAyB;EACvB,MAAM;EACN,QAAQ,CAAC,QAAQ,QAAQ;EACzB,SAAS;EACV;CAID,YAAY;EACV,MAAM,CAAC,QAAQ,OAAO;EACtB,SAAS;EACV;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;CAID,QAAQ;CAIR,QAAQ;CAIR,eAAe;CAIf,YAAY;CAIZ,aAAa;EACX,MAAM;EACN,SAAS;EACV;CAID,sBAAsB;EACpB,MAAM;EACN,SAAS;EACV;CAID,sBAAsB;CAItB,eAAe;CAIf,uBAAuB;EACrB,MAAMA,iCAAgD,CAAC,QAAQ,QAAQ,CAAC;EACxE,SAAS;EACV;CACF,CAAU;AAYX,MAAa,YAAY,EACvB,WAAW,MAAoB,SAAkB,sCACtC,KAAK,8BAAa,KAAK,KAChCC,wBAAU,QAAQ,8BACT,QAAQ,EACpB"}
1
+ {"version":3,"file":"form.js","names":["buildProps","componentSizes","definePropType","isBoolean"],"sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport interface FormMetaProps {\n /**\n * @description Control the size of components in this form.\n */\n size?: ComponentSize\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.\n */\nexport const formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport interface FormProps extends FormMetaProps {\n /**\n * @description Data of form component.\n */\n model?: Record<string, any>\n /**\n * @description Validation rules of form.\n */\n rules?: FormRules\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition?: 'left' | 'right'\n /**\n * @description Suffix of the label.\n */\n labelSuffix?: string\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage?: boolean\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon?: boolean\n /**\n * @description Whether to show the error message.\n */\n showMessage?: boolean\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange?: boolean\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk?: boolean\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError?: boolean\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions?: ScrollIntoViewOptions | boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormProps` instead.\n */\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: definePropType<ScrollIntoViewOptions | boolean>([Object, Boolean]),\n default: true,\n },\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormProps` instead.\n */\nexport type FormPropsPublic = ExtractPublicPropTypes<typeof formProps>\n\n/**\n * @deprecated Removed after 3.0.0, Use `FormMetaProps` instead.\n */\nexport type FormMetaPropsPublic = ExtractPublicPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"mappings":";;;;;;;;;;;AA4BA,MAAa,gBAAgBA,6BAAW;CAItC,MAAM;EACJ,MAAM;EACN,QAAQC;EACT;CAID,UAAU;CACX,CAAU;;;;AAoDX,MAAa,YAAYD,6BAAW;CAClC,GAAG;CAIH,OAAO;CAIP,OAAO,EACL,MAAME,iCAA0B,OAAO,EACxC;CAID,yBAAyB;EACvB,MAAM;EACN,QAAQ,CAAC,QAAQ,QAAQ;EACzB,SAAS;EACV;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;CAID,eAAe;CAIf,YAAY;CAIZ,aAAa;EACX,MAAM;EACN,SAAS;EACV;CAID,sBAAsB;EACpB,MAAM;EACN,SAAS;EACV;CAID,sBAAsB;CAItB,eAAe;CAIf,uBAAuB;EACrB,MAAMA,iCAAgD,CAAC,QAAQ,QAAQ,CAAC;EACxE,SAAS;EACV;CACF,CAAU;AAYX,MAAa,YAAY,EACvB,WAAW,MAAoB,SAAkB,sCACtC,KAAK,8BAAa,KAAK,KAChCC,wBAAU,QAAQ,8BACT,QAAQ,EACpB"}
@@ -48,8 +48,6 @@ declare const __VLS_base: vue.DefineComponent<FormProps, {
48
48
  }, string, vue.PublicProps, Readonly<FormProps> & Readonly<{
49
49
  onValidate?: ((prop: FormItemProp, isValid: boolean, message: string) => any) | undefined;
50
50
  }>, {
51
- labelWidth: string | number;
52
- labelPosition: "left" | "right" | "top";
53
51
  requireAsteriskPosition: "left" | "right";
54
52
  labelSuffix: string;
55
53
  showMessage: boolean;
@@ -6,7 +6,6 @@ const require_form = require('./form.js');
6
6
  const require_constants = require('./constants.js');
7
7
  const require_use_form_common_props = require('./hooks/use-form-common-props.js');
8
8
  const require_utils = require('./utils.js');
9
- let _vueuse_core = require("@vueuse/core");
10
9
  let lodash_unified = require("lodash-unified");
11
10
  let vue = require("vue");
12
11
  let _vue_shared = require("@vue/shared");
@@ -24,22 +23,9 @@ var form_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
24
23
  const formRef = (0, vue.ref)();
25
24
  const fields = (0, vue.reactive)([]);
26
25
  const initialValues = /* @__PURE__ */ new Map();
27
- const { width: viewportWidth } = (0, _vueuse_core.useWindowSize)({ initialWidth: Number.POSITIVE_INFINITY });
28
26
  const formSize = require_use_form_common_props.useFormSize();
29
27
  const ns = require_index.useNamespace("form");
30
- const isMobile = (0, vue.computed)(() => props.mobile || viewportWidth.value < 768);
31
- const formClasses = (0, vue.computed)(() => {
32
- const { labelPosition, inline } = props;
33
- return [
34
- ns.b(),
35
- ns.m(formSize.value || "default"),
36
- {
37
- [ns.m(`label-${labelPosition}`)]: labelPosition,
38
- [ns.m("inline")]: inline,
39
- [ns.is("mobile")]: isMobile.value
40
- }
41
- ];
42
- });
28
+ const formClasses = (0, vue.computed)(() => [ns.b(), ns.m(formSize.value || "default")]);
43
29
  const getField = (prop) => {
44
30
  return require_utils.filterFields(fields, [prop])[0];
45
31
  };
@@ -147,7 +133,6 @@ var form_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
147
133
  });
148
134
  (0, vue.provide)(require_constants.formContextKey, (0, vue.reactive)({
149
135
  ...(0, vue.toRefs)(props),
150
- isMobile,
151
136
  emit,
152
137
  resetFields,
153
138
  clearValidate,
@@ -155,8 +140,7 @@ var form_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.d
155
140
  getField,
156
141
  addField,
157
142
  removeField,
158
- setInitialValues,
159
- ...require_utils.useFormLabelWidth()
143
+ setInitialValues
160
144
  }));
161
145
  __expose({
162
146
  validate,
@@ -1 +1 @@
1
- {"version":3,"file":"form.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { cloneDeep } from 'lodash-unified'\nimport { useWindowSize } from '@vueuse/core'\nimport {\n debugWarn,\n ensureArray,\n getProp,\n isArray,\n isFunction,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits } from './form'\nimport { filterFields, useFormLabelWidth } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormProps } from './form'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<FormProps>(), {\n labelPosition: 'right',\n requireAsteriskPosition: 'left',\n labelWidth: '',\n labelSuffix: '',\n showMessage: true,\n validateOnRuleChange: true,\n scrollIntoViewOptions: true,\n})\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\nconst initialValues = new Map<string, any>()\nconst { width: viewportWidth } = useWindowSize({\n initialWidth: Number.POSITIVE_INFINITY,\n})\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst isMobile = computed(() => props.mobile || viewportWidth.value < 768)\nconst formClasses = computed(() => {\n const { labelPosition, inline } = props\n return [\n ns.b(),\n ns.m(formSize.value || 'default'),\n {\n [ns.m(`label-${labelPosition}`)]: labelPosition,\n [ns.m('inline')]: inline,\n [ns.is('mobile')]: isMobile.value,\n },\n ]\n})\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n if (!fields.includes(field)) {\n fields.push(field)\n }\n if (field.propString) {\n if (initialValues.has(field.propString)) {\n field.setInitialValue(initialValues.get(field.propString))\n } else {\n initialValues.set(field.propString, cloneDeep(field.fieldValue))\n }\n }\n}\n\nconst removeField: FormContext['removeField'] = (field, oldPropString?) => {\n if (oldPropString) {\n // Prop changed on a live field: delete stale key, field stays in fields[]\n initialValues.delete(oldPropString)\n return\n }\n // Unmount: splice from array, cache initialValue for potential remount\n const idx = fields.indexOf(field)\n if (idx > -1) {\n fields.splice(idx, 1)\n if (field.propString) {\n initialValues.set(field.propString, cloneDeep(field.getInitialValue()))\n }\n }\n}\n\nconst setInitialValues: FormContext['setInitialValues'] = (initModel) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for setInitialValues to work.')\n return\n }\n if (!initModel) {\n debugWarn(\n COMPONENT_NAME,\n 'initModel is required for setInitialValues to work.'\n )\n return\n }\n\n for (const key of initialValues.keys()) {\n initialValues.set(key, cloneDeep(getProp(initModel, key).value))\n }\n fields.forEach((field) => {\n if (field.prop) {\n field.setInitialValue(getProp(initModel, field.prop).value)\n }\n })\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n\n filterFields(fields, properties).forEach((field) => field.resetField())\n\n const activePropStrings = new Set(\n fields.map((f) => f.propString).filter(Boolean)\n )\n const propsToCheck =\n properties.length > 0\n ? ensureArray(properties).map((p) => (isArray(p) ? p.join('.') : p))\n : [...initialValues.keys()]\n\n for (const propString of propsToCheck) {\n if (!activePropStrings.has(propString) && initialValues.has(propString)) {\n getProp(props.model, propString).value = cloneDeep(\n initialValues.get(propString)\n )\n }\n }\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error' && !field.error) field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`)\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n isMobile,\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n setInitialValues,\n\n ...useFormLabelWidth(),\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n /**\n * @description Set initial values for form fields. When `resetFields` is called, fields will reset to these values.\n */\n setInitialValues,\n})\n</script>\n"],"mappings":"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"}
1
+ {"version":3,"file":"form.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { cloneDeep } from 'lodash-unified'\nimport {\n debugWarn,\n ensureArray,\n getProp,\n isArray,\n isFunction,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits } from './form'\nimport { filterFields } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormProps } from './form'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<FormProps>(), {\n requireAsteriskPosition: 'left',\n labelSuffix: '',\n showMessage: true,\n validateOnRuleChange: true,\n scrollIntoViewOptions: true,\n})\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\nconst initialValues = new Map<string, any>()\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst formClasses = computed(() => [ns.b(), ns.m(formSize.value || 'default')])\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n if (!fields.includes(field)) {\n fields.push(field)\n }\n if (field.propString) {\n if (initialValues.has(field.propString)) {\n field.setInitialValue(initialValues.get(field.propString))\n } else {\n initialValues.set(field.propString, cloneDeep(field.fieldValue))\n }\n }\n}\n\nconst removeField: FormContext['removeField'] = (field, oldPropString?) => {\n if (oldPropString) {\n // Prop changed on a live field: delete stale key, field stays in fields[]\n initialValues.delete(oldPropString)\n return\n }\n // Unmount: splice from array, cache initialValue for potential remount\n const idx = fields.indexOf(field)\n if (idx > -1) {\n fields.splice(idx, 1)\n if (field.propString) {\n initialValues.set(field.propString, cloneDeep(field.getInitialValue()))\n }\n }\n}\n\nconst setInitialValues: FormContext['setInitialValues'] = (initModel) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for setInitialValues to work.')\n return\n }\n if (!initModel) {\n debugWarn(\n COMPONENT_NAME,\n 'initModel is required for setInitialValues to work.'\n )\n return\n }\n\n for (const key of initialValues.keys()) {\n initialValues.set(key, cloneDeep(getProp(initModel, key).value))\n }\n fields.forEach((field) => {\n if (field.prop) {\n field.setInitialValue(getProp(initModel, field.prop).value)\n }\n })\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n\n filterFields(fields, properties).forEach((field) => field.resetField())\n\n const activePropStrings = new Set(\n fields.map((f) => f.propString).filter(Boolean)\n )\n const propsToCheck =\n properties.length > 0\n ? ensureArray(properties).map((p) => (isArray(p) ? p.join('.') : p))\n : [...initialValues.keys()]\n\n for (const propString of propsToCheck) {\n if (!activePropStrings.has(propString) && initialValues.has(propString)) {\n getProp(props.model, propString).value = cloneDeep(\n initialValues.get(propString)\n )\n }\n }\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error' && !field.error) field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`)\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n setInitialValues,\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n /**\n * @description Set initial values for form fields. When `resetFields` is called, fields will reset to these values.\n */\n setInitialValues,\n})\n</script>\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"form2.js","names":[],"sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { cloneDeep } from 'lodash-unified'\nimport { useWindowSize } from '@vueuse/core'\nimport {\n debugWarn,\n ensureArray,\n getProp,\n isArray,\n isFunction,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits } from './form'\nimport { filterFields, useFormLabelWidth } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormProps } from './form'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<FormProps>(), {\n labelPosition: 'right',\n requireAsteriskPosition: 'left',\n labelWidth: '',\n labelSuffix: '',\n showMessage: true,\n validateOnRuleChange: true,\n scrollIntoViewOptions: true,\n})\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\nconst initialValues = new Map<string, any>()\nconst { width: viewportWidth } = useWindowSize({\n initialWidth: Number.POSITIVE_INFINITY,\n})\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst isMobile = computed(() => props.mobile || viewportWidth.value < 768)\nconst formClasses = computed(() => {\n const { labelPosition, inline } = props\n return [\n ns.b(),\n ns.m(formSize.value || 'default'),\n {\n [ns.m(`label-${labelPosition}`)]: labelPosition,\n [ns.m('inline')]: inline,\n [ns.is('mobile')]: isMobile.value,\n },\n ]\n})\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n if (!fields.includes(field)) {\n fields.push(field)\n }\n if (field.propString) {\n if (initialValues.has(field.propString)) {\n field.setInitialValue(initialValues.get(field.propString))\n } else {\n initialValues.set(field.propString, cloneDeep(field.fieldValue))\n }\n }\n}\n\nconst removeField: FormContext['removeField'] = (field, oldPropString?) => {\n if (oldPropString) {\n // Prop changed on a live field: delete stale key, field stays in fields[]\n initialValues.delete(oldPropString)\n return\n }\n // Unmount: splice from array, cache initialValue for potential remount\n const idx = fields.indexOf(field)\n if (idx > -1) {\n fields.splice(idx, 1)\n if (field.propString) {\n initialValues.set(field.propString, cloneDeep(field.getInitialValue()))\n }\n }\n}\n\nconst setInitialValues: FormContext['setInitialValues'] = (initModel) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for setInitialValues to work.')\n return\n }\n if (!initModel) {\n debugWarn(\n COMPONENT_NAME,\n 'initModel is required for setInitialValues to work.'\n )\n return\n }\n\n for (const key of initialValues.keys()) {\n initialValues.set(key, cloneDeep(getProp(initModel, key).value))\n }\n fields.forEach((field) => {\n if (field.prop) {\n field.setInitialValue(getProp(initModel, field.prop).value)\n }\n })\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n\n filterFields(fields, properties).forEach((field) => field.resetField())\n\n const activePropStrings = new Set(\n fields.map((f) => f.propString).filter(Boolean)\n )\n const propsToCheck =\n properties.length > 0\n ? ensureArray(properties).map((p) => (isArray(p) ? p.join('.') : p))\n : [...initialValues.keys()]\n\n for (const propString of propsToCheck) {\n if (!activePropStrings.has(propString) && initialValues.has(propString)) {\n getProp(props.model, propString).value = cloneDeep(\n initialValues.get(propString)\n )\n }\n }\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error' && !field.error) field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`)\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n isMobile,\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n setInitialValues,\n\n ...useFormLabelWidth(),\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n /**\n * @description Set initial values for form fields. When `resetFields` is called, fields will reset to these values.\n */\n setInitialValues,\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"form2.js","names":[],"sources":["../../../../../../packages/components/form/src/form.vue"],"sourcesContent":["<template>\n <form ref=\"formRef\" :class=\"formClasses\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, ref, toRefs, watch } from 'vue'\nimport { cloneDeep } from 'lodash-unified'\nimport {\n debugWarn,\n ensureArray,\n getProp,\n isArray,\n isFunction,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from './hooks'\nimport { formContextKey } from './constants'\nimport { formEmits } from './form'\nimport { filterFields } from './utils'\n\nimport type { ValidateFieldsError } from 'async-validator'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormProps } from './form'\nimport type {\n FormContext,\n FormItemContext,\n FormValidateCallback,\n FormValidationResult,\n} from './types'\nimport type { FormItemProp } from './form-item'\n\nconst COMPONENT_NAME = 'ElForm'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = withDefaults(defineProps<FormProps>(), {\n requireAsteriskPosition: 'left',\n labelSuffix: '',\n showMessage: true,\n validateOnRuleChange: true,\n scrollIntoViewOptions: true,\n})\nconst emit = defineEmits(formEmits)\n\nconst formRef = ref<HTMLElement>()\nconst fields = reactive<FormItemContext[]>([])\nconst initialValues = new Map<string, any>()\n\nconst formSize = useFormSize()\nconst ns = useNamespace('form')\nconst formClasses = computed(() => [ns.b(), ns.m(formSize.value || 'default')])\n\nconst getField: FormContext['getField'] = (prop) => {\n return filterFields(fields, [prop])[0]\n}\n\nconst addField: FormContext['addField'] = (field) => {\n if (!fields.includes(field)) {\n fields.push(field)\n }\n if (field.propString) {\n if (initialValues.has(field.propString)) {\n field.setInitialValue(initialValues.get(field.propString))\n } else {\n initialValues.set(field.propString, cloneDeep(field.fieldValue))\n }\n }\n}\n\nconst removeField: FormContext['removeField'] = (field, oldPropString?) => {\n if (oldPropString) {\n // Prop changed on a live field: delete stale key, field stays in fields[]\n initialValues.delete(oldPropString)\n return\n }\n // Unmount: splice from array, cache initialValue for potential remount\n const idx = fields.indexOf(field)\n if (idx > -1) {\n fields.splice(idx, 1)\n if (field.propString) {\n initialValues.set(field.propString, cloneDeep(field.getInitialValue()))\n }\n }\n}\n\nconst setInitialValues: FormContext['setInitialValues'] = (initModel) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for setInitialValues to work.')\n return\n }\n if (!initModel) {\n debugWarn(\n COMPONENT_NAME,\n 'initModel is required for setInitialValues to work.'\n )\n return\n }\n\n for (const key of initialValues.keys()) {\n initialValues.set(key, cloneDeep(getProp(initModel, key).value))\n }\n fields.forEach((field) => {\n if (field.prop) {\n field.setInitialValue(getProp(initModel, field.prop).value)\n }\n })\n}\n\nconst resetFields: FormContext['resetFields'] = (properties = []) => {\n if (!props.model) {\n debugWarn(COMPONENT_NAME, 'model is required for resetFields to work.')\n return\n }\n\n filterFields(fields, properties).forEach((field) => field.resetField())\n\n const activePropStrings = new Set(\n fields.map((f) => f.propString).filter(Boolean)\n )\n const propsToCheck =\n properties.length > 0\n ? ensureArray(properties).map((p) => (isArray(p) ? p.join('.') : p))\n : [...initialValues.keys()]\n\n for (const propString of propsToCheck) {\n if (!activePropStrings.has(propString) && initialValues.has(propString)) {\n getProp(props.model, propString).value = cloneDeep(\n initialValues.get(propString)\n )\n }\n }\n}\n\nconst clearValidate: FormContext['clearValidate'] = (props = []) => {\n filterFields(fields, props).forEach((field) => field.clearValidate())\n}\n\nconst isValidatable = computed(() => {\n const hasModel = !!props.model\n if (!hasModel) {\n debugWarn(COMPONENT_NAME, 'model is required for validate to work.')\n }\n return hasModel\n})\n\nconst obtainValidateFields = (props: Arrayable<FormItemProp>) => {\n if (fields.length === 0) return []\n\n const filteredFields = filterFields(fields, props)\n if (!filteredFields.length) {\n debugWarn(COMPONENT_NAME, 'please pass correct props!')\n return []\n }\n return filteredFields\n}\n\nconst validate = async (\n callback?: FormValidateCallback\n): FormValidationResult => validateField(undefined, callback)\n\nconst doValidateField = async (\n props: Arrayable<FormItemProp> = []\n): Promise<boolean> => {\n if (!isValidatable.value) return false\n\n const fields = obtainValidateFields(props)\n if (fields.length === 0) return true\n\n let validationErrors: ValidateFieldsError = {}\n for (const field of fields) {\n try {\n await field.validate('')\n if (field.validateState === 'error' && !field.error) field.resetField()\n } catch (fields) {\n validationErrors = {\n ...validationErrors,\n ...(fields as ValidateFieldsError),\n }\n }\n }\n\n if (Object.keys(validationErrors).length === 0) return true\n return Promise.reject(validationErrors)\n}\n\nconst validateField: FormContext['validateField'] = async (\n modelProps = [],\n callback\n) => {\n let result = false\n const shouldThrow = !isFunction(callback)\n try {\n result = await doValidateField(modelProps)\n // When result is false meaning that the fields are not validatable\n if (result === true) {\n await callback?.(result)\n }\n return result\n } catch (e) {\n if (e instanceof Error) throw e\n\n const invalidFields = e as ValidateFieldsError\n\n if (props.scrollToError) {\n // form-item may be dynamically rendered based on the judgment conditions, and the order in invalidFields is uncertain.\n // Therefore, the first form field with an error is determined by directly looking for the rendered element.\n if (formRef.value) {\n const formItem = formRef.value.querySelector(`.${ns.b()}-item.is-error`)\n formItem?.scrollIntoView(props.scrollIntoViewOptions)\n }\n }\n !result && (await callback?.(false, invalidFields))\n return shouldThrow && Promise.reject(invalidFields)\n }\n}\n\nconst scrollToField = (prop: FormItemProp) => {\n const field = getField(prop)\n if (field) {\n field.$el?.scrollIntoView(props.scrollIntoViewOptions)\n }\n}\n\nwatch(\n () => props.rules,\n () => {\n if (props.validateOnRuleChange) {\n validate().catch((err) => debugWarn(err))\n }\n },\n { deep: true, flush: 'post' }\n)\n\nprovide(\n formContextKey,\n reactive({\n ...toRefs(props),\n emit,\n\n resetFields,\n clearValidate,\n validateField,\n getField,\n addField,\n removeField,\n setInitialValues,\n })\n)\n\ndefineExpose({\n /**\n * @description Validate the whole form. Receives a callback or returns `Promise`.\n */\n validate,\n /**\n * @description Validate specified fields.\n */\n validateField,\n /**\n * @description Reset specified fields and remove validation result.\n */\n resetFields,\n /**\n * @description Clear validation message for specified fields.\n */\n clearValidate,\n /**\n * @description Scroll to the specified fields.\n */\n scrollToField,\n /**\n * @description Get a field context.\n */\n getField,\n /**\n * @description All fields context.\n */\n fields,\n /**\n * @description Set initial values for form fields. When `resetFields` is called, fields will reset to these values.\n */\n setInitialValues,\n})\n</script>\n"],"mappings":""}
@@ -2,14 +2,12 @@ import { ComponentSize } from "../../../constants/size.js";
2
2
  import { Arrayable, FieldPath } from "../../../utils/typescript.js";
3
3
  import "../../../utils/index.js";
4
4
  import { FormItemProp, FormItemProps, FormItemValidateState } from "./form-item.js";
5
- import { useFormLabelWidth } from "./utils.js";
6
5
  import { FormEmits, FormProps } from "./form.js";
7
6
  import { SetupContext, UnwrapRef } from "vue";
8
7
  import { MaybeRef } from "@vueuse/core";
9
8
  import { RuleItem, ValidateError, ValidateFieldsError } from "async-validator";
10
9
 
11
10
  //#region ../../packages/components/form/src/types.d.ts
12
- type FormLabelWidthContext = ReturnType<typeof useFormLabelWidth>;
13
11
  interface FormItemRule extends RuleItem {
14
12
  trigger?: Arrayable<string>;
15
13
  }
@@ -21,8 +19,7 @@ interface FormValidateFailure {
21
19
  errors: ValidateError[] | null;
22
20
  fields: ValidateFieldsError;
23
21
  }
24
- type FormContext = FormProps & UnwrapRef<FormLabelWidthContext> & {
25
- isMobile: boolean;
22
+ type FormContext = FormProps & {
26
23
  emit: SetupContext<FormEmits>['emit'];
27
24
  getField: (prop: FormItemProp) => FormItemContext | undefined;
28
25
  addField: (field: FormItemContext) => void;
@@ -52,4 +49,4 @@ interface FormItemContext extends FormItemProps {
52
49
  getInitialValue: () => any;
53
50
  }
54
51
  //#endregion
55
- export { FormContext, FormItemContext, FormItemRule, FormLabelWidthContext, FormRules, FormValidateCallback, FormValidateFailure, FormValidationResult };
52
+ export { FormContext, FormItemContext, FormItemRule, FormRules, FormValidateCallback, FormValidateFailure, FormValidationResult };
@@ -1,40 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
3
- const require_error = require('../../../utils/error.js');
4
- let vue = require("vue");
5
3
  let lodash_unified = require("lodash-unified");
6
4
  let _vue_shared = require("@vue/shared");
7
5
 
8
6
  //#region ../../packages/components/form/src/utils.ts
9
- const SCOPE = "ElForm";
10
- function useFormLabelWidth() {
11
- const potentialLabelWidthArr = (0, vue.ref)([]);
12
- const autoLabelWidth = (0, vue.computed)(() => {
13
- if (!potentialLabelWidthArr.value.length) return "0";
14
- const max = Math.max(...potentialLabelWidthArr.value);
15
- return max ? `${max}px` : "";
16
- });
17
- function getLabelWidthIndex(width) {
18
- const index = potentialLabelWidthArr.value.indexOf(width);
19
- if (index === -1 && autoLabelWidth.value === "0") require_error.debugWarn(SCOPE, `unexpected width ${width}`);
20
- return index;
21
- }
22
- function registerLabelWidth(val, oldVal) {
23
- if (val && oldVal) {
24
- const index = getLabelWidthIndex(oldVal);
25
- potentialLabelWidthArr.value.splice(index, 1, val);
26
- } else if (val) potentialLabelWidthArr.value.push(val);
27
- }
28
- function deregisterLabelWidth(val) {
29
- const index = getLabelWidthIndex(val);
30
- if (index > -1) potentialLabelWidthArr.value.splice(index, 1);
31
- }
32
- return {
33
- autoLabelWidth,
34
- registerLabelWidth,
35
- deregisterLabelWidth
36
- };
37
- }
38
7
  const filterFields = (fields, props) => {
39
8
  const normalized = (0, lodash_unified.castArray)(props).map((prop) => (0, _vue_shared.isArray)(prop) ? prop.join(".") : prop);
40
9
  return normalized.length > 0 ? fields.filter((field) => field.propString && normalized.includes(field.propString)) : fields;
@@ -42,5 +11,4 @@ const filterFields = (fields, props) => {
42
11
 
43
12
  //#endregion
44
13
  exports.filterFields = filterFields;
45
- exports.useFormLabelWidth = useFormLabelWidth;
46
14
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../../../../../packages/components/form/src/utils.ts"],"sourcesContent":["import { computed, ref } from 'vue'\nimport { debugWarn, ensureArray, isArray } from '@element-plus/utils'\n\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormItemContext } from './types'\nimport type { FormItemProp } from './form-item'\n\nconst SCOPE = 'ElForm'\n\nexport function useFormLabelWidth() {\n const potentialLabelWidthArr = ref<number[]>([])\n\n const autoLabelWidth = computed(() => {\n if (!potentialLabelWidthArr.value.length) return '0'\n const max = Math.max(...potentialLabelWidthArr.value)\n return max ? `${max}px` : ''\n })\n\n function getLabelWidthIndex(width: number) {\n const index = potentialLabelWidthArr.value.indexOf(width)\n if (index === -1 && autoLabelWidth.value === '0') {\n debugWarn(SCOPE, `unexpected width ${width}`)\n }\n return index\n }\n\n function registerLabelWidth(val: number, oldVal: number) {\n if (val && oldVal) {\n const index = getLabelWidthIndex(oldVal)\n potentialLabelWidthArr.value.splice(index, 1, val)\n } else if (val) {\n potentialLabelWidthArr.value.push(val)\n }\n }\n\n function deregisterLabelWidth(val: number) {\n const index = getLabelWidthIndex(val)\n if (index > -1) {\n potentialLabelWidthArr.value.splice(index, 1)\n }\n }\n\n return {\n autoLabelWidth,\n registerLabelWidth,\n deregisterLabelWidth,\n }\n}\n\nexport const filterFields = (\n fields: FormItemContext[],\n props: Arrayable<FormItemProp>\n) => {\n const normalized = ensureArray(props).map((prop) =>\n isArray(prop) ? prop.join('.') : prop\n )\n return normalized.length > 0\n ? fields.filter(\n (field) => field.propString && normalized.includes(field.propString)\n )\n : fields\n}\n"],"mappings":";;;;;;;;AAOA,MAAM,QAAQ;AAEd,SAAgB,oBAAoB;CAClC,MAAM,sCAAuC,EAAE,CAAC;CAEhD,MAAM,yCAAgC;AACpC,MAAI,CAAC,uBAAuB,MAAM,OAAQ,QAAO;EACjD,MAAM,MAAM,KAAK,IAAI,GAAG,uBAAuB,MAAM;AACrD,SAAO,MAAM,GAAG,IAAI,MAAM;GAC1B;CAEF,SAAS,mBAAmB,OAAe;EACzC,MAAM,QAAQ,uBAAuB,MAAM,QAAQ,MAAM;AACzD,MAAI,UAAU,MAAM,eAAe,UAAU,IAC3C,yBAAU,OAAO,oBAAoB,QAAQ;AAE/C,SAAO;;CAGT,SAAS,mBAAmB,KAAa,QAAgB;AACvD,MAAI,OAAO,QAAQ;GACjB,MAAM,QAAQ,mBAAmB,OAAO;AACxC,0BAAuB,MAAM,OAAO,OAAO,GAAG,IAAI;aACzC,IACT,wBAAuB,MAAM,KAAK,IAAI;;CAI1C,SAAS,qBAAqB,KAAa;EACzC,MAAM,QAAQ,mBAAmB,IAAI;AACrC,MAAI,QAAQ,GACV,wBAAuB,MAAM,OAAO,OAAO,EAAE;;AAIjD,QAAO;EACL;EACA;EACA;EACD;;AAGH,MAAa,gBACX,QACA,UACG;CACH,MAAM,2CAAyB,MAAM,CAAC,KAAK,kCACjC,KAAK,GAAG,KAAK,KAAK,IAAI,GAAG,KAClC;AACD,QAAO,WAAW,SAAS,IACvB,OAAO,QACJ,UAAU,MAAM,cAAc,WAAW,SAAS,MAAM,WAAW,CACrE,GACD"}
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../../../../packages/components/form/src/utils.ts"],"sourcesContent":["import { ensureArray, isArray } from '@element-plus/utils'\n\nimport type { Arrayable } from '@element-plus/utils'\nimport type { FormItemContext } from './types'\nimport type { FormItemProp } from './form-item'\n\nexport const filterFields = (\n fields: FormItemContext[],\n props: Arrayable<FormItemProp>\n) => {\n const normalized = ensureArray(props).map((prop) =>\n isArray(prop) ? prop.join('.') : prop\n )\n return normalized.length > 0\n ? fields.filter(\n (field) => field.propString && normalized.includes(field.propString)\n )\n : fields\n}\n"],"mappings":";;;;;;AAMA,MAAa,gBACX,QACA,UACG;CACH,MAAM,2CAAyB,MAAM,CAAC,KAAK,kCACjC,KAAK,GAAG,KAAK,KAAK,IAAI,GAAG,KAClC;AACD,QAAO,WAAW,SAAS,IACvB,OAAO,QACJ,UAAU,MAAM,cAAc,WAAW,SAAS,MAAM,WAAW,CACrE,GACD"}
@@ -135,7 +135,7 @@ import { EmptyProps, EmptyPropsPublic, emptyProps } from "./empty/src/empty.js";
135
135
  import { EmptyInstance } from "./empty/src/instance.js";
136
136
  import { ElEmpty } from "./empty/index.js";
137
137
  import { FormItemProp, FormItemProps, FormItemPropsPublic, FormItemValidateState, formItemProps, formItemValidateStates } from "./form/src/form-item.js";
138
- import { FormContext, FormItemContext, FormItemRule, FormLabelWidthContext, FormRules, FormValidateCallback, FormValidateFailure, FormValidationResult } from "./form/src/types.js";
138
+ import { FormContext, FormItemContext, FormItemRule, FormRules, FormValidateCallback, FormValidateFailure, FormValidationResult } from "./form/src/types.js";
139
139
  import { FormEmits, FormMetaProps, FormMetaPropsPublic, FormProps, FormPropsPublic, formEmits, formMetaProps, formProps } from "./form/src/form.js";
140
140
  import { formContextKey, formItemContextKey } from "./form/src/constants.js";
141
141
  import { useDisabled, useFormDisabled, useFormSize, useSize } from "./form/src/hooks/use-form-common-props.js";
@@ -288,4 +288,4 @@ import { _default as _default$2 } from "./popper/src/content.vue.js";
288
288
  import { ElPopper, Options, Placement } from "./popper/index.js";
289
289
  import { AutocompleteData, AutocompleteEmits, AutocompleteFetchSuggestions, AutocompleteFetchSuggestionsCallback, AutocompleteInstance, AutocompletePlacement, AutocompleteProps, AutocompletePropsPublic, autocompleteEmits, autocompleteProps } from "./autocomplete/src/autocomplete.js";
290
290
  import { ElAutocomplete } from "./autocomplete/index.js";
291
- export { Action, AffixEmits, AffixInstance, AffixProps, AffixPropsPublic, AlertEmits, AlertInstance, AlertProps, AlertPropsPublic, Alignment, AllowDragFunction, AllowDropFunction, AllowDropType, AnchorEmits, AnchorInstance, AnchorProps, AnchorPropsPublic, AsideInstance, AutoResizerProps, AutoResizerPropsPublic, AutocompleteData, AutocompleteEmits, AutocompleteFetchSuggestions, AutocompleteFetchSuggestionsCallback, AutocompleteInstance, AutocompletePlacement, AutocompleteProps, AutocompletePropsPublic, AvatarEmits, AvatarGroupContext, AvatarGroupInstance, AvatarGroupProps, AvatarGroupPropsPublic, AvatarInstance, AvatarProps, AvatarPropsPublic, BAR_MAP, BacktopEmits, BacktopInstance, BacktopProps, BacktopPropsPublic, BadgeInstance, BadgeProps, BadgePropsPublic, BorderStyle, BreadcrumbInstance, BreadcrumbItemInstance, BreadcrumbItemProps, BreadcrumbItemPropsPublic, BreadcrumbProps, BreadcrumbPropsPublic, ButtonConfigContext, ButtonEmits, ButtonGroupContext, ButtonGroupInstance, ButtonInstance, ButtonNativeType, ButtonProps, ButtonPropsPublic, ButtonType, CAROUSEL_ITEM_NAME, CASCADER_PANEL_INJECTION_KEY, CalendarDateTableInstance, CalendarDateType, CalendarEmits, CalendarInstance, CalendarProps, CalendarPropsPublic, Callback, CardConfigContext, CardInstance, CardProps, CardPropsPublic, CarouselContext, CarouselEmits, CarouselInstance, CarouselItemContext, CarouselItemInstance, CarouselItemProps, CarouselItemPropsPublic, CarouselItemStates, CarouselProps, CarouselPropsPublic, CascaderCommonProps, CascaderComponentProps, CascaderConfig, CascaderEmits, CascaderInstance, CascaderMenuInstance, Node as CascaderNode, CascaderNodePathValue, CascaderNodeValue, CascaderOption, CascaderPanelInstance, CascaderPanelProps, CascaderProps, CascaderValue, CellCls, CellStyle, CheckTagEmits, CheckTagInstance, CheckTagProps, CheckTagPropsPublic, CheckboxEmits, CheckboxGroupEmits, CheckboxGroupInstance, CheckboxGroupProps, CheckboxGroupPropsPublic, CheckboxGroupValueType, CheckboxInstance, CheckboxOption, CheckboxProps, CheckboxPropsPublic, CheckboxValueType, CheckedInfo, ColInstance, ColProps, ColPropsPublic, ColSize, ColSizeObject, CollapseActiveName, CollapseContext, CollapseEmits, CollapseIconPositionType, CollapseInstance, CollapseItemInstance, CollapseItemProps, CollapseItemPropsPublic, CollapseModelValue, CollapseProps, CollapsePropsPublic, ColorPickerEmits, ColorPickerInstance, ColorPickerPanelContext, ColorPickerPanelEmits, ColorPickerPanelInstance, ColorPickerPanelProps, ColorPickerPanelPropsPublic, ColorPickerProps, ColorPickerPropsPublic, Column, ColumnCls, ColumnResizeHandler, ColumnSortHandler, ColumnSortParams, ColumnStyle, Columns, CommonColorContext, _default as CommonPicker, CommonProps, ConfigProviderContext, ConfigProviderInstance, ConfigProviderProps, ConfigProviderPropsPublic, ContainerInstance, CountdownEmits, CountdownInstance, CountdownProps, CountdownPropsPublic, CreatePopperInstanceParams, Crossorigin, DEFAULT_DIALOG_TRANSITION, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, DEFAULT_STEP, DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY, DateCell, DateModelType, DateOrDates, DatePickerInstance, DatePickerPanelInstance, DatePickerPanelProps, DatePickerPanelPropsPublic, DatePickerProps, DatePickerPropsPublic, DatePickerType, DateTableInstance, DayOrDays, DefaultProps, DescriptionInstance, DescriptionItemProps, DescriptionItemPropsPublic, DescriptionItemVNode, DescriptionProps, DescriptionPropsPublic, DialogBeforeCloseFn, DialogConfigContext, DialogContext, DialogEmits, DialogInstance, DialogProps, DialogPropsPublic, DialogTransition, Direction, DividerInstance, DividerProps, DividerPropsPublic, DragEvents, DrawerEmits, DrawerInstance, DrawerProps, DrawerPropsPublic, DropdownInstance, DynamicSizeGrid, DynamicSizeGridInstance, DynamicSizeList, DynamicSizeListInstance, Effect, ElAffix, ElAlert, ElAnchor, ElAnchorLink, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElAvatarGroup, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCascaderPanelContext, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElColorPickerPanel, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDatePickerPanel, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownInjectionContext, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElInputTag, ElLink, ElLoading, vLoading as ElLoadingDirective, vLoading, Loading as ElLoadingService, ElMain, ElMention, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElMessageBoxOptions, ElMessageBoxShortcutMethod, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPaginationContext, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, _default$1 as ElPopperArrow, ElPopperArrowContent, ElPopperArrowInstance, ElPopperArrowTrigger, _default$2 as ElPopperContent, ElPopperContentInjectionContext, ElPopperInjectionContext, _default$3 as ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTooltipContentProps, ElTooltipContentPropsPublic, ElTooltipInjectionContext, ElTooltipProps, ElTooltipPropsPublic, ElTooltipTriggerProps, ElTooltipTriggerPropsPublic, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, ElWatermark, EmptyInstance, EmptyProps, EmptyPropsPublic, ExpandTrigger, ExpandedRowsChangeHandler, ExperimentalFeatures, ExposesStates, ExtraCellPropGetter, ExtractHeaderCellPropGetter, ExtractHeaderPropGetter, ExtractRowPropGetter, FIRST_KEYS, FIRST_LAST_KEYS, FakeNode, Filter, FilterNodeMethodFunction, FilterValue, FixedSizeGrid, FixedSizeList, FixedSizeListInstance, FooterInstance, FormContext, FormEmits, FormInstance, FormItemContext, FormItemInstance, FormItemProp, FormItemProps, FormItemPropsPublic, FormItemRule, FormItemValidateState, FormLabelWidthContext, FormMetaProps, FormMetaPropsPublic, FormProps, FormPropsPublic, FormRules, FormValidateCallback, FormValidateFailure, FormValidationResult, GAP, GetDisabledHours, GetDisabledMinutes, GetDisabledSeconds, GetEstimatedTotalSize, GetGridOffset, GetOffset, GetPosition, GetStartIndexForOffset, GetStopIndexForStartIndex, GridCache, GridConstructorProps, GridDefaultSlotParams, GridExposes, GridInstance, GridItemKeyGetter, GridItemRenderedEvtParams, GridScrollOptions, GridStates, HeaderCellSlotProps, HeaderClassNameGetter, HeaderInstance, IElDropdownInstance, IElMessageBox, IUseFormItemInputCommonProps, IconComponentMap, IconInstance, IconMap, IconProps, IconPropsPublic, IconifyCollection, IconifyIcon, IconifyIconName, ImageCrossorigin, ImageEmits, ImageFitType, ImageInstance, ImageProps, ImagePropsPublic, ImageViewerAction, ImageViewerCrossorigin, ImageViewerEmits, ImageViewerInstance, ImageViewerMode, ImageViewerProps, ImageViewerPropsPublic, InitCacheFunc, InitGridCacheFunc, InitListCacheFunc, InputAutoSize, InputEmits, InputInstance, InputModelModifiers, InputNumberEmits, InputNumberInstance, InputNumberProps, InputNumberPropsPublic, InputProps, InputPropsPublic, InputTagEmits, InputTagInstance, InputTagProps, InputTagPropsPublic, InputType, Instance, ItemProps, ItemSize, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, LayoutDirection, LazyLoad, LinkConfigContext, LinkEmits, LinkInstance, LinkProps, LinkPropsPublic, ListCache, ListConstructorProps, ListExposes, ListItem, ListItemSizer, ListType, LoadFunction, LoadingInstance, LoadingOptions, LoadingOptionsResolved, LoadingParentElement, MENU_INJECTION_KEY, MESSAGE_DEFAULT_PLACEMENT, MainInstance, Measurable, MentionEmits, MentionInstance, MentionOption, MentionOptionProps, MentionProps, MentionPropsPublic, MenuEmits, MenuInstance, MenuItemClicked, MenuItemEmits, MenuItemGroupInstance, MenuItemGroupProps, MenuItemGroupPropsPublic, MenuItemInstance, MenuItemProps, MenuItemPropsPublic, MenuItemRegistered, MenuProps, MenuPropsPublic, MenuProvider, Message, MessageBoxData, MessageBoxInputData, MessageBoxInputValidator, MessageBoxState, MessageBoxType, MessageConfigContext, MessageEmits, MessageFn, MessageHandler, MessageInstance, MessageOptions, MessageOptionsWithType, MessageParams, MessageParamsNormalized, MessageParamsWithType, MessagePlacement, MessageProps, MessagePropsPublic, MessageType, MessageTypedFn, ModelValueType, NODE_INSTANCE_INJECTION_KEY, NodeDropType, NotificationEmits, NotificationHandle, NotificationInstance, NotificationOptions, NotificationOptionsTyped, NotificationParams, NotificationParamsTyped, NotificationPosition, NotificationProps, NotificationPropsPublic, NotificationQueue, NotificationQueueItem, NotificationType, Notify, NotifyFn, NotifyTypedFn, Nullable, OptionBasic, OptionV2Props, Options, OverlayEmits, OverlayProps, OverlayPropsPublic, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, PageHeaderEmits, PageHeaderInstance, PageHeaderProps, PageHeaderPropsPublic, PaginationEmits, PaginationProps, PaginationPropsPublic, PickerOptions, Placement, PopconfirmEmits, PopconfirmInstance, PopconfirmProps, PopconfirmPropsPublic, PopoverEmits, PopoverInstance, PopoverProps, PopoverPropsPublic, PopperArrowInstance, PopperArrowProps, PopperArrowPropsPublic, PopperContentEmits, PopperContentInstance, PopperContentProps, PopperContentPropsPublic, PopperCoreConfigProps, PopperCoreConfigPropsPublic, PopperEffect, PopperInstance, PopperProps, PopperPropsPublic, PopperTrigger, PopperTriggerInstance, PopperTriggerProps, ProgressColor, ProgressFn, ProgressInstance, ProgressProps, ProgressPropsPublic, PropValidator, Props, RIGHT_CHECK_CHANGE_EVENT, ROOT_COMMON_COLOR_INJECTION_KEY, ROOT_COMMON_PICKER_INJECTION_KEY, ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, RTLOffsetType, RadioButtonInstance, RadioButtonProps, RadioButtonPropsPublic, RadioEmits, RadioGroupContext, RadioGroupEmits, RadioGroupInstance, RadioGroupProps, RadioGroupPropsPublic, RadioInstance, RadioProps, RadioPropsBase, RadioPropsPublic, RateEmits, RateInstance, RateProps, RatePropsPublic, RenderContentContext, RenderContentFunction, RenderLabel, RenderLabelProps, RenderRowData, ResetAfterIndex, ResetAfterIndices, Resolve, ResultInstance, ResultProps, ResultPropsPublic, RootTreeType, RowAlign, RowClassNameGetter, RowEventHandler, RowEventHandlerParams, RowEventHandlers, RowExpandHandler, RowExpandParams, RowHeightChangeHandler, RowHeightChangedParams, RowHoverHandler, RowHoverParams, RowInstance, RowJustify, RowProps, RowPropsPublic, STEPS_INJECTION_KEY, SUB_MENU_INJECTION_KEY, ScrollDir, ScrollbarContext, ScrollbarDirection, ScrollbarEmits, ScrollbarExpose, ScrollbarInstance, ScrollbarProps, ScrollbarPropsPublic, SegmentedEmits, SegmentedInstance, SegmentedProps, SegmentedPropsPublic, SelectContext, SelectEmits, SelectInstance, SelectOptionProps, OptionPublicInstance as SelectOptionProxy, SelectProps, SelectPropsPublic, SelectV2Context, SelectV2Instance, SelectV2Props, SharedExposes, SingleOrRange, SkeletonInstance, SkeletonItemInstance, SkeletonItemProps, SkeletonItemPropsPublic, SkeletonProps, SkeletonPropsPublic, SliderContext, SliderEmits, SliderInitData, SliderInstance, SliderProps, SliderPropsPublic, Sort, SortBy, SortState, SpaceInstance, SpaceItemInstance, SpaceItemProps, SpaceItemPropsPublic, SpaceProps, SpacePropsPublic, SplitterEmits, SplitterInstance, SplitterPanelEmits, SplitterPanelInstance, SplitterPanelProps, SplitterPanelPropsPublic, SplitterProps, SplitterPropsPublic, StatisticInstance, StatisticProps, StatisticPropsPublic, StepInstance, StepProps, StepPropsPublic, StepsEmits, StepsInstance, StepsProps, StepsPropsPublic, StepsStatus, SubMenuInstance, SubMenuProps, SubMenuPropsPublic, SubMenuProvider, SummaryMethod, SwitchEmits, SwitchInstance, SwitchProps, SwitchPropsPublic, TIMELINE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY, TabBarInstance, TabBarProps, TabBarPropsPublic, TabNavEmits, TabNavInstance, TabNavProps, TabNavPropsPublic, TabPaneInstance, TabPaneName, TabPaneProps, TabPanePropsPublic, Table, TableColumnCtx, TableColumnInstance, TableConfigContext, TableInstance, TableProps, TableRefs, TableTooltipData, TableV2, Alignment$1 as TableV2Alignment, TableV2CustomizedHeaderSlotParam, FixedDir as TableV2FixedDir, TableV2Instance, placeholderSign as TableV2Placeholder, TableV2Props, TableV2PropsPublic, TableV2RowProps, TableV2RowPropsPublic, SortOrder as TableV2SortOrder, TabsEmits, TabsInstance, TabsPaneContext, TabsPanes, TabsProps, TabsPropsPublic, TabsRootContext, Tag, TagEmits, TagInstance, TagProps, TagPropsPublic, TagTooltipProps, TextProps, TextPropsPublic, ThumbInstance, ThumbProps, ThumbPropsPublic, TimeList, _default$4 as TimePickPanel, TimePickerDefaultProps, TimePickerDefaultPropsPublic, TimePickerExpose, TimePickerInstance, TimeSelectInstance, TimeSelectProps, TimeSelectPropsPublic, TimeUnit, TimelineInstance, TimelineItemInstance, TimelineItemProps, TimelineItemPropsPublic, TimelineProps, TimelinePropsPublic, TimelineProvider, TooltipContentInstance, TooltipInstance, TooltipTriggerType, TourBtnProps, TourContentEmits, TourContentProps, TourContentPropsPublic, TourEmits, TourGap, TourInstance, TourMask, TourProps, TourPropsPublic, TourStepEmits, TourStepProps, TourStepPropsPublic, TransferCheckedState, TransferDataItem, TransferDirection, TransferEmits, TransferFormat, TransferInstance, TransferKey, TransferProps, TransferPropsAlias, TransferPropsPublic, TreeComponentProps, TreeData, TreeEmits, TreeInstance, TreeKey, TreeNode, TreeNodeChildState, TreeNodeData, TreeNodeLoadedDefaultProps, TreeNodeOptions, TreeOptionProps, TreeSelectInstance, TreeStoreNodesMap, TreeStoreOptions, TreeV2Instance, UploadBaseProps, UploadContentInstance, UploadContentProps, UploadContentPropsPublic, UploadContext, UploadData, UploadDraggerEmits, UploadDraggerInstance, UploadDraggerProps, UploadDraggerPropsPublic, UploadFile, UploadFiles, UploadHooks, UploadInstance, UploadListEmits, UploadListInstance, UploadListProps, UploadListPropsPublic, UploadProgressEvent, UploadProps, UploadPropsPublic, UploadRawFile, UploadRequestHandler, UploadRequestOptions, UploadStatus, UploadUserFile, UsePopperArrowProps, UsePopperContentProps, UsePopperCoreConfigProps, UsePopperProps, UseTooltipProps, UseTooltipTriggerProps, UserInput, VirtualizedGridProps, VirtualizedGridPropsPublic, VirtualizedListProps, VirtualizedListPropsPublic, VirtualizedProps, VirtualizedPropsPublic, VirtualizedScrollbarProps, VirtualizedScrollbarPropsPublic, WatermarkFontType, WatermarkInstance, WatermarkProps, WatermarkPropsPublic, affixEmits, affixProps, alertEffects, alertEmits, alertProps, anchorEmits, anchorProps, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarGroupContextKey, avatarGroupProps, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildTimeList, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardContextKey, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderPanelEmits, cascaderPanelProps, cascaderProps, checkTagEmits, checkTagProps, checkboxDefaultProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, checkboxPropsDefaults, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerEmits, colorPickerPanelContextKey, colorPickerPanelEmits, colorPickerPanelProps, colorPickerProps, colorPickerPropsDefaults, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, dateEquals, datePickerPanelProps, datePickerProps, dayOrDaysToDate, defaultProps, descriptionItemProps, descriptionProps, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dialogPropsDefaults, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formMetaProps, formProps, formatter, genFileId, hType, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, inputPropsDefaults, inputTagEmits, inputTagProps, isDisabled, isLeaf, linkEmits, linkProps, makeList, mentionDefaultProps, mentionEmits, mentionProps, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messagePlacement, messageProps, messageType, messageTypes, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popoverPropsDefaults, popperArrowProps, popperArrowPropsDefaults, popperContentEmits, popperContentProps, popperContentPropsDefaults, popperCoreConfigProps, popperCoreConfigPropsDefaults, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioButtonPropsDefaults, radioDefaultProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioGroupPropsDefaults, radioOption, radioOptionProp, radioProps, radioPropsBase, radioPropsDefaults, rangeArr, rateEmits, rateProps, registerIconifyCollection, registerIconifyIcon, renderContent, renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, segmentedEmits, segmentedProps, selectEmits, selectGroupKey, selectKey, selectProps, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceItemProps, spaceProps, splitterEmits, splitterPanelEmits, splitterPanelProps, splitterProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps, timeSelectProps, timeUnits, timelineItemProps, timelineProps, tooltipEmits, tourContentEmits, tourContentProps, tourEmits, tourPlacements, tourProps, tourStepEmits, tourStepProps, tourStrategies, transferCheckedChangeFn, transferEmits, transferProps, treeEmits, treeProps, uploadBaseProps, uploadBasePropsDefaults, uploadContentProps, uploadContentPropsDefaults, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, uploadPropsDefaults, useCascaderConfig, useDialog, useDisabled, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useGlobalComponentSettings, useGlobalConfig, usePopperArrowProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, useSize, useSpace, useTooltipContentProps, useTooltipContentPropsDefaults, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTooltipTriggerPropsDefaults, valueEquals, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, watermarkProps };
291
+ export { Action, AffixEmits, AffixInstance, AffixProps, AffixPropsPublic, AlertEmits, AlertInstance, AlertProps, AlertPropsPublic, Alignment, AllowDragFunction, AllowDropFunction, AllowDropType, AnchorEmits, AnchorInstance, AnchorProps, AnchorPropsPublic, AsideInstance, AutoResizerProps, AutoResizerPropsPublic, AutocompleteData, AutocompleteEmits, AutocompleteFetchSuggestions, AutocompleteFetchSuggestionsCallback, AutocompleteInstance, AutocompletePlacement, AutocompleteProps, AutocompletePropsPublic, AvatarEmits, AvatarGroupContext, AvatarGroupInstance, AvatarGroupProps, AvatarGroupPropsPublic, AvatarInstance, AvatarProps, AvatarPropsPublic, BAR_MAP, BacktopEmits, BacktopInstance, BacktopProps, BacktopPropsPublic, BadgeInstance, BadgeProps, BadgePropsPublic, BorderStyle, BreadcrumbInstance, BreadcrumbItemInstance, BreadcrumbItemProps, BreadcrumbItemPropsPublic, BreadcrumbProps, BreadcrumbPropsPublic, ButtonConfigContext, ButtonEmits, ButtonGroupContext, ButtonGroupInstance, ButtonInstance, ButtonNativeType, ButtonProps, ButtonPropsPublic, ButtonType, CAROUSEL_ITEM_NAME, CASCADER_PANEL_INJECTION_KEY, CalendarDateTableInstance, CalendarDateType, CalendarEmits, CalendarInstance, CalendarProps, CalendarPropsPublic, Callback, CardConfigContext, CardInstance, CardProps, CardPropsPublic, CarouselContext, CarouselEmits, CarouselInstance, CarouselItemContext, CarouselItemInstance, CarouselItemProps, CarouselItemPropsPublic, CarouselItemStates, CarouselProps, CarouselPropsPublic, CascaderCommonProps, CascaderComponentProps, CascaderConfig, CascaderEmits, CascaderInstance, CascaderMenuInstance, Node as CascaderNode, CascaderNodePathValue, CascaderNodeValue, CascaderOption, CascaderPanelInstance, CascaderPanelProps, CascaderProps, CascaderValue, CellCls, CellStyle, CheckTagEmits, CheckTagInstance, CheckTagProps, CheckTagPropsPublic, CheckboxEmits, CheckboxGroupEmits, CheckboxGroupInstance, CheckboxGroupProps, CheckboxGroupPropsPublic, CheckboxGroupValueType, CheckboxInstance, CheckboxOption, CheckboxProps, CheckboxPropsPublic, CheckboxValueType, CheckedInfo, ColInstance, ColProps, ColPropsPublic, ColSize, ColSizeObject, CollapseActiveName, CollapseContext, CollapseEmits, CollapseIconPositionType, CollapseInstance, CollapseItemInstance, CollapseItemProps, CollapseItemPropsPublic, CollapseModelValue, CollapseProps, CollapsePropsPublic, ColorPickerEmits, ColorPickerInstance, ColorPickerPanelContext, ColorPickerPanelEmits, ColorPickerPanelInstance, ColorPickerPanelProps, ColorPickerPanelPropsPublic, ColorPickerProps, ColorPickerPropsPublic, Column, ColumnCls, ColumnResizeHandler, ColumnSortHandler, ColumnSortParams, ColumnStyle, Columns, CommonColorContext, _default as CommonPicker, CommonProps, ConfigProviderContext, ConfigProviderInstance, ConfigProviderProps, ConfigProviderPropsPublic, ContainerInstance, CountdownEmits, CountdownInstance, CountdownProps, CountdownPropsPublic, CreatePopperInstanceParams, Crossorigin, DEFAULT_DIALOG_TRANSITION, DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, DEFAULT_STEP, DROPDOWN_INJECTION_KEY, DROPDOWN_INSTANCE_INJECTION_KEY, DateCell, DateModelType, DateOrDates, DatePickerInstance, DatePickerPanelInstance, DatePickerPanelProps, DatePickerPanelPropsPublic, DatePickerProps, DatePickerPropsPublic, DatePickerType, DateTableInstance, DayOrDays, DefaultProps, DescriptionInstance, DescriptionItemProps, DescriptionItemPropsPublic, DescriptionItemVNode, DescriptionProps, DescriptionPropsPublic, DialogBeforeCloseFn, DialogConfigContext, DialogContext, DialogEmits, DialogInstance, DialogProps, DialogPropsPublic, DialogTransition, Direction, DividerInstance, DividerProps, DividerPropsPublic, DragEvents, DrawerEmits, DrawerInstance, DrawerProps, DrawerPropsPublic, DropdownInstance, DynamicSizeGrid, DynamicSizeGridInstance, DynamicSizeList, DynamicSizeListInstance, Effect, ElAffix, ElAlert, ElAnchor, ElAnchorLink, ElAside, ElAutoResizer, ElAutocomplete, ElAvatar, ElAvatarGroup, ElBacktop, ElBadge, ElBreadcrumb, ElBreadcrumbItem, ElButton, ElButtonGroup, ElCalendar, ElCard, ElCarousel, ElCarouselItem, ElCascader, ElCascaderPanel, ElCascaderPanelContext, ElCheckTag, ElCheckbox, ElCheckboxButton, ElCheckboxGroup, ElCol, ElCollapse, ElCollapseItem, ElCollapseTransition, ElColorPicker, ElColorPickerPanel, ElConfigProvider, ElContainer, ElCountdown, ElDatePicker, ElDatePickerPanel, ElDescriptions, ElDescriptionsItem, ElDialog, ElDivider, ElDrawer, ElDropdown, ElDropdownInjectionContext, ElDropdownItem, ElDropdownMenu, ElEmpty, ElFooter, ElForm, ElFormItem, ElHeader, ElIcon, ElImage, ElImageViewer, ElInfiniteScroll, ElInput, ElInputNumber, ElInputTag, ElLink, ElLoading, vLoading as ElLoadingDirective, vLoading, Loading as ElLoadingService, ElMain, ElMention, ElMenu, ElMenuItem, ElMenuItemGroup, ElMessage, ElMessageBox, ElMessageBoxOptions, ElMessageBoxShortcutMethod, ElNotification, ElOption, ElOptionGroup, ElOverlay, ElPageHeader, ElPagination, ElPaginationContext, ElPopconfirm, ElPopover, ElPopoverDirective, ElPopper, _default$1 as ElPopperArrow, ElPopperArrowContent, ElPopperArrowInstance, ElPopperArrowTrigger, _default$2 as ElPopperContent, ElPopperContentInjectionContext, ElPopperInjectionContext, _default$3 as ElPopperTrigger, ElProgress, ElRadio, ElRadioButton, ElRadioGroup, ElRate, ElResult, ElRow, ElScrollbar, ElSegmented, ElSelect, ElSelectV2, ElSkeleton, ElSkeletonItem, ElSlider, ElSpace, ElSplitter, ElSplitterPanel, ElStatistic, ElStep, ElSteps, ElSubMenu, ElSwitch, ElTabPane, ElTable, ElTableColumn, ElTableV2, ElTabs, ElTag, ElText, ElTimePicker, ElTimeSelect, ElTimeline, ElTimelineItem, ElTooltip, ElTooltipContentProps, ElTooltipContentPropsPublic, ElTooltipInjectionContext, ElTooltipProps, ElTooltipPropsPublic, ElTooltipTriggerProps, ElTooltipTriggerPropsPublic, ElTour, ElTourStep, ElTransfer, ElTree, ElTreeSelect, ElTreeV2, ElUpload, ElWatermark, EmptyInstance, EmptyProps, EmptyPropsPublic, ExpandTrigger, ExpandedRowsChangeHandler, ExperimentalFeatures, ExposesStates, ExtraCellPropGetter, ExtractHeaderCellPropGetter, ExtractHeaderPropGetter, ExtractRowPropGetter, FIRST_KEYS, FIRST_LAST_KEYS, FakeNode, Filter, FilterNodeMethodFunction, FilterValue, FixedSizeGrid, FixedSizeList, FixedSizeListInstance, FooterInstance, FormContext, FormEmits, FormInstance, FormItemContext, FormItemInstance, FormItemProp, FormItemProps, FormItemPropsPublic, FormItemRule, FormItemValidateState, FormMetaProps, FormMetaPropsPublic, FormProps, FormPropsPublic, FormRules, FormValidateCallback, FormValidateFailure, FormValidationResult, GAP, GetDisabledHours, GetDisabledMinutes, GetDisabledSeconds, GetEstimatedTotalSize, GetGridOffset, GetOffset, GetPosition, GetStartIndexForOffset, GetStopIndexForStartIndex, GridCache, GridConstructorProps, GridDefaultSlotParams, GridExposes, GridInstance, GridItemKeyGetter, GridItemRenderedEvtParams, GridScrollOptions, GridStates, HeaderCellSlotProps, HeaderClassNameGetter, HeaderInstance, IElDropdownInstance, IElMessageBox, IUseFormItemInputCommonProps, IconComponentMap, IconInstance, IconMap, IconProps, IconPropsPublic, IconifyCollection, IconifyIcon, IconifyIconName, ImageCrossorigin, ImageEmits, ImageFitType, ImageInstance, ImageProps, ImagePropsPublic, ImageViewerAction, ImageViewerCrossorigin, ImageViewerEmits, ImageViewerInstance, ImageViewerMode, ImageViewerProps, ImageViewerPropsPublic, InitCacheFunc, InitGridCacheFunc, InitListCacheFunc, InputAutoSize, InputEmits, InputInstance, InputModelModifiers, InputNumberEmits, InputNumberInstance, InputNumberProps, InputNumberPropsPublic, InputProps, InputPropsPublic, InputTagEmits, InputTagInstance, InputTagProps, InputTagPropsPublic, InputType, Instance, ItemProps, ItemSize, LAST_KEYS, LEFT_CHECK_CHANGE_EVENT, LayoutDirection, LazyLoad, LinkConfigContext, LinkEmits, LinkInstance, LinkProps, LinkPropsPublic, ListCache, ListConstructorProps, ListExposes, ListItem, ListItemSizer, ListType, LoadFunction, LoadingInstance, LoadingOptions, LoadingOptionsResolved, LoadingParentElement, MENU_INJECTION_KEY, MESSAGE_DEFAULT_PLACEMENT, MainInstance, Measurable, MentionEmits, MentionInstance, MentionOption, MentionOptionProps, MentionProps, MentionPropsPublic, MenuEmits, MenuInstance, MenuItemClicked, MenuItemEmits, MenuItemGroupInstance, MenuItemGroupProps, MenuItemGroupPropsPublic, MenuItemInstance, MenuItemProps, MenuItemPropsPublic, MenuItemRegistered, MenuProps, MenuPropsPublic, MenuProvider, Message, MessageBoxData, MessageBoxInputData, MessageBoxInputValidator, MessageBoxState, MessageBoxType, MessageConfigContext, MessageEmits, MessageFn, MessageHandler, MessageInstance, MessageOptions, MessageOptionsWithType, MessageParams, MessageParamsNormalized, MessageParamsWithType, MessagePlacement, MessageProps, MessagePropsPublic, MessageType, MessageTypedFn, ModelValueType, NODE_INSTANCE_INJECTION_KEY, NodeDropType, NotificationEmits, NotificationHandle, NotificationInstance, NotificationOptions, NotificationOptionsTyped, NotificationParams, NotificationParamsTyped, NotificationPosition, NotificationProps, NotificationPropsPublic, NotificationQueue, NotificationQueueItem, NotificationType, Notify, NotifyFn, NotifyTypedFn, Nullable, OptionBasic, OptionV2Props, Options, OverlayEmits, OverlayProps, OverlayPropsPublic, PICKER_BASE_INJECTION_KEY, PICKER_POPPER_OPTIONS_INJECTION_KEY, POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY, PageHeaderEmits, PageHeaderInstance, PageHeaderProps, PageHeaderPropsPublic, PaginationEmits, PaginationProps, PaginationPropsPublic, PickerOptions, Placement, PopconfirmEmits, PopconfirmInstance, PopconfirmProps, PopconfirmPropsPublic, PopoverEmits, PopoverInstance, PopoverProps, PopoverPropsPublic, PopperArrowInstance, PopperArrowProps, PopperArrowPropsPublic, PopperContentEmits, PopperContentInstance, PopperContentProps, PopperContentPropsPublic, PopperCoreConfigProps, PopperCoreConfigPropsPublic, PopperEffect, PopperInstance, PopperProps, PopperPropsPublic, PopperTrigger, PopperTriggerInstance, PopperTriggerProps, ProgressColor, ProgressFn, ProgressInstance, ProgressProps, ProgressPropsPublic, PropValidator, Props, RIGHT_CHECK_CHANGE_EVENT, ROOT_COMMON_COLOR_INJECTION_KEY, ROOT_COMMON_PICKER_INJECTION_KEY, ROOT_PICKER_INJECTION_KEY, ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY, ROOT_TREE_INJECTION_KEY, RTLOffsetType, RadioButtonInstance, RadioButtonProps, RadioButtonPropsPublic, RadioEmits, RadioGroupContext, RadioGroupEmits, RadioGroupInstance, RadioGroupProps, RadioGroupPropsPublic, RadioInstance, RadioProps, RadioPropsBase, RadioPropsPublic, RateEmits, RateInstance, RateProps, RatePropsPublic, RenderContentContext, RenderContentFunction, RenderLabel, RenderLabelProps, RenderRowData, ResetAfterIndex, ResetAfterIndices, Resolve, ResultInstance, ResultProps, ResultPropsPublic, RootTreeType, RowAlign, RowClassNameGetter, RowEventHandler, RowEventHandlerParams, RowEventHandlers, RowExpandHandler, RowExpandParams, RowHeightChangeHandler, RowHeightChangedParams, RowHoverHandler, RowHoverParams, RowInstance, RowJustify, RowProps, RowPropsPublic, STEPS_INJECTION_KEY, SUB_MENU_INJECTION_KEY, ScrollDir, ScrollbarContext, ScrollbarDirection, ScrollbarEmits, ScrollbarExpose, ScrollbarInstance, ScrollbarProps, ScrollbarPropsPublic, SegmentedEmits, SegmentedInstance, SegmentedProps, SegmentedPropsPublic, SelectContext, SelectEmits, SelectInstance, SelectOptionProps, OptionPublicInstance as SelectOptionProxy, SelectProps, SelectPropsPublic, SelectV2Context, SelectV2Instance, SelectV2Props, SharedExposes, SingleOrRange, SkeletonInstance, SkeletonItemInstance, SkeletonItemProps, SkeletonItemPropsPublic, SkeletonProps, SkeletonPropsPublic, SliderContext, SliderEmits, SliderInitData, SliderInstance, SliderProps, SliderPropsPublic, Sort, SortBy, SortState, SpaceInstance, SpaceItemInstance, SpaceItemProps, SpaceItemPropsPublic, SpaceProps, SpacePropsPublic, SplitterEmits, SplitterInstance, SplitterPanelEmits, SplitterPanelInstance, SplitterPanelProps, SplitterPanelPropsPublic, SplitterProps, SplitterPropsPublic, StatisticInstance, StatisticProps, StatisticPropsPublic, StepInstance, StepProps, StepPropsPublic, StepsEmits, StepsInstance, StepsProps, StepsPropsPublic, StepsStatus, SubMenuInstance, SubMenuProps, SubMenuPropsPublic, SubMenuProvider, SummaryMethod, SwitchEmits, SwitchInstance, SwitchProps, SwitchPropsPublic, TIMELINE_INJECTION_KEY, TOOLTIP_INJECTION_KEY, TREE_NODE_MAP_INJECTION_KEY, TabBarInstance, TabBarProps, TabBarPropsPublic, TabNavEmits, TabNavInstance, TabNavProps, TabNavPropsPublic, TabPaneInstance, TabPaneName, TabPaneProps, TabPanePropsPublic, Table, TableColumnCtx, TableColumnInstance, TableConfigContext, TableInstance, TableProps, TableRefs, TableTooltipData, TableV2, Alignment$1 as TableV2Alignment, TableV2CustomizedHeaderSlotParam, FixedDir as TableV2FixedDir, TableV2Instance, placeholderSign as TableV2Placeholder, TableV2Props, TableV2PropsPublic, TableV2RowProps, TableV2RowPropsPublic, SortOrder as TableV2SortOrder, TabsEmits, TabsInstance, TabsPaneContext, TabsPanes, TabsProps, TabsPropsPublic, TabsRootContext, Tag, TagEmits, TagInstance, TagProps, TagPropsPublic, TagTooltipProps, TextProps, TextPropsPublic, ThumbInstance, ThumbProps, ThumbPropsPublic, TimeList, _default$4 as TimePickPanel, TimePickerDefaultProps, TimePickerDefaultPropsPublic, TimePickerExpose, TimePickerInstance, TimeSelectInstance, TimeSelectProps, TimeSelectPropsPublic, TimeUnit, TimelineInstance, TimelineItemInstance, TimelineItemProps, TimelineItemPropsPublic, TimelineProps, TimelinePropsPublic, TimelineProvider, TooltipContentInstance, TooltipInstance, TooltipTriggerType, TourBtnProps, TourContentEmits, TourContentProps, TourContentPropsPublic, TourEmits, TourGap, TourInstance, TourMask, TourProps, TourPropsPublic, TourStepEmits, TourStepProps, TourStepPropsPublic, TransferCheckedState, TransferDataItem, TransferDirection, TransferEmits, TransferFormat, TransferInstance, TransferKey, TransferProps, TransferPropsAlias, TransferPropsPublic, TreeComponentProps, TreeData, TreeEmits, TreeInstance, TreeKey, TreeNode, TreeNodeChildState, TreeNodeData, TreeNodeLoadedDefaultProps, TreeNodeOptions, TreeOptionProps, TreeSelectInstance, TreeStoreNodesMap, TreeStoreOptions, TreeV2Instance, UploadBaseProps, UploadContentInstance, UploadContentProps, UploadContentPropsPublic, UploadContext, UploadData, UploadDraggerEmits, UploadDraggerInstance, UploadDraggerProps, UploadDraggerPropsPublic, UploadFile, UploadFiles, UploadHooks, UploadInstance, UploadListEmits, UploadListInstance, UploadListProps, UploadListPropsPublic, UploadProgressEvent, UploadProps, UploadPropsPublic, UploadRawFile, UploadRequestHandler, UploadRequestOptions, UploadStatus, UploadUserFile, UsePopperArrowProps, UsePopperContentProps, UsePopperCoreConfigProps, UsePopperProps, UseTooltipProps, UseTooltipTriggerProps, UserInput, VirtualizedGridProps, VirtualizedGridPropsPublic, VirtualizedListProps, VirtualizedListPropsPublic, VirtualizedProps, VirtualizedPropsPublic, VirtualizedScrollbarProps, VirtualizedScrollbarPropsPublic, WatermarkFontType, WatermarkInstance, WatermarkProps, WatermarkPropsPublic, affixEmits, affixProps, alertEffects, alertEmits, alertProps, anchorEmits, anchorProps, autoResizerProps, autocompleteEmits, autocompleteProps, avatarEmits, avatarGroupContextKey, avatarGroupProps, avatarProps, backtopEmits, backtopProps, badgeProps, breadcrumbItemProps, breadcrumbKey, breadcrumbProps, buildTimeList, buttonEmits, buttonGroupContextKey, buttonNativeTypes, buttonProps, buttonTypes, calendarEmits, calendarProps, cardContextKey, cardProps, carouselContextKey, carouselEmits, carouselItemProps, carouselProps, cascaderEmits, cascaderPanelEmits, cascaderPanelProps, cascaderProps, checkTagEmits, checkTagProps, checkboxDefaultProps, checkboxEmits, checkboxGroupContextKey, checkboxGroupEmits, checkboxGroupProps, checkboxProps, checkboxPropsDefaults, colProps, collapseContextKey, collapseEmits, collapseItemProps, collapseProps, colorPickerEmits, colorPickerPanelContextKey, colorPickerPanelEmits, colorPickerPanelProps, colorPickerProps, colorPickerPropsDefaults, configProviderContextKey, configProviderProps, countdownEmits, countdownProps, dateEquals, datePickerPanelProps, datePickerProps, dayOrDaysToDate, defaultProps, descriptionItemProps, descriptionProps, dialogContextKey, dialogEmits, dialogInjectionKey, dialogProps, dialogPropsDefaults, dividerProps, drawerEmits, drawerProps, dropdownItemProps, dropdownMenuProps, dropdownProps, elPaginationKey, emitChangeFn, emptyProps, extractDateFormat, extractTimeFormat, formContextKey, formEmits, formItemContextKey, formItemProps, formItemValidateStates, formMetaProps, formProps, formatter, genFileId, hType, iconProps, imageEmits, imageProps, imageViewerEmits, imageViewerProps, inputEmits, inputNumberEmits, inputNumberProps, inputProps, inputPropsDefaults, inputTagEmits, inputTagProps, isDisabled, isLeaf, linkEmits, linkProps, makeList, mentionDefaultProps, mentionEmits, mentionProps, menuEmits, menuItemEmits, menuItemGroupProps, menuItemProps, menuProps, messageConfig, messageDefaults, messageEmits, messagePlacement, messageProps, messageType, messageTypes, notificationEmits, notificationProps, notificationTypes, overlayEmits, overlayProps, pageHeaderEmits, pageHeaderProps, paginationEmits, paginationProps, parseDate, popconfirmEmits, popconfirmProps, popoverEmits, popoverProps, popoverPropsDefaults, popperArrowProps, popperArrowPropsDefaults, popperContentEmits, popperContentProps, popperContentPropsDefaults, popperCoreConfigProps, popperCoreConfigPropsDefaults, popperProps, popperTriggerProps, progressProps, provideGlobalConfig, radioButtonProps, radioButtonPropsDefaults, radioDefaultProps, radioEmits, radioGroupEmits, radioGroupKey, radioGroupProps, radioGroupPropsDefaults, radioOption, radioOptionProp, radioProps, radioPropsBase, radioPropsDefaults, rangeArr, rateEmits, rateProps, registerIconifyCollection, registerIconifyIcon, renderContent, renderThumbStyle, resultProps, roleTypes, rowContextKey, rowProps, scrollbarContextKey, scrollbarEmits, scrollbarProps, segmentedEmits, segmentedProps, selectEmits, selectGroupKey, selectKey, selectProps, selectV2InjectionKey, skeletonItemProps, skeletonProps, sliderContextKey, sliderEmits, sliderProps, spaceItemProps, spaceProps, splitterEmits, splitterPanelEmits, splitterPanelProps, splitterProps, statisticProps, stepProps, stepsEmits, stepsProps, subMenuProps, switchEmits, switchProps, tabBarProps, tabNavEmits, tabNavProps, tabPaneProps, tableV2Props, tableV2RowProps, tabsEmits, tabsProps, tabsRootContextKey, tagEmits, tagProps, textProps, thumbProps, timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps, timeSelectProps, timeUnits, timelineItemProps, timelineProps, tooltipEmits, tourContentEmits, tourContentProps, tourEmits, tourPlacements, tourProps, tourStepEmits, tourStepProps, tourStrategies, transferCheckedChangeFn, transferEmits, transferProps, treeEmits, treeProps, uploadBaseProps, uploadBasePropsDefaults, uploadContentProps, uploadContentPropsDefaults, uploadContextKey, uploadDraggerEmits, uploadDraggerProps, uploadListEmits, uploadListProps, uploadListTypes, uploadProps, uploadPropsDefaults, useCascaderConfig, useDialog, useDisabled, useFormDisabled, useFormItem, useFormItemInputId, useFormSize, useGlobalComponentSettings, useGlobalConfig, usePopperArrowProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps, usePopperProps, usePopperTriggerProps, useSize, useSpace, useTooltipContentProps, useTooltipContentPropsDefaults, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps, useTooltipTriggerProps, useTooltipTriggerPropsDefaults, valueEquals, virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps, watermarkProps };