@element-plus/nightly 0.0.20220718 → 0.0.20220721

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 (360) hide show
  1. package/dist/index.full.js +322 -322
  2. package/dist/index.full.min.js +14 -14
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +15 -15
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +321 -322
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar.js +1 -1
  12. package/dist/locale/ar.min.js +1 -1
  13. package/dist/locale/ar.min.mjs +1 -1
  14. package/dist/locale/ar.mjs +1 -1
  15. package/dist/locale/az.js +1 -1
  16. package/dist/locale/az.min.js +1 -1
  17. package/dist/locale/az.min.mjs +1 -1
  18. package/dist/locale/az.mjs +1 -1
  19. package/dist/locale/bg.js +1 -1
  20. package/dist/locale/bg.min.js +1 -1
  21. package/dist/locale/bg.min.mjs +1 -1
  22. package/dist/locale/bg.mjs +1 -1
  23. package/dist/locale/bn.js +1 -1
  24. package/dist/locale/bn.min.js +1 -1
  25. package/dist/locale/bn.min.mjs +1 -1
  26. package/dist/locale/bn.mjs +1 -1
  27. package/dist/locale/ca.js +1 -1
  28. package/dist/locale/ca.min.js +1 -1
  29. package/dist/locale/ca.min.mjs +1 -1
  30. package/dist/locale/ca.mjs +1 -1
  31. package/dist/locale/cs.js +1 -1
  32. package/dist/locale/cs.min.js +1 -1
  33. package/dist/locale/cs.min.mjs +1 -1
  34. package/dist/locale/cs.mjs +1 -1
  35. package/dist/locale/da.js +1 -1
  36. package/dist/locale/da.min.js +1 -1
  37. package/dist/locale/da.min.mjs +1 -1
  38. package/dist/locale/da.mjs +1 -1
  39. package/dist/locale/de.js +1 -1
  40. package/dist/locale/de.min.js +1 -1
  41. package/dist/locale/de.min.mjs +1 -1
  42. package/dist/locale/de.mjs +1 -1
  43. package/dist/locale/el.js +1 -1
  44. package/dist/locale/el.min.js +1 -1
  45. package/dist/locale/el.min.mjs +1 -1
  46. package/dist/locale/el.mjs +1 -1
  47. package/dist/locale/en.js +1 -1
  48. package/dist/locale/en.min.js +1 -1
  49. package/dist/locale/en.min.mjs +1 -1
  50. package/dist/locale/en.mjs +1 -1
  51. package/dist/locale/eo.js +1 -1
  52. package/dist/locale/eo.min.js +1 -1
  53. package/dist/locale/eo.min.mjs +1 -1
  54. package/dist/locale/eo.mjs +1 -1
  55. package/dist/locale/es.js +1 -1
  56. package/dist/locale/es.min.js +1 -1
  57. package/dist/locale/es.min.mjs +1 -1
  58. package/dist/locale/es.mjs +1 -1
  59. package/dist/locale/et.js +1 -1
  60. package/dist/locale/et.min.js +1 -1
  61. package/dist/locale/et.min.mjs +1 -1
  62. package/dist/locale/et.mjs +1 -1
  63. package/dist/locale/eu.js +1 -1
  64. package/dist/locale/eu.min.js +1 -1
  65. package/dist/locale/eu.min.mjs +1 -1
  66. package/dist/locale/eu.mjs +1 -1
  67. package/dist/locale/fa.js +1 -1
  68. package/dist/locale/fa.min.js +1 -1
  69. package/dist/locale/fa.min.mjs +1 -1
  70. package/dist/locale/fa.mjs +1 -1
  71. package/dist/locale/fi.js +1 -1
  72. package/dist/locale/fi.min.js +1 -1
  73. package/dist/locale/fi.min.mjs +1 -1
  74. package/dist/locale/fi.mjs +1 -1
  75. package/dist/locale/fr.js +1 -1
  76. package/dist/locale/fr.min.js +1 -1
  77. package/dist/locale/fr.min.mjs +1 -1
  78. package/dist/locale/fr.mjs +1 -1
  79. package/dist/locale/he.js +1 -1
  80. package/dist/locale/he.min.js +1 -1
  81. package/dist/locale/he.min.mjs +1 -1
  82. package/dist/locale/he.mjs +1 -1
  83. package/dist/locale/hr.js +1 -1
  84. package/dist/locale/hr.min.js +1 -1
  85. package/dist/locale/hr.min.mjs +1 -1
  86. package/dist/locale/hr.mjs +1 -1
  87. package/dist/locale/hu.js +1 -1
  88. package/dist/locale/hu.min.js +1 -1
  89. package/dist/locale/hu.min.mjs +1 -1
  90. package/dist/locale/hu.mjs +1 -1
  91. package/dist/locale/hy-am.js +1 -1
  92. package/dist/locale/hy-am.min.js +1 -1
  93. package/dist/locale/hy-am.min.mjs +1 -1
  94. package/dist/locale/hy-am.mjs +1 -1
  95. package/dist/locale/id.js +1 -1
  96. package/dist/locale/id.min.js +1 -1
  97. package/dist/locale/id.min.mjs +1 -1
  98. package/dist/locale/id.mjs +1 -1
  99. package/dist/locale/it.js +1 -1
  100. package/dist/locale/it.min.js +1 -1
  101. package/dist/locale/it.min.mjs +1 -1
  102. package/dist/locale/it.mjs +1 -1
  103. package/dist/locale/ja.js +1 -1
  104. package/dist/locale/ja.min.js +1 -1
  105. package/dist/locale/ja.min.mjs +1 -1
  106. package/dist/locale/ja.mjs +1 -1
  107. package/dist/locale/kk.js +1 -1
  108. package/dist/locale/kk.min.js +1 -1
  109. package/dist/locale/kk.min.mjs +1 -1
  110. package/dist/locale/kk.mjs +1 -1
  111. package/dist/locale/km.js +1 -1
  112. package/dist/locale/km.min.js +1 -1
  113. package/dist/locale/km.min.mjs +1 -1
  114. package/dist/locale/km.mjs +1 -1
  115. package/dist/locale/ko.js +1 -1
  116. package/dist/locale/ko.min.js +1 -1
  117. package/dist/locale/ko.min.mjs +1 -1
  118. package/dist/locale/ko.mjs +1 -1
  119. package/dist/locale/ku.js +1 -1
  120. package/dist/locale/ku.min.js +1 -1
  121. package/dist/locale/ku.min.mjs +1 -1
  122. package/dist/locale/ku.mjs +1 -1
  123. package/dist/locale/ky.js +1 -1
  124. package/dist/locale/ky.min.js +1 -1
  125. package/dist/locale/ky.min.mjs +1 -1
  126. package/dist/locale/ky.mjs +1 -1
  127. package/dist/locale/lt.js +1 -1
  128. package/dist/locale/lt.min.js +1 -1
  129. package/dist/locale/lt.min.mjs +1 -1
  130. package/dist/locale/lt.mjs +1 -1
  131. package/dist/locale/lv.js +1 -1
  132. package/dist/locale/lv.min.js +1 -1
  133. package/dist/locale/lv.min.mjs +1 -1
  134. package/dist/locale/lv.mjs +1 -1
  135. package/dist/locale/mg.js +1 -1
  136. package/dist/locale/mg.min.js +1 -1
  137. package/dist/locale/mg.min.mjs +1 -1
  138. package/dist/locale/mg.mjs +1 -1
  139. package/dist/locale/mn.js +1 -1
  140. package/dist/locale/mn.min.js +1 -1
  141. package/dist/locale/mn.min.mjs +1 -1
  142. package/dist/locale/mn.mjs +1 -1
  143. package/dist/locale/nb-no.js +1 -1
  144. package/dist/locale/nb-no.min.js +1 -1
  145. package/dist/locale/nb-no.min.mjs +1 -1
  146. package/dist/locale/nb-no.mjs +1 -1
  147. package/dist/locale/nl.js +1 -1
  148. package/dist/locale/nl.min.js +1 -1
  149. package/dist/locale/nl.min.mjs +1 -1
  150. package/dist/locale/nl.mjs +1 -1
  151. package/dist/locale/pa.js +1 -1
  152. package/dist/locale/pa.min.js +1 -1
  153. package/dist/locale/pa.min.mjs +1 -1
  154. package/dist/locale/pa.mjs +1 -1
  155. package/dist/locale/pl.js +1 -1
  156. package/dist/locale/pl.min.js +1 -1
  157. package/dist/locale/pl.min.mjs +1 -1
  158. package/dist/locale/pl.mjs +1 -1
  159. package/dist/locale/pt-br.js +1 -1
  160. package/dist/locale/pt-br.min.js +1 -1
  161. package/dist/locale/pt-br.min.mjs +1 -1
  162. package/dist/locale/pt-br.mjs +1 -1
  163. package/dist/locale/pt.js +1 -1
  164. package/dist/locale/pt.min.js +1 -1
  165. package/dist/locale/pt.min.mjs +1 -1
  166. package/dist/locale/pt.mjs +1 -1
  167. package/dist/locale/ro.js +1 -1
  168. package/dist/locale/ro.min.js +1 -1
  169. package/dist/locale/ro.min.mjs +1 -1
  170. package/dist/locale/ro.mjs +1 -1
  171. package/dist/locale/ru.js +1 -1
  172. package/dist/locale/ru.min.js +1 -1
  173. package/dist/locale/ru.min.mjs +1 -1
  174. package/dist/locale/ru.mjs +1 -1
  175. package/dist/locale/sk.js +1 -1
  176. package/dist/locale/sk.min.js +1 -1
  177. package/dist/locale/sk.min.mjs +1 -1
  178. package/dist/locale/sk.mjs +1 -1
  179. package/dist/locale/sl.js +1 -1
  180. package/dist/locale/sl.min.js +1 -1
  181. package/dist/locale/sl.min.mjs +1 -1
  182. package/dist/locale/sl.mjs +1 -1
  183. package/dist/locale/sr.js +1 -1
  184. package/dist/locale/sr.min.js +1 -1
  185. package/dist/locale/sr.min.mjs +1 -1
  186. package/dist/locale/sr.mjs +1 -1
  187. package/dist/locale/sv.js +1 -1
  188. package/dist/locale/sv.min.js +1 -1
  189. package/dist/locale/sv.min.mjs +1 -1
  190. package/dist/locale/sv.mjs +1 -1
  191. package/dist/locale/ta.js +1 -1
  192. package/dist/locale/ta.min.js +1 -1
  193. package/dist/locale/ta.min.mjs +1 -1
  194. package/dist/locale/ta.mjs +1 -1
  195. package/dist/locale/th.js +1 -1
  196. package/dist/locale/th.min.js +1 -1
  197. package/dist/locale/th.min.mjs +1 -1
  198. package/dist/locale/th.mjs +1 -1
  199. package/dist/locale/tk.js +1 -1
  200. package/dist/locale/tk.min.js +1 -1
  201. package/dist/locale/tk.min.mjs +1 -1
  202. package/dist/locale/tk.mjs +1 -1
  203. package/dist/locale/tr.js +1 -1
  204. package/dist/locale/tr.min.js +1 -1
  205. package/dist/locale/tr.min.mjs +1 -1
  206. package/dist/locale/tr.mjs +1 -1
  207. package/dist/locale/ug-cn.js +1 -1
  208. package/dist/locale/ug-cn.min.js +1 -1
  209. package/dist/locale/ug-cn.min.mjs +1 -1
  210. package/dist/locale/ug-cn.mjs +1 -1
  211. package/dist/locale/uk.js +1 -1
  212. package/dist/locale/uk.min.js +1 -1
  213. package/dist/locale/uk.min.mjs +1 -1
  214. package/dist/locale/uk.mjs +1 -1
  215. package/dist/locale/uz-uz.js +1 -1
  216. package/dist/locale/uz-uz.min.js +1 -1
  217. package/dist/locale/uz-uz.min.mjs +1 -1
  218. package/dist/locale/uz-uz.mjs +1 -1
  219. package/dist/locale/vi.js +1 -1
  220. package/dist/locale/vi.min.js +1 -1
  221. package/dist/locale/vi.min.mjs +1 -1
  222. package/dist/locale/vi.mjs +1 -1
  223. package/dist/locale/zh-cn.js +1 -1
  224. package/dist/locale/zh-cn.min.js +1 -1
  225. package/dist/locale/zh-cn.min.mjs +1 -1
  226. package/dist/locale/zh-cn.mjs +1 -1
  227. package/dist/locale/zh-tw.js +1 -1
  228. package/dist/locale/zh-tw.min.js +1 -1
  229. package/dist/locale/zh-tw.min.mjs +1 -1
  230. package/dist/locale/zh-tw.mjs +1 -1
  231. package/es/components/avatar/index.mjs +2 -2
  232. package/es/components/avatar/src/avatar.mjs +67 -32
  233. package/es/components/avatar/src/avatar.mjs.map +1 -1
  234. package/es/components/avatar/src/avatar2.mjs +32 -67
  235. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  236. package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs +21 -8
  237. package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs.map +1 -1
  238. package/es/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +5 -2
  239. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +5 -2
  240. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +5 -2
  241. package/es/components/date-picker/src/panel-utils.d.ts +10 -4
  242. package/es/components/descriptions/index.d.ts +82 -54
  243. package/es/components/descriptions/index.mjs +2 -1
  244. package/es/components/descriptions/index.mjs.map +1 -1
  245. package/es/components/descriptions/src/description.d.ts +15 -0
  246. package/es/components/descriptions/src/description.mjs +32 -0
  247. package/es/components/descriptions/src/description.mjs.map +1 -0
  248. package/es/components/descriptions/src/description.vue.d.ts +106 -0
  249. package/es/components/descriptions/src/description2.mjs +127 -0
  250. package/es/components/descriptions/src/description2.mjs.map +1 -0
  251. package/es/components/descriptions/src/descriptions-cell.mjs +4 -4
  252. package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
  253. package/es/components/descriptions/src/descriptions-row.d.ts +3 -0
  254. package/es/components/descriptions/src/descriptions-row.mjs +7 -71
  255. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  256. package/es/components/descriptions/src/descriptions-row.vue.d.ts +28 -7
  257. package/es/components/descriptions/src/descriptions-row2.mjs +69 -0
  258. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -0
  259. package/es/components/descriptions/src/token.d.ts +1 -1
  260. package/es/components/descriptions/src/token.mjs +2 -2
  261. package/es/components/descriptions/src/token.mjs.map +1 -1
  262. package/es/components/dialog/src/use-dialog.mjs.map +1 -1
  263. package/es/components/index.mjs +3 -2
  264. package/es/components/index.mjs.map +1 -1
  265. package/es/components/input-number/src/input-number2.mjs +3 -3
  266. package/es/components/menu/src/menu.mjs +16 -8
  267. package/es/components/menu/src/menu.mjs.map +1 -1
  268. package/es/components/rate/src/rate2.mjs +2 -1
  269. package/es/components/rate/src/rate2.mjs.map +1 -1
  270. package/es/components/select/src/option.mjs +4 -4
  271. package/es/components/select/src/option.mjs.map +1 -1
  272. package/es/components/table/src/table-header/event-helper.mjs +5 -9
  273. package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
  274. package/es/components/table/src/util.d.ts +1 -1
  275. package/es/components/table/src/util.mjs +2 -8
  276. package/es/components/table/src/util.mjs.map +1 -1
  277. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.mjs +3 -3
  278. package/es/components/timeline/index.mjs +2 -2
  279. package/es/components/timeline/src/timeline-item.mjs +43 -70
  280. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  281. package/es/components/timeline/src/timeline-item2.mjs +70 -43
  282. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  283. package/es/components/upload/src/use-handlers.mjs +1 -1
  284. package/es/components/upload/src/use-handlers.mjs.map +1 -1
  285. package/es/directives/repeat-click/index.d.ts +2 -2
  286. package/es/directives/repeat-click/index.mjs +13 -13
  287. package/es/directives/repeat-click/index.mjs.map +1 -1
  288. package/es/index.mjs +3 -2
  289. package/es/index.mjs.map +1 -1
  290. package/es/version.d.ts +1 -1
  291. package/es/version.mjs +1 -1
  292. package/es/version.mjs.map +1 -1
  293. package/lib/components/avatar/index.js +2 -2
  294. package/lib/components/avatar/src/avatar.js +67 -33
  295. package/lib/components/avatar/src/avatar.js.map +1 -1
  296. package/lib/components/avatar/src/avatar2.js +33 -67
  297. package/lib/components/avatar/src/avatar2.js.map +1 -1
  298. package/lib/components/date-picker/src/date-picker-com/basic-date-table.js +21 -8
  299. package/lib/components/date-picker/src/date-picker-com/basic-date-table.js.map +1 -1
  300. package/lib/components/date-picker/src/date-picker-com/basic-date-table.vue.d.ts +5 -2
  301. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +5 -2
  302. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +5 -2
  303. package/lib/components/date-picker/src/panel-utils.d.ts +10 -4
  304. package/lib/components/descriptions/index.d.ts +82 -54
  305. package/lib/components/descriptions/index.js +4 -2
  306. package/lib/components/descriptions/index.js.map +1 -1
  307. package/lib/components/descriptions/src/description.d.ts +15 -0
  308. package/lib/components/descriptions/src/description.js +36 -0
  309. package/lib/components/descriptions/src/description.js.map +1 -0
  310. package/lib/components/descriptions/src/description.vue.d.ts +106 -0
  311. package/lib/components/descriptions/src/description2.js +131 -0
  312. package/lib/components/descriptions/src/description2.js.map +1 -0
  313. package/lib/components/descriptions/src/descriptions-cell.js +3 -3
  314. package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
  315. package/lib/components/descriptions/src/descriptions-row.d.ts +3 -0
  316. package/lib/components/descriptions/src/descriptions-row.js +7 -71
  317. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  318. package/lib/components/descriptions/src/descriptions-row.vue.d.ts +28 -7
  319. package/lib/components/descriptions/src/descriptions-row2.js +73 -0
  320. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -0
  321. package/lib/components/descriptions/src/token.d.ts +1 -1
  322. package/lib/components/descriptions/src/token.js +2 -2
  323. package/lib/components/descriptions/src/token.js.map +1 -1
  324. package/lib/components/dialog/src/use-dialog.js.map +1 -1
  325. package/lib/components/index.js +4 -2
  326. package/lib/components/index.js.map +1 -1
  327. package/lib/components/menu/src/menu.js +17 -9
  328. package/lib/components/menu/src/menu.js.map +1 -1
  329. package/lib/components/rate/src/rate2.js +2 -1
  330. package/lib/components/rate/src/rate2.js.map +1 -1
  331. package/lib/components/select/src/option.js +4 -4
  332. package/lib/components/select/src/option.js.map +1 -1
  333. package/lib/components/table/src/table-header/event-helper.js +5 -9
  334. package/lib/components/table/src/table-header/event-helper.js.map +1 -1
  335. package/lib/components/table/src/util.d.ts +1 -1
  336. package/lib/components/table/src/util.js +2 -8
  337. package/lib/components/table/src/util.js.map +1 -1
  338. package/lib/components/timeline/index.js +2 -2
  339. package/lib/components/timeline/src/timeline-item.js +43 -70
  340. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  341. package/lib/components/timeline/src/timeline-item2.js +70 -43
  342. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  343. package/lib/components/upload/src/use-handlers.js +1 -1
  344. package/lib/components/upload/src/use-handlers.js.map +1 -1
  345. package/lib/directives/repeat-click/index.d.ts +2 -2
  346. package/lib/directives/repeat-click/index.js +13 -13
  347. package/lib/directives/repeat-click/index.js.map +1 -1
  348. package/lib/index.js +4 -2
  349. package/lib/index.js.map +1 -1
  350. package/lib/version.d.ts +1 -1
  351. package/lib/version.js +1 -1
  352. package/lib/version.js.map +1 -1
  353. package/package.json +2 -2
  354. package/web-types.json +1 -1
  355. package/es/components/descriptions/src/index.mjs +0 -160
  356. package/es/components/descriptions/src/index.mjs.map +0 -1
  357. package/es/components/descriptions/src/index.vue.d.ts +0 -80
  358. package/lib/components/descriptions/src/index.js +0 -164
  359. package/lib/components/descriptions/src/index.js.map +0 -1
  360. package/lib/components/descriptions/src/index.vue.d.ts +0 -80
