@element-plus/nightly 0.0.20220309 → 0.0.20220312

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 (514) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +1130 -867
  4. package/dist/index.full.min.js +14 -8
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +17 -11
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +1131 -869
  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/bg.js +1 -1
  18. package/dist/locale/bg.min.js +1 -1
  19. package/dist/locale/bg.min.mjs +1 -1
  20. package/dist/locale/bg.mjs +1 -1
  21. package/dist/locale/bn.js +1 -1
  22. package/dist/locale/bn.min.js +1 -1
  23. package/dist/locale/bn.min.mjs +1 -1
  24. package/dist/locale/bn.mjs +1 -1
  25. package/dist/locale/ca.js +1 -1
  26. package/dist/locale/ca.min.js +1 -1
  27. package/dist/locale/ca.min.mjs +1 -1
  28. package/dist/locale/ca.mjs +1 -1
  29. package/dist/locale/cs.js +1 -1
  30. package/dist/locale/cs.min.js +1 -1
  31. package/dist/locale/cs.min.mjs +1 -1
  32. package/dist/locale/cs.mjs +1 -1
  33. package/dist/locale/da.js +1 -1
  34. package/dist/locale/da.min.js +1 -1
  35. package/dist/locale/da.min.mjs +1 -1
  36. package/dist/locale/da.mjs +1 -1
  37. package/dist/locale/de.js +1 -1
  38. package/dist/locale/de.min.js +1 -1
  39. package/dist/locale/de.min.mjs +1 -1
  40. package/dist/locale/de.mjs +1 -1
  41. package/dist/locale/el.js +1 -1
  42. package/dist/locale/el.min.js +1 -1
  43. package/dist/locale/el.min.mjs +1 -1
  44. package/dist/locale/el.mjs +1 -1
  45. package/dist/locale/en.js +1 -1
  46. package/dist/locale/en.min.js +1 -1
  47. package/dist/locale/en.min.mjs +1 -1
  48. package/dist/locale/en.mjs +1 -1
  49. package/dist/locale/eo.js +1 -1
  50. package/dist/locale/eo.min.js +1 -1
  51. package/dist/locale/eo.min.mjs +1 -1
  52. package/dist/locale/eo.mjs +1 -1
  53. package/dist/locale/es.js +1 -1
  54. package/dist/locale/es.min.js +1 -1
  55. package/dist/locale/es.min.mjs +1 -1
  56. package/dist/locale/es.mjs +1 -1
  57. package/dist/locale/et.js +1 -1
  58. package/dist/locale/et.min.js +1 -1
  59. package/dist/locale/et.min.mjs +1 -1
  60. package/dist/locale/et.mjs +1 -1
  61. package/dist/locale/eu.js +1 -1
  62. package/dist/locale/eu.min.js +1 -1
  63. package/dist/locale/eu.min.mjs +1 -1
  64. package/dist/locale/eu.mjs +1 -1
  65. package/dist/locale/fa.js +1 -1
  66. package/dist/locale/fa.min.js +1 -1
  67. package/dist/locale/fa.min.mjs +1 -1
  68. package/dist/locale/fa.mjs +1 -1
  69. package/dist/locale/fi.js +1 -1
  70. package/dist/locale/fi.min.js +1 -1
  71. package/dist/locale/fi.min.mjs +1 -1
  72. package/dist/locale/fi.mjs +1 -1
  73. package/dist/locale/fr.js +1 -1
  74. package/dist/locale/fr.min.js +1 -1
  75. package/dist/locale/fr.min.mjs +1 -1
  76. package/dist/locale/fr.mjs +1 -1
  77. package/dist/locale/he.js +1 -1
  78. package/dist/locale/he.min.js +1 -1
  79. package/dist/locale/he.min.mjs +1 -1
  80. package/dist/locale/he.mjs +1 -1
  81. package/dist/locale/hr.js +1 -1
  82. package/dist/locale/hr.min.js +1 -1
  83. package/dist/locale/hr.min.mjs +1 -1
  84. package/dist/locale/hr.mjs +1 -1
  85. package/dist/locale/hu.js +1 -1
  86. package/dist/locale/hu.min.js +1 -1
  87. package/dist/locale/hu.min.mjs +1 -1
  88. package/dist/locale/hu.mjs +1 -1
  89. package/dist/locale/hy-am.js +1 -1
  90. package/dist/locale/hy-am.min.js +1 -1
  91. package/dist/locale/hy-am.min.mjs +1 -1
  92. package/dist/locale/hy-am.mjs +1 -1
  93. package/dist/locale/id.js +1 -1
  94. package/dist/locale/id.min.js +1 -1
  95. package/dist/locale/id.min.mjs +1 -1
  96. package/dist/locale/id.mjs +1 -1
  97. package/dist/locale/it.js +1 -1
  98. package/dist/locale/it.min.js +1 -1
  99. package/dist/locale/it.min.mjs +1 -1
  100. package/dist/locale/it.mjs +1 -1
  101. package/dist/locale/ja.js +1 -1
  102. package/dist/locale/ja.min.js +1 -1
  103. package/dist/locale/ja.min.mjs +1 -1
  104. package/dist/locale/ja.mjs +1 -1
  105. package/dist/locale/kk.js +1 -1
  106. package/dist/locale/kk.min.js +1 -1
  107. package/dist/locale/kk.min.mjs +1 -1
  108. package/dist/locale/kk.mjs +1 -1
  109. package/dist/locale/km.js +1 -1
  110. package/dist/locale/km.min.js +1 -1
  111. package/dist/locale/km.min.mjs +1 -1
  112. package/dist/locale/km.mjs +1 -1
  113. package/dist/locale/ko.js +1 -1
  114. package/dist/locale/ko.min.js +1 -1
  115. package/dist/locale/ko.min.mjs +1 -1
  116. package/dist/locale/ko.mjs +1 -1
  117. package/dist/locale/ku.js +1 -1
  118. package/dist/locale/ku.min.js +1 -1
  119. package/dist/locale/ku.min.mjs +1 -1
  120. package/dist/locale/ku.mjs +1 -1
  121. package/dist/locale/ky.js +1 -1
  122. package/dist/locale/ky.min.js +1 -1
  123. package/dist/locale/ky.min.mjs +1 -1
  124. package/dist/locale/ky.mjs +1 -1
  125. package/dist/locale/lt.js +1 -1
  126. package/dist/locale/lt.min.js +1 -1
  127. package/dist/locale/lt.min.mjs +1 -1
  128. package/dist/locale/lt.mjs +1 -1
  129. package/dist/locale/lv.js +1 -1
  130. package/dist/locale/lv.min.js +1 -1
  131. package/dist/locale/lv.min.mjs +1 -1
  132. package/dist/locale/lv.mjs +1 -1
  133. package/dist/locale/mg.js +1 -1
  134. package/dist/locale/mg.min.js +1 -1
  135. package/dist/locale/mg.min.mjs +1 -1
  136. package/dist/locale/mg.mjs +1 -1
  137. package/dist/locale/mn.js +1 -1
  138. package/dist/locale/mn.min.js +1 -1
  139. package/dist/locale/mn.min.mjs +1 -1
  140. package/dist/locale/mn.mjs +1 -1
  141. package/dist/locale/nb-no.js +1 -1
  142. package/dist/locale/nb-no.min.js +1 -1
  143. package/dist/locale/nb-no.min.mjs +1 -1
  144. package/dist/locale/nb-no.mjs +1 -1
  145. package/dist/locale/nl.js +1 -1
  146. package/dist/locale/nl.min.js +1 -1
  147. package/dist/locale/nl.min.mjs +1 -1
  148. package/dist/locale/nl.mjs +1 -1
  149. package/dist/locale/pa.js +1 -1
  150. package/dist/locale/pa.min.js +1 -1
  151. package/dist/locale/pa.min.mjs +1 -1
  152. package/dist/locale/pa.mjs +1 -1
  153. package/dist/locale/pl.js +1 -1
  154. package/dist/locale/pl.min.js +1 -1
  155. package/dist/locale/pl.min.mjs +1 -1
  156. package/dist/locale/pl.mjs +1 -1
  157. package/dist/locale/pt-br.js +1 -1
  158. package/dist/locale/pt-br.min.js +1 -1
  159. package/dist/locale/pt-br.min.mjs +1 -1
  160. package/dist/locale/pt-br.mjs +1 -1
  161. package/dist/locale/pt.js +1 -1
  162. package/dist/locale/pt.min.js +1 -1
  163. package/dist/locale/pt.min.mjs +1 -1
  164. package/dist/locale/pt.mjs +1 -1
  165. package/dist/locale/ro.js +1 -1
  166. package/dist/locale/ro.min.js +1 -1
  167. package/dist/locale/ro.min.mjs +1 -1
  168. package/dist/locale/ro.mjs +1 -1
  169. package/dist/locale/ru.js +1 -1
  170. package/dist/locale/ru.min.js +1 -1
  171. package/dist/locale/ru.min.mjs +1 -1
  172. package/dist/locale/ru.mjs +1 -1
  173. package/dist/locale/sk.js +1 -1
  174. package/dist/locale/sk.min.js +1 -1
  175. package/dist/locale/sk.min.mjs +1 -1
  176. package/dist/locale/sk.mjs +1 -1
  177. package/dist/locale/sl.js +1 -1
  178. package/dist/locale/sl.min.js +1 -1
  179. package/dist/locale/sl.min.mjs +1 -1
  180. package/dist/locale/sl.mjs +1 -1
  181. package/dist/locale/sr.js +1 -1
  182. package/dist/locale/sr.min.js +1 -1
  183. package/dist/locale/sr.min.mjs +1 -1
  184. package/dist/locale/sr.mjs +1 -1
  185. package/dist/locale/sv.js +1 -1
  186. package/dist/locale/sv.min.js +1 -1
  187. package/dist/locale/sv.min.mjs +1 -1
  188. package/dist/locale/sv.mjs +1 -1
  189. package/dist/locale/ta.js +1 -1
  190. package/dist/locale/ta.min.js +1 -1
  191. package/dist/locale/ta.min.mjs +1 -1
  192. package/dist/locale/ta.mjs +1 -1
  193. package/dist/locale/th.js +1 -1
  194. package/dist/locale/th.min.js +1 -1
  195. package/dist/locale/th.min.mjs +1 -1
  196. package/dist/locale/th.mjs +1 -1
  197. package/dist/locale/tk.js +1 -1
  198. package/dist/locale/tk.min.js +1 -1
  199. package/dist/locale/tk.min.mjs +1 -1
  200. package/dist/locale/tk.mjs +1 -1
  201. package/dist/locale/tr.js +1 -1
  202. package/dist/locale/tr.min.js +1 -1
  203. package/dist/locale/tr.min.mjs +1 -1
  204. package/dist/locale/tr.mjs +1 -1
  205. package/dist/locale/ug-cn.js +1 -1
  206. package/dist/locale/ug-cn.min.js +1 -1
  207. package/dist/locale/ug-cn.min.mjs +1 -1
  208. package/dist/locale/ug-cn.mjs +1 -1
  209. package/dist/locale/uk.js +1 -1
  210. package/dist/locale/uk.min.js +1 -1
  211. package/dist/locale/uk.min.mjs +1 -1
  212. package/dist/locale/uk.mjs +1 -1
  213. package/dist/locale/uz-uz.js +1 -1
  214. package/dist/locale/uz-uz.min.js +1 -1
  215. package/dist/locale/uz-uz.min.mjs +1 -1
  216. package/dist/locale/uz-uz.mjs +1 -1
  217. package/dist/locale/vi.js +1 -1
  218. package/dist/locale/vi.min.js +1 -1
  219. package/dist/locale/vi.min.mjs +1 -1
  220. package/dist/locale/vi.mjs +1 -1
  221. package/dist/locale/zh-cn.js +1 -1
  222. package/dist/locale/zh-cn.min.js +1 -1
  223. package/dist/locale/zh-cn.min.mjs +1 -1
  224. package/dist/locale/zh-cn.mjs +1 -1
  225. package/dist/locale/zh-tw.js +1 -1
  226. package/dist/locale/zh-tw.min.js +1 -1
  227. package/dist/locale/zh-tw.min.mjs +1 -1
  228. package/dist/locale/zh-tw.mjs +1 -1
  229. package/es/components/autocomplete/index.d.ts +621 -50
  230. package/es/components/autocomplete/src/autocomplete.vue.d.ts +621 -50
  231. package/es/components/autocomplete/src/autocomplete2.mjs +7 -6
  232. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  233. package/es/components/calendar/src/date-table2.mjs +2 -2
  234. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  235. package/es/components/cascader/index.d.ts +522 -176
  236. package/es/components/cascader/src/index.mjs +63 -9
  237. package/es/components/cascader/src/index.mjs.map +1 -1
  238. package/es/components/cascader/src/index.vue.d.ts +262 -88
  239. package/es/components/cascader-panel/src/index.mjs +1 -1
  240. package/es/components/cascader-panel/src/index.mjs.map +1 -1
  241. package/es/components/cascader-panel/src/types.d.ts +1 -0
  242. package/es/components/cascader-panel/src/types.mjs.map +1 -1
  243. package/es/components/divider/index.d.ts +7 -0
  244. package/es/components/divider/index.mjs +2 -2
  245. package/es/components/divider/index.mjs.map +1 -1
  246. package/es/components/divider/src/divider.vue.d.ts +7 -0
  247. package/es/components/divider/src/divider2.mjs +21 -23
  248. package/es/components/divider/src/divider2.mjs.map +1 -1
  249. package/es/components/dropdown/index.d.ts +1 -1
  250. package/es/components/dropdown/src/dropdown.vue.d.ts +1 -1
  251. package/es/components/input/index.d.ts +125 -45
  252. package/es/components/input/index.mjs +2 -2
  253. package/es/components/input/index.mjs.map +1 -1
  254. package/es/components/input/src/input.d.ts +4 -3
  255. package/es/components/input/src/input.mjs +5 -1
  256. package/es/components/input/src/input.mjs.map +1 -1
  257. package/es/components/input/src/input.vue.d.ts +125 -45
  258. package/es/components/input/src/input2.mjs +261 -281
  259. package/es/components/input/src/input2.mjs.map +1 -1
  260. package/es/components/input/src/{calc-textarea-height.d.ts → utils.d.ts} +0 -0
  261. package/es/components/input/src/{calc-textarea-height.mjs → utils.mjs} +1 -1
  262. package/es/components/input/src/utils.mjs.map +1 -0
  263. package/es/components/input-number/index.d.ts +250 -90
  264. package/es/components/input-number/src/input-number.vue.d.ts +250 -90
  265. package/es/components/link/index.d.ts +42 -0
  266. package/es/components/link/index.mjs +2 -2
  267. package/es/components/link/index.mjs.map +1 -1
  268. package/es/components/link/src/link.vue.d.ts +42 -0
  269. package/es/components/link/src/link2.mjs +35 -39
  270. package/es/components/link/src/link2.mjs.map +1 -1
  271. package/es/components/message/src/message-method.mjs +3 -3
  272. package/es/components/message/src/message-method.mjs.map +1 -1
  273. package/es/components/message/src/message.d.ts +1 -1
  274. package/es/components/message/src/message.mjs +5 -1
  275. package/es/components/message/src/message.mjs.map +1 -1
  276. package/es/components/message/src/message.vue.d.ts +9 -3
  277. package/es/components/pagination/src/components/pager.mjs +24 -5
  278. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  279. package/es/components/popover/index.d.ts +2 -2
  280. package/es/components/popover/src/index.vue.d.ts +1 -1
  281. package/es/components/popper/src/content.vue.d.ts +2 -2
  282. package/es/components/rate/index.d.ts +3 -3
  283. package/es/components/rate/src/rate.d.ts +1 -1
  284. package/es/components/rate/src/rate.mjs +1 -1
  285. package/es/components/rate/src/rate.mjs.map +1 -1
  286. package/es/components/rate/src/rate.vue.d.ts +3 -3
  287. package/es/components/rate/src/rate2.mjs +1 -1
  288. package/es/components/rate/src/rate2.mjs.map +1 -1
  289. package/es/components/scrollbar/src/thumb.vue.d.ts +1 -1
  290. package/es/components/select/index.d.ts +10 -1
  291. package/es/components/select/src/option.mjs +6 -5
  292. package/es/components/select/src/option.mjs.map +1 -1
  293. package/es/components/select/src/select.mjs +57 -4
  294. package/es/components/select/src/select.mjs.map +1 -1
  295. package/es/components/select/src/select.vue.d.ts +10 -1
  296. package/es/components/select/src/useSelect.d.ts +1 -1
  297. package/es/components/select/src/useSelect.mjs +7 -5
  298. package/es/components/select/src/useSelect.mjs.map +1 -1
  299. package/es/components/select-v2/index.d.ts +20 -2
  300. package/es/components/select-v2/src/defaults.d.ts +4 -0
  301. package/es/components/select-v2/src/defaults.mjs +4 -0
  302. package/es/components/select-v2/src/defaults.mjs.map +1 -1
  303. package/es/components/select-v2/src/select.mjs +53 -3
  304. package/es/components/select-v2/src/select.mjs.map +1 -1
  305. package/es/components/select-v2/src/select.vue.d.ts +10 -1
  306. package/es/components/slider/src/index.mjs +2 -1
  307. package/es/components/slider/src/index.mjs.map +1 -1
  308. package/es/components/table/src/config.d.ts +2 -1
  309. package/es/components/table/src/config.mjs +6 -2
  310. package/es/components/table/src/config.mjs.map +1 -1
  311. package/es/components/table/src/store/expand.mjs +0 -1
  312. package/es/components/table/src/store/expand.mjs.map +1 -1
  313. package/es/components/table/src/table/defaults.d.ts +3 -1
  314. package/es/components/table/src/table/defaults.mjs.map +1 -1
  315. package/es/components/table/src/table/style-helper.mjs +2 -2
  316. package/es/components/table/src/table/style-helper.mjs.map +1 -1
  317. package/es/components/table/src/table-body/render-helper.mjs +28 -21
  318. package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
  319. package/es/components/table/src/table-body/styles-helper.mjs +0 -3
  320. package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
  321. package/es/components/table/src/util.mjs +2 -0
  322. package/es/components/table/src/util.mjs.map +1 -1
  323. package/es/components/tabs/src/tab-pane2.mjs +1 -1
  324. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  325. package/es/components/time-select/index.d.ts +4 -4
  326. package/es/components/time-select/src/time-select.vue.d.ts +2 -2
  327. package/es/components/tooltip/src/content.vue.d.ts +3 -3
  328. package/es/components/tooltip/src/tooltip2.mjs +6 -1
  329. package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
  330. package/es/components/upload/index.d.ts +22 -18
  331. package/es/components/upload/src/upload-content.d.ts +1 -1
  332. package/es/components/upload/src/upload-content.mjs +5 -0
  333. package/es/components/upload/src/upload-content.mjs.map +1 -1
  334. package/es/components/upload/src/upload-content.vue.d.ts +4 -4
  335. package/es/components/upload/src/upload-list2.mjs +31 -25
  336. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  337. package/es/components/upload/src/upload.d.ts +5 -4
  338. package/es/components/upload/src/upload.mjs.map +1 -1
  339. package/es/components/upload/src/upload.vue.d.ts +67 -61
  340. package/es/components/upload/src/upload2.mjs +53 -33
  341. package/es/components/upload/src/upload2.mjs.map +1 -1
  342. package/es/components/upload/src/use-handlers.d.ts +3 -3
  343. package/es/components/upload/src/use-handlers.mjs +5 -4
  344. package/es/components/upload/src/use-handlers.mjs.map +1 -1
  345. package/es/components/virtual-list/src/hooks/use-grid-wheel.mjs +2 -2
  346. package/es/components/virtual-list/src/hooks/use-grid-wheel.mjs.map +1 -1
  347. package/es/components/virtual-list/src/hooks/use-wheel.mjs +2 -2
  348. package/es/components/virtual-list/src/hooks/use-wheel.mjs.map +1 -1
  349. package/es/components/virtual-list/src/utils.d.ts +0 -1
  350. package/es/components/virtual-list/src/utils.mjs +1 -3
  351. package/es/components/virtual-list/src/utils.mjs.map +1 -1
  352. package/es/index.d.ts +1 -0
  353. package/es/index.mjs +1 -0
  354. package/es/index.mjs.map +1 -1
  355. package/es/version.d.ts +1 -1
  356. package/es/version.mjs +1 -1
  357. package/es/version.mjs.map +1 -1
  358. package/lib/components/autocomplete/index.d.ts +621 -50
  359. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +621 -50
  360. package/lib/components/autocomplete/src/autocomplete2.js +7 -6
  361. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  362. package/lib/components/calendar/src/date-table2.js +2 -2
  363. package/lib/components/calendar/src/date-table2.js.map +1 -1
  364. package/lib/components/cascader/index.d.ts +522 -176
  365. package/lib/components/cascader/src/index.js +62 -8
  366. package/lib/components/cascader/src/index.js.map +1 -1
  367. package/lib/components/cascader/src/index.vue.d.ts +262 -88
  368. package/lib/components/cascader-panel/src/index.js +1 -1
  369. package/lib/components/cascader-panel/src/index.js.map +1 -1
  370. package/lib/components/cascader-panel/src/types.d.ts +1 -0
  371. package/lib/components/cascader-panel/src/types.js.map +1 -1
  372. package/lib/components/divider/index.d.ts +7 -0
  373. package/lib/components/divider/src/divider.vue.d.ts +7 -0
  374. package/lib/components/divider/src/divider2.js +20 -22
  375. package/lib/components/divider/src/divider2.js.map +1 -1
  376. package/lib/components/dropdown/index.d.ts +1 -1
  377. package/lib/components/dropdown/src/dropdown.vue.d.ts +1 -1
  378. package/lib/components/input/index.d.ts +125 -45
  379. package/lib/components/input/src/input.d.ts +4 -3
  380. package/lib/components/input/src/input.js +5 -1
  381. package/lib/components/input/src/input.js.map +1 -1
  382. package/lib/components/input/src/input.vue.d.ts +125 -45
  383. package/lib/components/input/src/input2.js +271 -291
  384. package/lib/components/input/src/input2.js.map +1 -1
  385. package/lib/components/input/src/{calc-textarea-height.d.ts → utils.d.ts} +0 -0
  386. package/lib/components/input/src/{calc-textarea-height.js → utils.js} +1 -1
  387. package/lib/components/input/src/utils.js.map +1 -0
  388. package/lib/components/input-number/index.d.ts +250 -90
  389. package/lib/components/input-number/src/input-number.vue.d.ts +250 -90
  390. package/lib/components/link/index.d.ts +42 -0
  391. package/lib/components/link/src/link.vue.d.ts +42 -0
  392. package/lib/components/link/src/link2.js +37 -41
  393. package/lib/components/link/src/link2.js.map +1 -1
  394. package/lib/components/message/src/message-method.js +2 -2
  395. package/lib/components/message/src/message-method.js.map +1 -1
  396. package/lib/components/message/src/message.d.ts +1 -1
  397. package/lib/components/message/src/message.js +5 -1
  398. package/lib/components/message/src/message.js.map +1 -1
  399. package/lib/components/message/src/message.vue.d.ts +9 -3
  400. package/lib/components/pagination/src/components/pager.js +24 -5
  401. package/lib/components/pagination/src/components/pager.js.map +1 -1
  402. package/lib/components/popover/index.d.ts +2 -2
  403. package/lib/components/popover/src/index.vue.d.ts +1 -1
  404. package/lib/components/popper/src/content.vue.d.ts +2 -2
  405. package/lib/components/rate/index.d.ts +3 -3
  406. package/lib/components/rate/src/rate.d.ts +1 -1
  407. package/lib/components/rate/src/rate.js +1 -1
  408. package/lib/components/rate/src/rate.js.map +1 -1
  409. package/lib/components/rate/src/rate.vue.d.ts +3 -3
  410. package/lib/components/rate/src/rate2.js +1 -1
  411. package/lib/components/rate/src/rate2.js.map +1 -1
  412. package/lib/components/scrollbar/src/thumb.vue.d.ts +1 -1
  413. package/lib/components/select/index.d.ts +10 -1
  414. package/lib/components/select/src/option.js +5 -4
  415. package/lib/components/select/src/option.js.map +1 -1
  416. package/lib/components/select/src/select.js +56 -3
  417. package/lib/components/select/src/select.js.map +1 -1
  418. package/lib/components/select/src/select.vue.d.ts +10 -1
  419. package/lib/components/select/src/useSelect.d.ts +1 -1
  420. package/lib/components/select/src/useSelect.js +7 -5
  421. package/lib/components/select/src/useSelect.js.map +1 -1
  422. package/lib/components/select-v2/index.d.ts +20 -2
  423. package/lib/components/select-v2/src/defaults.d.ts +4 -0
  424. package/lib/components/select-v2/src/defaults.js +4 -0
  425. package/lib/components/select-v2/src/defaults.js.map +1 -1
  426. package/lib/components/select-v2/src/select.js +53 -3
  427. package/lib/components/select-v2/src/select.js.map +1 -1
  428. package/lib/components/select-v2/src/select.vue.d.ts +10 -1
  429. package/lib/components/slider/src/index.js +2 -1
  430. package/lib/components/slider/src/index.js.map +1 -1
  431. package/lib/components/table/src/config.d.ts +2 -1
  432. package/lib/components/table/src/config.js +6 -2
  433. package/lib/components/table/src/config.js.map +1 -1
  434. package/lib/components/table/src/store/expand.js +0 -1
  435. package/lib/components/table/src/store/expand.js.map +1 -1
  436. package/lib/components/table/src/table/defaults.d.ts +3 -1
  437. package/lib/components/table/src/table/defaults.js.map +1 -1
  438. package/lib/components/table/src/table/style-helper.js +2 -2
  439. package/lib/components/table/src/table/style-helper.js.map +1 -1
  440. package/lib/components/table/src/table-body/render-helper.js +28 -21
  441. package/lib/components/table/src/table-body/render-helper.js.map +1 -1
  442. package/lib/components/table/src/table-body/styles-helper.js +0 -3
  443. package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
  444. package/lib/components/table/src/util.js +6 -0
  445. package/lib/components/table/src/util.js.map +1 -1
  446. package/lib/components/tabs/src/tab-pane2.js +1 -1
  447. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  448. package/lib/components/time-select/index.d.ts +4 -4
  449. package/lib/components/time-select/src/time-select.vue.d.ts +2 -2
  450. package/lib/components/tooltip/src/content.vue.d.ts +3 -3
  451. package/lib/components/tooltip/src/tooltip2.js +5 -0
  452. package/lib/components/tooltip/src/tooltip2.js.map +1 -1
  453. package/lib/components/upload/index.d.ts +22 -18
  454. package/lib/components/upload/src/upload-content.d.ts +1 -1
  455. package/lib/components/upload/src/upload-content.js +5 -0
  456. package/lib/components/upload/src/upload-content.js.map +1 -1
  457. package/lib/components/upload/src/upload-content.vue.d.ts +4 -4
  458. package/lib/components/upload/src/upload-list2.js +30 -24
  459. package/lib/components/upload/src/upload-list2.js.map +1 -1
  460. package/lib/components/upload/src/upload.d.ts +5 -4
  461. package/lib/components/upload/src/upload.js.map +1 -1
  462. package/lib/components/upload/src/upload.vue.d.ts +67 -61
  463. package/lib/components/upload/src/upload2.js +52 -32
  464. package/lib/components/upload/src/upload2.js.map +1 -1
  465. package/lib/components/upload/src/use-handlers.d.ts +3 -3
  466. package/lib/components/upload/src/use-handlers.js +5 -4
  467. package/lib/components/upload/src/use-handlers.js.map +1 -1
  468. package/lib/components/virtual-list/src/hooks/use-grid-wheel.js +2 -2
  469. package/lib/components/virtual-list/src/hooks/use-grid-wheel.js.map +1 -1
  470. package/lib/components/virtual-list/src/hooks/use-wheel.js +2 -2
  471. package/lib/components/virtual-list/src/hooks/use-wheel.js.map +1 -1
  472. package/lib/components/virtual-list/src/utils.d.ts +0 -1
  473. package/lib/components/virtual-list/src/utils.js +0 -3
  474. package/lib/components/virtual-list/src/utils.js.map +1 -1
  475. package/lib/index.d.ts +1 -0
  476. package/lib/index.js +9 -0
  477. package/lib/index.js.map +1 -1
  478. package/lib/version.d.ts +1 -1
  479. package/lib/version.js +1 -1
  480. package/lib/version.js.map +1 -1
  481. package/package.json +7 -6
  482. package/tags.json +1 -1
  483. package/theme-chalk/base.css +1 -1
  484. package/theme-chalk/el-carousel.css +1 -1
  485. package/theme-chalk/el-cascader.css +1 -1
  486. package/theme-chalk/el-collapse.css +1 -1
  487. package/theme-chalk/el-date-picker.css +1 -1
  488. package/theme-chalk/el-link.css +1 -1
  489. package/theme-chalk/el-menu.css +1 -1
  490. package/theme-chalk/el-pagination.css +1 -1
  491. package/theme-chalk/el-select.css +1 -1
  492. package/theme-chalk/el-slider.css +1 -1
  493. package/theme-chalk/el-time-picker.css +1 -1
  494. package/theme-chalk/el-time-select.css +1 -1
  495. package/theme-chalk/el-tree.css +1 -1
  496. package/theme-chalk/el-upload.css +1 -1
  497. package/theme-chalk/index.css +1 -1
  498. package/theme-chalk/src/carousel.scss +3 -0
  499. package/theme-chalk/src/cascader.scss +14 -0
  500. package/theme-chalk/src/common/transition.scss +6 -1
  501. package/theme-chalk/src/common/var.scss +2 -2
  502. package/theme-chalk/src/link.scss +28 -24
  503. package/theme-chalk/src/menu.scss +4 -0
  504. package/theme-chalk/src/mixins/_var.scss +1 -5
  505. package/theme-chalk/src/mixins/config.scss +1 -0
  506. package/theme-chalk/src/mixins/function.scss +16 -0
  507. package/theme-chalk/src/mixins/utils.scss +6 -0
  508. package/theme-chalk/src/pagination.scss +8 -8
  509. package/theme-chalk/src/select.scss +14 -0
  510. package/theme-chalk/src/slider.scss +1 -1
  511. package/theme-chalk/src/upload.scss +130 -118
  512. package/web-types.json +1 -1
  513. package/es/components/input/src/calc-textarea-height.mjs.map +0 -1
  514. package/lib/components/input/src/calc-textarea-height.js.map +0 -1
