@element-plus/nightly 0.0.20241224 → 0.0.20241225
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/index.full.js +3 -3
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -3
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3 -3
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +118 -25
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +25 -118
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +89 -36
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +36 -89
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +1 -1
- package/es/components/anchor/src/anchor-link.mjs +81 -5
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +5 -81
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +71 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -71
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +6 -29
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +29 -6
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +16 -134
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +134 -16
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/date-table.mjs +89 -31
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +31 -89
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +20 -42
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +42 -20
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +64 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -64
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +126 -26
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +26 -126
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +26 -87
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +87 -26
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +34 -16
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +16 -34
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +11 -52
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +52 -11
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +45 -412
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +412 -45
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +24 -24
- package/es/components/mention/index.mjs +2 -2
- package/es/components/mention/src/mention.mjs +62 -282
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +282 -62
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +35 -18
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +18 -35
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +35 -17
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +17 -35
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +6 -26
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +26 -6
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +127 -31
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +31 -127
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +5 -65
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +65 -5
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.mjs +64 -10
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +10 -64
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +167 -33
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +33 -167
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +19 -89
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +89 -19
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +19 -190
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +190 -19
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -228
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +228 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +13 -71
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +71 -13
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +33 -72
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +72 -33
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/mask.mjs +18 -75
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +75 -18
- package/es/components/tour/src/mask2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +44 -168
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step2.mjs +168 -44
- package/es/components/tour/src/step2.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/upload/index.mjs +4 -4
- package/es/components/upload/src/upload-content.mjs +33 -196
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +196 -33
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +173 -28
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +28 -173
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.mjs +97 -125
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +125 -97
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +24 -24
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +118 -26
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +26 -118
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +88 -37
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +37 -88
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/anchor/index.js +1 -1
- package/lib/components/anchor/src/anchor-link.js +81 -5
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +5 -81
- package/lib/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +71 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -71
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +6 -29
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +29 -6
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +17 -134
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +134 -17
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/date-table.js +89 -35
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +35 -89
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +20 -42
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +42 -20
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +64 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -64
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +126 -26
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +26 -126
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +26 -86
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +86 -26
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +34 -16
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +16 -34
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +11 -52
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +52 -11
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +46 -412
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +412 -46
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +24 -24
- package/lib/components/mention/index.js +2 -2
- package/lib/components/mention/src/mention.js +61 -280
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention2.js +280 -61
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +35 -18
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +18 -35
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +35 -18
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +18 -35
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +6 -26
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +26 -6
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +127 -32
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +32 -127
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +5 -65
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +65 -5
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/scrollbar/src/bar.js +64 -10
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +10 -64
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +167 -34
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +34 -167
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/slider/src/button.js +20 -89
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +89 -20
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +19 -190
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +190 -19
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -227
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +227 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +13 -71
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +71 -13
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +33 -72
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +72 -33
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/mask.js +18 -75
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +75 -18
- package/lib/components/tour/src/mask2.js.map +1 -1
- package/lib/components/tour/src/step.js +44 -167
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step2.js +167 -44
- package/lib/components/tour/src/step2.js.map +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/upload/index.js +4 -4
- package/lib/components/upload/src/upload-content.js +32 -195
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +195 -32
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +173 -29
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +29 -173
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.js +100 -125
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +125 -100
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +24 -24
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-color-picker.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-input-tag.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-mention.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/color-picker.scss +1 -0
- package/theme-chalk/src/common/var.scss +1 -0
- package/theme-chalk/src/date-picker/picker.scss +1 -0
- package/theme-chalk/src/input-tag.scss +5 -0
- package/theme-chalk/src/input.scss +1 -0
- package/theme-chalk/src/mention.scss +4 -0
- package/theme-chalk/src/select.scss +1 -0
- package/web-types.json +1 -1
@@ -1,195 +1,24 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { Check, Close } from '@element-plus/icons-vue';
|
4
|
-
import { stepProps } from './item2.mjs';
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
7
|
-
import { isNumber } from '../../../utils/types.mjs';
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
8
3
|
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
() => parent.props.active,
|
26
|
-
() => parent.props.processStatus,
|
27
|
-
() => parent.props.finishStatus
|
28
|
-
], ([active]) => {
|
29
|
-
updateStatus(active);
|
30
|
-
}, { immediate: true });
|
31
|
-
});
|
32
|
-
onBeforeUnmount(() => {
|
33
|
-
parent.removeStep(stepItemState.uid);
|
34
|
-
});
|
35
|
-
const currentStatus = computed(() => {
|
36
|
-
return props.status || internalStatus.value;
|
37
|
-
});
|
38
|
-
const prevStatus = computed(() => {
|
39
|
-
const prevStep = parent.steps.value[index.value - 1];
|
40
|
-
return prevStep ? prevStep.currentStatus : "wait";
|
41
|
-
});
|
42
|
-
const isCenter = computed(() => {
|
43
|
-
return parent.props.alignCenter;
|
44
|
-
});
|
45
|
-
const isVertical = computed(() => {
|
46
|
-
return parent.props.direction === "vertical";
|
47
|
-
});
|
48
|
-
const isSimple = computed(() => {
|
49
|
-
return parent.props.simple;
|
50
|
-
});
|
51
|
-
const stepsCount = computed(() => {
|
52
|
-
return parent.steps.value.length;
|
53
|
-
});
|
54
|
-
const isLast = computed(() => {
|
55
|
-
var _a;
|
56
|
-
return ((_a = parent.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === (currentInstance == null ? void 0 : currentInstance.uid);
|
57
|
-
});
|
58
|
-
const space = computed(() => {
|
59
|
-
return isSimple.value ? "" : parent.props.space;
|
60
|
-
});
|
61
|
-
const containerKls = computed(() => {
|
62
|
-
return [
|
63
|
-
ns.b(),
|
64
|
-
ns.is(isSimple.value ? "simple" : parent.props.direction),
|
65
|
-
ns.is("flex", isLast.value && !space.value && !isCenter.value),
|
66
|
-
ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
|
67
|
-
];
|
68
|
-
});
|
69
|
-
const style = computed(() => {
|
70
|
-
const style2 = {
|
71
|
-
flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`
|
72
|
-
};
|
73
|
-
if (isVertical.value)
|
74
|
-
return style2;
|
75
|
-
if (isLast.value) {
|
76
|
-
style2.maxWidth = `${100 / stepsCount.value}%`;
|
77
|
-
}
|
78
|
-
return style2;
|
79
|
-
});
|
80
|
-
const setIndex = (val) => {
|
81
|
-
index.value = val;
|
82
|
-
};
|
83
|
-
const calcProgress = (status) => {
|
84
|
-
const isWait = status === "wait";
|
85
|
-
const style2 = {
|
86
|
-
transitionDelay: `${isWait ? "-" : ""}${150 * index.value}ms`
|
87
|
-
};
|
88
|
-
const step = status === parent.props.processStatus || isWait ? 0 : 100;
|
89
|
-
style2.borderWidth = step && !isSimple.value ? "1px" : 0;
|
90
|
-
style2[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
|
91
|
-
lineStyle.value = style2;
|
92
|
-
};
|
93
|
-
const updateStatus = (activeIndex) => {
|
94
|
-
if (activeIndex > index.value) {
|
95
|
-
internalStatus.value = parent.props.finishStatus;
|
96
|
-
} else if (activeIndex === index.value && prevStatus.value !== "error") {
|
97
|
-
internalStatus.value = parent.props.processStatus;
|
98
|
-
} else {
|
99
|
-
internalStatus.value = "wait";
|
100
|
-
}
|
101
|
-
const prevChild = parent.steps.value[index.value - 1];
|
102
|
-
if (prevChild)
|
103
|
-
prevChild.calcProgress(internalStatus.value);
|
104
|
-
};
|
105
|
-
const stepItemState = reactive({
|
106
|
-
uid: currentInstance.uid,
|
107
|
-
currentStatus,
|
108
|
-
setIndex,
|
109
|
-
calcProgress
|
110
|
-
});
|
111
|
-
parent.addStep(stepItemState);
|
112
|
-
return (_ctx, _cache) => {
|
113
|
-
return openBlock(), createElementBlock("div", {
|
114
|
-
style: normalizeStyle(unref(style)),
|
115
|
-
class: normalizeClass(unref(containerKls))
|
116
|
-
}, [
|
117
|
-
createCommentVNode(" icon & line "),
|
118
|
-
createElementVNode("div", {
|
119
|
-
class: normalizeClass([unref(ns).e("head"), unref(ns).is(unref(currentStatus))])
|
120
|
-
}, [
|
121
|
-
!unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
122
|
-
key: 0,
|
123
|
-
class: normalizeClass(unref(ns).e("line"))
|
124
|
-
}, [
|
125
|
-
createElementVNode("i", {
|
126
|
-
class: normalizeClass(unref(ns).e("line-inner")),
|
127
|
-
style: normalizeStyle(lineStyle.value)
|
128
|
-
}, null, 6)
|
129
|
-
], 2)) : createCommentVNode("v-if", true),
|
130
|
-
createElementVNode("div", {
|
131
|
-
class: normalizeClass([unref(ns).e("icon"), unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")])
|
132
|
-
}, [
|
133
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
134
|
-
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
135
|
-
key: 0,
|
136
|
-
class: normalizeClass(unref(ns).e("icon-inner"))
|
137
|
-
}, {
|
138
|
-
default: withCtx(() => [
|
139
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
140
|
-
]),
|
141
|
-
_: 1
|
142
|
-
}, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), {
|
143
|
-
key: 1,
|
144
|
-
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
145
|
-
}, {
|
146
|
-
default: withCtx(() => [
|
147
|
-
createVNode(unref(Check))
|
148
|
-
]),
|
149
|
-
_: 1
|
150
|
-
}, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), {
|
151
|
-
key: 2,
|
152
|
-
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
153
|
-
}, {
|
154
|
-
default: withCtx(() => [
|
155
|
-
createVNode(unref(Close))
|
156
|
-
]),
|
157
|
-
_: 1
|
158
|
-
}, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
159
|
-
key: 3,
|
160
|
-
class: normalizeClass(unref(ns).e("icon-inner"))
|
161
|
-
}, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)
|
162
|
-
])
|
163
|
-
], 2)
|
164
|
-
], 2),
|
165
|
-
createCommentVNode(" title & description "),
|
166
|
-
createElementVNode("div", {
|
167
|
-
class: normalizeClass(unref(ns).e("main"))
|
168
|
-
}, [
|
169
|
-
createElementVNode("div", {
|
170
|
-
class: normalizeClass([unref(ns).e("title"), unref(ns).is(unref(currentStatus))])
|
171
|
-
}, [
|
172
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
173
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
174
|
-
])
|
175
|
-
], 2),
|
176
|
-
unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
177
|
-
key: 0,
|
178
|
-
class: normalizeClass(unref(ns).e("arrow"))
|
179
|
-
}, null, 2)) : (openBlock(), createElementBlock("div", {
|
180
|
-
key: 1,
|
181
|
-
class: normalizeClass([unref(ns).e("description"), unref(ns).is(unref(currentStatus))])
|
182
|
-
}, [
|
183
|
-
renderSlot(_ctx.$slots, "description", {}, () => [
|
184
|
-
createTextVNode(toDisplayString(_ctx.description), 1)
|
185
|
-
])
|
186
|
-
], 2))
|
187
|
-
], 2)
|
188
|
-
], 6);
|
189
|
-
};
|
4
|
+
const stepProps = buildProps({
|
5
|
+
title: {
|
6
|
+
type: String,
|
7
|
+
default: ""
|
8
|
+
},
|
9
|
+
icon: {
|
10
|
+
type: iconPropType
|
11
|
+
},
|
12
|
+
description: {
|
13
|
+
type: String,
|
14
|
+
default: ""
|
15
|
+
},
|
16
|
+
status: {
|
17
|
+
type: String,
|
18
|
+
values: ["", "wait", "process", "finish", "error", "success"],
|
19
|
+
default: ""
|
190
20
|
}
|
191
21
|
});
|
192
|
-
var Step = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "item.vue"]]);
|
193
22
|
|
194
|
-
export {
|
23
|
+
export { stepProps };
|
195
24
|
//# sourceMappingURL=item.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"item.mjs","sources":["../../../../../../packages/components/steps/src/item.vue"],"sourcesContent":["<template>\n <div :style=\"style\" :class=\"containerKls\">\n <!-- icon & line -->\n <div :class=\"[ns.e('head'), ns.is(currentStatus)]\">\n <div v-if=\"!isSimple\" :class=\"ns.e('line')\">\n <i :class=\"ns.e('line-inner')\" :style=\"lineStyle\" />\n </div>\n\n <div\n :class=\"[ns.e('icon'), ns.is(icon || $slots.icon ? 'icon' : 'text')]\"\n >\n <slot name=\"icon\">\n <el-icon v-if=\"icon\" :class=\"ns.e('icon-inner')\">\n <component :is=\"icon\" />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'success'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Check />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'error'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Close />\n </el-icon>\n <div v-else-if=\"!isSimple\" :class=\"ns.e('icon-inner')\">\n {{ index + 1 }}\n </div>\n </slot>\n </div>\n </div>\n <!-- title & description -->\n <div :class=\"ns.e('main')\">\n <div :class=\"[ns.e('title'), ns.is(currentStatus)]\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"isSimple\" :class=\"ns.e('arrow')\" />\n <div v-else :class=\"[ns.e('description'), ns.is(currentStatus)]\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Check, Close } from '@element-plus/icons-vue'\nimport { isNumber } from '@element-plus/utils'\nimport { stepProps } from './item'\n\nimport type { CSSProperties, Ref } from 'vue'\n\nexport interface IStepsProps {\n space: number | string\n active: number\n direction: string\n alignCenter: boolean\n simple: boolean\n finishStatus: string\n processStatus: string\n}\n\nexport interface StepItemState {\n uid: number\n currentStatus: string\n setIndex: (val: number) => void\n calcProgress: (status: string) => void\n}\n\nexport interface IStepsInject {\n props: IStepsProps\n steps: Ref<StepItemState[]>\n addStep: (item: StepItemState) => void\n removeStep: (uid: number) => void\n}\n\ndefineOptions({\n name: 'ElStep',\n})\n\nconst props = defineProps(stepProps)\nconst ns = useNamespace('step')\nconst index = ref(-1)\nconst lineStyle = ref({})\nconst internalStatus = ref('')\nconst parent = inject('ElSteps') as IStepsInject\nconst currentInstance = getCurrentInstance()\n\nonMounted(() => {\n watch(\n [\n () => parent.props.active,\n () => parent.props.processStatus,\n () => parent.props.finishStatus,\n ],\n ([active]) => {\n updateStatus(active)\n },\n { immediate: true }\n )\n})\n\nonBeforeUnmount(() => {\n parent.removeStep(stepItemState.uid)\n})\n\nconst currentStatus = computed(() => {\n return props.status || internalStatus.value\n})\n\nconst prevStatus = computed(() => {\n const prevStep = parent.steps.value[index.value - 1]\n return prevStep ? prevStep.currentStatus : 'wait'\n})\n\nconst isCenter = computed(() => {\n return parent.props.alignCenter\n})\n\nconst isVertical = computed(() => {\n return parent.props.direction === 'vertical'\n})\n\nconst isSimple = computed(() => {\n return parent.props.simple\n})\n\nconst stepsCount = computed(() => {\n return parent.steps.value.length\n})\n\nconst isLast = computed(() => {\n return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance?.uid\n})\n\nconst space = computed(() => {\n return isSimple.value ? '' : parent.props.space\n})\n\nconst containerKls = computed(() => {\n return [\n ns.b(),\n ns.is(isSimple.value ? 'simple' : parent.props.direction),\n ns.is('flex', isLast.value && !space.value && !isCenter.value),\n ns.is('center', isCenter.value && !isVertical.value && !isSimple.value),\n ]\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n flexBasis: isNumber(space.value)\n ? `${space.value}px`\n : space.value\n ? space.value\n : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`,\n }\n if (isVertical.value) return style\n if (isLast.value) {\n style.maxWidth = `${100 / stepsCount.value}%`\n }\n return style\n})\n\nconst setIndex = (val: number) => {\n index.value = val\n}\n\nconst calcProgress = (status: string) => {\n const isWait = status === 'wait'\n const style: CSSProperties = {\n transitionDelay: `${isWait ? '-' : ''}${150 * index.value}ms`,\n }\n const step = status === parent.props.processStatus || isWait ? 0 : 100\n\n style.borderWidth = step && !isSimple.value ? '1px' : 0\n style[parent.props.direction === 'vertical' ? 'height' : 'width'] = `${step}%`\n lineStyle.value = style\n}\n\nconst updateStatus = (activeIndex: number) => {\n if (activeIndex > index.value) {\n internalStatus.value = parent.props.finishStatus\n } else if (activeIndex === index.value && prevStatus.value !== 'error') {\n internalStatus.value = parent.props.processStatus\n } else {\n internalStatus.value = 'wait'\n }\n const prevChild = parent.steps.value[index.value - 1]\n if (prevChild) prevChild.calcProgress(internalStatus.value)\n}\n\nconst stepItemState = reactive({\n uid: currentInstance!.uid,\n currentStatus,\n setIndex,\n calcProgress,\n})\n\nparent.addStep(stepItemState)\n</script>\n"],"names":["style"],"mappings":";;;;;;;;mCAyFc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAE,CAAA,CAAA,CAAA;AACpB,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,cAAA,GAAiB,IAAI,EAAE,CAAA,CAAA;AAC7B,IAAM,MAAA,MAAA,GAAS,OAAO,SAAS,CAAA,CAAA;AAC/B,IAAA,MAAM,kBAAkB,kBAAmB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AAA,KAAA,GAAA,MAAA,CAAA;AACpB,KAAAA,CAAAA;AACA,IAAA,MAAA,YAAkBA,GAAAA,CAAAA,WAAAA,KAAAA;AAAA,MACpB,IAAA,WAAA,GAAA,KAAA,CAAA,KAAA,EAAA;AAEA,QAAM,cAAA,CAAA,KAAwC,GAAA,MAAA,CAAA,KAAA,CAAA,YAAA,CAAA;AAC5C,OAAI,MAAA,IAAA,gBAA2B,KAAA,CAAA,KAAA,IAAA,UAAA,CAAA,KAAA,KAAA,OAAA,EAAA;AAC7B,QAAe,cAAA,CAAA,KAAA,GAAQ,OAAO,KAAM,CAAA,aAAA,CAAA;AAAA;AAEpC,QAAe,cAAA,CAAA,KAAA,GAAQ,OAAO;AAAM,OAC/B;AACL,MAAA,MAAA,SAAA,GAAuB,MAAA,CAAA,KAAA,CAAA,KAAA,CAAA,KAAA,CAAA,KAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MACzB,IAAA,SAAA;AACA,QAAA,sBAAyB,CAAA,cAAY,CAAA;AACrC,KAAA,CAAA;AAA0D,IAC5D,MAAA,aAAA,GAAA,QAAA,CAAA;AAEA,MAAA,GAAA,iBAAsB,CAAS,GAAA;AAAA,MAC7B,aAAsB;AAAA,MACtB,QAAA;AAAA,MACA,YAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACF,MAAC,CAAA,OAAA,CAAA,aAAA,CAAA,CAAA;AAED,IAAA,OAAO,aAAqB,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"item.mjs","sources":["../../../../../../packages/components/steps/src/item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type Step from './item.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const stepProps = buildProps({\n /**\n * @description step title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description step custom icon. Icons can be passed via named slot as well\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description step description\n */\n description: {\n type: String,\n default: '',\n },\n /**\n * @description current status. It will be automatically set by Steps if not configured.\n */\n status: {\n type: String,\n values: ['', 'wait', 'process', 'finish', 'error', 'success'],\n default: '',\n },\n} as const)\n\nexport type StepProps = ExtractPropTypes<typeof stepProps>\n\nexport type StepInstance = InstanceType<typeof Step>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;AACjE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
@@ -1,24 +1,195 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, ref, inject, getCurrentInstance, onMounted, watch, onBeforeUnmount, computed, reactive, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createCommentVNode, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, createVNode, toDisplayString, createTextVNode } from 'vue';
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
3
|
+
import { Check, Close } from '@element-plus/icons-vue';
|
4
|
+
import { stepProps } from './item.mjs';
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
7
|
+
import { isNumber } from '../../../utils/types.mjs';
|
3
8
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
const __default__ = defineComponent({
|
10
|
+
name: "ElStep"
|
11
|
+
});
|
12
|
+
const _sfc_main = defineComponent({
|
13
|
+
...__default__,
|
14
|
+
props: stepProps,
|
15
|
+
setup(__props) {
|
16
|
+
const props = __props;
|
17
|
+
const ns = useNamespace("step");
|
18
|
+
const index = ref(-1);
|
19
|
+
const lineStyle = ref({});
|
20
|
+
const internalStatus = ref("");
|
21
|
+
const parent = inject("ElSteps");
|
22
|
+
const currentInstance = getCurrentInstance();
|
23
|
+
onMounted(() => {
|
24
|
+
watch([
|
25
|
+
() => parent.props.active,
|
26
|
+
() => parent.props.processStatus,
|
27
|
+
() => parent.props.finishStatus
|
28
|
+
], ([active]) => {
|
29
|
+
updateStatus(active);
|
30
|
+
}, { immediate: true });
|
31
|
+
});
|
32
|
+
onBeforeUnmount(() => {
|
33
|
+
parent.removeStep(stepItemState.uid);
|
34
|
+
});
|
35
|
+
const currentStatus = computed(() => {
|
36
|
+
return props.status || internalStatus.value;
|
37
|
+
});
|
38
|
+
const prevStatus = computed(() => {
|
39
|
+
const prevStep = parent.steps.value[index.value - 1];
|
40
|
+
return prevStep ? prevStep.currentStatus : "wait";
|
41
|
+
});
|
42
|
+
const isCenter = computed(() => {
|
43
|
+
return parent.props.alignCenter;
|
44
|
+
});
|
45
|
+
const isVertical = computed(() => {
|
46
|
+
return parent.props.direction === "vertical";
|
47
|
+
});
|
48
|
+
const isSimple = computed(() => {
|
49
|
+
return parent.props.simple;
|
50
|
+
});
|
51
|
+
const stepsCount = computed(() => {
|
52
|
+
return parent.steps.value.length;
|
53
|
+
});
|
54
|
+
const isLast = computed(() => {
|
55
|
+
var _a;
|
56
|
+
return ((_a = parent.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === (currentInstance == null ? void 0 : currentInstance.uid);
|
57
|
+
});
|
58
|
+
const space = computed(() => {
|
59
|
+
return isSimple.value ? "" : parent.props.space;
|
60
|
+
});
|
61
|
+
const containerKls = computed(() => {
|
62
|
+
return [
|
63
|
+
ns.b(),
|
64
|
+
ns.is(isSimple.value ? "simple" : parent.props.direction),
|
65
|
+
ns.is("flex", isLast.value && !space.value && !isCenter.value),
|
66
|
+
ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
|
67
|
+
];
|
68
|
+
});
|
69
|
+
const style = computed(() => {
|
70
|
+
const style2 = {
|
71
|
+
flexBasis: isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`
|
72
|
+
};
|
73
|
+
if (isVertical.value)
|
74
|
+
return style2;
|
75
|
+
if (isLast.value) {
|
76
|
+
style2.maxWidth = `${100 / stepsCount.value}%`;
|
77
|
+
}
|
78
|
+
return style2;
|
79
|
+
});
|
80
|
+
const setIndex = (val) => {
|
81
|
+
index.value = val;
|
82
|
+
};
|
83
|
+
const calcProgress = (status) => {
|
84
|
+
const isWait = status === "wait";
|
85
|
+
const style2 = {
|
86
|
+
transitionDelay: `${isWait ? "-" : ""}${150 * index.value}ms`
|
87
|
+
};
|
88
|
+
const step = status === parent.props.processStatus || isWait ? 0 : 100;
|
89
|
+
style2.borderWidth = step && !isSimple.value ? "1px" : 0;
|
90
|
+
style2[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
|
91
|
+
lineStyle.value = style2;
|
92
|
+
};
|
93
|
+
const updateStatus = (activeIndex) => {
|
94
|
+
if (activeIndex > index.value) {
|
95
|
+
internalStatus.value = parent.props.finishStatus;
|
96
|
+
} else if (activeIndex === index.value && prevStatus.value !== "error") {
|
97
|
+
internalStatus.value = parent.props.processStatus;
|
98
|
+
} else {
|
99
|
+
internalStatus.value = "wait";
|
100
|
+
}
|
101
|
+
const prevChild = parent.steps.value[index.value - 1];
|
102
|
+
if (prevChild)
|
103
|
+
prevChild.calcProgress(internalStatus.value);
|
104
|
+
};
|
105
|
+
const stepItemState = reactive({
|
106
|
+
uid: currentInstance.uid,
|
107
|
+
currentStatus,
|
108
|
+
setIndex,
|
109
|
+
calcProgress
|
110
|
+
});
|
111
|
+
parent.addStep(stepItemState);
|
112
|
+
return (_ctx, _cache) => {
|
113
|
+
return openBlock(), createElementBlock("div", {
|
114
|
+
style: normalizeStyle(unref(style)),
|
115
|
+
class: normalizeClass(unref(containerKls))
|
116
|
+
}, [
|
117
|
+
createCommentVNode(" icon & line "),
|
118
|
+
createElementVNode("div", {
|
119
|
+
class: normalizeClass([unref(ns).e("head"), unref(ns).is(unref(currentStatus))])
|
120
|
+
}, [
|
121
|
+
!unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
122
|
+
key: 0,
|
123
|
+
class: normalizeClass(unref(ns).e("line"))
|
124
|
+
}, [
|
125
|
+
createElementVNode("i", {
|
126
|
+
class: normalizeClass(unref(ns).e("line-inner")),
|
127
|
+
style: normalizeStyle(lineStyle.value)
|
128
|
+
}, null, 6)
|
129
|
+
], 2)) : createCommentVNode("v-if", true),
|
130
|
+
createElementVNode("div", {
|
131
|
+
class: normalizeClass([unref(ns).e("icon"), unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")])
|
132
|
+
}, [
|
133
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
134
|
+
_ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
135
|
+
key: 0,
|
136
|
+
class: normalizeClass(unref(ns).e("icon-inner"))
|
137
|
+
}, {
|
138
|
+
default: withCtx(() => [
|
139
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
140
|
+
]),
|
141
|
+
_: 1
|
142
|
+
}, 8, ["class"])) : unref(currentStatus) === "success" ? (openBlock(), createBlock(unref(ElIcon), {
|
143
|
+
key: 1,
|
144
|
+
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
145
|
+
}, {
|
146
|
+
default: withCtx(() => [
|
147
|
+
createVNode(unref(Check))
|
148
|
+
]),
|
149
|
+
_: 1
|
150
|
+
}, 8, ["class"])) : unref(currentStatus) === "error" ? (openBlock(), createBlock(unref(ElIcon), {
|
151
|
+
key: 2,
|
152
|
+
class: normalizeClass([unref(ns).e("icon-inner"), unref(ns).is("status")])
|
153
|
+
}, {
|
154
|
+
default: withCtx(() => [
|
155
|
+
createVNode(unref(Close))
|
156
|
+
]),
|
157
|
+
_: 1
|
158
|
+
}, 8, ["class"])) : !unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
159
|
+
key: 3,
|
160
|
+
class: normalizeClass(unref(ns).e("icon-inner"))
|
161
|
+
}, toDisplayString(index.value + 1), 3)) : createCommentVNode("v-if", true)
|
162
|
+
])
|
163
|
+
], 2)
|
164
|
+
], 2),
|
165
|
+
createCommentVNode(" title & description "),
|
166
|
+
createElementVNode("div", {
|
167
|
+
class: normalizeClass(unref(ns).e("main"))
|
168
|
+
}, [
|
169
|
+
createElementVNode("div", {
|
170
|
+
class: normalizeClass([unref(ns).e("title"), unref(ns).is(unref(currentStatus))])
|
171
|
+
}, [
|
172
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
173
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
174
|
+
])
|
175
|
+
], 2),
|
176
|
+
unref(isSimple) ? (openBlock(), createElementBlock("div", {
|
177
|
+
key: 0,
|
178
|
+
class: normalizeClass(unref(ns).e("arrow"))
|
179
|
+
}, null, 2)) : (openBlock(), createElementBlock("div", {
|
180
|
+
key: 1,
|
181
|
+
class: normalizeClass([unref(ns).e("description"), unref(ns).is(unref(currentStatus))])
|
182
|
+
}, [
|
183
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
184
|
+
createTextVNode(toDisplayString(_ctx.description), 1)
|
185
|
+
])
|
186
|
+
], 2))
|
187
|
+
], 2)
|
188
|
+
], 6);
|
189
|
+
};
|
20
190
|
}
|
21
191
|
});
|
192
|
+
var Step = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "item.vue"]]);
|
22
193
|
|
23
|
-
export {
|
194
|
+
export { Step as default };
|
24
195
|
//# sourceMappingURL=item2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type Step from './item.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const stepProps = buildProps({\n /**\n * @description step title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description step custom icon. Icons can be passed via named slot as well\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description step description\n */\n description: {\n type: String,\n default: '',\n },\n /**\n * @description current status. It will be automatically set by Steps if not configured.\n */\n status: {\n type: String,\n values: ['', 'wait', 'process', 'finish', 'error', 'success'],\n default: '',\n },\n} as const)\n\nexport type StepProps = ExtractPropTypes<typeof stepProps>\n\nexport type StepInstance = InstanceType<typeof Step>\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;AACjE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
|
1
|
+
{"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.vue"],"sourcesContent":["<template>\n <div :style=\"style\" :class=\"containerKls\">\n <!-- icon & line -->\n <div :class=\"[ns.e('head'), ns.is(currentStatus)]\">\n <div v-if=\"!isSimple\" :class=\"ns.e('line')\">\n <i :class=\"ns.e('line-inner')\" :style=\"lineStyle\" />\n </div>\n\n <div\n :class=\"[ns.e('icon'), ns.is(icon || $slots.icon ? 'icon' : 'text')]\"\n >\n <slot name=\"icon\">\n <el-icon v-if=\"icon\" :class=\"ns.e('icon-inner')\">\n <component :is=\"icon\" />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'success'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Check />\n </el-icon>\n <el-icon\n v-else-if=\"currentStatus === 'error'\"\n :class=\"[ns.e('icon-inner'), ns.is('status')]\"\n >\n <Close />\n </el-icon>\n <div v-else-if=\"!isSimple\" :class=\"ns.e('icon-inner')\">\n {{ index + 1 }}\n </div>\n </slot>\n </div>\n </div>\n <!-- title & description -->\n <div :class=\"ns.e('main')\">\n <div :class=\"[ns.e('title'), ns.is(currentStatus)]\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"isSimple\" :class=\"ns.e('arrow')\" />\n <div v-else :class=\"[ns.e('description'), ns.is(currentStatus)]\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Check, Close } from '@element-plus/icons-vue'\nimport { isNumber } from '@element-plus/utils'\nimport { stepProps } from './item'\n\nimport type { CSSProperties, Ref } from 'vue'\n\nexport interface IStepsProps {\n space: number | string\n active: number\n direction: string\n alignCenter: boolean\n simple: boolean\n finishStatus: string\n processStatus: string\n}\n\nexport interface StepItemState {\n uid: number\n currentStatus: string\n setIndex: (val: number) => void\n calcProgress: (status: string) => void\n}\n\nexport interface IStepsInject {\n props: IStepsProps\n steps: Ref<StepItemState[]>\n addStep: (item: StepItemState) => void\n removeStep: (uid: number) => void\n}\n\ndefineOptions({\n name: 'ElStep',\n})\n\nconst props = defineProps(stepProps)\nconst ns = useNamespace('step')\nconst index = ref(-1)\nconst lineStyle = ref({})\nconst internalStatus = ref('')\nconst parent = inject('ElSteps') as IStepsInject\nconst currentInstance = getCurrentInstance()\n\nonMounted(() => {\n watch(\n [\n () => parent.props.active,\n () => parent.props.processStatus,\n () => parent.props.finishStatus,\n ],\n ([active]) => {\n updateStatus(active)\n },\n { immediate: true }\n )\n})\n\nonBeforeUnmount(() => {\n parent.removeStep(stepItemState.uid)\n})\n\nconst currentStatus = computed(() => {\n return props.status || internalStatus.value\n})\n\nconst prevStatus = computed(() => {\n const prevStep = parent.steps.value[index.value - 1]\n return prevStep ? prevStep.currentStatus : 'wait'\n})\n\nconst isCenter = computed(() => {\n return parent.props.alignCenter\n})\n\nconst isVertical = computed(() => {\n return parent.props.direction === 'vertical'\n})\n\nconst isSimple = computed(() => {\n return parent.props.simple\n})\n\nconst stepsCount = computed(() => {\n return parent.steps.value.length\n})\n\nconst isLast = computed(() => {\n return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance?.uid\n})\n\nconst space = computed(() => {\n return isSimple.value ? '' : parent.props.space\n})\n\nconst containerKls = computed(() => {\n return [\n ns.b(),\n ns.is(isSimple.value ? 'simple' : parent.props.direction),\n ns.is('flex', isLast.value && !space.value && !isCenter.value),\n ns.is('center', isCenter.value && !isVertical.value && !isSimple.value),\n ]\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n flexBasis: isNumber(space.value)\n ? `${space.value}px`\n : space.value\n ? space.value\n : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`,\n }\n if (isVertical.value) return style\n if (isLast.value) {\n style.maxWidth = `${100 / stepsCount.value}%`\n }\n return style\n})\n\nconst setIndex = (val: number) => {\n index.value = val\n}\n\nconst calcProgress = (status: string) => {\n const isWait = status === 'wait'\n const style: CSSProperties = {\n transitionDelay: `${isWait ? '-' : ''}${150 * index.value}ms`,\n }\n const step = status === parent.props.processStatus || isWait ? 0 : 100\n\n style.borderWidth = step && !isSimple.value ? '1px' : 0\n style[parent.props.direction === 'vertical' ? 'height' : 'width'] = `${step}%`\n lineStyle.value = style\n}\n\nconst updateStatus = (activeIndex: number) => {\n if (activeIndex > index.value) {\n internalStatus.value = parent.props.finishStatus\n } else if (activeIndex === index.value && prevStatus.value !== 'error') {\n internalStatus.value = parent.props.processStatus\n } else {\n internalStatus.value = 'wait'\n }\n const prevChild = parent.steps.value[index.value - 1]\n if (prevChild) prevChild.calcProgress(internalStatus.value)\n}\n\nconst stepItemState = reactive({\n uid: currentInstance!.uid,\n currentStatus,\n setIndex,\n calcProgress,\n})\n\nparent.addStep(stepItemState)\n</script>\n"],"names":["style"],"mappings":";;;;;;;;mCAyFc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAC9B,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAE,CAAA,CAAA,CAAA;AACpB,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,cAAA,GAAiB,IAAI,EAAE,CAAA,CAAA;AAC7B,IAAM,MAAA,MAAA,GAAS,OAAO,SAAS,CAAA,CAAA;AAC/B,IAAA,MAAM,kBAAkB,kBAAmB,EAAA,CAAA;AAE3C,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,KAAA,CAAA;AAAA,QACE,MAAA,MAAA,CAAA,KAAA,CAAA,MAAA;AAAA,QACE,MAAA,YAAmB,CAAA,aAAA;AAAA,QACnB,MAAA,YAAmB,CAAA,YAAA;AAAA,OACnB,EAAA,CAAA,CAAA,YAAa;AAAM,QACrB,YAAA,CAAA,MAAA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AA,gBAA2B,KAAA,CAAA,KAAA,IAAA,UAAA,CAAA,KAAA,KAAA,OAAA,EAAA;AAC7B,QAAe,cAAA,CAAA,KAAA,GAAQ,OAAO,KAAM,CAAA,aAAA,CAAA;AAAA;AAEpC,QAAe,cAAA,CAAA,KAAA,GAAQ,OAAO;AAAM,OAC/B;AACL,MAAA,MAAA,SAAA,GAAuB,MAAA,CAAA,KAAA,CAAA,KAAA,CAAA,KAAA,CAAA,KAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MACzB,IAAA,SAAA;AACA,QAAA,sBAAyB,CAAA,cAAY,CAAA;AACrC,KAAA,CAAA;AAA0D,IAC5D,MAAA,aAAA,GAAA,QAAA,CAAA;AAEA,MAAA,GAAA,iBAAsB,CAAS,GAAA;AAAA,MAC7B,aAAsB;AAAA,MACtB,QAAA;AAAA,MACA,YAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACF,MAAC,CAAA,OAAA,CAAA,aAAA,CAAA,CAAA;AAED,IAAA,OAAO,aAAqB,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Switch from './src/
|
2
|
-
export { switchEmits, switchProps } from './src/
|
1
|
+
import Switch from './src/switch2.mjs';
|
2
|
+
export { switchEmits, switchProps } from './src/switch.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElSwitch = withInstall(Switch);
|