@@ -2,78 +2,51 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var index$1 = require('../../icon/index.js');
7
- require('../../../hooks/index.js');
8
- var timelineItem = require('./timeline-item2.js');
9
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
7
+ var icon = require('../../../utils/vue/icon.js');
11
8
 
12
- const __default__ = {
13
- name: "ElTimelineItem"
14
- };
15
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
- ...__default__,
17
- props: timelineItem.timelineItemProps,
18
- setup(__props) {
19
- const ns = index.useNamespace("timeline-item");
20
- return (_ctx, _cache) => {
21
- return vue.openBlock(), vue.createElementBlock("li", {
22
- class: vue.normalizeClass([vue.unref(ns).b(), { [vue.unref(ns).e("center")]: _ctx.center }])
23
- }, [
24
- vue.createElementVNode("div", {
25
- class: vue.normalizeClass(vue.unref(ns).e("tail"))
26
- }, null, 2),
27
- !_ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
28
- key: 0,
29
- class: vue.normalizeClass([
30
- vue.unref(ns).e("node"),
31
- vue.unref(ns).em("node", _ctx.size || ""),
32
- vue.unref(ns).em("node", _ctx.type || ""),
33
- vue.unref(ns).is("hollow", _ctx.hollow)
34
- ]),
35
- style: vue.normalizeStyle({
36
- backgroundColor: _ctx.color
37
- })
38
- }, [
39
- _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
40
- key: 0,
41
- class: vue.normalizeClass(vue.unref(ns).e("icon"))
42
- }, {
43
- default: vue.withCtx(() => [
44
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
45
- ]),
46
- _: 1
47
- }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
48
- ], 6)) : vue.createCommentVNode("v-if", true),
49
- _ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
50
- key: 1,
51
- class: vue.normalizeClass(vue.unref(ns).e("dot"))
52
- }, [
53
- vue.renderSlot(_ctx.$slots, "dot")
54
- ], 2)) : vue.createCommentVNode("v-if", true),
55
- vue.createElementVNode("div", {
56
- class: vue.normalizeClass(vue.unref(ns).e("wrapper"))
57
- }, [
58
- !_ctx.hideTimestamp && _ctx.placement === "top" ? (vue.openBlock(), vue.createElementBlock("div", {
59
- key: 0,
60
- class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("top")])
61
- }, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true),
62
- vue.createElementVNode("div", {
63
- class: vue.normalizeClass(vue.unref(ns).e("content"))
64
- }, [
65
- vue.renderSlot(_ctx.$slots, "default")
66
- ], 2),
67
- !_ctx.hideTimestamp && _ctx.placement === "bottom" ? (vue.openBlock(), vue.createElementBlock("div", {
68
- key: 1,
69
- class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("bottom")])
70
- }, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true)
71
- ], 2)
72
- ], 2);
73
- };
9
+ const timelineItemProps = runtime.buildProps({
10
+ timestamp: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ hideTimestamp: {
15
+ type: Boolean,
16
+ default: false
17
+ },
18
+ center: {
19
+ type: Boolean,
20
+ default: false
21
+ },
22
+ placement: {
23
+ type: String,
24
+ values: ["top", "bottom"],
25
+ default: "bottom"
26
+ },
27
+ type: {
28
+ type: String,
29
+ values: ["primary", "success", "warning", "danger", "info"],
30
+ default: ""
31
+ },
32
+ color: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ size: {
37
+ type: String,
38
+ values: ["normal", "large"],
39
+ default: "normal"
40
+ },
41
+ icon: {
42
+ type: icon.iconPropType,
43
+ default: ""
44
+ },
45
+ hollow: {
46
+ type: Boolean,
47
+ default: false
74
48
  }
75
49
  });
