element-plus 2.3.9 → 2.3.12

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 (445) hide show
  1. package/README.md +5 -8
  2. package/attributes.json +1 -1
  3. package/dist/index.full.js +148 -123
  4. package/dist/index.full.min.js +20 -20
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +20 -20
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +148 -123
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar.js +1 -1
  14. package/dist/locale/ar.min.js +1 -1
  15. package/dist/locale/ar.min.mjs +1 -1
  16. package/dist/locale/ar.mjs +1 -1
  17. package/dist/locale/az.js +1 -1
  18. package/dist/locale/az.min.js +1 -1
  19. package/dist/locale/az.min.mjs +1 -1
  20. package/dist/locale/az.mjs +1 -1
  21. package/dist/locale/bg.js +1 -1
  22. package/dist/locale/bg.min.js +1 -1
  23. package/dist/locale/bg.min.mjs +1 -1
  24. package/dist/locale/bg.mjs +1 -1
  25. package/dist/locale/bn.js +1 -1
  26. package/dist/locale/bn.min.js +1 -1
  27. package/dist/locale/bn.min.mjs +1 -1
  28. package/dist/locale/bn.mjs +1 -1
  29. package/dist/locale/ca.js +1 -1
  30. package/dist/locale/ca.min.js +1 -1
  31. package/dist/locale/ca.min.mjs +1 -1
  32. package/dist/locale/ca.mjs +1 -1
  33. package/dist/locale/ckb.js +1 -1
  34. package/dist/locale/ckb.min.js +1 -1
  35. package/dist/locale/ckb.min.mjs +1 -1
  36. package/dist/locale/ckb.mjs +1 -1
  37. package/dist/locale/cs.js +1 -1
  38. package/dist/locale/cs.min.js +1 -1
  39. package/dist/locale/cs.min.mjs +1 -1
  40. package/dist/locale/cs.mjs +1 -1
  41. package/dist/locale/da.js +1 -1
  42. package/dist/locale/da.min.js +1 -1
  43. package/dist/locale/da.min.mjs +1 -1
  44. package/dist/locale/da.mjs +1 -1
  45. package/dist/locale/de.js +1 -1
  46. package/dist/locale/de.min.js +1 -1
  47. package/dist/locale/de.min.mjs +1 -1
  48. package/dist/locale/de.mjs +1 -1
  49. package/dist/locale/el.js +1 -1
  50. package/dist/locale/el.min.js +1 -1
  51. package/dist/locale/el.min.mjs +1 -1
  52. package/dist/locale/el.mjs +1 -1
  53. package/dist/locale/en.js +1 -1
  54. package/dist/locale/en.min.js +1 -1
  55. package/dist/locale/en.min.mjs +1 -1
  56. package/dist/locale/en.mjs +1 -1
  57. package/dist/locale/eo.js +1 -1
  58. package/dist/locale/eo.min.js +1 -1
  59. package/dist/locale/eo.min.mjs +1 -1
  60. package/dist/locale/eo.mjs +1 -1
  61. package/dist/locale/es.js +1 -1
  62. package/dist/locale/es.min.js +1 -1
  63. package/dist/locale/es.min.mjs +1 -1
  64. package/dist/locale/es.mjs +1 -1
  65. package/dist/locale/et.js +1 -1
  66. package/dist/locale/et.min.js +1 -1
  67. package/dist/locale/et.min.mjs +1 -1
  68. package/dist/locale/et.mjs +1 -1
  69. package/dist/locale/eu.js +1 -1
  70. package/dist/locale/eu.min.js +1 -1
  71. package/dist/locale/eu.min.mjs +1 -1
  72. package/dist/locale/eu.mjs +1 -1
  73. package/dist/locale/fa.js +1 -1
  74. package/dist/locale/fa.min.js +1 -1
  75. package/dist/locale/fa.min.mjs +1 -1
  76. package/dist/locale/fa.mjs +1 -1
  77. package/dist/locale/fi.js +1 -1
  78. package/dist/locale/fi.min.js +1 -1
  79. package/dist/locale/fi.min.mjs +1 -1
  80. package/dist/locale/fi.mjs +1 -1
  81. package/dist/locale/fr.js +1 -1
  82. package/dist/locale/fr.min.js +1 -1
  83. package/dist/locale/fr.min.mjs +1 -1
  84. package/dist/locale/fr.mjs +1 -1
  85. package/dist/locale/he.js +1 -1
  86. package/dist/locale/he.min.js +1 -1
  87. package/dist/locale/he.min.mjs +1 -1
  88. package/dist/locale/he.mjs +1 -1
  89. package/dist/locale/hr.js +1 -1
  90. package/dist/locale/hr.min.js +1 -1
  91. package/dist/locale/hr.min.mjs +1 -1
  92. package/dist/locale/hr.mjs +1 -1
  93. package/dist/locale/hu.js +1 -1
  94. package/dist/locale/hu.min.js +1 -1
  95. package/dist/locale/hu.min.mjs +1 -1
  96. package/dist/locale/hu.mjs +1 -1
  97. package/dist/locale/hy-am.js +1 -1
  98. package/dist/locale/hy-am.min.js +1 -1
  99. package/dist/locale/hy-am.min.mjs +1 -1
  100. package/dist/locale/hy-am.mjs +1 -1
  101. package/dist/locale/id.js +1 -1
  102. package/dist/locale/id.min.js +1 -1
  103. package/dist/locale/id.min.mjs +1 -1
  104. package/dist/locale/id.mjs +1 -1
  105. package/dist/locale/it.js +1 -1
  106. package/dist/locale/it.min.js +1 -1
  107. package/dist/locale/it.min.mjs +1 -1
  108. package/dist/locale/it.mjs +1 -1
  109. package/dist/locale/ja.js +1 -1
  110. package/dist/locale/ja.min.js +1 -1
  111. package/dist/locale/ja.min.mjs +1 -1
  112. package/dist/locale/ja.mjs +1 -1
  113. package/dist/locale/kk.js +1 -1
  114. package/dist/locale/kk.min.js +1 -1
  115. package/dist/locale/kk.min.mjs +1 -1
  116. package/dist/locale/kk.mjs +1 -1
  117. package/dist/locale/km.js +1 -1
  118. package/dist/locale/km.min.js +1 -1
  119. package/dist/locale/km.min.mjs +1 -1
  120. package/dist/locale/km.mjs +1 -1
  121. package/dist/locale/ko.js +1 -1
  122. package/dist/locale/ko.min.js +1 -1
  123. package/dist/locale/ko.min.mjs +1 -1
  124. package/dist/locale/ko.mjs +1 -1
  125. package/dist/locale/ku.js +1 -1
  126. package/dist/locale/ku.min.js +1 -1
  127. package/dist/locale/ku.min.mjs +1 -1
  128. package/dist/locale/ku.mjs +1 -1
  129. package/dist/locale/ky.js +1 -1
  130. package/dist/locale/ky.min.js +1 -1
  131. package/dist/locale/ky.min.mjs +1 -1
  132. package/dist/locale/ky.mjs +1 -1
  133. package/dist/locale/lt.js +1 -1
  134. package/dist/locale/lt.min.js +1 -1
  135. package/dist/locale/lt.min.mjs +1 -1
  136. package/dist/locale/lt.mjs +1 -1
  137. package/dist/locale/lv.js +1 -1
  138. package/dist/locale/lv.min.js +1 -1
  139. package/dist/locale/lv.min.mjs +1 -1
  140. package/dist/locale/lv.mjs +1 -1
  141. package/dist/locale/mg.js +1 -1
  142. package/dist/locale/mg.min.js +1 -1
  143. package/dist/locale/mg.min.mjs +1 -1
  144. package/dist/locale/mg.mjs +1 -1
  145. package/dist/locale/mn.js +1 -1
  146. package/dist/locale/mn.min.js +1 -1
  147. package/dist/locale/mn.min.mjs +1 -1
  148. package/dist/locale/mn.mjs +1 -1
  149. package/dist/locale/nb-no.js +1 -1
  150. package/dist/locale/nb-no.min.js +1 -1
  151. package/dist/locale/nb-no.min.mjs +1 -1
  152. package/dist/locale/nb-no.mjs +1 -1
  153. package/dist/locale/nl.js +1 -1
  154. package/dist/locale/nl.min.js +1 -1
  155. package/dist/locale/nl.min.mjs +1 -1
  156. package/dist/locale/nl.mjs +1 -1
  157. package/dist/locale/pa.js +1 -1
  158. package/dist/locale/pa.min.js +1 -1
  159. package/dist/locale/pa.min.mjs +1 -1
  160. package/dist/locale/pa.mjs +1 -1
  161. package/dist/locale/pl.js +1 -1
  162. package/dist/locale/pl.min.js +1 -1
  163. package/dist/locale/pl.min.mjs +1 -1
  164. package/dist/locale/pl.mjs +1 -1
  165. package/dist/locale/pt-br.js +1 -1
  166. package/dist/locale/pt-br.min.js +1 -1
  167. package/dist/locale/pt-br.min.mjs +1 -1
  168. package/dist/locale/pt-br.mjs +1 -1
  169. package/dist/locale/pt.js +1 -1
  170. package/dist/locale/pt.min.js +1 -1
  171. package/dist/locale/pt.min.mjs +1 -1
  172. package/dist/locale/pt.mjs +1 -1
  173. package/dist/locale/ro.js +1 -1
  174. package/dist/locale/ro.min.js +1 -1
  175. package/dist/locale/ro.min.mjs +1 -1
  176. package/dist/locale/ro.mjs +1 -1
  177. package/dist/locale/ru.js +1 -1
  178. package/dist/locale/ru.min.js +1 -1
  179. package/dist/locale/ru.min.mjs +1 -1
  180. package/dist/locale/ru.mjs +1 -1
  181. package/dist/locale/sk.js +1 -1
  182. package/dist/locale/sk.min.js +1 -1
  183. package/dist/locale/sk.min.mjs +1 -1
  184. package/dist/locale/sk.mjs +1 -1
  185. package/dist/locale/sl.js +1 -1
  186. package/dist/locale/sl.min.js +1 -1
  187. package/dist/locale/sl.min.mjs +1 -1
  188. package/dist/locale/sl.mjs +1 -1
  189. package/dist/locale/sr.js +1 -1
  190. package/dist/locale/sr.min.js +1 -1
  191. package/dist/locale/sr.min.mjs +1 -1
  192. package/dist/locale/sr.mjs +1 -1
  193. package/dist/locale/sv.js +1 -1
  194. package/dist/locale/sv.min.js +1 -1
  195. package/dist/locale/sv.min.mjs +1 -1
  196. package/dist/locale/sv.mjs +1 -1
  197. package/dist/locale/ta.js +1 -1
  198. package/dist/locale/ta.min.js +1 -1
  199. package/dist/locale/ta.min.mjs +1 -1
  200. package/dist/locale/ta.mjs +1 -1
  201. package/dist/locale/th.js +1 -1
  202. package/dist/locale/th.min.js +1 -1
  203. package/dist/locale/th.min.mjs +1 -1
  204. package/dist/locale/th.mjs +1 -1
  205. package/dist/locale/tk.js +1 -1
  206. package/dist/locale/tk.min.js +1 -1
  207. package/dist/locale/tk.min.mjs +1 -1
  208. package/dist/locale/tk.mjs +1 -1
  209. package/dist/locale/tr.js +1 -1
  210. package/dist/locale/tr.min.js +1 -1
  211. package/dist/locale/tr.min.mjs +1 -1
  212. package/dist/locale/tr.mjs +1 -1
  213. package/dist/locale/ug-cn.js +1 -1
  214. package/dist/locale/ug-cn.min.js +1 -1
  215. package/dist/locale/ug-cn.min.mjs +1 -1
  216. package/dist/locale/ug-cn.mjs +1 -1
  217. package/dist/locale/uk.js +1 -1
  218. package/dist/locale/uk.min.js +1 -1
  219. package/dist/locale/uk.min.mjs +1 -1
  220. package/dist/locale/uk.mjs +1 -1
  221. package/dist/locale/uz-uz.js +1 -1
  222. package/dist/locale/uz-uz.min.js +1 -1
  223. package/dist/locale/uz-uz.min.mjs +1 -1
  224. package/dist/locale/uz-uz.mjs +1 -1
  225. package/dist/locale/vi.js +1 -1
  226. package/dist/locale/vi.min.js +1 -1
  227. package/dist/locale/vi.min.mjs +1 -1
  228. package/dist/locale/vi.mjs +1 -1
  229. package/dist/locale/zh-cn.js +1 -1
  230. package/dist/locale/zh-cn.min.js +1 -1
  231. package/dist/locale/zh-cn.min.mjs +1 -1
  232. package/dist/locale/zh-cn.mjs +1 -1
  233. package/dist/locale/zh-tw.js +1 -1
  234. package/dist/locale/zh-tw.min.js +1 -1
  235. package/dist/locale/zh-tw.min.mjs +1 -1
  236. package/dist/locale/zh-tw.mjs +1 -1
  237. package/es/components/autocomplete/index.d.ts +1 -1
  238. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  239. package/es/components/autocomplete/src/autocomplete.vue.d.ts +7 -8
  240. package/es/components/autocomplete/src/autocomplete2.mjs +2 -3
  241. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  242. package/es/components/card/index.d.ts +2 -0
  243. package/es/components/card/src/card.d.ts +1 -0
  244. package/es/components/card/src/card.mjs +1 -0
  245. package/es/components/card/src/card.mjs.map +1 -1
  246. package/es/components/card/src/card.vue.d.ts +2 -0
  247. package/es/components/card/src/card2.mjs +1 -1
  248. package/es/components/card/src/card2.mjs.map +1 -1
  249. package/es/components/cascader/index.d.ts +8 -0
  250. package/es/components/cascader/src/cascader.d.ts +1 -0
  251. package/es/components/cascader/src/cascader.mjs +4 -0
  252. package/es/components/cascader/src/cascader.mjs.map +1 -1
  253. package/es/components/cascader/src/cascader.vue.d.ts +4 -0
  254. package/es/components/cascader/src/cascader2.mjs +3 -3
  255. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  256. package/es/components/checkbox/src/checkbox-button.mjs +10 -6
  257. package/es/components/checkbox/src/checkbox-button.mjs.map +1 -1
  258. package/es/components/checkbox/src/checkbox2.mjs +10 -6
  259. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  260. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +6 -4
  261. package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
  262. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
  263. package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +7 -13
  264. package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
  265. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
  266. package/es/components/date-picker/src/panel-utils.d.ts +2 -2
  267. package/es/components/dialog/index.d.ts +12 -0
  268. package/es/components/dialog/src/dialog-content.d.ts +1 -0
  269. package/es/components/dialog/src/dialog-content.mjs +4 -0
  270. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  271. package/es/components/dialog/src/dialog-content.vue.d.ts +4 -0
  272. package/es/components/dialog/src/dialog-content2.mjs +7 -5
  273. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  274. package/es/components/dialog/src/dialog.d.ts +2 -0
  275. package/es/components/dialog/src/dialog.mjs +4 -0
  276. package/es/components/dialog/src/dialog.mjs.map +1 -1
  277. package/es/components/dialog/src/dialog.vue.d.ts +12 -0
  278. package/es/components/dialog/src/dialog2.mjs +2 -1
  279. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  280. package/es/components/drawer/index.d.ts +6 -0
  281. package/es/components/drawer/src/drawer.d.ts +2 -0
  282. package/es/components/drawer/src/drawer.mjs +4 -0
  283. package/es/components/drawer/src/drawer.mjs.map +1 -1
  284. package/es/components/drawer/src/drawer.vue.d.ts +6 -0
  285. package/es/components/drawer/src/drawer2.mjs +2 -1
  286. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  287. package/es/components/dropdown/src/dropdown2.mjs +6 -6
  288. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  289. package/es/components/form/src/form-item.mjs.map +1 -1
  290. package/es/components/input-number/src/input-number2.mjs +3 -3
  291. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  292. package/es/components/pagination/src/components/sizes.vue.d.ts +22 -49
  293. package/es/components/radio/src/radio-button2.mjs +5 -3
  294. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  295. package/es/components/radio/src/radio2.mjs +5 -3
  296. package/es/components/radio/src/radio2.mjs.map +1 -1
  297. package/es/components/select/index.d.ts +24 -57
  298. package/es/components/select/src/option-group.mjs +1 -4
  299. package/es/components/select/src/option-group.mjs.map +1 -1
  300. package/es/components/select/src/option-group.vue.d.ts +14 -8
  301. package/es/components/select/src/option.mjs +1 -4
  302. package/es/components/select/src/option.mjs.map +1 -1
  303. package/es/components/select/src/option.vue.d.ts +20 -8
  304. package/es/components/select/src/select.mjs +11 -14
  305. package/es/components/select/src/select.mjs.map +1 -1
  306. package/es/components/select/src/select.vue.d.ts +355 -50
  307. package/es/components/select/src/useSelect.d.ts +1 -0
  308. package/es/components/select/src/useSelect.mjs +19 -10
  309. package/es/components/select/src/useSelect.mjs.map +1 -1
  310. package/es/components/select-v2/index.d.ts +2 -2
  311. package/es/components/select-v2/src/select.vue.d.ts +1 -1
  312. package/es/components/table/src/config.d.ts +1 -1
  313. package/es/components/table/src/config.mjs +5 -3
  314. package/es/components/table/src/config.mjs.map +1 -1
  315. package/es/components/table/src/table-body/index.mjs +2 -5
  316. package/es/components/table/src/table-body/index.mjs.map +1 -1
  317. package/es/components/table/src/table-body/render-helper.mjs +1 -1
  318. package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
  319. package/es/components/table-v2/src/table-v2.mjs +1 -1
  320. package/es/components/table-v2/src/table-v2.mjs.map +1 -1
  321. package/es/components/time-picker/src/common/picker.mjs.map +1 -1
  322. package/es/components/time-picker/src/common/picker.vue.d.ts +1 -1
  323. package/es/components/time-select/index.d.ts +84 -180
  324. package/es/components/time-select/src/time-select.vue.d.ts +42 -90
  325. package/es/components/transfer/src/transfer.mjs.map +1 -1
  326. package/es/components/tree/src/tree-node.mjs +1 -1
  327. package/es/components/tree/src/tree-node.mjs.map +1 -1
  328. package/es/components/tree-select/src/tree-select-option.d.ts +8 -32
  329. package/es/components/tree-v2/src/composables/useTree.mjs +1 -1
  330. package/es/components/tree-v2/src/composables/useTree.mjs.map +1 -1
  331. package/es/components/upload/index.d.ts +0 -3
  332. package/es/components/upload/src/ajax.mjs +2 -1
  333. package/es/components/upload/src/ajax.mjs.map +1 -1
  334. package/es/components/upload/src/upload.vue.d.ts +0 -3
  335. package/es/components/upload/src/upload2.mjs +5 -6
  336. package/es/components/upload/src/upload2.mjs.map +1 -1
  337. package/es/version.d.ts +1 -1
  338. package/es/version.mjs +1 -1
  339. package/es/version.mjs.map +1 -1
  340. package/lib/components/autocomplete/index.d.ts +1 -1
  341. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  342. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +7 -8
  343. package/lib/components/autocomplete/src/autocomplete2.js +1 -2
  344. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  345. package/lib/components/card/index.d.ts +2 -0
  346. package/lib/components/card/src/card.d.ts +1 -0
  347. package/lib/components/card/src/card.js +1 -0
  348. package/lib/components/card/src/card.js.map +1 -1
  349. package/lib/components/card/src/card.vue.d.ts +2 -0
  350. package/lib/components/card/src/card2.js +1 -1
  351. package/lib/components/card/src/card2.js.map +1 -1
  352. package/lib/components/cascader/index.d.ts +8 -0
  353. package/lib/components/cascader/src/cascader.d.ts +1 -0
  354. package/lib/components/cascader/src/cascader.js +4 -0
  355. package/lib/components/cascader/src/cascader.js.map +1 -1
  356. package/lib/components/cascader/src/cascader.vue.d.ts +4 -0
  357. package/lib/components/cascader/src/cascader2.js +3 -3
  358. package/lib/components/cascader/src/cascader2.js.map +1 -1
  359. package/lib/components/checkbox/src/checkbox-button.js +9 -5
  360. package/lib/components/checkbox/src/checkbox-button.js.map +1 -1
  361. package/lib/components/checkbox/src/checkbox2.js +9 -5
  362. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  363. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +6 -4
  364. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
  365. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +1 -1
  366. package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +7 -13
  367. package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
  368. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
  369. package/lib/components/date-picker/src/panel-utils.d.ts +2 -2
  370. package/lib/components/dialog/index.d.ts +12 -0
  371. package/lib/components/dialog/src/dialog-content.d.ts +1 -0
  372. package/lib/components/dialog/src/dialog-content.js +4 -0
  373. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  374. package/lib/components/dialog/src/dialog-content.vue.d.ts +4 -0
  375. package/lib/components/dialog/src/dialog-content2.js +7 -5
  376. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  377. package/lib/components/dialog/src/dialog.d.ts +2 -0
  378. package/lib/components/dialog/src/dialog.js +4 -0
  379. package/lib/components/dialog/src/dialog.js.map +1 -1
  380. package/lib/components/dialog/src/dialog.vue.d.ts +12 -0
  381. package/lib/components/dialog/src/dialog2.js +2 -1
  382. package/lib/components/dialog/src/dialog2.js.map +1 -1
  383. package/lib/components/drawer/index.d.ts +6 -0
  384. package/lib/components/drawer/src/drawer.d.ts +2 -0
  385. package/lib/components/drawer/src/drawer.js +4 -0
  386. package/lib/components/drawer/src/drawer.js.map +1 -1
  387. package/lib/components/drawer/src/drawer.vue.d.ts +6 -0
  388. package/lib/components/drawer/src/drawer2.js +2 -1
  389. package/lib/components/drawer/src/drawer2.js.map +1 -1
  390. package/lib/components/dropdown/src/dropdown2.js +5 -5
  391. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  392. package/lib/components/form/src/form-item.js.map +1 -1
  393. package/lib/components/input-number/src/input-number2.js +3 -3
  394. package/lib/components/input-number/src/input-number2.js.map +1 -1
  395. package/lib/components/pagination/src/components/sizes.vue.d.ts +22 -49
  396. package/lib/components/radio/src/radio-button2.js +4 -2
  397. package/lib/components/radio/src/radio-button2.js.map +1 -1
  398. package/lib/components/radio/src/radio2.js +4 -2
  399. package/lib/components/radio/src/radio2.js.map +1 -1
  400. package/lib/components/select/index.d.ts +24 -57
  401. package/lib/components/select/src/option-group.js +1 -4
  402. package/lib/components/select/src/option-group.js.map +1 -1
  403. package/lib/components/select/src/option-group.vue.d.ts +14 -8
  404. package/lib/components/select/src/option.js +1 -4
  405. package/lib/components/select/src/option.js.map +1 -1
  406. package/lib/components/select/src/option.vue.d.ts +20 -8
  407. package/lib/components/select/src/select.js +11 -14
  408. package/lib/components/select/src/select.js.map +1 -1
  409. package/lib/components/select/src/select.vue.d.ts +355 -50
  410. package/lib/components/select/src/useSelect.d.ts +1 -0
  411. package/lib/components/select/src/useSelect.js +17 -8
  412. package/lib/components/select/src/useSelect.js.map +1 -1
  413. package/lib/components/select-v2/index.d.ts +2 -2
  414. package/lib/components/select-v2/src/select.vue.d.ts +1 -1
  415. package/lib/components/table/src/config.d.ts +1 -1
  416. package/lib/components/table/src/config.js +5 -3
  417. package/lib/components/table/src/config.js.map +1 -1
  418. package/lib/components/table/src/table-body/index.js +2 -5
  419. package/lib/components/table/src/table-body/index.js.map +1 -1
  420. package/lib/components/table/src/table-body/render-helper.js +1 -1
  421. package/lib/components/table/src/table-body/render-helper.js.map +1 -1
  422. package/lib/components/table-v2/src/table-v2.js +1 -1
  423. package/lib/components/table-v2/src/table-v2.js.map +1 -1
  424. package/lib/components/time-picker/src/common/picker.js.map +1 -1
  425. package/lib/components/time-picker/src/common/picker.vue.d.ts +1 -1
  426. package/lib/components/time-select/index.d.ts +84 -180
  427. package/lib/components/time-select/src/time-select.vue.d.ts +42 -90
  428. package/lib/components/transfer/src/transfer.js.map +1 -1
  429. package/lib/components/tree/src/tree-node.js +1 -1
  430. package/lib/components/tree/src/tree-node.js.map +1 -1
  431. package/lib/components/tree-select/src/tree-select-option.d.ts +8 -32
  432. package/lib/components/tree-v2/src/composables/useTree.js +1 -1
  433. package/lib/components/tree-v2/src/composables/useTree.js.map +1 -1
  434. package/lib/components/upload/index.d.ts +0 -3
  435. package/lib/components/upload/src/ajax.js +2 -1
  436. package/lib/components/upload/src/ajax.js.map +1 -1
  437. package/lib/components/upload/src/upload.vue.d.ts +0 -3
  438. package/lib/components/upload/src/upload2.js +4 -5
  439. package/lib/components/upload/src/upload2.js.map +1 -1
  440. package/lib/version.d.ts +1 -1
  441. package/lib/version.js +1 -1
  442. package/lib/version.js.map +1 -1
  443. package/package.json +2 -2
  444. package/tags.json +1 -1
  445. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useTree.js","sources":["../../../../../../../packages/components/tree-v2/src/composables/useTree.ts"],"sourcesContent":["import { computed, nextTick, ref, shallowRef, watch } from 'vue'\nimport { isObject } from '@element-plus/utils'\nimport {\n CURRENT_CHANGE,\n NODE_CLICK,\n NODE_COLLAPSE,\n NODE_EXPAND,\n TreeOptionsEnum,\n} from '../virtual-tree'\nimport { useCheck } from './useCheck'\nimport { useFilter } from './useFilter'\nimport type { SetupContext } from 'vue'\nimport type { treeEmits } from '../virtual-tree'\nimport type { CheckboxValueType } from '@element-plus/components/checkbox'\nimport type {\n Tree,\n TreeData,\n TreeKey,\n TreeNode,\n TreeNodeData,\n TreeProps,\n} from '../types'\n\nexport function useTree(\n props: TreeProps,\n emit: SetupContext<typeof treeEmits>['emit']\n) {\n const expandedKeySet = ref<Set<TreeKey>>(new Set(props.defaultExpandedKeys))\n const currentKey = ref<TreeKey | undefined>()\n const tree = shallowRef<Tree | undefined>()\n\n watch(\n () => props.currentNodeKey,\n (key) => {\n currentKey.value = key\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => props.data,\n (data: TreeData) => {\n setData(data)\n },\n {\n immediate: true,\n }\n )\n\n const {\n isIndeterminate,\n isChecked,\n toggleCheckbox,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n } = useCheck(props, tree)\n\n const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(\n props,\n tree\n )\n\n const valueKey = computed(() => {\n return props.props?.value || TreeOptionsEnum.KEY\n })\n const childrenKey = computed(() => {\n return props.props?.children || TreeOptionsEnum.CHILDREN\n })\n const disabledKey = computed(() => {\n return props.props?.disabled || TreeOptionsEnum.DISABLED\n })\n const labelKey = computed(() => {\n return props.props?.label || TreeOptionsEnum.LABEL\n })\n\n const flattenTree = computed(() => {\n const expandedKeys = expandedKeySet.value\n const hiddenKeys = hiddenNodeKeySet.value\n const flattenNodes: TreeNode[] = []\n const nodes = (tree.value && tree.value.treeNodes) || []\n function traverse() {\n const stack: TreeNode[] = []\n for (let i = nodes.length - 1; i >= 0; --i) {\n stack.push(nodes[i])\n }\n while (stack.length) {\n const node = stack.pop()\n if (!node) continue\n if (!hiddenKeys.has(node.key)) {\n flattenNodes.push(node)\n }\n // Only \"visible\" nodes will be rendered\n if (expandedKeys.has(node.key)) {\n const children = node.children\n if (children) {\n const length = children.length\n for (let i = length - 1; i >= 0; --i) {\n stack.push(children[i])\n }\n }\n }\n }\n }\n traverse()\n return flattenNodes\n })\n\n const isNotEmpty = computed(() => {\n return flattenTree.value.length > 0\n })\n\n function createTree(data: TreeData): Tree {\n const treeNodeMap: Map<TreeKey, TreeNode> = new Map()\n const levelTreeNodeMap: Map<number, TreeNode[]> = new Map()\n let maxLevel = 1\n function traverse(\n nodes: TreeData,\n level = 1,\n parent: TreeNode | undefined = undefined\n ) {\n const siblings: TreeNode[] = []\n for (const rawNode of nodes) {\n const value = getKey(rawNode)\n const node: TreeNode = {\n level,\n key: value,\n data: rawNode,\n }\n node.label = getLabel(rawNode)\n node.parent = parent\n const children = getChildren(rawNode)\n node.disabled = getDisabled(rawNode)\n node.isLeaf = !children || children.length === 0\n if (children && children.length) {\n node.children = traverse(children, level + 1, node)\n }\n siblings.push(node)\n treeNodeMap.set(value, node)\n if (!levelTreeNodeMap.has(level)) {\n levelTreeNodeMap.set(level, [])\n }\n levelTreeNodeMap.get(level)?.push(node)\n }\n if (level > maxLevel) {\n maxLevel = level\n }\n return siblings\n }\n const treeNodes: TreeNode[] = traverse(data)\n return {\n treeNodeMap,\n levelTreeNodeMap,\n maxLevel,\n treeNodes,\n }\n }\n\n function filter(query: string) {\n const keys = doFilter(query)\n if (keys) {\n expandedKeySet.value = keys\n }\n }\n\n function getChildren(node: TreeNodeData): TreeNodeData[] {\n return node[childrenKey.value]\n }\n\n function getKey(node: TreeNodeData): TreeKey {\n if (!node) {\n return ''\n }\n return node[valueKey.value]\n }\n\n function getDisabled(node: TreeNodeData): boolean {\n return node[disabledKey.value]\n }\n\n function getLabel(node: TreeNodeData): string {\n return node[labelKey.value]\n }\n\n function toggleExpand(node: TreeNode) {\n const expandedKeys = expandedKeySet.value\n if (expandedKeys.has(node.key)) {\n collapseNode(node)\n } else {\n expandNode(node)\n }\n }\n\n function setExpandedKeys(keys: TreeKey[]) {\n expandedKeySet.value = new Set(keys)\n }\n\n function handleNodeClick(node: TreeNode, e: MouseEvent) {\n emit(NODE_CLICK, node.data, node, e)\n handleCurrentChange(node)\n if (props.expandOnClickNode) {\n toggleExpand(node)\n }\n if (props.showCheckbox && props.checkOnClickNode && !node.disabled) {\n toggleCheckbox(node, !isChecked(node), true)\n }\n }\n\n function handleCurrentChange(node: TreeNode) {\n if (!isCurrent(node)) {\n currentKey.value = node.key\n emit(CURRENT_CHANGE, node.data, node)\n }\n }\n\n function handleNodeCheck(node: TreeNode, checked: CheckboxValueType) {\n toggleCheckbox(node, checked)\n }\n\n function expandNode(node: TreeNode) {\n const keySet = expandedKeySet.value\n if (tree.value && props.accordion) {\n // whether only one node among the same level can be expanded at one time\n const { treeNodeMap } = tree.value\n keySet.forEach((key) => {\n const treeNode = treeNodeMap.get(key)\n if (node && node.level === treeNode?.level) {\n keySet.delete(key)\n }\n })\n }\n keySet.add(node.key)\n emit(NODE_EXPAND, node.data, node)\n }\n\n function collapseNode(node: TreeNode) {\n expandedKeySet.value.delete(node.key)\n emit(NODE_COLLAPSE, node.data, node)\n }\n\n function isExpanded(node: TreeNode): boolean {\n return expandedKeySet.value.has(node.key)\n }\n\n function isDisabled(node: TreeNode): boolean {\n return !!node.disabled\n }\n\n function isCurrent(node: TreeNode): boolean {\n const current = currentKey.value\n return !!current && current === node.key\n }\n\n function getCurrentNode(): TreeNodeData | undefined {\n if (!currentKey.value) return undefined\n return tree.value?.treeNodeMap.get(currentKey.value)?.data\n }\n\n function getCurrentKey(): TreeKey | undefined {\n return currentKey.value\n }\n\n function setCurrentKey(key: TreeKey): void {\n currentKey.value = key\n }\n\n function setData(data: TreeData) {\n nextTick(() => (tree.value = createTree(data)))\n }\n\n function getNode(data: TreeKey | TreeNodeData) {\n const key = isObject(data) ? getKey(data) : data\n return tree.value?.treeNodeMap.get(key)\n }\n\n return {\n tree,\n flattenTree,\n isNotEmpty,\n getKey,\n getChildren,\n toggleExpand,\n toggleCheckbox,\n isExpanded,\n isChecked,\n isIndeterminate,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeCheck,\n // expose\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n setExpandedKeys,\n }\n}\n"],"names":["ref","shallowRef","watch","useCheck","useFilter","computed","TreeOptionsEnum","NODE_CLICK","CURRENT_CHANGE","NODE_EXPAND","NODE_COLLAPSE","nextTick","isObject"],"mappings":";;;;;;;;;;;AAWO,SAAS,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;AACrC,EAAE,MAAM,cAAc,GAAGA,OAAG,CAAC,IAAI,GAAG,CAAC,KA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,WAAW;AACf,IAAI,UAAU;AACd,IAAI,MAAM;AACV,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,uBAAuB;AAC3B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"useTree.js","sources":["../../../../../../../packages/components/tree-v2/src/composables/useTree.ts"],"sourcesContent":["import { computed, nextTick, ref, shallowRef, watch } from 'vue'\nimport { isObject } from '@element-plus/utils'\nimport {\n CURRENT_CHANGE,\n NODE_CLICK,\n NODE_COLLAPSE,\n NODE_EXPAND,\n TreeOptionsEnum,\n} from '../virtual-tree'\nimport { useCheck } from './useCheck'\nimport { useFilter } from './useFilter'\nimport type { SetupContext } from 'vue'\nimport type { treeEmits } from '../virtual-tree'\nimport type { CheckboxValueType } from '@element-plus/components/checkbox'\nimport type {\n Tree,\n TreeData,\n TreeKey,\n TreeNode,\n TreeNodeData,\n TreeProps,\n} from '../types'\n\nexport function useTree(\n props: TreeProps,\n emit: SetupContext<typeof treeEmits>['emit']\n) {\n const expandedKeySet = ref<Set<TreeKey>>(new Set(props.defaultExpandedKeys))\n const currentKey = ref<TreeKey | undefined>()\n const tree = shallowRef<Tree | undefined>()\n\n watch(\n () => props.currentNodeKey,\n (key) => {\n currentKey.value = key\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => props.data,\n (data: TreeData) => {\n setData(data)\n },\n {\n immediate: true,\n }\n )\n\n const {\n isIndeterminate,\n isChecked,\n toggleCheckbox,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n } = useCheck(props, tree)\n\n const { doFilter, hiddenNodeKeySet, isForceHiddenExpandIcon } = useFilter(\n props,\n tree\n )\n\n const valueKey = computed(() => {\n return props.props?.value || TreeOptionsEnum.KEY\n })\n const childrenKey = computed(() => {\n return props.props?.children || TreeOptionsEnum.CHILDREN\n })\n const disabledKey = computed(() => {\n return props.props?.disabled || TreeOptionsEnum.DISABLED\n })\n const labelKey = computed(() => {\n return props.props?.label || TreeOptionsEnum.LABEL\n })\n\n const flattenTree = computed(() => {\n const expandedKeys = expandedKeySet.value\n const hiddenKeys = hiddenNodeKeySet.value\n const flattenNodes: TreeNode[] = []\n const nodes = (tree.value && tree.value.treeNodes) || []\n function traverse() {\n const stack: TreeNode[] = []\n for (let i = nodes.length - 1; i >= 0; --i) {\n stack.push(nodes[i])\n }\n while (stack.length) {\n const node = stack.pop()\n if (!node) continue\n if (!hiddenKeys.has(node.key)) {\n flattenNodes.push(node)\n }\n // Only \"visible\" nodes will be rendered\n if (expandedKeys.has(node.key)) {\n const children = node.children\n if (children) {\n const length = children.length\n for (let i = length - 1; i >= 0; --i) {\n stack.push(children[i])\n }\n }\n }\n }\n }\n traverse()\n return flattenNodes\n })\n\n const isNotEmpty = computed(() => {\n return flattenTree.value.length > 0\n })\n\n function createTree(data: TreeData): Tree {\n const treeNodeMap: Map<TreeKey, TreeNode> = new Map()\n const levelTreeNodeMap: Map<number, TreeNode[]> = new Map()\n let maxLevel = 1\n function traverse(\n nodes: TreeData,\n level = 1,\n parent: TreeNode | undefined = undefined\n ) {\n const siblings: TreeNode[] = []\n for (const rawNode of nodes) {\n const value = getKey(rawNode)\n const node: TreeNode = {\n level,\n key: value,\n data: rawNode,\n }\n node.label = getLabel(rawNode)\n node.parent = parent\n const children = getChildren(rawNode)\n node.disabled = getDisabled(rawNode)\n node.isLeaf = !children || children.length === 0\n if (children && children.length) {\n node.children = traverse(children, level + 1, node)\n }\n siblings.push(node)\n treeNodeMap.set(value, node)\n if (!levelTreeNodeMap.has(level)) {\n levelTreeNodeMap.set(level, [])\n }\n levelTreeNodeMap.get(level)?.push(node)\n }\n if (level > maxLevel) {\n maxLevel = level\n }\n return siblings\n }\n const treeNodes: TreeNode[] = traverse(data)\n return {\n treeNodeMap,\n levelTreeNodeMap,\n maxLevel,\n treeNodes,\n }\n }\n\n function filter(query: string) {\n const keys = doFilter(query)\n if (keys) {\n expandedKeySet.value = keys\n }\n }\n\n function getChildren(node: TreeNodeData): TreeNodeData[] {\n return node[childrenKey.value]\n }\n\n function getKey(node: TreeNodeData): TreeKey {\n if (!node) {\n return ''\n }\n return node[valueKey.value]\n }\n\n function getDisabled(node: TreeNodeData): boolean {\n return node[disabledKey.value]\n }\n\n function getLabel(node: TreeNodeData): string {\n return node[labelKey.value]\n }\n\n function toggleExpand(node: TreeNode) {\n const expandedKeys = expandedKeySet.value\n if (expandedKeys.has(node.key)) {\n collapseNode(node)\n } else {\n expandNode(node)\n }\n }\n\n function setExpandedKeys(keys: TreeKey[]) {\n expandedKeySet.value = new Set(keys)\n }\n\n function handleNodeClick(node: TreeNode, e: MouseEvent) {\n emit(NODE_CLICK, node.data, node, e)\n handleCurrentChange(node)\n if (props.expandOnClickNode) {\n toggleExpand(node)\n }\n if (props.showCheckbox && props.checkOnClickNode && !node.disabled) {\n toggleCheckbox(node, !isChecked(node), true)\n }\n }\n\n function handleCurrentChange(node: TreeNode) {\n if (!isCurrent(node)) {\n currentKey.value = node.key\n emit(CURRENT_CHANGE, node.data, node)\n }\n }\n\n function handleNodeCheck(node: TreeNode, checked: CheckboxValueType) {\n toggleCheckbox(node, checked)\n }\n\n function expandNode(node: TreeNode) {\n const keySet = expandedKeySet.value\n if (tree.value && props.accordion) {\n // whether only one node among the same level can be expanded at one time\n const { treeNodeMap } = tree.value\n keySet.forEach((key) => {\n const treeNode = treeNodeMap.get(key)\n if (node && node.level === treeNode?.level) {\n keySet.delete(key)\n }\n })\n }\n keySet.add(node.key)\n emit(NODE_EXPAND, node.data, node)\n }\n\n function collapseNode(node: TreeNode) {\n expandedKeySet.value.delete(node.key)\n emit(NODE_COLLAPSE, node.data, node)\n }\n\n function isExpanded(node: TreeNode): boolean {\n return expandedKeySet.value.has(node.key)\n }\n\n function isDisabled(node: TreeNode): boolean {\n return !!node.disabled\n }\n\n function isCurrent(node: TreeNode): boolean {\n const current = currentKey.value\n return current !== undefined && current === node.key\n }\n\n function getCurrentNode(): TreeNodeData | undefined {\n if (!currentKey.value) return undefined\n return tree.value?.treeNodeMap.get(currentKey.value)?.data\n }\n\n function getCurrentKey(): TreeKey | undefined {\n return currentKey.value\n }\n\n function setCurrentKey(key: TreeKey): void {\n currentKey.value = key\n }\n\n function setData(data: TreeData) {\n nextTick(() => (tree.value = createTree(data)))\n }\n\n function getNode(data: TreeKey | TreeNodeData) {\n const key = isObject(data) ? getKey(data) : data\n return tree.value?.treeNodeMap.get(key)\n }\n\n return {\n tree,\n flattenTree,\n isNotEmpty,\n getKey,\n getChildren,\n toggleExpand,\n toggleCheckbox,\n isExpanded,\n isChecked,\n isIndeterminate,\n isDisabled,\n isCurrent,\n isForceHiddenExpandIcon,\n handleNodeClick,\n handleNodeCheck,\n // expose\n getCurrentNode,\n getCurrentKey,\n setCurrentKey,\n getCheckedKeys,\n getCheckedNodes,\n getHalfCheckedKeys,\n getHalfCheckedNodes,\n setChecked,\n setCheckedKeys,\n filter,\n setData,\n getNode,\n expandNode,\n collapseNode,\n setExpandedKeys,\n }\n}\n"],"names":["ref","shallowRef","watch","useCheck","useFilter","computed","TreeOptionsEnum","NODE_CLICK","CURRENT_CHANGE","NODE_EXPAND","NODE_COLLAPSE","nextTick","isObject"],"mappings":";;;;;;;;;;;AAWO,SAAS,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE;AACrC,E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CAAC;AACxE,GAAG;AACH,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,WAAW;AACf,IAAI,UAAU;AACd,IAAI,MAAM;AACV,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,uBAAuB;AAC3B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,IAAI,MAAM;AACV,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
@@ -220,9 +220,6 @@ export declare const ElUpload: import("element-plus/es/utils").SFCWithInstall<im
220
220
  }>> & {
221
221
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
222
222
  }>>;
223
- slots: Readonly<{
224
- [name: string]: import("vue").Slot | undefined;
225
- }>;
226
223
  disabled: import("vue").ComputedRef<boolean>;
227
224
  uploadRef: import("vue").ShallowRef<({
228
225
  $: import("vue").ComponentInternalInstance;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var lodashUnified = require('lodash-unified');
6
6
  require('../../../utils/index.js');
7
7
  var error = require('../../../utils/error.js');
8
+ var shared = require('@vue/shared');
8
9
 
9
10
  const SCOPE = "ElUpload";
10
11
  class UploadAjaxError extends Error {
@@ -53,7 +54,7 @@ const ajaxUpload = (option) => {
53
54
  const formData = new FormData();
54
55
  if (option.data) {
55
56
  for (const [key, value] of Object.entries(option.data)) {
56
- if (Array.isArray(value))
57
+ if (shared.isArray(value) && value.length)
57
58
  formData.append(key, ...value);
58
59
  else
59
60
  formData.append(key, value);
@@ -1 +1 @@
1
- {"version":3,"file":"ajax.js","sources":["../../../../../../packages/components/upload/src/ajax.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { throwError } from '@element-plus/utils'\nimport type {\n UploadProgressEvent,\n UploadRequestHandler,\n UploadRequestOptions,\n} from './upload'\n\nconst SCOPE = 'ElUpload'\n\nexport class UploadAjaxError extends Error {\n name = 'UploadAjaxError'\n status: number\n method: string\n url: string\n\n constructor(message: string, status: number, method: string, url: string) {\n super(message)\n this.status = status\n this.method = method\n this.url = url\n }\n}\n\nfunction getError(\n action: string,\n option: UploadRequestOptions,\n xhr: XMLHttpRequest\n) {\n let msg: string\n if (xhr.response) {\n msg = `${xhr.response.error || xhr.response}`\n } else if (xhr.responseText) {\n msg = `${xhr.responseText}`\n } else {\n msg = `fail to ${option.method} ${action} ${xhr.status}`\n }\n\n return new UploadAjaxError(msg, xhr.status, option.method, action)\n}\n\nfunction getBody(xhr: XMLHttpRequest): XMLHttpRequestResponseType {\n const text = xhr.responseText || xhr.response\n if (!text) {\n return text\n }\n\n try {\n return JSON.parse(text)\n } catch {\n return text\n }\n}\n\nexport const ajaxUpload: UploadRequestHandler = (option) => {\n if (typeof XMLHttpRequest === 'undefined')\n throwError(SCOPE, 'XMLHttpRequest is undefined')\n\n const xhr = new XMLHttpRequest()\n const action = option.action\n\n if (xhr.upload) {\n xhr.upload.addEventListener('progress', (evt) => {\n const progressEvt = evt as UploadProgressEvent\n progressEvt.percent = evt.total > 0 ? (evt.loaded / evt.total) * 100 : 0\n option.onProgress(progressEvt)\n })\n }\n\n const formData = new FormData()\n if (option.data) {\n for (const [key, value] of Object.entries(option.data)) {\n if (Array.isArray(value)) formData.append(key, ...value)\n else formData.append(key, value)\n }\n }\n formData.append(option.filename, option.file, option.file.name)\n\n xhr.addEventListener('error', () => {\n option.onError(getError(action, option, xhr))\n })\n\n xhr.addEventListener('load', () => {\n if (xhr.status < 200 || xhr.status >= 300) {\n return option.onError(getError(action, option, xhr))\n }\n option.onSuccess(getBody(xhr))\n })\n\n xhr.open(option.method, action, true)\n\n if (option.withCredentials && 'withCredentials' in xhr) {\n xhr.withCredentials = true\n }\n\n const headers = option.headers || {}\n if (headers instanceof Headers) {\n headers.forEach((value, key) => xhr.setRequestHeader(key, value))\n } else {\n for (const [key, value] of Object.entries(headers)) {\n if (isNil(value)) continue\n xhr.setRequestHeader(key, String(value))\n }\n }\n\n xhr.send(formData)\n return xhr\n}\n"],"names":["throwError","isNil"],"mappings":";;;;;;;;AAEA,MAAM,KAAK,GAAG,UAAU,CAAC;AAClB,MAAM,eAAe,SAAS,KAAK,CAAC;AAC3C,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE;AAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AACnB,IAAI,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;AAClC,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACzB,IAAI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;AACnB,GAAG;AACH,CAAC;AACD,SAAS,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE;AACvC,EAAE,IAAI,GAAG,CAAC;AACV,EAAE,IAAI,GAAG,CAAC,QAAQ,EAAE;AACpB,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;AAClD,GAAG,MAAM,IAAI,GAAG,CAAC,YAAY,EAAE;AAC/B,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;AAChC,GAAG,MAAM;AACT,IAAI,GAAG,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAA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;AAC1D,IAAI,GAAG,CAAC,eAAe,GAAG,IAAI,CAAC;AAC/B,GAAG;AACH,EAAE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;AACvC,EAAE,IAAI,OAAO,YAAY,OAAO,EAAE;AAClC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AACtE,GAAG,MAAM;AACT,IAAI,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AACxD,MAAM,IAAIC,mBAAK,CAAC,KAAK,CAAC;AACtB,QAAQ,SAAS;AACjB,MAAM,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/C,KAAK;AACL,GAAG;AACH,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrB,EAAE,OAAO,GAAG,CAAC;AACb;;;;;"}
1
+ {"version":3,"file":"ajax.js","sources":["../../../../../../packages/components/upload/src/ajax.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { isArray, throwError } from '@element-plus/utils'\nimport type {\n UploadProgressEvent,\n UploadRequestHandler,\n UploadRequestOptions,\n} from './upload'\n\nconst SCOPE = 'ElUpload'\n\nexport class UploadAjaxError extends Error {\n name = 'UploadAjaxError'\n status: number\n method: string\n url: string\n\n constructor(message: string, status: number, method: string, url: string) {\n super(message)\n this.status = status\n this.method = method\n this.url = url\n }\n}\n\nfunction getError(\n action: string,\n option: UploadRequestOptions,\n xhr: XMLHttpRequest\n) {\n let msg: string\n if (xhr.response) {\n msg = `${xhr.response.error || xhr.response}`\n } else if (xhr.responseText) {\n msg = `${xhr.responseText}`\n } else {\n msg = `fail to ${option.method} ${action} ${xhr.status}`\n }\n\n return new UploadAjaxError(msg, xhr.status, option.method, action)\n}\n\nfunction getBody(xhr: XMLHttpRequest): XMLHttpRequestResponseType {\n const text = xhr.responseText || xhr.response\n if (!text) {\n return text\n }\n\n try {\n return JSON.parse(text)\n } catch {\n return text\n }\n}\n\nexport const ajaxUpload: UploadRequestHandler = (option) => {\n if (typeof XMLHttpRequest === 'undefined')\n throwError(SCOPE, 'XMLHttpRequest is undefined')\n\n const xhr = new XMLHttpRequest()\n const action = option.action\n\n if (xhr.upload) {\n xhr.upload.addEventListener('progress', (evt) => {\n const progressEvt = evt as UploadProgressEvent\n progressEvt.percent = evt.total > 0 ? (evt.loaded / evt.total) * 100 : 0\n option.onProgress(progressEvt)\n })\n }\n\n const formData = new FormData()\n if (option.data) {\n for (const [key, value] of Object.entries(option.data)) {\n if (isArray(value) && value.length) formData.append(key, ...value)\n else formData.append(key, value)\n }\n }\n formData.append(option.filename, option.file, option.file.name)\n\n xhr.addEventListener('error', () => {\n option.onError(getError(action, option, xhr))\n })\n\n xhr.addEventListener('load', () => {\n if (xhr.status < 200 || xhr.status >= 300) {\n return option.onError(getError(action, option, xhr))\n }\n option.onSuccess(getBody(xhr))\n })\n\n xhr.open(option.method, action, true)\n\n if (option.withCredentials && 'withCredentials' in xhr) {\n xhr.withCredentials = true\n }\n\n const headers = option.headers || {}\n if (headers instanceof Headers) {\n headers.forEach((value, key) => xhr.setRequestHeader(key, value))\n } else {\n for (const [key, value] of Object.entries(headers)) {\n if (isNil(value)) continue\n xhr.setRequestHeader(key, String(value))\n }\n }\n\n xhr.send(formData)\n return xhr\n}\n"],"names":["throwError","isArray","isNil"],"mappings":";;;;;;;;;AAEA,MAAM,KAAK,GAAG,UAAU,CAAC;AAClB,MAAM,eAAe,SAAS,KAAK,CAAC;AAC3C,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE;AAC5C,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AACnB,IAAI,IAAI,CAAC,IAAI,GAAG,iBAA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AK;AACL,GAAG;AACH,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrB,EAAE,OAAO,GAAG,CAAC;AACb;;;;;"}
@@ -221,9 +221,6 @@ declare const _default: import("vue").DefineComponent<{
221
221
  }>> & {
222
222
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
223
223
  }>>;
224
- slots: Readonly<{
225
- [name: string]: import("vue").Slot | undefined;
226
- }>;
227
224
  disabled: import("vue").ComputedRef<boolean>;
228
225
  uploadRef: import("vue").ShallowRef<({
229
226
  $: import("vue").ComponentInternalInstance;
@@ -20,7 +20,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
20
  props: upload.uploadProps,
21
21
  setup(__props, { expose }) {
22
22
  const props = __props;
23
- const slots = vue.useSlots();
24
23
  const disabled = useFormCommonProps.useFormDisabled();
25
24
  const uploadRef = vue.shallowRef();
26
25
  const {
@@ -76,8 +75,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
76
75
  ref: uploadRef
77
76
  }, vue.unref(uploadContentProps)), {
78
77
  default: vue.withCtx(() => [
79
- vue.unref(slots).trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
80
- !vue.unref(slots).trigger && vue.unref(slots).default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
78
+ _ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
79
+ !_ctx.$slots.trigger && _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
81
80
  ]),
82
81
  _: 3
83
82
  }, 16)
@@ -97,8 +96,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
97
96
  ref: uploadRef
98
97
  }, vue.unref(uploadContentProps)), {
99
98
  default: vue.withCtx(() => [
100
- vue.unref(slots).trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
101
- !vue.unref(slots).trigger && vue.unref(slots).default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
99
+ _ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
100
+ !_ctx.$slots.trigger && _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
102
101
  ]),
103
102
  _: 3
104
103
  }, 16)) : vue.createCommentVNode("v-if", true),
@@ -1 +1 @@
1
- {"version":3,"file":"upload2.js","sources":["../../../../../../packages/components/upload/src/upload.vue"],"sourcesContent":["<template>\n <div>\n <upload-list\n v-if=\"isPictureCard && showFileList\"\n :disabled=\"disabled\"\n :list-type=\"listType\"\n :files=\"uploadFiles\"\n :handle-preview=\"onPreview\"\n @remove=\"handleRemove\"\n >\n <template v-if=\"$slots.file\" #default=\"{ file }\">\n <slot name=\"file\" :file=\"file\" />\n </template>\n <template #append>\n <upload-content ref=\"uploadRef\" v-bind=\"uploadContentProps\">\n <slot v-if=\"slots.trigger\" name=\"trigger\" />\n <slot v-if=\"!slots.trigger && slots.default\" />\n </upload-content>\n </template>\n </upload-list>\n\n <upload-content\n v-if=\"!isPictureCard || (isPictureCard && !showFileList)\"\n ref=\"uploadRef\"\n v-bind=\"uploadContentProps\"\n >\n <slot v-if=\"slots.trigger\" name=\"trigger\" />\n <slot v-if=\"!slots.trigger && slots.default\" />\n </upload-content>\n\n <slot v-if=\"$slots.trigger\" />\n <slot name=\"tip\" />\n <upload-list\n v-if=\"!isPictureCard && showFileList\"\n :disabled=\"disabled\"\n :list-type=\"listType\"\n :files=\"uploadFiles\"\n :handle-preview=\"onPreview\"\n @remove=\"handleRemove\"\n >\n <template v-if=\"$slots.file\" #default=\"{ file }\">\n <slot name=\"file\" :file=\"file\" />\n </template>\n </upload-list>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n onBeforeUnmount,\n provide,\n shallowRef,\n toRef,\n useSlots,\n} from 'vue'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { uploadContextKey } from './constants'\nimport UploadList from './upload-list.vue'\nimport UploadContent from './upload-content.vue'\nimport { useHandlers } from './use-handlers'\nimport { uploadProps } from './upload'\n\nimport type {\n UploadContentInstance,\n UploadContentProps,\n} from './upload-content'\n\ndefineOptions({\n name: 'ElUpload',\n})\n\nconst props = defineProps(uploadProps)\n\nconst slots = useSlots()\nconst disabled = useFormDisabled()\n\nconst uploadRef = shallowRef<UploadContentInstance>()\nconst {\n abort,\n submit,\n clearFiles,\n uploadFiles,\n handleStart,\n handleError,\n handleRemove,\n handleSuccess,\n handleProgress,\n} = useHandlers(props, uploadRef)\n\nconst isPictureCard = computed(() => props.listType === 'picture-card')\n\nconst uploadContentProps = computed<UploadContentProps>(() => ({\n ...props,\n fileList: uploadFiles.value,\n onStart: handleStart,\n onProgress: handleProgress,\n onSuccess: handleSuccess,\n onError: handleError,\n onRemove: handleRemove,\n}))\n\nonBeforeUnmount(() => {\n uploadFiles.value.forEach(({ url }) => {\n if (url?.startsWith('blob:')) URL.revokeObjectURL(url)\n })\n})\n\nprovide(uploadContextKey, {\n accept: toRef(props, 'accept'),\n})\n\ndefineExpose({\n /** @description cancel upload request */\n abort,\n /** @description upload the file list manually */\n submit,\n /** @description clear the file list */\n clearFiles,\n /** @description select the file manually */\n handleStart,\n /** @description remove the file manually */\n handleRemove,\n})\n</script>\n"],"names":["useSlots","useFormDisabled","shallowRef","useHandlers","computed","onBeforeUnmount","provide","uploadContextKey","toRef"],"mappings":";;;;;;;;;;;;;;uCAoEc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AACvB,IAAA,MAAM,WAAWC,kCAAgB,EAAA,CAAA;AAEjC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"upload2.js","sources":["../../../../../../packages/components/upload/src/upload.vue"],"sourcesContent":["<template>\n <div>\n <upload-list\n v-if=\"isPictureCard && showFileList\"\n :disabled=\"disabled\"\n :list-type=\"listType\"\n :files=\"uploadFiles\"\n :handle-preview=\"onPreview\"\n @remove=\"handleRemove\"\n >\n <template v-if=\"$slots.file\" #default=\"{ file }\">\n <slot name=\"file\" :file=\"file\" />\n </template>\n <template #append>\n <upload-content ref=\"uploadRef\" v-bind=\"uploadContentProps\">\n <slot v-if=\"$slots.trigger\" name=\"trigger\" />\n <slot v-if=\"!$slots.trigger && $slots.default\" />\n </upload-content>\n </template>\n </upload-list>\n\n <upload-content\n v-if=\"!isPictureCard || (isPictureCard && !showFileList)\"\n ref=\"uploadRef\"\n v-bind=\"uploadContentProps\"\n >\n <slot v-if=\"$slots.trigger\" name=\"trigger\" />\n <slot v-if=\"!$slots.trigger && $slots.default\" />\n </upload-content>\n\n <slot v-if=\"$slots.trigger\" />\n <slot name=\"tip\" />\n <upload-list\n v-if=\"!isPictureCard && showFileList\"\n :disabled=\"disabled\"\n :list-type=\"listType\"\n :files=\"uploadFiles\"\n :handle-preview=\"onPreview\"\n @remove=\"handleRemove\"\n >\n <template v-if=\"$slots.file\" #default=\"{ file }\">\n <slot name=\"file\" :file=\"file\" />\n </template>\n </upload-list>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onBeforeUnmount, provide, shallowRef, toRef } from 'vue'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { uploadContextKey } from './constants'\nimport UploadList from './upload-list.vue'\nimport UploadContent from './upload-content.vue'\nimport { useHandlers } from './use-handlers'\nimport { uploadProps } from './upload'\n\nimport type {\n UploadContentInstance,\n UploadContentProps,\n} from './upload-content'\n\ndefineOptions({\n name: 'ElUpload',\n})\n\nconst props = defineProps(uploadProps)\n\nconst disabled = useFormDisabled()\n\nconst uploadRef = shallowRef<UploadContentInstance>()\nconst {\n abort,\n submit,\n clearFiles,\n uploadFiles,\n handleStart,\n handleError,\n handleRemove,\n handleSuccess,\n handleProgress,\n} = useHandlers(props, uploadRef)\n\nconst isPictureCard = computed(() => props.listType === 'picture-card')\n\nconst uploadContentProps = computed<UploadContentProps>(() => ({\n ...props,\n fileList: uploadFiles.value,\n onStart: handleStart,\n onProgress: handleProgress,\n onSuccess: handleSuccess,\n onError: handleError,\n onRemove: handleRemove,\n}))\n\nonBeforeUnmount(() => {\n uploadFiles.value.forEach(({ url }) => {\n if (url?.startsWith('blob:')) URL.revokeObjectURL(url)\n })\n})\n\nprovide(uploadContextKey, {\n accept: toRef(props, 'accept'),\n})\n\ndefineExpose({\n /** @description cancel upload request */\n abort,\n /** @description upload the file list manually */\n submit,\n /** @description clear the file list */\n clearFiles,\n /** @description select the file manually */\n handleStart,\n /** @description remove the file manually */\n handleRemove,\n})\n</script>\n"],"names":["useFormDisabled","shallowRef","useHandlers","computed","onBeforeUnmount","provide","uploadContextKey","toRef"],"mappings":";;;;;;;;;;;;;;uCA6Dc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAWA,kCAAgB,EAAA,CAAA;AAEjC,IAAA,MAAM,YAAYC,cAAkC,EAAA,CAAA;AACpD,IAAM,MAAA;AAAA,MACJ,KAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,KACE,GAAAC,uBAAA,CAAY,OAAO,SAAS,CAAA,CAAA;AAEhC,IAAA,MAAM,aAAgB,GAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,aAAa,cAAc,CAAA,CAAA;AAEtE,IAAM,MAAA,kBAAA,GAAqBA,aAA6B,OAAO;AAAA,MAC7D,GAAG,KAAA;AAAA,MACH,UAAU,WAAY,CAAA,KAAA;AAAA,MACtB,OAAS,EAAA,WAAA;AAAA,MACT,UAAY,EAAA,cAAA;AAAA,MACZ,SAAW,EAAA,aAAA;AAAA,MACX,OAAS,EAAA,WAAA;AAAA,MACT,QAAU,EAAA,YAAA;AAAA,KACV,CAAA,CAAA,CAAA;AAEF,IAAAC,mBAAA,CAAgB,MAAM;AACpB,MAAA,WAAA,CAAY,KAAM,CAAA,OAAA,CAAQ,CAAC,EAAE,GAAU,EAAA,KAAA;AACrC,QAAI,IAAA,GAAA,gBAAuB,CAAA,GAAA,GAAA,CAAA,UAAA,CAAA,OAAA,CAAA;AAAG,UAAA,GAAA,CAAI,gBAAgB,GAAG,CAAA,CAAA;AAAA,OACtD,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAED,IAAAC,WAAA,CAAQC,0BAAkB,EAAA;AAAA,MACxB,MAAA,EAAQC,SAAM,CAAA,KAAA,EAAO,QAAQ,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,KAAA;AAAA,MAEA,MAAA;AAAA,MAEA,UAAA;AAAA,MAEA,WAAA;AAAA,MAEA,YAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.3.9";
1
+ export declare const version = "2.3.12";
package/lib/version.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const version = "2.3.9";
5
+ const version = "2.3.12";
6
6
 
7
7
  exports.version = version;
8
8
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.3.9'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.3.12'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-plus",
3
- "version": "2.3.9",
3
+ "version": "2.3.12",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "element-plus",
@@ -109,5 +109,5 @@
109
109
  "not ie 11",
110
110
  "not op_mini all"
111
111
  ],
112
- "gitHead": "8b083b454e966f4812852992b9c618e0ba68c8f5"
112
+ "gitHead": "89d4ec863ce55fc3de2f0513631e76f695f8e791"
113
113
  }
package/tags.json CHANGED
@@ -1 +1 @@
1
- {"el-affix":{"attributes":["offset","position","target","z-index","change","scroll"],"description":"Fix the element to a specific visible area.\n\n[Docs](https://element-plus.org/en-US/component/affix.html#affix)"},"el-alert":{"attributes":["title","type","description","closable","center","close-text","show-icon","effect","close"],"description":"Displays important alert messages.\n\n[Docs](https://element-plus.org/en-US/component/alert.html#alert)"},"el-autocomplete":{"attributes":["model-value","placeholder","clearable","disabled","value-key","debounce","placement","fetch-suggestions","trigger-on-focus","select-when-unmatched","name","label","hide-loading","popper-class","popper-append-to-body","teleported","highlight-first-item","fit-input-width","select","change"],"description":"Get some recommended tips based on the current input.\n\n[Docs](https://element-plus.org/en-US/component/autocomplete.html#autocomplete)"},"el-avatar":{"attributes":["icon","size","shape","src","src-set","alt","fit","error"],"description":"Avatars can be used to represent people or objects. It supports images, Icons, or characters.\n\n[Docs](https://element-plus.org/en-US/component/avatar.html#avatar)"},"el-backtop":{"attributes":["target","visibility-height","right","bottom","click"],"description":"A button to back to top.\n\n[Docs](https://element-plus.org/en-US/component/backtop.html#backtop)"},"el-badge":{"attributes":["value","max","is-dot","hidden","type"],"description":"A number or status mark on buttons and icons.\n\n[Docs](https://element-plus.org/en-US/component/badge.html#badge)"},"el-breadcrumb":{"attributes":["separator","separator-icon"],"subtags":["el-breadcrumb-item"],"description":"Displays the location of the current page, making it easier to browser back.\n\n[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumb)"},"el-breadcrumb-item":{"attributes":["to","replace"],"description":"[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumbitem)"},"el-button":{"attributes":["size","type","plain","text","bg","link","round","circle","loading","loading-icon","disabled","icon","autofocus","native-type","auto-insert-space","color","dark","tag"],"description":"Commonly used button.\n\n[Docs](https://element-plus.org/en-US/component/button.html#button)"},"el-button-group":{"attributes":["size","type"],"subtags":["el-button"],"description":"[Docs](https://element-plus.org/en-US/component/button.html#buttongroup)"},"el-calendar":{"attributes":["model-value","range"],"description":"Display date.\n\n[Docs](https://element-plus.org/en-US/component/calendar.html#calendar)"},"el-card":{"attributes":["header","body-style","shadow"],"description":"Integrate information in a card container.\n\n[Docs](https://element-plus.org/en-US/component/card.html#card)"},"el-carousel":{"attributes":["height","initial-index","trigger","autoplay","interval","indicator-position","arrow","type","loop","direction","pause-on-hover","change"],"subtags":["el-carousel-item"],"description":"Loop a series of images or texts in a limited space\n\n[Docs](https://element-plus.org/en-US/component/carousel.html#carousel)"},"el-carousel-item":{"attributes":["name","label"],"description":"[Docs](https://element-plus.org/en-US/component/carousel.html#carousel-item)"},"el-cascader":{"attributes":["model-value","options","props","size","placeholder","disabled","clearable","show-all-levels","collapse-tags","collapse-tags-tooltip","separator","filterable","filter-method","debounce","before-filter","popper-class","teleported","popper-append-to-body","tag-type","validate-event","change","expand-change","blur","focus","visible-change","remove-tag"],"description":"If the options have a clear hierarchical structure, Cascader can be used to view and select them.\n\n[Docs](https://element-plus.org/en-US/component/cascader.html#cascader)"},"el-cascader-panel":{"attributes":["model-value","options","props","change","expand-change","close"],"description":"[Docs](https://element-plus.org/en-US/component/cascader.html#cascaderpanel)"},"el-checkbox":{"attributes":["model-value","label","true-label","false-label","disabled","border","size","name","checked","indeterminate","validate-event","tabindex","id","controls","change"],"description":"A group of options for multiple choices.\n\n[Docs](https://element-plus.org/en-US/component/checkbox.html#checkbox)"},"el-checkbox-group":{"attributes":["model-value","size","disabled","min","max","label","text-color","fill","tag","validate-event","change"],"subtags":["el-checkbox","el-checkbox-button"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxgroup)"},"el-checkbox-button":{"attributes":["label","true-label","false-label","disabled","name","checked"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxbutton)"},"el-collapse":{"attributes":["model-value","accordion","change"],"subtags":["el-collapse-item"],"description":"Use Collapse to store contents.\n\n[Docs](https://element-plus.org/en-US/component/collapse.html#collapse)"},"el-collapse-item":{"attributes":["name","title","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/collapse.html#collapse-item)"},"el-color-picker":{"attributes":["model-value","disabled","size","show-alpha","color-format","popper-class","predefine","validate-event","tabindex","label","id","change","active-change"],"description":"ColorPicker is a color selector supporting multiple color formats.\n\n[Docs](https://element-plus.org/en-US/component/color-picker.html#colorpicker)"},"el-config-provider":{"attributes":["locale","size","z-index","namespace","button","message","experimental-features"],"description":"Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere.\n\n[Docs](https://element-plus.org/en-US/component/config-provider.html#config-provider)"},"el-container":{"attributes":["direction"],"subtags":["el-container","el-header","el-aside","el-main","el-footer"],"description":"Container components for scaffolding basic structure of the page:\n\n[Docs](https://element-plus.org/en-US/component/container.html#container)"},"el-header":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#header)"},"el-aside":{"attributes":["width"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#aside)"},"el-main":{"description":"[Docs](https://element-plus.org/en-US/component/container.html#main)"},"el-footer":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#footer)"},"el-date-picker":{"attributes":["model-value","readonly","disabled","size","editable","clearable","placeholder","start-placeholder","end-placeholder","type","format","popper-class","popper-options","range-separator","default-value","default-time","value-format","id","name","unlink-panels","prefix-icon","clear-icon","validate-event","disabled-date","shortcuts","cell-class-name","teleported","change","blur","focus","calendar-change","panel-change","visible-change"],"description":"Use Date Picker for date input.\n\n[Docs](https://element-plus.org/en-US/component/date-picker.html#datepicker)"},"el-descriptions":{"attributes":["border","column","direction","size","title","extra"],"subtags":["el-descriptions-item"],"description":"Display multiple fields in list form.\n\n[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions)"},"el-descriptions-item":{"attributes":["label","span","width","min-width","align","label-align","class-name","label-class-name"],"description":"[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions-item)"},"el-dialog":{"attributes":["model-value","title","width","fullscreen","top","modal","modal-class","append-to-body","lock-scroll","custom-class","open-delay","close-delay","close-on-click-modal","close-on-press-escape","show-close","before-close","draggable","center","align-center","destroy-on-close","close-icon","z-index","open","opened","close","closed","open-auto-focus","close-auto-focus"],"description":"Informs users while preserving the current page state.\n\n[Docs](https://element-plus.org/en-US/component/dialog.html#dialog)"},"el-divider":{"attributes":["direction","border-style","content-position"],"description":"The dividing line that separates the content.\n\n[Docs](https://element-plus.org/en-US/component/divider.html#divider)"},"el-drawer":{"attributes":["model-value","append-to-body","lock-scroll","before-close","close-on-click-modal","close-on-press-escape","open-delay","close-delay","custom-class","destroy-on-close","modal","direction","show-close","size","title","with-header","modal-class","z-index","open","opened","close","closed"],"description":"Sometimes, `Dialog` does not always satisfy our requirements, let's say you have a massive form, or you need space to display something like `terms & conditions`, `Drawer` has almost identical API with `Dialog`, but it introduces different user experience.\n\n[Docs](https://element-plus.org/en-US/component/drawer.html#drawer)"},"el-dropdown":{"attributes":["type","size","max-height","split-button","disabled","placement","trigger","hide-on-click","show-timeout","hide-timeout","role","tabindex","popper-class","popper-options","teleported","click","command","visible-change"],"subtags":["el-dropdown-menu"],"description":"Toggleable menu for displaying lists of links and actions.\n\n[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown)"},"el-dropdown-menu":{"subtags":["el-dropdown-item"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-menu)"},"el-dropdown-item":{"attributes":["command","disabled","divided","icon"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-item)"},"el-empty":{"attributes":["image","image-size","description"],"description":"Placeholder hints for empty states.\n\n[Docs](https://element-plus.org/en-US/component/empty.html#empty)"},"el-form":{"attributes":["model","rules","inline","label-position","label-width","label-suffix","hide-required-asterisk","require-asterisk-position","show-message","inline-message","status-icon","validate-on-rule-change","size","disabled","scroll-to-error","scroll-into-view-options","validate"],"subtags":["el-form-item"],"description":"Form consists of `input`, `radio`, `select`, `checkbox` and so on. With form, you can collect, verify and submit data.\n\n[Docs](https://element-plus.org/en-US/component/form.html#form)"},"el-form-item":{"attributes":["prop","label","label-width","required","rules","error","show-message","inline-message","size","for","validate-status"],"description":"[Docs](https://element-plus.org/en-US/component/form.html#formitem)"},"el-icon":{"attributes":["color","size"],"description":"Element Plus provides a set of common icons.\n\n[Docs](https://element-plus.org/en-US/component/icon.html#icon)"},"el-image":{"attributes":["src","fit","hide-on-click-modal","loading","lazy","scroll-container","alt","referrerpolicy","preview-src-list","z-index","initial-index","close-on-press-escape","preview-teleported","infinite","zoom-rate","load","error","switch","close","show"],"description":"Besides the native features of img, support lazy load, custom placeholder and load failure, etc.\n\n[Docs](https://element-plus.org/en-US/component/image.html#image)"},"el-image-viewer":{"attributes":["url-list","z-index","initial-index","infinite","hide-on-click-modal","teleported","zoom-rate","close-on-press-escape","close","switch"],"description":"[Docs](https://element-plus.org/en-US/component/image.html#image-viewer)"},"el-input-number":{"attributes":["model-value","min","max","step","step-strictly","precision","size","readonly","disabled","controls","controls-position","name","label","placeholder","id","value-on-clear","validate-event","change","blur","focus"],"description":"Input numerical values with a customizable range.\n\n[Docs](https://element-plus.org/en-US/component/input-number.html#input-number)"},"el-input":{"attributes":["type","model-value","maxlength","minlength","show-word-limit","placeholder","clearable","formatter","parser","show-password","disabled","size","prefix-icon","suffix-icon","rows","autosize","autocomplete","name","readonly","max","min","step","resize","autofocus","form","label","tabindex","validate-event","input-style","blur","focus","change","input","clear"],"description":"Input data using mouse or keyboard.\n\n[Docs](https://element-plus.org/en-US/component/input.html#input)"},"el-row":{"attributes":["gutter","justify","align","tag"],"subtags":["el-col"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#row)"},"el-col":{"attributes":["span","offset","push","pull","xs","sm","md","lg","xl","tag"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#col)"},"el-link":{"attributes":["type","underline","disabled","href","icon"],"description":"Text hyperlink\n\n[Docs](https://element-plus.org/en-US/component/link.html#link)"},"el-menu":{"attributes":["mode","collapse","ellipsis","background-color","text-color","active-text-color","default-active","default-openeds","unique-opened","menu-trigger","router","collapse-transition","popper-effect","select","open","close"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"Menu that provides navigation for your website.\n\n[Docs](https://element-plus.org/en-US/component/menu.html#menu)"},"el-sub-menu":{"attributes":["index","popper-class","show-timeout","hide-timeout","disabled","popper-append-to-body","teleported","popper-offset","expand-close-icon","expand-open-icon","collapse-close-icon","collapse-open-icon"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#submenu)"},"el-menu-item":{"attributes":["index","route","disabled","click"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item)"},"el-menu-item-group":{"attributes":["title"],"subtags":["el-menu-item"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item-group)"},"el-page-header":{"attributes":["icon","title","content","back"],"description":"If path of the page is simple, it is recommended to use PageHeader instead of the Breadcrumb.\n\n[Docs](https://element-plus.org/en-US/component/page-header.html#page-header)"},"el-pagination":{"attributes":["small","background","page-size","default-page-size","total","page-count","pager-count","current-page","default-current-page","layout","page-sizes","popper-class","prev-text","prev-icon","next-text","next-icon","disabled","hide-on-single-page","size-change","current-change","prev-click","next-click"],"description":"If you have too much data to display in one page, use pagination.\n\n[Docs](https://element-plus.org/en-US/component/pagination.html#pagination)"},"el-popconfirm":{"attributes":["title","confirm-button-text","cancel-button-text","confirm-button-type","cancel-button-type","icon","icon-color","hide-icon","hide-after","teleported","persistent","width","confirm","cancel"],"description":"A simple confirmation dialog of an element click action.\n\n[Docs](https://element-plus.org/en-US/component/popconfirm.html#popconfirm)"},"el-popover":{"attributes":["trigger","title","effect","content","width","placement","disabled","visible","offset","transition","show-arrow","popper-options","popper-class","popper-style","show-after","hide-after","auto-close","tabindex","teleported","persistent","show","before-enter","after-enter","hide","before-leave","after-leave"],"description":":::tip\n\n[Docs](https://element-plus.org/en-US/component/popover.html#popover)"},"el-progress":{"attributes":["percentage","type","stroke-width","text-inside","status","indeterminate","duration","color","width","show-text","stroke-linecap","format","striped","striped-flow"],"description":"Progress is used to show the progress of current operation, and inform the user the current status.\n\n[Docs](https://element-plus.org/en-US/component/progress.html#progress)"},"el-radio":{"attributes":["model-value","label","disabled","border","size","name","change"],"description":"Single selection among multiple options.\n\n[Docs](https://element-plus.org/en-US/component/radio.html#radio)"},"el-radio-group":{"attributes":["model-value","size","disabled","text-color","fill","validate-event","label","name","id","change"],"subtags":["el-radio","el-radio-button"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiogroup)"},"el-radio-button":{"attributes":["label","disabled","name"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiobutton)"},"el-rate":{"attributes":["model-value","max","size","disabled","allow-half","low-threshold","high-threshold","colors","void-color","disabled-void-color","icons","void-icon","disabled-void-icon","show-text","show-score","text-color","texts","score-template","clearable","id","label","change"],"description":"Used for rating\n\n[Docs](https://element-plus.org/en-US/component/rate.html#rate)"},"el-result":{"attributes":["title","sub-title","icon"],"description":"Used to give feedback on the result of user's operation or access exception.\n\n[Docs](https://element-plus.org/en-US/component/result.html#result)"},"el-scrollbar":{"attributes":["height","max-height","native","wrap-style","wrap-class","view-style","view-class","noresize","tag","always","min-size","scroll"],"description":"Used to replace the browser's native scrollbar.\n\n[Docs](https://element-plus.org/en-US/component/scrollbar.html#scrollbar)"},"el-select-v2":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","clear-icon","collapse-tags","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","reserve-keyword","no-data-text","popper-class","popper-append-to-body","teleported","persistent","popper-options","automatic-dropdown","height","scrollbar-always-on","remote","remote-method","validate-event","placement","collapse-tags-tooltip","change","visible-change","remove-tag","clear","blur","focus"],"description":"[Docs](https://element-plus.org/en-US/component/select-v2.html#selectv2)"},"el-select":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","collapse-tags","collapse-tags-tooltip","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","filter-method","remote","remote-method","remote-show-suffix","loading","loading-text","no-match-text","no-data-text","popper-class","reserve-keyword","default-first-option","popper-append-to-body","teleported","persistent","automatic-dropdown","clear-icon","fit-input-width","suffix-icon","suffix-transition","tag-type","validate-event","placement","max-collapse-tags","change","visible-change","remove-tag","clear","blur","focus"],"subtags":["el-option-group","el-option"],"description":"When there are plenty of options, use a drop-down menu to display and select desired ones.\n\n[Docs](https://element-plus.org/en-US/component/select.html#select)"},"el-option-group":{"attributes":["label","disabled"],"subtags":["el-option"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option-group)"},"el-option":{"attributes":["value","label","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option)"},"el-skeleton":{"attributes":["animated","count","loading","rows","throttle"],"description":"When loading data, and you need a rich experience for visual and interactions for your end users, you can choose `skeleton`.\n\n[Docs](https://element-plus.org/en-US/component/skeleton.html#skeleton)"},"el-skeleton-item":{"attributes":["variant"],"description":"[Docs](https://element-plus.org/en-US/component/skeleton.html#skeletonitem)"},"el-slider":{"attributes":["model-value","min","max","disabled","step","show-input","show-input-controls","size","input-size","show-stops","show-tooltip","format-tooltip","range","vertical","height","label","range-start-label","range-end-label","format-value-text","debounce","tooltip-class","placement","marks","validate-event","change","input"],"description":"Drag the slider within a fixed range.\n\n[Docs](https://element-plus.org/en-US/component/slider.html#slider)"},"el-space":{"attributes":["alignment","class","direction","prefix-cls","style","spacer","size","wrap","fill","fill-ratio"],"description":"Even though we have [Divider]\n\n[Docs](https://element-plus.org/en-US/component/space.html#space)"},"el-statistic":{"description":"Display statistics.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#statistic)"},"el-countdown":{"description":":::demo Countdown component, support to add other components control countdown.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#countdown)"},"el-steps":{"attributes":["space","direction","active","process-status","finish-status","align-center","simple"],"subtags":["el-step"],"description":"Guide the user to complete tasks in accordance with the process. Its steps can be set according to the actual application scenario and the number of the steps can't be less than 2.\n\n[Docs](https://element-plus.org/en-US/component/steps.html#steps)"},"el-step":{"attributes":["title","description","icon","status"],"description":"[Docs](https://element-plus.org/en-US/component/steps.html#step)"},"el-switch":{"attributes":["model-value","disabled","loading","size","width","inline-prompt","active-icon","inactive-icon","active-action-icon","inactive-action-icon","active-text","inactive-text","active-value","inactive-value","active-color","inactive-color","border-color","name","validate-event","before-change","id","tabindex","change"],"description":"Switch is used for switching between two opposing states.\n\n[Docs](https://element-plus.org/en-US/component/switch.html#switch)"},"el-table-v2":{"attributes":["cache","estimated-row-height","header-class","header-props","header-cell-props","header-height","footer-height","row-class","row-key","row-props","row-height","cell-props","columns","data","data-getter","fixed-data","expand-column-key","expanded-row-keys","default-expanded-row-keys","class","fixed","width","height","max-height","h-scrollbar-size","v-scrollbar-size","scrollbar-always-on","sort-by","sort-state","column-sort","expanded-rows-change","end-reached","scroll","rows-rendered","row-expand","row-event-handlers"],"description":"[Docs](https://element-plus.org/en-US/component/table-v2.html#tablev2)"},"el-table":{"attributes":["data","height","max-height","stripe","border","size","fit","show-header","highlight-current-row","current-row-key","row-class-name","row-style","cell-class-name","cell-style","header-row-class-name","header-row-style","header-cell-class-name","header-cell-style","row-key","empty-text","default-expand-all","expand-row-keys","default-sort","tooltip-effect","tooltip-options","show-summary","sum-text","summary-method","span-method","select-on-indeterminate","indent","lazy","load","tree-props","table-layout","scrollbar-always-on","show-overflow-tooltip","flexible","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","cell-contextmenu","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],"subtags":["el-table-column"],"description":"Display multiple data with similar format. You can sort, filter, compare your data in a table.\n\n[Docs](https://element-plus.org/en-US/component/table.html#table)"},"el-table-column":{"attributes":["type","index","label","column-key","prop","width","min-width","fixed","render-header","sortable","sort-method","sort-by","sort-orders","resizable","formatter","show-overflow-tooltip","align","header-align","class-name","label-class-name","selectable","reserve-selection","filters","filter-placement","filter-multiple","filter-method","filtered-value"],"description":"[Docs](https://element-plus.org/en-US/component/table.html#table-column)"},"el-tabs":{"attributes":["model-value","type","closable","addable","editable","tab-position","stretch","before-leave","tab-click","tab-change","tab-remove","tab-add","edit"],"subtags":["el-tab-pane"],"description":"Divide data collections which are related yet belong to different types.\n\n[Docs](https://element-plus.org/en-US/component/tabs.html#tabs)"},"el-tab-pane":{"attributes":["label","disabled","name","closable","lazy"],"description":"[Docs](https://element-plus.org/en-US/component/tabs.html#tab-pane)"},"el-tag":{"attributes":["type","closable","disable-transitions","hit","color","size","effect","round","click","close"],"description":"Used for marking and selection.\n\n[Docs](https://element-plus.org/en-US/component/tag.html#tag)"},"el-check-tag":{"attributes":["checked","change"],"description":"[Docs](https://element-plus.org/en-US/component/tag.html#checktag)"},"el-text":{"attributes":["type","size","truncated","tag"],"description":"Used for text.\n\n[Docs](https://element-plus.org/en-US/component/text.html#text)"},"el-time-picker":{"attributes":["model-value","readonly","disabled","editable","clearable","size","placeholder","start-placeholder","end-placeholder","is-range","arrow-control","popper-class","range-separator","format","default-value","id","name","label","prefix-icon","clear-icon","disabled-hours","disabled-minutes","disabled-seconds","teleported","tabindex","change","blur","focus","visible-change"],"description":"Use Time Picker for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-picker.html#timepicker)"},"el-time-select":{"attributes":["model-value","disabled","editable","clearable","size","placeholder","name","effect","prefix-icon","clear-icon","start","end","step","min-time","max-time","format","change","blur","focus"],"description":"Use Time Select for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-select.html#timeselect)"},"el-timeline":{"subtags":["el-timeline-item"],"description":"Visually display timeline.\n\n[Docs](https://element-plus.org/en-US/component/timeline.html#timeline)"},"el-timeline-item":{"attributes":["timestamp","hide-timestamp","center","placement","type","color","size","icon","hollow"],"description":"[Docs](https://element-plus.org/en-US/component/timeline.html#timeline-item)"},"el-tooltip":{"attributes":["append-to","effect","content","raw-content","placement","visible","disabled","offset","transition","popper-options","show-after","show-arrow","hide-after","auto-close","popper-class","enterable","teleported","trigger","virtual-triggering","virtual-ref","trigger-keys","persistent","aria-label"],"description":"Display prompt information for mouse hover.\n\n[Docs](https://element-plus.org/en-US/component/tooltip.html#tooltip)"},"el-transfer":{"attributes":["model-value","data","filterable","filter-placeholder","filter-method","target-order","titles","button-texts","render-content","format","props","left-default-checked","right-default-checked","validate-event","change","left-check-change","right-check-change"],"description":"[Docs](https://element-plus.org/en-US/component/transfer.html#transfer)"},"el-own":{"attributes":["cache-data"],"description":"[Docs](https://element-plus.org/en-US/component/tree-select.html#own)"},"el-tree-v2":{"attributes":["data","empty-text","props","highlight-current","expand-on-click-node","check-on-click-node","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-method","indent","icon","item-size","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse"],"description":"[Docs](https://element-plus.org/en-US/component/tree-v2.html#treev2)"},"el-tree":{"attributes":["data","empty-text","node-key","props","render-after-expand","load","render-content","highlight-current","default-expand-all","expand-on-click-node","check-on-click-node","auto-expand-parent","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-node-method","accordion","indent","icon","lazy","draggable","allow-drag","allow-drop","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],"description":"Display a set of data with hierarchies.\n\n[Docs](https://element-plus.org/en-US/component/tree.html#tree)"},"el-upload":{"attributes":["action","headers","method","multiple","data","name","with-credentials","show-file-list","drag","accept","on-preview","on-remove","on-success","on-error","on-progress","on-change","on-exceed","before-upload","before-remove","file-list","list-type","auto-upload","http-request","disabled","limit"],"description":"Upload files by clicking or drag-and-drop.\n\n[Docs](https://element-plus.org/en-US/component/upload.html#upload)"}}
1
+ {"el-affix":{"attributes":["offset","position","target","z-index","change","scroll"],"description":"Fix the element to a specific visible area.\n\n[Docs](https://element-plus.org/en-US/component/affix.html#affix)"},"el-alert":{"attributes":["title","type","description","closable","center","close-text","show-icon","effect","close"],"description":"Displays important alert messages.\n\n[Docs](https://element-plus.org/en-US/component/alert.html#alert)"},"el-autocomplete":{"attributes":["model-value","placeholder","clearable","disabled","value-key","debounce","placement","fetch-suggestions","trigger-on-focus","select-when-unmatched","name","label","hide-loading","popper-class","popper-append-to-body","teleported","highlight-first-item","fit-input-width","select","change"],"description":"Get some recommended tips based on the current input.\n\n[Docs](https://element-plus.org/en-US/component/autocomplete.html#autocomplete)"},"el-avatar":{"attributes":["icon","size","shape","src","src-set","alt","fit","error"],"description":"Avatars can be used to represent people or objects. It supports images, Icons, or characters.\n\n[Docs](https://element-plus.org/en-US/component/avatar.html#avatar)"},"el-backtop":{"attributes":["target","visibility-height","right","bottom","click"],"description":"A button to back to top.\n\n[Docs](https://element-plus.org/en-US/component/backtop.html#backtop)"},"el-badge":{"attributes":["value","max","is-dot","hidden","type"],"description":"A number or status mark on buttons and icons.\n\n[Docs](https://element-plus.org/en-US/component/badge.html#badge)"},"el-breadcrumb":{"attributes":["separator","separator-icon"],"subtags":["el-breadcrumb-item"],"description":"Displays the location of the current page, making it easier to browser back.\n\n[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumb)"},"el-breadcrumb-item":{"attributes":["to","replace"],"description":"[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumbitem)"},"el-button":{"attributes":["size","type","plain","text","bg","link","round","circle","loading","loading-icon","disabled","icon","autofocus","native-type","auto-insert-space","color","dark","tag"],"description":"Commonly used button.\n\n[Docs](https://element-plus.org/en-US/component/button.html#button)"},"el-button-group":{"attributes":["size","type"],"subtags":["el-button"],"description":"[Docs](https://element-plus.org/en-US/component/button.html#buttongroup)"},"el-calendar":{"attributes":["model-value","range"],"description":"Display date.\n\n[Docs](https://element-plus.org/en-US/component/calendar.html#calendar)"},"el-card":{"attributes":["header","body-style","body-class","shadow"],"description":"Integrate information in a card container.\n\n[Docs](https://element-plus.org/en-US/component/card.html#card)"},"el-carousel":{"attributes":["height","initial-index","trigger","autoplay","interval","indicator-position","arrow","type","loop","direction","pause-on-hover","change"],"subtags":["el-carousel-item"],"description":"Loop a series of images or texts in a limited space\n\n[Docs](https://element-plus.org/en-US/component/carousel.html#carousel)"},"el-carousel-item":{"attributes":["name","label"],"description":"[Docs](https://element-plus.org/en-US/component/carousel.html#carousel-item)"},"el-cascader":{"attributes":["model-value","options","props","size","placeholder","disabled","clearable","show-all-levels","collapse-tags","collapse-tags-tooltip","separator","filterable","filter-method","debounce","before-filter","popper-class","teleported","popper-append-to-body","tag-type","validate-event","max-collapse-tags","change","expand-change","blur","focus","visible-change","remove-tag"],"description":"If the options have a clear hierarchical structure, Cascader can be used to view and select them.\n\n[Docs](https://element-plus.org/en-US/component/cascader.html#cascader)"},"el-cascader-panel":{"attributes":["model-value","options","props","change","expand-change","close"],"description":"[Docs](https://element-plus.org/en-US/component/cascader.html#cascaderpanel)"},"el-checkbox":{"attributes":["model-value","label","true-label","false-label","disabled","border","size","name","checked","indeterminate","validate-event","tabindex","id","controls","change"],"description":"A group of options for multiple choices.\n\n[Docs](https://element-plus.org/en-US/component/checkbox.html#checkbox)"},"el-checkbox-group":{"attributes":["model-value","size","disabled","min","max","label","text-color","fill","tag","validate-event","change"],"subtags":["el-checkbox","el-checkbox-button"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxgroup)"},"el-checkbox-button":{"attributes":["label","true-label","false-label","disabled","name","checked"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxbutton)"},"el-collapse":{"attributes":["model-value","accordion","change"],"subtags":["el-collapse-item"],"description":"Use Collapse to store contents.\n\n[Docs](https://element-plus.org/en-US/component/collapse.html#collapse)"},"el-collapse-item":{"attributes":["name","title","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/collapse.html#collapse-item)"},"el-color-picker":{"attributes":["model-value","disabled","size","show-alpha","color-format","popper-class","predefine","validate-event","tabindex","label","id","change","active-change"],"description":"ColorPicker is a color selector supporting multiple color formats.\n\n[Docs](https://element-plus.org/en-US/component/color-picker.html#colorpicker)"},"el-config-provider":{"attributes":["locale","size","z-index","namespace","button","message","experimental-features"],"description":"Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere.\n\n[Docs](https://element-plus.org/en-US/component/config-provider.html#config-provider)"},"el-container":{"attributes":["direction"],"subtags":["el-container","el-header","el-aside","el-main","el-footer"],"description":"Container components for scaffolding basic structure of the page:\n\n[Docs](https://element-plus.org/en-US/component/container.html#container)"},"el-header":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#header)"},"el-aside":{"attributes":["width"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#aside)"},"el-main":{"description":"[Docs](https://element-plus.org/en-US/component/container.html#main)"},"el-footer":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#footer)"},"el-date-picker":{"attributes":["model-value","readonly","disabled","size","editable","clearable","placeholder","start-placeholder","end-placeholder","type","format","popper-class","popper-options","range-separator","default-value","default-time","value-format","id","name","unlink-panels","prefix-icon","clear-icon","validate-event","disabled-date","shortcuts","cell-class-name","teleported","change","blur","focus","calendar-change","panel-change","visible-change"],"description":"Use Date Picker for date input.\n\n[Docs](https://element-plus.org/en-US/component/date-picker.html#datepicker)"},"el-descriptions":{"attributes":["border","column","direction","size","title","extra"],"subtags":["el-descriptions-item"],"description":"Display multiple fields in list form.\n\n[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions)"},"el-descriptions-item":{"attributes":["label","span","width","min-width","align","label-align","class-name","label-class-name"],"description":"[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions-item)"},"el-dialog":{"attributes":["model-value","title","width","fullscreen","top","modal","modal-class","append-to-body","lock-scroll","custom-class","open-delay","close-delay","close-on-click-modal","close-on-press-escape","show-close","before-close","draggable","center","align-center","destroy-on-close","close-icon","z-index","header-aria-level","open","opened","close","closed","open-auto-focus","close-auto-focus"],"description":"Informs users while preserving the current page state.\n\n[Docs](https://element-plus.org/en-US/component/dialog.html#dialog)"},"el-divider":{"attributes":["direction","border-style","content-position"],"description":"The dividing line that separates the content.\n\n[Docs](https://element-plus.org/en-US/component/divider.html#divider)"},"el-drawer":{"attributes":["model-value","append-to-body","lock-scroll","before-close","close-on-click-modal","close-on-press-escape","open-delay","close-delay","custom-class","destroy-on-close","modal","direction","show-close","size","title","with-header","modal-class","z-index","header-aria-level","open","opened","close","closed"],"description":"Sometimes, `Dialog` does not always satisfy our requirements, let's say you have a massive form, or you need space to display something like `terms & conditions`, `Drawer` has almost identical API with `Dialog`, but it introduces different user experience.\n\n[Docs](https://element-plus.org/en-US/component/drawer.html#drawer)"},"el-dropdown":{"attributes":["type","size","max-height","split-button","disabled","placement","trigger","hide-on-click","show-timeout","hide-timeout","role","tabindex","popper-class","popper-options","teleported","click","command","visible-change"],"subtags":["el-dropdown-menu"],"description":"Toggleable menu for displaying lists of links and actions.\n\n[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown)"},"el-dropdown-menu":{"subtags":["el-dropdown-item"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-menu)"},"el-dropdown-item":{"attributes":["command","disabled","divided","icon"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-item)"},"el-empty":{"attributes":["image","image-size","description"],"description":"Placeholder hints for empty states.\n\n[Docs](https://element-plus.org/en-US/component/empty.html#empty)"},"el-form":{"attributes":["model","rules","inline","label-position","label-width","label-suffix","hide-required-asterisk","require-asterisk-position","show-message","inline-message","status-icon","validate-on-rule-change","size","disabled","scroll-to-error","scroll-into-view-options","validate"],"subtags":["el-form-item"],"description":"Form consists of `input`, `radio`, `select`, `checkbox` and so on. With form, you can collect, verify and submit data.\n\n[Docs](https://element-plus.org/en-US/component/form.html#form)"},"el-form-item":{"attributes":["prop","label","label-width","required","rules","error","show-message","inline-message","size","for","validate-status"],"description":"[Docs](https://element-plus.org/en-US/component/form.html#formitem)"},"el-icon":{"attributes":["color","size"],"description":"Element Plus provides a set of common icons.\n\n[Docs](https://element-plus.org/en-US/component/icon.html#icon)"},"el-image":{"attributes":["src","fit","hide-on-click-modal","loading","lazy","scroll-container","alt","referrerpolicy","preview-src-list","z-index","initial-index","close-on-press-escape","preview-teleported","infinite","zoom-rate","load","error","switch","close","show"],"description":"Besides the native features of img, support lazy load, custom placeholder and load failure, etc.\n\n[Docs](https://element-plus.org/en-US/component/image.html#image)"},"el-image-viewer":{"attributes":["url-list","z-index","initial-index","infinite","hide-on-click-modal","teleported","zoom-rate","close-on-press-escape","close","switch"],"description":"[Docs](https://element-plus.org/en-US/component/image.html#image-viewer)"},"el-input-number":{"attributes":["model-value","min","max","step","step-strictly","precision","size","readonly","disabled","controls","controls-position","name","label","placeholder","id","value-on-clear","validate-event","change","blur","focus"],"description":"Input numerical values with a customizable range.\n\n[Docs](https://element-plus.org/en-US/component/input-number.html#input-number)"},"el-input":{"attributes":["type","model-value","maxlength","minlength","show-word-limit","placeholder","clearable","formatter","parser","show-password","disabled","size","prefix-icon","suffix-icon","rows","autosize","autocomplete","name","readonly","max","min","step","resize","autofocus","form","label","tabindex","validate-event","input-style","blur","focus","change","input","clear"],"description":"Input data using mouse or keyboard.\n\n[Docs](https://element-plus.org/en-US/component/input.html#input)"},"el-row":{"attributes":["gutter","justify","align","tag"],"subtags":["el-col"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#row)"},"el-col":{"attributes":["span","offset","push","pull","xs","sm","md","lg","xl","tag"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#col)"},"el-link":{"attributes":["type","underline","disabled","href","icon"],"description":"Text hyperlink\n\n[Docs](https://element-plus.org/en-US/component/link.html#link)"},"el-menu":{"attributes":["mode","collapse","ellipsis","background-color","text-color","active-text-color","default-active","default-openeds","unique-opened","menu-trigger","router","collapse-transition","popper-effect","select","open","close"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"Menu that provides navigation for your website.\n\n[Docs](https://element-plus.org/en-US/component/menu.html#menu)"},"el-sub-menu":{"attributes":["index","popper-class","show-timeout","hide-timeout","disabled","popper-append-to-body","teleported","popper-offset","expand-close-icon","expand-open-icon","collapse-close-icon","collapse-open-icon"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#submenu)"},"el-menu-item":{"attributes":["index","route","disabled","click"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item)"},"el-menu-item-group":{"attributes":["title"],"subtags":["el-menu-item"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item-group)"},"el-page-header":{"attributes":["icon","title","content","back"],"description":"If path of the page is simple, it is recommended to use PageHeader instead of the Breadcrumb.\n\n[Docs](https://element-plus.org/en-US/component/page-header.html#page-header)"},"el-pagination":{"attributes":["small","background","page-size","default-page-size","total","page-count","pager-count","current-page","default-current-page","layout","page-sizes","popper-class","prev-text","prev-icon","next-text","next-icon","disabled","hide-on-single-page","size-change","current-change","prev-click","next-click"],"description":"If you have too much data to display in one page, use pagination.\n\n[Docs](https://element-plus.org/en-US/component/pagination.html#pagination)"},"el-popconfirm":{"attributes":["title","confirm-button-text","cancel-button-text","confirm-button-type","cancel-button-type","icon","icon-color","hide-icon","hide-after","teleported","persistent","width","confirm","cancel"],"description":"A simple confirmation dialog of an element click action.\n\n[Docs](https://element-plus.org/en-US/component/popconfirm.html#popconfirm)"},"el-popover":{"attributes":["trigger","title","effect","content","width","placement","disabled","visible","offset","transition","show-arrow","popper-options","popper-class","popper-style","show-after","hide-after","auto-close","tabindex","teleported","persistent","show","before-enter","after-enter","hide","before-leave","after-leave"],"description":":::tip\n\n[Docs](https://element-plus.org/en-US/component/popover.html#popover)"},"el-progress":{"attributes":["percentage","type","stroke-width","text-inside","status","indeterminate","duration","color","width","show-text","stroke-linecap","format","striped","striped-flow"],"description":"Progress is used to show the progress of current operation, and inform the user the current status.\n\n[Docs](https://element-plus.org/en-US/component/progress.html#progress)"},"el-radio":{"attributes":["model-value","label","disabled","border","size","name","change"],"description":"Single selection among multiple options.\n\n[Docs](https://element-plus.org/en-US/component/radio.html#radio)"},"el-radio-group":{"attributes":["model-value","size","disabled","text-color","fill","validate-event","label","name","id","change"],"subtags":["el-radio","el-radio-button"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiogroup)"},"el-radio-button":{"attributes":["label","disabled","name"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiobutton)"},"el-rate":{"attributes":["model-value","max","size","disabled","allow-half","low-threshold","high-threshold","colors","void-color","disabled-void-color","icons","void-icon","disabled-void-icon","show-text","show-score","text-color","texts","score-template","clearable","id","label","change"],"description":"Used for rating\n\n[Docs](https://element-plus.org/en-US/component/rate.html#rate)"},"el-result":{"attributes":["title","sub-title","icon"],"description":"Used to give feedback on the result of user's operation or access exception.\n\n[Docs](https://element-plus.org/en-US/component/result.html#result)"},"el-scrollbar":{"attributes":["height","max-height","native","wrap-style","wrap-class","view-style","view-class","noresize","tag","always","min-size","scroll"],"description":"Used to replace the browser's native scrollbar.\n\n[Docs](https://element-plus.org/en-US/component/scrollbar.html#scrollbar)"},"el-select-v2":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","clear-icon","collapse-tags","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","reserve-keyword","no-data-text","popper-class","popper-append-to-body","teleported","persistent","popper-options","automatic-dropdown","height","scrollbar-always-on","remote","remote-method","validate-event","placement","collapse-tags-tooltip","max-collapse-tags","change","visible-change","remove-tag","clear","blur","focus"],"description":"[Docs](https://element-plus.org/en-US/component/select-v2.html#selectv2)"},"el-select":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","collapse-tags","collapse-tags-tooltip","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","filter-method","remote","remote-method","remote-show-suffix","loading","loading-text","no-match-text","no-data-text","popper-class","reserve-keyword","default-first-option","teleported","persistent","automatic-dropdown","clear-icon","fit-input-width","suffix-icon","suffix-transition","tag-type","validate-event","placement","max-collapse-tags","popper-options","aria-label","change","visible-change","remove-tag","clear","blur","focus"],"subtags":["el-option-group","el-option"],"description":"When there are plenty of options, use a drop-down menu to display and select desired ones.\n\n[Docs](https://element-plus.org/en-US/component/select.html#select)"},"el-option-group":{"attributes":["label","disabled"],"subtags":["el-option"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option-group)"},"el-option":{"attributes":["value","label","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option)"},"el-skeleton":{"attributes":["animated","count","loading","rows","throttle"],"description":"When loading data, and you need a rich experience for visual and interactions for your end users, you can choose `skeleton`.\n\n[Docs](https://element-plus.org/en-US/component/skeleton.html#skeleton)"},"el-skeleton-item":{"attributes":["variant"],"description":"[Docs](https://element-plus.org/en-US/component/skeleton.html#skeletonitem)"},"el-slider":{"attributes":["model-value","min","max","disabled","step","show-input","show-input-controls","size","input-size","show-stops","show-tooltip","format-tooltip","range","vertical","height","label","range-start-label","range-end-label","format-value-text","debounce","tooltip-class","placement","marks","validate-event","change","input"],"description":"Drag the slider within a fixed range.\n\n[Docs](https://element-plus.org/en-US/component/slider.html#slider)"},"el-space":{"attributes":["alignment","class","direction","prefix-cls","style","spacer","size","wrap","fill","fill-ratio"],"description":"Even though we have [Divider]\n\n[Docs](https://element-plus.org/en-US/component/space.html#space)"},"el-statistic":{"description":"Display statistics.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#statistic)"},"el-countdown":{"description":":::demo Countdown component, support to add other components control countdown.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#countdown)"},"el-steps":{"attributes":["space","direction","active","process-status","finish-status","align-center","simple"],"subtags":["el-step"],"description":"Guide the user to complete tasks in accordance with the process. Its steps can be set according to the actual application scenario and the number of the steps can't be less than 2.\n\n[Docs](https://element-plus.org/en-US/component/steps.html#steps)"},"el-step":{"attributes":["title","description","icon","status"],"description":"[Docs](https://element-plus.org/en-US/component/steps.html#step)"},"el-switch":{"attributes":["model-value","disabled","loading","size","width","inline-prompt","active-icon","inactive-icon","active-action-icon","inactive-action-icon","active-text","inactive-text","active-value","inactive-value","active-color","inactive-color","border-color","name","validate-event","before-change","id","tabindex","change"],"description":"Switch is used for switching between two opposing states.\n\n[Docs](https://element-plus.org/en-US/component/switch.html#switch)"},"el-table-v2":{"attributes":["cache","estimated-row-height","header-class","header-props","header-cell-props","header-height","footer-height","row-class","row-key","row-props","row-height","cell-props","columns","data","data-getter","fixed-data","expand-column-key","expanded-row-keys","default-expanded-row-keys","class","fixed","width","height","max-height","h-scrollbar-size","v-scrollbar-size","scrollbar-always-on","sort-by","sort-state","column-sort","expanded-rows-change","end-reached","scroll","rows-rendered","row-expand","row-event-handlers"],"description":"[Docs](https://element-plus.org/en-US/component/table-v2.html#tablev2)"},"el-table":{"attributes":["data","height","max-height","stripe","border","size","fit","show-header","highlight-current-row","current-row-key","row-class-name","row-style","cell-class-name","cell-style","header-row-class-name","header-row-style","header-cell-class-name","header-cell-style","row-key","empty-text","default-expand-all","expand-row-keys","default-sort","tooltip-effect","tooltip-options","show-summary","sum-text","summary-method","span-method","select-on-indeterminate","indent","lazy","load","tree-props","table-layout","scrollbar-always-on","show-overflow-tooltip","flexible","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","cell-contextmenu","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],"subtags":["el-table-column"],"description":"Display multiple data with similar format. You can sort, filter, compare your data in a table.\n\n[Docs](https://element-plus.org/en-US/component/table.html#table)"},"el-table-column":{"attributes":["type","index","label","column-key","prop","width","min-width","fixed","render-header","sortable","sort-method","sort-by","sort-orders","resizable","formatter","show-overflow-tooltip","align","header-align","class-name","label-class-name","selectable","reserve-selection","filters","filter-placement","filter-multiple","filter-method","filtered-value"],"description":"[Docs](https://element-plus.org/en-US/component/table.html#table-column)"},"el-tabs":{"attributes":["model-value","type","closable","addable","editable","tab-position","stretch","before-leave","tab-click","tab-change","tab-remove","tab-add","edit"],"subtags":["el-tab-pane"],"description":"Divide data collections which are related yet belong to different types.\n\n[Docs](https://element-plus.org/en-US/component/tabs.html#tabs)"},"el-tab-pane":{"attributes":["label","disabled","name","closable","lazy"],"description":"[Docs](https://element-plus.org/en-US/component/tabs.html#tab-pane)"},"el-tag":{"attributes":["type","closable","disable-transitions","hit","color","size","effect","round","click","close"],"description":"Used for marking and selection.\n\n[Docs](https://element-plus.org/en-US/component/tag.html#tag)"},"el-check-tag":{"attributes":["checked","change"],"description":"[Docs](https://element-plus.org/en-US/component/tag.html#checktag)"},"el-text":{"attributes":["type","size","truncated","tag"],"description":"Used for text.\n\n[Docs](https://element-plus.org/en-US/component/text.html#text)"},"el-time-picker":{"attributes":["model-value","readonly","disabled","editable","clearable","size","placeholder","start-placeholder","end-placeholder","is-range","arrow-control","popper-class","range-separator","format","default-value","id","name","label","prefix-icon","clear-icon","disabled-hours","disabled-minutes","disabled-seconds","teleported","tabindex","change","blur","focus","visible-change"],"description":"Use Time Picker for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-picker.html#timepicker)"},"el-time-select":{"attributes":["model-value","disabled","editable","clearable","size","placeholder","name","effect","prefix-icon","clear-icon","start","end","step","min-time","max-time","format","change","blur","focus"],"description":"Use Time Select for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-select.html#timeselect)"},"el-timeline":{"subtags":["el-timeline-item"],"description":"Visually display timeline.\n\n[Docs](https://element-plus.org/en-US/component/timeline.html#timeline)"},"el-timeline-item":{"attributes":["timestamp","hide-timestamp","center","placement","type","color","size","icon","hollow"],"description":"[Docs](https://element-plus.org/en-US/component/timeline.html#timeline-item)"},"el-tooltip":{"attributes":["append-to","effect","content","raw-content","placement","visible","disabled","offset","transition","popper-options","show-after","show-arrow","hide-after","auto-close","popper-class","enterable","teleported","trigger","virtual-triggering","virtual-ref","trigger-keys","persistent","aria-label"],"description":"Display prompt information for mouse hover.\n\n[Docs](https://element-plus.org/en-US/component/tooltip.html#tooltip)"},"el-transfer":{"attributes":["model-value","data","filterable","filter-placeholder","filter-method","target-order","titles","button-texts","render-content","format","props","left-default-checked","right-default-checked","validate-event","change","left-check-change","right-check-change"],"description":"[Docs](https://element-plus.org/en-US/component/transfer.html#transfer)"},"el-own":{"attributes":["cache-data"],"description":"[Docs](https://element-plus.org/en-US/component/tree-select.html#own)"},"el-tree-v2":{"attributes":["data","empty-text","props","highlight-current","expand-on-click-node","check-on-click-node","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-method","indent","icon","item-size","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse"],"description":"[Docs](https://element-plus.org/en-US/component/tree-v2.html#treev2)"},"el-tree":{"attributes":["data","empty-text","node-key","props","render-after-expand","load","render-content","highlight-current","default-expand-all","expand-on-click-node","check-on-click-node","auto-expand-parent","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-node-method","accordion","indent","icon","lazy","draggable","allow-drag","allow-drop","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],"description":"Display a set of data with hierarchies.\n\n[Docs](https://element-plus.org/en-US/component/tree.html#tree)"},"el-upload":{"attributes":["action","headers","method","multiple","data","name","with-credentials","show-file-list","drag","accept","on-preview","on-remove","on-success","on-error","on-progress","on-change","on-exceed","before-upload","before-remove","file-list","list-type","auto-upload","http-request","disabled","limit"],"description":"Upload files by clicking or drag-and-drop.\n\n[Docs](https://element-plus.org/en-US/component/upload.html#upload)"}}