@@ -50,6 +50,33 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
50
50
  handleStart,
51
51
  handleRemove
52
52
  });
53
+ const slots = vue.useSlots();
54
+ const uploadContentProps = vue.computed(() => ({
55
+ type: props.type,
56
+ drag: props.drag,
57
+ action: props.action,
58
+ multiple: props.multiple,
59
+ withCredentials: props.withCredentials,
60
+ headers: props.headers,
61
+ method: props.method,
62
+ name: props.name,
63
+ data: props.data,
64
+ accept: props.accept,
65
+ autoUpload: props.autoUpload,
66
+ listType: props.listType,
67
+ disabled: props.disabled,
68
+ limit: props.limit,
69
+ fileList: props.fileList,
70
+ showFileList: props.showFileList,
71
+ httpRequest: props.httpRequest,
72
+ beforeUpload: props.beforeUpload,
73
+ onExceed: props.onExceed,
74
+ onStart: handleStart,
75
+ onProgress: handleProgress,
76
+ onSuccess: handleSuccess,
77
+ onError: handleError,
78
+ onRemove: handleRemove
79
+ }));
53
80
  return (_ctx, _cache) => {
54
81
  return vue.openBlock(), vue.createElementBlock("div", null, [
55
82
  vue.unref(isPictureCard) && _ctx.showFileList ? (vue.openBlock(), vue.createBlock(uploadList["default"], {
@@ -59,7 +86,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
59
86
  files: vue.unref(uploadFiles),
60
87
  "handle-preview": _ctx.onPreview,
61
88
  onRemove: vue.unref(handleRemove)
62
- }, vue.createSlots({ _: 2 }, [
89
+ }, vue.createSlots({
90
+ append: vue.withCtx(() => [
91
+ _ctx.listType === "picture-card" ? (vue.openBlock(), vue.createBlock(uploadContent["default"], vue.mergeProps({
92
+ key: 0,
93
+ ref_key: "uploadRef",
94
+ ref: uploadRef
95
+ }, vue.unref(uploadContentProps)), {
96
+ default: vue.withCtx(() => [
97
+ vue.unref(slots).trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
98
+ !vue.unref(slots).trigger && vue.unref(slots).default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
99
+ ]),
100
+ _: 3
101
+ }, 16)) : vue.createCommentVNode("v-if", true)
102
+ ]),
103
+ _: 2
104
+ }, [
63
105
  _ctx.$slots.file ? {
64
106
  name: "default",
65
107
  fn: vue.withCtx(({ file }) => [
@@ -67,43 +109,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
67
109
  ])
68
110
  } : void 0
69
111
  ]), 1032, ["disabled", "list-type", "files", "handle-preview", "onRemove"])) : vue.createCommentVNode("v-if", true),
70
- vue.createVNode(uploadContent["default"], {
112
+ _ctx.listType !== "picture-card" ? (vue.openBlock(), vue.createBlock(uploadContent["default"], vue.mergeProps({
113
+ key: 1,
71
114
  ref_key: "uploadRef",
72
- ref: uploadRef,
73
- type: _ctx.type,
74
- drag: _ctx.drag,
75
- action: _ctx.action,
76
- multiple: _ctx.multiple,
77
- "with-credentials": _ctx.withCredentials,
78
- headers: _ctx.headers,
79
- method: _ctx.method,
80
- name: _ctx.name,
81
- data: _ctx.data,
82
- accept: _ctx.accept,
83
- "file-list": vue.unref(uploadFiles),
84
- "auto-upload": _ctx.autoUpload,
85
- "list-type": _ctx.listType,
86
- disabled: vue.unref(disabled),
87
- limit: _ctx.limit,
88
- "http-request": _ctx.httpRequest,
89
- "before-upload": _ctx.beforeUpload,
90
- "on-exceed": _ctx.onExceed,
91
- "on-start": vue.unref(handleStart),
92
- "on-progress": vue.unref(handleProgress),
93
- "on-success": vue.unref(handleSuccess),
94
- "on-error": vue.unref(handleError),
95
- "on-remove": vue.unref(handleRemove)
96
- }, {
115
+ ref: uploadRef
116
+ }, vue.unref(uploadContentProps)), {
97
117
  default: vue.withCtx(() => [
98
- _ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
99
- !_ctx.$slots.trigger && _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
118
+ vue.unref(slots).trigger ? vue.renderSlot(_ctx.$slots, "trigger", { key: 0 }) : vue.createCommentVNode("v-if", true),
119
+ !vue.unref(slots).trigger && vue.unref(slots).default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true)
100
120
  ]),
101
121
  _: 3
102
- }, 8, ["type", "drag", "action", "multiple", "with-credentials", "headers", "method", "name", "data", "accept", "file-list", "auto-upload", "list-type", "disabled", "limit", "http-request", "before-upload", "on-exceed", "on-start", "on-progress", "on-success", "on-error", "on-remove"]),
103
- _ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }) : vue.createCommentVNode("v-if", true),
122
+ }, 16)) : vue.createCommentVNode("v-if", true),
123
+ _ctx.$slots.trigger ? vue.renderSlot(_ctx.$slots, "default", { key: 2 }) : vue.createCommentVNode("v-if", true),
104
124
  vue.renderSlot(_ctx.$slots, "tip"),
105
125
  !vue.unref(isPictureCard) && _ctx.showFileList ? (vue.openBlock(), vue.createBlock(uploadList["default"], {
106
- key: 2,
126
+ key: 3,
107
127
  disabled: vue.unref(disabled),
108
128
  "list-type": _ctx.listType,
109
129
  files: vue.unref(uploadFiles),
@@ -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\"></slot>\n </template>\n </upload-list>\n <upload-content\n ref=\"uploadRef\"\n :type=\"type\"\n :drag=\"drag\"\n :action=\"action\"\n :multiple=\"multiple\"\n :with-credentials=\"withCredentials\"\n :headers=\"headers\"\n :method=\"method\"\n :name=\"name\"\n :data=\"data\"\n :accept=\"accept\"\n :file-list=\"uploadFiles\"\n :auto-upload=\"autoUpload\"\n :list-type=\"listType\"\n :disabled=\"disabled\"\n :limit=\"limit\"\n :http-request=\"httpRequest\"\n :before-upload=\"beforeUpload\"\n :on-exceed=\"onExceed\"\n :on-start=\"handleStart\"\n :on-progress=\"handleProgress\"\n :on-success=\"handleSuccess\"\n :on-error=\"handleError\"\n :on-remove=\"handleRemove\"\n >\n <template #default>\n <slot v-if=\"$slots.trigger\" name=\"trigger\" />\n <slot v-if=\"!$slots.trigger && $slots.default\" />\n </template>\n </upload-content>\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<script lang=\"ts\" setup>\nimport { computed, provide, onBeforeUnmount, toRef, shallowRef } from 'vue'\nimport { uploadContextKey } from '@element-plus/tokens'\nimport { useDisabled } from '@element-plus/hooks'\n\nimport UploadList from './upload-list.vue'\nimport UploadContent from './upload-content.vue'\nimport { useHandlers } from './use-handlers'\nimport { uploadProps } from './upload'\nimport type { UploadContentInstance } from './upload-content'\n\ndefineOptions({\n name: 'ElUpload',\n})\n\nconst props = defineProps(uploadProps)\nconst disabled = useDisabled()\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\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":["useDisabled","shallowRef","useHandlers","computed","onBeforeUnmount","provide","uploadContextKey","toRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6EA,IAAA,MAAA,QAAA,GAAAA,iBAAA,EAAA,CAAA;AAEA,IAAA,MAAA,SAAA,GAAAC,cAAA,EAAA,CAAA;AACA,IAAA,MAAA;AAAA,MACA,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,KAAA,GACAC,wBAAA,KAAA,EAAA,SAAA,CAAA,CAAA;AAEA,IAAA,MAAA,aAAA,GAAAC,YAAA,CAAA,MAAA,KAAA,CAAA,QAAA,KAAA,cAAA,CAAA,CAAA;AAEA,IAAAC,mBAAA,CAAA,MAAA;AACA,MAAA,WAAA,CAAA,KAAA,CAAA,OAAA,CAAA,CAAA,EAAA,GAAA,EAAA,KAAA;AACA,QAAA,IAAA,OAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,UAAA,CAAA,OAAA,CAAA;AAAA,UAAA,GAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA;AAAA,OAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAIA,IAAAC,WAAA,CAAAC,yBAAA,EAAA;AAAA,MACA,MAAA,EAAAC,UAAA,KAAA,EAAA,QAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAGA,IAAA,MAAA,CAAA;AAAA,MAEA,KAAA;AAAA,MAEA,MAAA;AAAA,MAEA,UAAA;AAAA,MAEA,WAAA;AAAA,MAEA,YAAA;AAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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\"></slot>\n </template>\n <template #append>\n <upload-content\n v-if=\"listType === 'picture-card'\"\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 </template>\n </upload-list>\n\n <upload-content\n v-if=\"listType !== 'picture-card'\"\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 provide,\n onBeforeUnmount,\n toRef,\n shallowRef,\n useSlots,\n} from 'vue'\nimport { uploadContextKey } from '@element-plus/tokens'\nimport { useDisabled } from '@element-plus/hooks'\n\nimport UploadList from './upload-list.vue'\nimport UploadContent from './upload-content.vue'\nimport { useHandlers } from './use-handlers'\nimport { uploadProps, type UploadFiles } from './upload'\nimport type {\n UploadContentInstance,\n UploadContentProps,\n} from './upload-content'\n\ndefineOptions({\n name: 'ElUpload',\n})\n\nconst props = defineProps(uploadProps)\nconst disabled = useDisabled()\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\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\nconst slots = useSlots()\n\n// did not use `defineComponent` for performance\nconst uploadContentProps = computed<UploadContentProps>(() => ({\n type: props.type,\n drag: props.drag,\n action: props.action,\n multiple: props.multiple,\n withCredentials: props.withCredentials,\n headers: props.headers,\n method: props.method,\n name: props.name,\n data: props.data,\n accept: props.accept,\n autoUpload: props.autoUpload,\n listType: props.listType,\n disabled: props.disabled,\n limit: props.limit,\n fileList: props.fileList as UploadFiles,\n showFileList: props.showFileList,\n httpRequest: props.httpRequest,\n beforeUpload: props.beforeUpload,\n onExceed: props.onExceed,\n onStart: handleStart,\n onProgress: handleProgress,\n onSuccess: handleSuccess,\n onError: handleError,\n onRemove: handleRemove,\n}))\n</script>\n"],"names":["useDisabled","shallowRef","useHandlers","computed","onBeforeUnmount","provide","uploadContextKey","toRef","useSlots"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6EA,IAAA,MAAA,QAAA,GAAAA,iBAAA,EAAA,CAAA;AAEA,IAAA,MAAA,SAAA,GAAAC,cAAA,EAAA,CAAA;AACA,IAAA,MAAA;AAAA,MACA,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,KAAA,GACAC,wBAAA,KAAA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,OAAA,KAAA,CAAA,KAAA;AAAA,MACA,UAAA,KAAA,CAAA,QAAA;AAAA,MACA,cAAA,KAAA,CAAA,YAAA;AAAA,MACA,aAAA,KAAA,CAAA,WAAA;AAAA,MACA,cAAA,KAAA,CAAA,YAAA;AAAA,MACA,UAAA,KAAA,CAAA,QAAA;AAAA,MACA,OAAA,EAAA,WAAA;AAAA,MACA,UAAA,EAAA,cAAA;AAAA,MACA,SAAA,EAAA,aAAA;AAAA,MACA,OAAA,EAAA,WAAA;AAAA,MACA,QAAA,EAAA,YAAA;AAAA,KAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -15,11 +15,11 @@ export declare const useHandlers: (props: UploadProps, uploadRef: ShallowRef<Upl
15
15
  name: string;
16
16
  percentage?: number | undefined;
17
17
  status: UploadStatus;
18
- size: number;
18
+ size?: number | undefined;
19
19
  response?: unknown;
20
20
  uid: number;
21
21
  url?: string | undefined;
22
- raw: {
22
+ raw?: {
23
23
  uid: number;
24
24
  readonly lastModified: number;
25
25
  readonly name: string;
@@ -42,6 +42,6 @@ export declare const useHandlers: (props: UploadProps, uploadRef: ShallowRef<Upl
42
42
  (): Promise<string>;
43
43
  (): Promise<string>;
44
44
  };
45
- };
45
+ } | undefined;
46
46
  }[]>;
47
47
  };
@@ -41,7 +41,7 @@ const useHandlers = (props, uploadRef) => {
41
41
  return;
42
42
  props.onProgress(evt, file, uploadFiles.value);
43
43
  file.status = "uploading";
44
- file.percentage = evt.percent;
44
+ file.percentage = Math.round(evt.percent);
45
45
  };
46
46
  const handleSuccess = (response, rawFile) => {
47
47
  const file = getFile(rawFile);
@@ -104,7 +104,7 @@ const useHandlers = (props, uploadRef) => {
104
104
  function submit() {
105
105
  uploadFiles.value.filter(({ status }) => status === "ready").forEach(({ raw }) => {
106
106
  var _a;
107
- return (_a = uploadRef.value) == null ? void 0 : _a.upload(raw);
107
+ return raw && ((_a = uploadRef.value) == null ? void 0 : _a.upload(raw));
108
108
  });
109
109
  }
110
110
  vue.watch(() => props.listType, (val) => {
@@ -125,10 +125,11 @@ const useHandlers = (props, uploadRef) => {
125
125
  });
126
126
  vue.watch(() => props.fileList, (fileList) => {
127
127
  for (const file of fileList) {
128
- file.uid = upload.genFileId();
128
+ file.uid || (file.uid = upload.genFileId());
129
129
  file.status || (file.status = "success");
130
130
  }
131
- }, { immediate: true });
131
+ uploadFiles.value = fileList;
132
+ }, { immediate: true, deep: true });
132
133
  return {
133
134
  abort,
134
135
  clearFiles,
@@ -1 +1 @@
1
- {"version":3,"file":"use-handlers.js","sources":["../../../../../../packages/components/upload/src/use-handlers.ts"],"sourcesContent":["import { ref, watch } from 'vue'\nimport { debugWarn, throwError } from '@element-plus/utils'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { genFileId } from './upload'\nimport type { ShallowRef } from 'vue'\nimport type {\n UploadContentProps,\n UploadContentInstance,\n} from './upload-content'\nimport type {\n UploadRawFile,\n UploadFile,\n UploadProps,\n UploadStatus,\n UploadFiles,\n} from './upload'\n\nconst SCOPE = 'ElUpload'\n\nconst revokeObjectURL = (file: UploadFile) => {\n if (file.url?.startsWith('blob:')) {\n URL.revokeObjectURL(file.url)\n }\n}\n\nexport const useHandlers = (\n props: UploadProps,\n uploadRef: ShallowRef<UploadContentInstance | undefined>\n) => {\n const uploadFiles = ref<UploadFiles>([])\n\n const getFile = (rawFile: UploadRawFile) =>\n uploadFiles.value.find((file) => file.uid === rawFile.uid)\n\n function abort(file: UploadFile) {\n uploadRef.value?.abort(file)\n }\n\n function clearFiles(\n /** @default ['ready', 'uploading', 'success', 'fail'] */\n states: UploadStatus[] = ['ready', 'uploading', 'success', 'fail']\n ) {\n uploadFiles.value = uploadFiles.value.filter(\n (row) => !states.includes(row.status)\n )\n }\n\n const handleError: UploadContentProps['onError'] = (err, rawFile) => {\n const file = getFile(rawFile)\n if (!file) return\n\n file.status = 'fail'\n uploadFiles.value.splice(uploadFiles.value.indexOf(file), 1)\n props.onError(err, file, uploadFiles.value)\n props.onChange(file, uploadFiles.value)\n }\n\n const handleProgress: UploadContentProps['onProgress'] = (evt, rawFile) => {\n const file = getFile(rawFile)\n if (!file) return\n\n props.onProgress(evt, file, uploadFiles.value)\n file.status = 'uploading'\n file.percentage = evt.percent\n }\n\n const handleSuccess: UploadContentProps['onSuccess'] = (\n response,\n rawFile\n ) => {\n const file = getFile(rawFile)\n if (!file) return\n\n file.status = 'success'\n file.response = response\n props.onSuccess(response, file, uploadFiles.value)\n props.onChange(file, uploadFiles.value)\n }\n\n const handleStart: UploadContentProps['onStart'] = (file) => {\n const uploadFile: UploadFile = {\n name: file.name,\n percentage: 0,\n status: 'ready',\n size: file.size,\n raw: file,\n uid: file.uid,\n }\n if (props.listType === 'picture-card' || props.listType === 'picture') {\n try {\n uploadFile.url = URL.createObjectURL(file)\n } catch (err: unknown) {\n debugWarn(SCOPE, (err as Error).message)\n props.onError(err as Error, uploadFile, uploadFiles.value)\n }\n }\n uploadFiles.value.push(uploadFile)\n props.onChange(uploadFile, uploadFiles.value)\n }\n\n const handleRemove: UploadContentProps['onRemove'] = async (\n file,\n rawFile // TODO: deprecated in 2.2\n ): Promise<void> => {\n if (rawFile) {\n useDeprecated(\n {\n scope: SCOPE,\n from: 'handleRemove second argument',\n version: '2.2',\n replacement: 'first argument `file`',\n ref: 'https://element-plus.org/en-US/component/upload.html#methods',\n },\n true\n )\n }\n\n const _file = rawFile || file\n const uploadFile = _file instanceof File ? getFile(_file) : _file\n if (!uploadFile) throwError(SCOPE, 'file to be removed not found')\n\n const doRemove = (file: UploadFile) => {\n abort(file)\n const fileList = uploadFiles.value\n fileList.splice(fileList.indexOf(file), 1)\n props.onRemove(file, fileList)\n revokeObjectURL(file)\n }\n\n if (props.beforeRemove) {\n const before = await props.beforeRemove(uploadFile, uploadFiles.value)\n if (before !== false) doRemove(uploadFile)\n } else {\n doRemove(uploadFile)\n }\n }\n\n function submit() {\n uploadFiles.value\n .filter(({ status }) => status === 'ready')\n .forEach(({ raw }) => uploadRef.value?.upload(raw))\n }\n\n watch(\n () => props.listType,\n (val) => {\n if (val !== 'picture-card' && val !== 'picture') {\n return\n }\n\n uploadFiles.value = uploadFiles.value.map((file) => {\n const { raw, url } = file\n if (!url && raw) {\n try {\n file.url = URL.createObjectURL(raw)\n } catch (err: unknown) {\n props.onError(err as Error, file, uploadFiles.value)\n }\n }\n return file\n })\n }\n )\n\n watch(\n () => props.fileList,\n (fileList) => {\n for (const file of fileList) {\n file.uid = genFileId()\n file.status ||= 'success'\n }\n },\n { immediate: true }\n )\n\n return {\n abort,\n clearFiles,\n handleError,\n handleProgress,\n handleStart,\n handleSuccess,\n handleRemove,\n submit,\n uploadFiles,\n }\n}\n"],"names":["ref","debugWarn","useDeprecated","throwError","watch","genFileId"],"mappings":";;;;;;;;;;;AAIA,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,eAAe,GAAG,CAAC,IAAI,KAAK;AAClC,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;AACjE,IAAI,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClC,GAAG;AACH,CAAC,CAAC;AACU,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK;AACjD,EAAE,MAAM,WAAW,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAC9B,EAAE,MAAM,OAAO,GAAG,CAAC,OAAO,KAAK,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1F,EAAE,SAAS,KAAK,CAAC,IAAI,EAAE;AACvB,IAAI,IAAI,EAAE,CAAC;AACX,I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,IAAI,CAAC;AAClB,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC;AACL,EAAEA,SAAK,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,KAAK;AAC5C,IAAI,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;AACjC,MAAM,IAAI,CAAC,GAAG,GAAGC,gBAAS,EAAE,CAAC;AAC7B,MAAM,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAC/C,KAAK;AACL,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1B,EAAE,OAAO;AACT,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-handlers.js","sources":["../../../../../../packages/components/upload/src/use-handlers.ts"],"sourcesContent":["import { ref, watch } from 'vue'\nimport { debugWarn, throwError } from '@element-plus/utils'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { genFileId } from './upload'\nimport type { ShallowRef } from 'vue'\nimport type {\n UploadContentProps,\n UploadContentInstance,\n} from './upload-content'\nimport type {\n UploadRawFile,\n UploadFile,\n UploadProps,\n UploadStatus,\n UploadFiles,\n} from './upload'\n\nconst SCOPE = 'ElUpload'\n\nconst revokeObjectURL = (file: UploadFile) => {\n if (file.url?.startsWith('blob:')) {\n URL.revokeObjectURL(file.url)\n }\n}\n\nexport const useHandlers = (\n props: UploadProps,\n uploadRef: ShallowRef<UploadContentInstance | undefined>\n) => {\n const uploadFiles = ref<UploadFiles>([])\n\n const getFile = (rawFile: UploadRawFile) =>\n uploadFiles.value.find((file) => file.uid === rawFile.uid)\n\n function abort(file: UploadFile) {\n uploadRef.value?.abort(file)\n }\n\n function clearFiles(\n /** @default ['ready', 'uploading', 'success', 'fail'] */\n states: UploadStatus[] = ['ready', 'uploading', 'success', 'fail']\n ) {\n uploadFiles.value = uploadFiles.value.filter(\n (row) => !states.includes(row.status)\n )\n }\n\n const handleError: UploadContentProps['onError'] = (err, rawFile) => {\n const file = getFile(rawFile)\n if (!file) return\n\n file.status = 'fail'\n uploadFiles.value.splice(uploadFiles.value.indexOf(file), 1)\n props.onError(err, file, uploadFiles.value)\n props.onChange(file, uploadFiles.value)\n }\n\n const handleProgress: UploadContentProps['onProgress'] = (evt, rawFile) => {\n const file = getFile(rawFile)\n if (!file) return\n\n props.onProgress(evt, file, uploadFiles.value)\n file.status = 'uploading'\n file.percentage = Math.round(evt.percent)\n }\n\n const handleSuccess: UploadContentProps['onSuccess'] = (\n response,\n rawFile\n ) => {\n const file = getFile(rawFile)\n if (!file) return\n\n file.status = 'success'\n file.response = response\n props.onSuccess(response, file, uploadFiles.value)\n props.onChange(file, uploadFiles.value)\n }\n\n const handleStart: UploadContentProps['onStart'] = (file) => {\n const uploadFile: UploadFile = {\n name: file.name,\n percentage: 0,\n status: 'ready',\n size: file.size,\n raw: file,\n uid: file.uid,\n }\n if (props.listType === 'picture-card' || props.listType === 'picture') {\n try {\n uploadFile.url = URL.createObjectURL(file)\n } catch (err: unknown) {\n debugWarn(SCOPE, (err as Error).message)\n props.onError(err as Error, uploadFile, uploadFiles.value)\n }\n }\n uploadFiles.value.push(uploadFile)\n props.onChange(uploadFile, uploadFiles.value)\n }\n\n const handleRemove: UploadContentProps['onRemove'] = async (\n file,\n rawFile // TODO: deprecated in 2.2\n ): Promise<void> => {\n if (rawFile) {\n useDeprecated(\n {\n scope: SCOPE,\n from: 'handleRemove second argument',\n version: '2.2',\n replacement: 'first argument `file`',\n ref: 'https://element-plus.org/en-US/component/upload.html#methods',\n },\n true\n )\n }\n\n const _file = rawFile || file\n const uploadFile = _file instanceof File ? getFile(_file) : _file\n if (!uploadFile) throwError(SCOPE, 'file to be removed not found')\n\n const doRemove = (file: UploadFile) => {\n abort(file)\n const fileList = uploadFiles.value\n fileList.splice(fileList.indexOf(file), 1)\n props.onRemove(file, fileList)\n revokeObjectURL(file)\n }\n\n if (props.beforeRemove) {\n const before = await props.beforeRemove(uploadFile, uploadFiles.value)\n if (before !== false) doRemove(uploadFile)\n } else {\n doRemove(uploadFile)\n }\n }\n\n function submit() {\n uploadFiles.value\n .filter(({ status }) => status === 'ready')\n .forEach(({ raw }) => raw && uploadRef.value?.upload(raw))\n }\n\n watch(\n () => props.listType,\n (val) => {\n if (val !== 'picture-card' && val !== 'picture') {\n return\n }\n\n uploadFiles.value = uploadFiles.value.map((file) => {\n const { raw, url } = file\n if (!url && raw) {\n try {\n file.url = URL.createObjectURL(raw)\n } catch (err: unknown) {\n props.onError(err as Error, file, uploadFiles.value)\n }\n }\n return file\n })\n }\n )\n\n watch(\n () => props.fileList,\n (fileList) => {\n for (const file of fileList) {\n file.uid ||= genFileId()\n file.status ||= 'success'\n }\n uploadFiles.value = fileList as UploadFiles\n },\n { immediate: true, deep: true }\n )\n\n return {\n abort,\n clearFiles,\n handleError,\n handleProgress,\n handleStart,\n handleSuccess,\n handleRemove,\n submit,\n uploadFiles,\n }\n}\n"],"names":["ref","debugWarn","useDeprecated","throwError","watch","genFileId"],"mappings":";;;;;;;;;;;AAIA,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,eAAe,GAAG,CAAC,IAAI,KAAK;AAClC,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;AACjE,IAAI,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClC,GAAG;AACH,CAAC,CAAC;AACU,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK;AACjD,EAAE,MAAM,WAAW,GAAGA,OAAG,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AAChC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE;AACvB,QAAQ,IAAI;AACZ,UAAU,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9C,SAAS,CAAC,OAAO,GAAG,EAAE;AACtB,UAAU,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AACtD,SAAS;AACT,OAAO;AACP,MAAM,OAAO,IAAI,CAAC;AAClB,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC;AACL,EAAEA,SAAK,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,KAAK;AAC5C,IAAI,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE;AACjC,MAAM,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,GAAGC,gBAAS,EAAE,CAAC,CAAC;AAC3C,MAAM,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAC/C,KAAK;AACL,IAAI,WAAW,CAAC,KAAK,GAAG,QAAQ,CAAC;AACjC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACtC,EAAE,OAAO;AACT,IAAI,KAAK;AACT,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../../../utils/index.js');
6
- var utils = require('../utils.js');
7
6
  var raf = require('../../../../utils/raf.js');
7
+ var browser = require('../../../../utils/browser.js');
8
8
 
9
9
  const useGridWheel = ({ atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }, onWheelDelta) => {
10
10
  let frameHandle = null;
@@ -23,7 +23,7 @@ const useGridWheel = ({ atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }, on
23
23
  return;
24
24
  xOffset += x;
25
25
  yOffset += y;
26
- if (!utils.isFF) {
26
+ if (!browser.isFirefox()) {
27
27
  e.preventDefault();
28
28
  }
29
29
  frameHandle = raf.rAF(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"use-grid-wheel.js","sources":["../../../../../../../packages/components/virtual-list/src/hooks/use-grid-wheel.ts"],"sourcesContent":["import { rAF, cAF } from '@element-plus/utils'\nimport { isFF } from '../utils'\n\nimport type { ComputedRef } from 'vue'\n\ninterface GridWheelState {\n atXStartEdge: ComputedRef<boolean>\n atXEndEdge: ComputedRef<boolean>\n atYStartEdge: ComputedRef<boolean>\n atYEndEdge: ComputedRef<boolean>\n}\n\ntype GridWheelHandler = (x: number, y: number) => void\n\nexport const useGridWheel = (\n { atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }: GridWheelState,\n onWheelDelta: GridWheelHandler\n) => {\n let frameHandle: number | null = null\n let xOffset = 0\n let yOffset = 0\n\n const hasReachedEdge = (x: number, y: number) => {\n const xEdgeReached =\n (x < 0 && atXStartEdge.value) || (x > 0 && atXEndEdge.value)\n const yEdgeReached =\n (y < 0 && atYStartEdge.value) || (y > 0 && atYEndEdge.value)\n return xEdgeReached && yEdgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle!)\n\n const x = e.deltaX\n const y = e.deltaY\n\n if (\n hasReachedEdge(xOffset, yOffset) &&\n hasReachedEdge(xOffset + x, yOffset + y)\n )\n return\n\n xOffset += x\n yOffset += y\n\n if (!isFF) {\n e.preventDefault()\n }\n\n frameHandle = rAF(() => {\n onWheelDelta(xOffset, yOffset)\n xOffset = 0\n yOffset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWheel,\n }\n}\n"],"names":["cAF","isFF","rAF"],"mappings":";;;;;;;;AAEY,M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MAAM,OAAO,GAAG,CAAC,CAAC;AAClB,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-grid-wheel.js","sources":["../../../../../../../packages/components/virtual-list/src/hooks/use-grid-wheel.ts"],"sourcesContent":["import { rAF, cAF, isFirefox } from '@element-plus/utils'\n\nimport type { ComputedRef } from 'vue'\n\ninterface GridWheelState {\n atXStartEdge: ComputedRef<boolean>\n atXEndEdge: ComputedRef<boolean>\n atYStartEdge: ComputedRef<boolean>\n atYEndEdge: ComputedRef<boolean>\n}\n\ntype GridWheelHandler = (x: number, y: number) => void\n\nexport const useGridWheel = (\n { atXEndEdge, atXStartEdge, atYEndEdge, atYStartEdge }: GridWheelState,\n onWheelDelta: GridWheelHandler\n) => {\n let frameHandle: number | null = null\n let xOffset = 0\n let yOffset = 0\n\n const hasReachedEdge = (x: number, y: number) => {\n const xEdgeReached =\n (x < 0 && atXStartEdge.value) || (x > 0 && atXEndEdge.value)\n const yEdgeReached =\n (y < 0 && atYStartEdge.value) || (y > 0 && atYEndEdge.value)\n return xEdgeReached && yEdgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle!)\n\n const x = e.deltaX\n const y = e.deltaY\n\n if (\n hasReachedEdge(xOffset, yOffset) &&\n hasReachedEdge(xOffset + x, yOffset + y)\n )\n return\n\n xOffset += x\n yOffset += y\n\n if (!isFirefox()) {\n e.preventDefault()\n }\n\n frameHandle = rAF(() => {\n onWheelDelta(xOffset, yOffset)\n xOffset = 0\n yOffset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWheel,\n }\n}\n"],"names":["cAF","isFirefox","rAF"],"mappings":";;;;;;;;AACY,MAAC,YAAY,GAAG,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,YAAY,KAAK;AACtG,EAAE,IAA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Ac;AAClB,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../../../utils/index.js');
6
- var utils = require('../utils.js');
7
6
  var defaults = require('../defaults.js');
8
7
  var raf = require('../../../../utils/raf.js');
8
+ var browser = require('../../../../utils/browser.js');
9
9
 
10
10
  const LayoutKeys = {
11
11
  [defaults.HORIZONTAL]: "deltaX",
@@ -24,7 +24,7 @@ const useWheel = ({ atEndEdge, atStartEdge, layout }, onWheelDelta) => {
24
24
  if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset))
25
25
  return;
26
26
  offset += newOffset;
27
- if (!utils.isFF) {
27
+ if (!browser.isFirefox()) {
28
28
  e.preventDefault();
29
29
  }
30
30
  frameHandle = raf.rAF(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"use-wheel.js","sources":["../../../../../../../packages/components/virtual-list/src/hooks/use-wheel.ts"],"sourcesContent":["import { rAF, cAF } from '@element-plus/utils'\nimport { isFF } from '../utils'\nimport { HORIZONTAL, VERTICAL } from '../defaults'\n\nimport type { ComputedRef } from 'vue'\nimport type { LayoutDirection } from '../types'\n\nconst LayoutKeys = {\n [HORIZONTAL]: 'deltaX',\n [VERTICAL]: 'deltaY',\n}\n\ninterface ListWheelState {\n atStartEdge: ComputedRef<boolean> // exclusive to reachEnd\n atEndEdge: ComputedRef<boolean>\n layout: ComputedRef<LayoutDirection>\n}\n\ntype ListWheelHandler = (offset: number) => void\n\nconst useWheel = (\n { atEndEdge, atStartEdge, layout }: ListWheelState,\n onWheelDelta: ListWheelHandler\n) => {\n let frameHandle: number\n let offset = 0\n\n // let scrollLock = false\n // let lockHandle = null\n\n // const lockScroll = () => {\n // clearTimeout(lockHandle)\n // scrollLock = true\n // lockHandle = setTimeout(() => scrollLock = false, 50)\n // }\n\n const hasReachedEdge = (offset: number) => {\n const edgeReached =\n (offset < 0 && atStartEdge.value) || (offset > 0 && atEndEdge.value)\n\n return edgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle)\n\n const newOffset = e[LayoutKeys[layout.value]]\n\n if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset)) return\n\n offset += newOffset\n\n if (!isFF) {\n e.preventDefault()\n }\n\n frameHandle = rAF(() => {\n onWheelDelta(offset)\n offset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWheel,\n }\n}\n\nexport default useWheel\n"],"names":["HORIZONTAL","VERTICAL","cAF","isFF","rAF"],"mappings":";;;;;;;;;AAGA,MAAM,UAAU,GAAG;AACnB,EAAE,CAACA,mBAAU,GAAG,QAAQ;AACxB,EAAE,CAACC,iBAAQ,GAAG,QAAQ;AACtB,CAAC,CAAC;AACG,MAAC,QAAQ,GAAG,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,YAAY,KAAK;AACvE,EAAE,IAAI,WAAW,CAAC;AAClB,EAAE,IAAI,MAAM,GAAG,CAAC,CAAC;AACjB,EAAE,MAAM,cAAc,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,MAAM,WAAW,GAAG,OAAO,GAAG,CAAC,IAAI,WAAW,CAAC,KAAK,IAAI,OAAO,GAAG,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC;AAC3F,IAAI,OAAO,WAAW,CAAC;AACvB,GAAG,CAAC;AACJ,EAAE,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK;AACzB,IAAIC,OAAG,CAAC,WAAW,CAAC,CAAC;AACrB,IAAI,MAAM,SAAS,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,IAAI,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC;AACpE,MAAM,OAAO;AACb,IAAI,MAAM,IAAI,SAAS,CAAC;AACxB,IAAI,IAAI,CAACC,UAAI,EAAE;AACf,MAAM,CAAC,CAAC,cAAc,EAAE,CAAC;AACzB,KAAK;AACL,IAAI,WAAW,GAAGC,OAAG,CAAC,MAAM;AAC5B,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;AAC3B,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-wheel.js","sources":["../../../../../../../packages/components/virtual-list/src/hooks/use-wheel.ts"],"sourcesContent":["import { rAF, cAF, isFirefox } from '@element-plus/utils'\nimport { HORIZONTAL, VERTICAL } from '../defaults'\n\nimport type { ComputedRef } from 'vue'\nimport type { LayoutDirection } from '../types'\n\nconst LayoutKeys = {\n [HORIZONTAL]: 'deltaX',\n [VERTICAL]: 'deltaY',\n}\n\ninterface ListWheelState {\n atStartEdge: ComputedRef<boolean> // exclusive to reachEnd\n atEndEdge: ComputedRef<boolean>\n layout: ComputedRef<LayoutDirection>\n}\n\ntype ListWheelHandler = (offset: number) => void\n\nconst useWheel = (\n { atEndEdge, atStartEdge, layout }: ListWheelState,\n onWheelDelta: ListWheelHandler\n) => {\n let frameHandle: number\n let offset = 0\n\n // let scrollLock = false\n // let lockHandle = null\n\n // const lockScroll = () => {\n // clearTimeout(lockHandle)\n // scrollLock = true\n // lockHandle = setTimeout(() => scrollLock = false, 50)\n // }\n\n const hasReachedEdge = (offset: number) => {\n const edgeReached =\n (offset < 0 && atStartEdge.value) || (offset > 0 && atEndEdge.value)\n\n return edgeReached\n }\n\n const onWheel = (e: WheelEvent) => {\n cAF(frameHandle)\n\n const newOffset = e[LayoutKeys[layout.value]]\n\n if (hasReachedEdge(offset) && hasReachedEdge(offset + newOffset)) return\n\n offset += newOffset\n\n if (!isFirefox()) {\n e.preventDefault()\n }\n\n frameHandle = rAF(() => {\n onWheelDelta(offset)\n offset = 0\n })\n }\n\n return {\n hasReachedEdge,\n onWhe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AAG,CAAC;AACJ;;;;"}
@@ -10,4 +10,3 @@ export declare function renderThumbStyle({ move, size, bar }: {
10
10
  size: any;
11
11
  bar: any;
12
12
  }, layout: string): CSSProperties;
13
- export declare const isFF: boolean;
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var shared = require('@vue/shared');
6
5
  var defaults = require('./defaults.js');
7
6
 
8
7
  const getScrollDir = (prev, cur) => prev < cur ? defaults.FORWARD : defaults.BACKWARD;
@@ -55,12 +54,10 @@ function renderThumbStyle({ move, size, bar }, layout) {
55
54
  }
56
55
  return style;
57
56
  }
58
- const isFF = typeof navigator !== "undefined" && shared.isObject(navigator) && /Firefox/i.test(navigator.userAgent);
59
57
 
60
58
  exports.getRTLOffsetType = getRTLOffsetType;
61
59
  exports.getRelativePos = getRelativePos;
62
60
  exports.getScrollDir = getScrollDir;
63
- exports.isFF = isFF;
64
61
  exports.isHorizontal = isHorizontal;
65
62
  exports.isRTL = isRTL;
66
63
  exports.renderThumbStyle = renderThumbStyle;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../../packages/components/virtual-list/src/utils.ts"],"sourcesContent":["import { isObject } from '@vue/shared'\nimport {\n FORWARD,\n BACKWARD,\n LTR,\n RTL,\n HORIZONTAL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_DESC,\n RTL_OFFSET_POS_ASC,\n PageKey,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { RTLOffsetType, Direction, LayoutDirection } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\nexport function renderThumbStyle({ move, size, bar }, layout: string) {\n const style: CSSProperties = {}\n const translate = `translate${bar.axis}(${move}px)`\n\n style[bar.size] = size\n style.transform = translate\n style.msTransform = translate\n // polyfill\n ;(style as any).webkitTransform = translate\n\n if (layout === 'horizontal') {\n style.height = '100%'\n } else {\n style.width = '100%'\n }\n\n return style\n}\n\nexport const isFF =\n typeof navigator !== 'undefined' &&\n isObject(navigator) &&\n /Firefox/i.test(navigator.userAgent)\n"],"names":["FORWARD","BACKWARD","LTR","RTL","HORIZONTAL","RTL_OFFSET_POS_DESC","RTL_OFFSET_NAG","RTL_OFFSET_POS_ASC","PageKey","isObject"],"mappings":";;;;;;;AAYY,MAAC,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,GAAGA,gBAAO,GAAGC,kBAAS;AAC/D,MAAC,YAAY,GAAG,CAAC,GAAG,KAAK,GAAG,KAAKC,YAAG,IAAI,GAAG,KAAKC,YAAG,IAAI,GAAG,KAAKC,oBAAW;AAC1E,MAAC,KAAK,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ourcesContent":["import {\n FORWARD,\n BACKWARD,\n LTR,\n RTL,\n HORIZONTAL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_DESC,\n RTL_OFFSET_POS_ASC,\n PageKey,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { RTLOffsetType, Direction, LayoutDirection } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\nexport function renderThumbStyle({ move, size, bar }, layout: string) {\n const style: CSSProperties = {}\n const translate = `translate${bar.axis}(${move}px)`\n\n style[bar.size] = size\n style.transform = translate\n style.msTransform = translate\n // polyfill\n ;(style as any).webkitTransform = translate\n\n if (layout === 'horizontal') {\n style.height = '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MAAM,KAAK,YAAY,EAAE;AAC/B,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AAC1B,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;;;;;;"}
package/lib/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export declare const install: (app: import("vue").App<any>, options?: Partial<im
14
14
  }>>) => void;
15
15
  export declare const version: string;
16
16
  export default installer;
17
+ export { default as dayjs } from 'dayjs';
package/lib/index.js CHANGED
@@ -8,6 +8,7 @@ require('./directives/index.js');
8
8
  require('./hooks/index.js');
9
9
  require('./tokens/index.js');
10
10
  var makeInstaller = require('./make-installer.js');
11
+ var dayjs = require('dayjs');
11
12
  var affix = require('./components/affix/src/affix.js');
12
13
  var index = require('./components/affix/index.js');
13
14
  var alert = require('./components/alert/src/alert.js');
@@ -213,11 +214,19 @@ var scrollbar$1 = require('./tokens/scrollbar.js');
213
214
  var tabs$1 = require('./tokens/tabs.js');
214
215
  var upload$1 = require('./tokens/upload.js');
215
216
 
217
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
218
+
219
+ var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
220
+
216
221
  const install = defaults["default"].install;
217
222
  const version = defaults["default"].version;
218
223
 
219
224
  exports["default"] = defaults["default"];
220
225
  exports.makeInstaller = makeInstaller.makeInstaller;
226
+ Object.defineProperty(exports, 'dayjs', {
227
+ enumerable: true,
228
+ get: function () { return dayjs__default["default"]; }
229
+ });
221
230
  exports.affixEmits = affix.affixEmits;
222
231
  exports.affixProps = affix.affixProps;
223
232
  exports.ElAffix = index.ElAffix;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n\nexport { default as dayjs } from 'dayjs'\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20220309";
1
+ export declare const version = "0.0.20220312";
package/lib/version.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const version = "0.0.20220309";
5
+ const version = "0.0.20220312";
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 = '0.0.20220309'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20220312'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@element-plus/nightly",
3
- "version": "0.0.20220309",
3
+ "version": "0.0.20220312",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "homepage": "https://element-plus.org/",
6
6
  "keywords": [
@@ -12,6 +12,10 @@
12
12
  "vue"
13
13
  ],
14
14
  "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/element-plus/element-plus.git"
18
+ },
15
19
  "exports": {
16
20
  ".": {
17
21
  "require": "./lib/index.js",
@@ -37,10 +41,6 @@
37
41
  "es/components/*/style/*",
38
42
  "lib/components/*/style/*"
39
43
  ],
40
- "repository": {
41
- "type": "git",
42
- "url": "git+https://github.com/element-plus/element-plus.git"
43
- },
44
44
  "bugs": {
45
45
  "url": "https://github.com/element-plus/element-plus/issues"
46
46
  },
@@ -54,6 +54,7 @@
54
54
  "@vueuse/core": "^7.7.1",
55
55
  "async-validator": "^4.0.7",
56
56
  "dayjs": "^1.10.8",
57
+ "escape-html": "^1.0.3",
57
58
  "lodash": "^4.17.21",
58
59
  "lodash-es": "^4.17.21",
59
60
  "lodash-unified": "^1.0.2",
@@ -77,5 +78,5 @@
77
78
  "not ie 11",
78
79
  "not op_mini all"
79
80
  ],
80
- "gitHead": "6b7bc4fd9437b79f87adb2c972c6c5cf1bada883"
81
+ "gitHead": "9c30a5d153163564c9ae96f1d3abf8c30ce3e1df"
81
82
  }