76
- var TimelineItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]);
77
50
 
78
- exports["default"] = TimelineItem;
51
+ exports.timelineItemProps = timelineItemProps;
79
52
  //# sourceMappingURL=timeline-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-item.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"[\n ns.e('node'),\n ns.em('node', size || ''),\n ns.em('node', type || ''),\n ns.is('hollow', hollow),\n ]\"\n :style=\"{\n backgroundColor: color,\n }\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon')\">\n <component :is=\"icon\" />\n </el-icon>\n </div>\n <div v-if=\"$slots.dot\" :class=\"ns.e('dot')\">\n <slot name=\"dot\" />\n </div>\n\n <div :class=\"ns.e('wrapper')\">\n <div\n v-if=\"!hideTimestamp && placement === 'top'\"\n :class=\"[ns.e('timestamp'), ns.is('top')]\"\n >\n {{ timestamp }}\n </div>\n\n <div :class=\"ns.e('content')\">\n <slot />\n </div>\n\n <div\n v-if=\"!hideTimestamp && placement === 'bottom'\"\n :class=\"[ns.e('timestamp'), ns.is('bottom')]\"\n >\n {{ timestamp }}\n </div>\n </div>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\ndefineProps(timelineItemProps)\n\nconst ns = useNamespace('timeline-item')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;;;;;;;;;AAwDA,IAAA,MAAA,EAAA,GAAAA,mBAAA,eAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"timeline-item.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n timestamp: {\n type: String,\n default: '',\n },\n hideTimestamp: {\n type: Boolean,\n default: false,\n },\n center: {\n type: Boolean,\n default: false,\n },\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n color: {\n type: String,\n default: '',\n },\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n icon: {\n type: iconPropType,\n default: '',\n },\n hollow: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem>\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/D,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
@@ -2,51 +2,78 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
7
- var icon = require('../../../utils/vue/icon.js');
5
+ var vue = require('vue');
6
+ var index$1 = require('../../icon/index.js');
7
+ require('../../../hooks/index.js');
8
+ var timelineItem = require('./timeline-item.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
8
11
 
9
- const timelineItemProps = runtime.buildProps({
10
- timestamp: {
11
- type: String,
12
- default: ""
13
- },
14
- hideTimestamp: {
15
- type: Boolean,
16
- default: false
17
- },
18
- center: {
19
- type: Boolean,
20
- default: false
21
- },
22
- placement: {
23
- type: String,
24
- values: ["top", "bottom"],
25
- default: "bottom"
26
- },
27
- type: {
28
- type: String,
29
- values: ["primary", "success", "warning", "danger", "info"],
30
- default: ""
31
- },
32
- color: {
33
- type: String,
34
- default: ""
35
- },
36
- size: {
37
- type: String,
38
- values: ["normal", "large"],
39
- default: "normal"
40
- },
41
- icon: {
42
- type: icon.iconPropType,
43
- default: ""
44
- },
45
- hollow: {
46
- type: Boolean,
47
- default: false
12
+ const __default__ = {
13
+ name: "ElTimelineItem"
14
+ };
15
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
16
+ ...__default__,
17
+ props: timelineItem.timelineItemProps,
18
+ setup(__props) {
19
+ const ns = index.useNamespace("timeline-item");
20
+ return (_ctx, _cache) => {
21
+ return vue.openBlock(), vue.createElementBlock("li", {
22
+ class: vue.normalizeClass([vue.unref(ns).b(), { [vue.unref(ns).e("center")]: _ctx.center }])
23
+ }, [
24
+ vue.createElementVNode("div", {
25
+ class: vue.normalizeClass(vue.unref(ns).e("tail"))
26
+ }, null, 2),
27
+ !_ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
28
+ key: 0,
29
+ class: vue.normalizeClass([
30
+ vue.unref(ns).e("node"),
31
+ vue.unref(ns).em("node", _ctx.size || ""),
32
+ vue.unref(ns).em("node", _ctx.type || ""),
33
+ vue.unref(ns).is("hollow", _ctx.hollow)
34
+ ]),
35
+ style: vue.normalizeStyle({
36
+ backgroundColor: _ctx.color
37
+ })
38
+ }, [
39
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
40
+ key: 0,
41
+ class: vue.normalizeClass(vue.unref(ns).e("icon"))
42
+ }, {
43
+ default: vue.withCtx(() => [
44
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
45
+ ]),
46
+ _: 1
47
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
48
+ ], 6)) : vue.createCommentVNode("v-if", true),
49
+ _ctx.$slots.dot ? (vue.openBlock(), vue.createElementBlock("div", {
50
+ key: 1,
51
+ class: vue.normalizeClass(vue.unref(ns).e("dot"))
52
+ }, [
53
+ vue.renderSlot(_ctx.$slots, "dot")
54
+ ], 2)) : vue.createCommentVNode("v-if", true),
55
+ vue.createElementVNode("div", {
56
+ class: vue.normalizeClass(vue.unref(ns).e("wrapper"))
57
+ }, [
58
+ !_ctx.hideTimestamp && _ctx.placement === "top" ? (vue.openBlock(), vue.createElementBlock("div", {
59
+ key: 0,
60
+ class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("top")])
61
+ }, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true),
62
+ vue.createElementVNode("div", {
63
+ class: vue.normalizeClass(vue.unref(ns).e("content"))
64
+ }, [
65
+ vue.renderSlot(_ctx.$slots, "default")
66
+ ], 2),
67
+ !_ctx.hideTimestamp && _ctx.placement === "bottom" ? (vue.openBlock(), vue.createElementBlock("div", {
68
+ key: 1,
69
+ class: vue.normalizeClass([vue.unref(ns).e("timestamp"), vue.unref(ns).is("bottom")])
70
+ }, vue.toDisplayString(_ctx.timestamp), 3)) : vue.createCommentVNode("v-if", true)
71
+ ], 2)
72
+ ], 2);
73
+ };
48
74
  }
49
75
  });
76
+ var TimelineItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]);
50
77
 
51
- exports.timelineItemProps = timelineItemProps;
78
+ exports["default"] = TimelineItem;
52
79
  //# sourceMappingURL=timeline-item2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-item2.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n timestamp: {\n type: String,\n default: '',\n },\n hideTimestamp: {\n type: Boolean,\n default: false,\n },\n center: {\n type: Boolean,\n default: false,\n },\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n color: {\n type: String,\n default: '',\n },\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n icon: {\n type: iconPropType,\n default: '',\n },\n hollow: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem>\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/D,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"timeline-item2.js","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"[\n ns.e('node'),\n ns.em('node', size || ''),\n ns.em('node', type || ''),\n ns.is('hollow', hollow),\n ]\"\n :style=\"{\n backgroundColor: color,\n }\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon')\">\n <component :is=\"icon\" />\n </el-icon>\n </div>\n <div v-if=\"$slots.dot\" :class=\"ns.e('dot')\">\n <slot name=\"dot\" />\n </div>\n\n <div :class=\"ns.e('wrapper')\">\n <div\n v-if=\"!hideTimestamp && placement === 'top'\"\n :class=\"[ns.e('timestamp'), ns.is('top')]\"\n >\n {{ timestamp }}\n </div>\n\n <div :class=\"ns.e('content')\">\n <slot />\n </div>\n\n <div\n v-if=\"!hideTimestamp && placement === 'bottom'\"\n :class=\"[ns.e('timestamp'), ns.is('bottom')]\"\n >\n {{ timestamp }}\n </div>\n </div>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\ndefineProps(timelineItemProps)\n\nconst ns = useNamespace('timeline-item')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;;;;;;;;;AAwDA,IAAA,MAAA,EAAA,GAAAA,mBAAA,eAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -69,7 +69,7 @@ const useHandlers = (props, uploadRef) => {
69
69
  props.onError(err, uploadFile, uploadFiles.value);
70
70
  }
71
71
  }
72
- uploadFiles.value.push(uploadFile);
72
+ uploadFiles.value = [...uploadFiles.value, uploadFile];
73
73
  props.onChange(uploadFile, uploadFiles.value);
74
74
  };
75
75
  const handleRemove = async (file) => {
@@ -1 +1 @@
1
- {"version":3,"file":"use-handlers.js","sources":["../../../../../../packages/components/upload/src/use-handlers.ts"],"sourcesContent":["import { watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { debugWarn, throwError } from '@element-plus/utils'\nimport { genFileId } from './upload'\nimport type { ShallowRef } from 'vue'\nimport type {\n UploadContentInstance,\n UploadContentProps,\n} from './upload-content'\nimport type {\n UploadFile,\n UploadFiles,\n UploadProps,\n UploadRawFile,\n UploadStatus,\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 = useVModel(\n props as Omit<UploadProps, 'fileList'> & { fileList: UploadFiles },\n 'fileList',\n undefined,\n { passive: true }\n )\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 console.error(err)\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 ): Promise<void> => {\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 uploadFiles,\n (files) => {\n for (const file of files) {\n file.uid ||= genFileId()\n file.status ||= 'success'\n }\n },\n { immediate: true, deep: true }\n )\n\n return {\n /** @description two-way binding ref from props `fileList` */\n uploadFiles,\n abort,\n clearFiles,\n handleError,\n handleProgress,\n handleStart,\n handleSuccess,\n handleRemove,\n submit,\n }\n}\n"],"names":["useVModel","debugWarn","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,cAAS,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,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,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7D,GAAG;AACH,EAAE,SAAS,UAAU,CAAC,MAAM,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;AAC1E,IAAI,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAA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AAW;AACf,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"use-handlers.js","sources":["../../../../../../packages/components/upload/src/use-handlers.ts"],"sourcesContent":["import { watch } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { debugWarn, throwError } from '@element-plus/utils'\nimport { genFileId } from './upload'\nimport type { ShallowRef } from 'vue'\nimport type {\n UploadContentInstance,\n UploadContentProps,\n} from './upload-content'\nimport type {\n UploadFile,\n UploadFiles,\n UploadProps,\n UploadRawFile,\n UploadStatus,\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 = useVModel(\n props as Omit<UploadProps, 'fileList'> & { fileList: UploadFiles },\n 'fileList',\n undefined,\n { passive: true }\n )\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 console.error(err)\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 = [...uploadFiles.value, uploadFile]\n props.onChange(uploadFile, uploadFiles.value)\n }\n\n const handleRemove: UploadContentProps['onRemove'] = async (\n file\n ): Promise<void> => {\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 uploadFiles,\n (files) => {\n for (const file of files) {\n file.uid ||= genFileId()\n file.status ||= 'success'\n }\n },\n { immediate: true, deep: true }\n )\n\n return {\n /** @description two-way binding ref from props `fileList` */\n uploadFiles,\n abort,\n clearFiles,\n handleError,\n handleProgress,\n handleStart,\n handleSuccess,\n handleRemove,\n submit,\n }\n}\n"],"names":["useVModel","debugWarn","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,cAAS,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,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,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7D,GAAG;AACH,EAAE,SAAS,UAAU,CAAC,MAAM,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;AAC1E,IAAI,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAA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;AACf,IAAI,cAAc;AAClB,IAAI,WAAW;AACf,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,MAAM;AACV,GAAG,CAAC;AACJ;;;;"}
@@ -1,3 +1,3 @@
1
1
  import type { ObjectDirective } from 'vue';
2
- declare const _default: ObjectDirective<any, any>;
3
- export default _default;
2
+ declare const RepeatClick: ObjectDirective;
3
+ export default RepeatClick;
@@ -2,31 +2,31 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../utils/index.js');
6
- var event = require('../../utils/dom/event.js');
7
-
8
- var vRepeatClick = {
5
+ const RepeatClick = {
9
6
  beforeMount(el, binding) {
10
7
  let interval = null;
11
- let startTime;
8
+ let isHandlerCalled = false;
12
9
  const handler = () => binding.value && binding.value();
13
10
  const clear = () => {
14
- if (Date.now() - startTime < 100) {
15
- handler();
16
- }
17
11
  clearInterval(interval);
18
12
  interval = null;
13
+ if (!isHandlerCalled) {
14
+ handler();
15
+ }
16
+ isHandlerCalled = false;
19
17
  };
20
- event.on(el, "mousedown", (e) => {
18
+ el.addEventListener("mousedown", (e) => {
21
19
  if (e.button !== 0)
22
20
  return;
23
- startTime = Date.now();
24
- event.once(document, "mouseup", clear);
21
+ document.addEventListener("mouseup", clear, { once: true });
25
22
  clearInterval(interval);
26
- interval = setInterval(handler, 100);
23
+ interval = setInterval(() => {
24
+ isHandlerCalled = true;
25
+ handler();
26
+ }, 100);
27
27
  });
28
28
  }
29
29
  };
30
30
 
31
- exports["default"] = vRepeatClick;
31
+ exports["default"] = RepeatClick;
32
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/directives/repeat-click/index.ts"],"sourcesContent":["// @ts-nocheck\nimport { on, once } from '@element-plus/utils'\n\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\n\nexport default {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n let interval = null\n let startTime: number\n const handler = () => binding.value && binding.value()\n const clear = () => {\n if (Date.now() - startTime < 100) {\n handler()\n }\n clearInterval(interval)\n interval = null\n }\n\n on(el, 'mousedown', (e: MouseEvent) => {\n if ((e as any).button !== 0) return\n startTime = Date.now()\n once(document as any, 'mouseup', clear)\n clearInterval(interval)\n interval = setInterval(handler, 100)\n })\n },\n} as ObjectDirective\n"],"names":["on","once"],"mappings":";;;;;;;AACA,mBAAe;AACf,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE;AAC3B,IAAI,IAAI,QAAQ,GAAG,IAAI,CAAC;AACxB,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;AAC3D,IAAI,MAAM,KAAK,GAAG,MAAM;AACxB,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,GAAG,EAAE;AACxC,QAAQ,OAAO,EAAE,CAAC;AAClB,OAAO;AACP,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AAC9B,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,KAAK,CAAC;AACN,IAAIA,QAAE,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,KAAK;AAC/B,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;AACxB,QAAQ,OAAO;AACf,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AAC7B,MAAMC,UAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AACvC,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AAC9B,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC3C,KAAK,CAAC,CAAC;AACP,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/directives/repeat-click/index.ts"],"sourcesContent":["import type { DirectiveBinding, ObjectDirective } from 'vue'\n\nconst RepeatClick: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n let interval: ReturnType<typeof setInterval> | null = null\n let isHandlerCalled = false\n\n const handler = () => binding.value && binding.value()\n\n const clear = () => {\n clearInterval(interval!)\n interval = null\n\n if (!isHandlerCalled) {\n handler()\n }\n isHandlerCalled = false\n }\n\n el.addEventListener('mousedown', (e: MouseEvent) => {\n if (e.button !== 0) return\n\n document.addEventListener('mouseup', clear, { once: true })\n\n clearInterval(interval!)\n interval = setInterval(() => {\n isHandlerCalled = true\n handler()\n }, 100)\n })\n },\n}\n\nexport default RepeatClick\n"],"names":[],"mappings":";;;;AAAK,MAAC,WAAW,GAAG;AACpB,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE;AAC3B,IAAI,IAAI,QAAQ,GAAG,IAAI,CAAC;AACxB,IAAI,IAAI,eAAe,GAAG,KAAK,CAAC;AAChC,IAAI,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;AAC3D,IAAI,MAAM,KAAK,GAAG,MAAM;AACxB,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AAC9B,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,MAAM,IAAI,CAAC,eAAe,EAAE;AAC5B,QAAQ,OAAO,EAAE,CAAC;AAClB,OAAO;AACP,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,KAAK,CAAC;AACN,IAAI,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,KAAK;AAC5C,MAAM,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;AACxB,QAAQ,OAAO;AACf,MAAM,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAClE,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;AAC9B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM;AACnC,QAAQ,eAAe,GAAG,IAAI,CAAC;AAC/B,QAAQ,OAAO,EAAE,CAAC;AAClB,OAAO,EAAE,GAAG,CAAC,CAAC;AACd,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
package/lib/index.js CHANGED
@@ -16,7 +16,7 @@ var alert = require('./components/alert/src/alert.js');
16
16
  var index$1 = require('./components/alert/index.js');
17
17
  var autocomplete = require('./components/autocomplete/src/autocomplete.js');
18
18
  var index$2 = require('./components/autocomplete/index.js');
19
- var avatar = require('./components/avatar/src/avatar.js');
19
+ var avatar = require('./components/avatar/src/avatar2.js');
20
20
  var index$3 = require('./components/avatar/index.js');
21
21
  var backtop = require('./components/backtop/src/backtop.js');
22
22
  var index$4 = require('./components/backtop/index.js');
@@ -53,6 +53,7 @@ var configProvider = require('./components/config-provider/src/config-provider.j
53
53
  var index$j = require('./components/config-provider/index.js');
54
54
  var index$k = require('./components/container/index.js');
55
55
  var index$l = require('./components/date-picker/index.js');
56
+ var description = require('./components/descriptions/src/description.js');
56
57
  var index$m = require('./components/descriptions/index.js');
57
58
  var useDialog = require('./components/dialog/src/use-dialog.js');
58
59
  var dialog = require('./components/dialog/src/dialog.js');
@@ -157,7 +158,7 @@ var picker = require('./components/time-picker/src/common/picker.js');
157
158
  var panelTimePick = require('./components/time-picker/src/time-picker-com/panel-time-pick.js');
158
159
  var index$W = require('./components/time-picker/index.js');
159
160
  var index$X = require('./components/time-select/index.js');
160
- var timelineItem = require('./components/timeline/src/timeline-item2.js');
161
+ var timelineItem = require('./components/timeline/src/timeline-item.js');
161
162
  var index$Y = require('./components/timeline/index.js');
162
163
  var tooltip = require('./components/tooltip/src/tooltip.js');
163
164
  var tokens$1 = require('./components/tooltip/src/tokens.js');
@@ -335,6 +336,7 @@ exports.ElFooter = index$k.ElFooter;
335
336
  exports.ElHeader = index$k.ElHeader;
336
337
  exports.ElMain = index$k.ElMain;
337
338
  exports.ElDatePicker = index$l.ElDatePicker;
339
+ exports.descriptionProps = description.descriptionProps;
338
340
  exports.ElDescriptions = index$m.ElDescriptions;
339
341
  exports.ElDescriptionsItem = index$m.ElDescriptionsItem;
340
342
  exports.useDialog = useDialog.useDialog;
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/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport * 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOY,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/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport * 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOY,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.20220718";
1
+ export declare const version = "0.0.20220721";
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.20220718";
5
+ const version = "0.0.20220721";
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.20220718'\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.20220721'\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.20220718",
3
+ "version": "0.0.20220721",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "element-plus",
@@ -83,5 +83,5 @@
83
83
  "not ie 11",
84
84
  "not op_mini all"
85
85
  ],
86
- "gitHead": "379d373497110c6ba7d988f99c756b806029c55f"
86
+ "gitHead": "6837b22841e68f19e6f7f3e3fc69d842a123711a"
87
87
  }