@element-plus/nightly 0.0.20241230 → 0.0.20241231
Sign up to get free protection for your applications and to get access to all the features.
- 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/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +192 -42
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +42 -192
- package/es/components/anchor/src/anchor2.mjs.map +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/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +7 -69
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +69 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +29 -71
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +71 -29
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +402 -40
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +40 -402
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +79 -22
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +22 -79
- package/es/components/countdown/src/countdown2.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/descriptions/src/descriptions-row.mjs +63 -6
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +6 -63
- package/es/components/descriptions/src/descriptions-row2.mjs.map +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/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +232 -64
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +64 -232
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +24 -24
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +166 -15
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +15 -166
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message.mjs +145 -91
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +91 -145
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/pagination/src/components/jumper.mjs +7 -58
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +58 -7
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +23 -71
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +71 -23
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +114 -45
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +45 -114
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +64 -110
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +110 -64
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +258 -83
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +83 -258
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/scrollbar/src/bar.mjs +10 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -10
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/slider/index.mjs +2 -2
- package/es/components/slider/src/slider.mjs +88 -238
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +238 -88
- package/es/components/slider/src/slider2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +190 -19
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +19 -190
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +99 -27
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +27 -99
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +21 -36
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +36 -21
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +50 -123
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +123 -50
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/root.mjs +17 -79
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +79 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tour/index.mjs +3 -3
- package/es/components/tour/src/content.mjs +43 -67
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +67 -43
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +153 -68
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +68 -153
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/upload/index.mjs +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/upload2.mjs +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/components/upload/src/use-handlers.mjs.map +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +210 -27
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +27 -210
- package/es/components/watermark/src/watermark2.mjs.map +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/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +191 -42
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +42 -191
- package/lib/components/anchor/src/anchor2.js.map +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/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +7 -69
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +69 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +30 -71
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +71 -30
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +400 -40
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +40 -400
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +79 -23
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +23 -79
- package/lib/components/countdown/src/countdown2.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/descriptions/src/descriptions-row.js +63 -6
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +6 -63
- package/lib/components/descriptions/src/descriptions-row2.js.map +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/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +231 -64
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +64 -231
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +24 -24
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/mention/src/mention-dropdown.js +166 -16
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +16 -166
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message.js +144 -93
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +93 -144
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/pagination/src/components/jumper.js +7 -58
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +58 -7
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +23 -71
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +71 -23
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +114 -46
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +46 -114
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +65 -110
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +110 -65
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +257 -83
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +83 -257
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -31
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +31 -27
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/scrollbar/src/bar.js +10 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -10
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/slider/index.js +2 -2
- package/lib/components/slider/src/slider.js +89 -238
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +238 -89
- package/lib/components/slider/src/slider2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +190 -19
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +19 -190
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +99 -28
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +28 -99
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +21 -36
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +36 -21
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +50 -128
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +128 -50
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/root.js +17 -79
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +79 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tour/index.js +3 -3
- package/lib/components/tour/src/content.js +46 -67
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +67 -46
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +151 -67
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +67 -151
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/upload/index.js +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/upload2.js +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/components/upload/src/use-handlers.js.map +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +210 -27
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +27 -210
- package/lib/components/watermark/src/watermark2.js.map +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/web-types.json +1 -1
@@ -2,198 +2,27 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var iconsVue = require('@element-plus/icons-vue');
|
8
|
-
var item = require('./item.js');
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
11
|
-
var types = require('../../../utils/types.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var icon = require('../../../utils/vue/icon.js');
|
12
7
|
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
() => parent.props.active,
|
30
|
-
() => parent.props.processStatus,
|
31
|
-
() => parent.props.finishStatus
|
32
|
-
], ([active]) => {
|
33
|
-
updateStatus(active);
|
34
|
-
}, { immediate: true });
|
35
|
-
});
|
36
|
-
vue.onBeforeUnmount(() => {
|
37
|
-
parent.removeStep(stepItemState.uid);
|
38
|
-
});
|
39
|
-
const currentStatus = vue.computed(() => {
|
40
|
-
return props.status || internalStatus.value;
|
41
|
-
});
|
42
|
-
const prevStatus = vue.computed(() => {
|
43
|
-
const prevStep = parent.steps.value[index$2.value - 1];
|
44
|
-
return prevStep ? prevStep.currentStatus : "wait";
|
45
|
-
});
|
46
|
-
const isCenter = vue.computed(() => {
|
47
|
-
return parent.props.alignCenter;
|
48
|
-
});
|
49
|
-
const isVertical = vue.computed(() => {
|
50
|
-
return parent.props.direction === "vertical";
|
51
|
-
});
|
52
|
-
const isSimple = vue.computed(() => {
|
53
|
-
return parent.props.simple;
|
54
|
-
});
|
55
|
-
const stepsCount = vue.computed(() => {
|
56
|
-
return parent.steps.value.length;
|
57
|
-
});
|
58
|
-
const isLast = vue.computed(() => {
|
59
|
-
var _a;
|
60
|
-
return ((_a = parent.steps.value[stepsCount.value - 1]) == null ? void 0 : _a.uid) === (currentInstance == null ? void 0 : currentInstance.uid);
|
61
|
-
});
|
62
|
-
const space = vue.computed(() => {
|
63
|
-
return isSimple.value ? "" : parent.props.space;
|
64
|
-
});
|
65
|
-
const containerKls = vue.computed(() => {
|
66
|
-
return [
|
67
|
-
ns.b(),
|
68
|
-
ns.is(isSimple.value ? "simple" : parent.props.direction),
|
69
|
-
ns.is("flex", isLast.value && !space.value && !isCenter.value),
|
70
|
-
ns.is("center", isCenter.value && !isVertical.value && !isSimple.value)
|
71
|
-
];
|
72
|
-
});
|
73
|
-
const style = vue.computed(() => {
|
74
|
-
const style2 = {
|
75
|
-
flexBasis: types.isNumber(space.value) ? `${space.value}px` : space.value ? space.value : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`
|
76
|
-
};
|
77
|
-
if (isVertical.value)
|
78
|
-
return style2;
|
79
|
-
if (isLast.value) {
|
80
|
-
style2.maxWidth = `${100 / stepsCount.value}%`;
|
81
|
-
}
|
82
|
-
return style2;
|
83
|
-
});
|
84
|
-
const setIndex = (val) => {
|
85
|
-
index$2.value = val;
|
86
|
-
};
|
87
|
-
const calcProgress = (status) => {
|
88
|
-
const isWait = status === "wait";
|
89
|
-
const style2 = {
|
90
|
-
transitionDelay: `${isWait ? "-" : ""}${150 * index$2.value}ms`
|
91
|
-
};
|
92
|
-
const step = status === parent.props.processStatus || isWait ? 0 : 100;
|
93
|
-
style2.borderWidth = step && !isSimple.value ? "1px" : 0;
|
94
|
-
style2[parent.props.direction === "vertical" ? "height" : "width"] = `${step}%`;
|
95
|
-
lineStyle.value = style2;
|
96
|
-
};
|
97
|
-
const updateStatus = (activeIndex) => {
|
98
|
-
if (activeIndex > index$2.value) {
|
99
|
-
internalStatus.value = parent.props.finishStatus;
|
100
|
-
} else if (activeIndex === index$2.value && prevStatus.value !== "error") {
|
101
|
-
internalStatus.value = parent.props.processStatus;
|
102
|
-
} else {
|
103
|
-
internalStatus.value = "wait";
|
104
|
-
}
|
105
|
-
const prevChild = parent.steps.value[index$2.value - 1];
|
106
|
-
if (prevChild)
|
107
|
-
prevChild.calcProgress(internalStatus.value);
|
108
|
-
};
|
109
|
-
const stepItemState = vue.reactive({
|
110
|
-
uid: currentInstance.uid,
|
111
|
-
currentStatus,
|
112
|
-
setIndex,
|
113
|
-
calcProgress
|
114
|
-
});
|
115
|
-
parent.addStep(stepItemState);
|
116
|
-
return (_ctx, _cache) => {
|
117
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
118
|
-
style: vue.normalizeStyle(vue.unref(style)),
|
119
|
-
class: vue.normalizeClass(vue.unref(containerKls))
|
120
|
-
}, [
|
121
|
-
vue.createCommentVNode(" icon & line "),
|
122
|
-
vue.createElementVNode("div", {
|
123
|
-
class: vue.normalizeClass([vue.unref(ns).e("head"), vue.unref(ns).is(vue.unref(currentStatus))])
|
124
|
-
}, [
|
125
|
-
!vue.unref(isSimple) ? (vue.openBlock(), vue.createElementBlock("div", {
|
126
|
-
key: 0,
|
127
|
-
class: vue.normalizeClass(vue.unref(ns).e("line"))
|
128
|
-
}, [
|
129
|
-
vue.createElementVNode("i", {
|
130
|
-
class: vue.normalizeClass(vue.unref(ns).e("line-inner")),
|
131
|
-
style: vue.normalizeStyle(lineStyle.value)
|
132
|
-
}, null, 6)
|
133
|
-
], 2)) : vue.createCommentVNode("v-if", true),
|
134
|
-
vue.createElementVNode("div", {
|
135
|
-
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(ns).is(_ctx.icon || _ctx.$slots.icon ? "icon" : "text")])
|
136
|
-
}, [
|
137
|
-
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
138
|
-
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
139
|
-
key: 0,
|
140
|
-
class: vue.normalizeClass(vue.unref(ns).e("icon-inner"))
|
141
|
-
}, {
|
142
|
-
default: vue.withCtx(() => [
|
143
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
144
|
-
]),
|
145
|
-
_: 1
|
146
|
-
}, 8, ["class"])) : vue.unref(currentStatus) === "success" ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
147
|
-
key: 1,
|
148
|
-
class: vue.normalizeClass([vue.unref(ns).e("icon-inner"), vue.unref(ns).is("status")])
|
149
|
-
}, {
|
150
|
-
default: vue.withCtx(() => [
|
151
|
-
vue.createVNode(vue.unref(iconsVue.Check))
|
152
|
-
]),
|
153
|
-
_: 1
|
154
|
-
}, 8, ["class"])) : vue.unref(currentStatus) === "error" ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
155
|
-
key: 2,
|
156
|
-
class: vue.normalizeClass([vue.unref(ns).e("icon-inner"), vue.unref(ns).is("status")])
|
157
|
-
}, {
|
158
|
-
default: vue.withCtx(() => [
|
159
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
160
|
-
]),
|
161
|
-
_: 1
|
162
|
-
}, 8, ["class"])) : !vue.unref(isSimple) ? (vue.openBlock(), vue.createElementBlock("div", {
|
163
|
-
key: 3,
|
164
|
-
class: vue.normalizeClass(vue.unref(ns).e("icon-inner"))
|
165
|
-
}, vue.toDisplayString(index$2.value + 1), 3)) : vue.createCommentVNode("v-if", true)
|
166
|
-
])
|
167
|
-
], 2)
|
168
|
-
], 2),
|
169
|
-
vue.createCommentVNode(" title & description "),
|
170
|
-
vue.createElementVNode("div", {
|
171
|
-
class: vue.normalizeClass(vue.unref(ns).e("main"))
|
172
|
-
}, [
|
173
|
-
vue.createElementVNode("div", {
|
174
|
-
class: vue.normalizeClass([vue.unref(ns).e("title"), vue.unref(ns).is(vue.unref(currentStatus))])
|
175
|
-
}, [
|
176
|
-
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
177
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
178
|
-
])
|
179
|
-
], 2),
|
180
|
-
vue.unref(isSimple) ? (vue.openBlock(), vue.createElementBlock("div", {
|
181
|
-
key: 0,
|
182
|
-
class: vue.normalizeClass(vue.unref(ns).e("arrow"))
|
183
|
-
}, null, 2)) : (vue.openBlock(), vue.createElementBlock("div", {
|
184
|
-
key: 1,
|
185
|
-
class: vue.normalizeClass([vue.unref(ns).e("description"), vue.unref(ns).is(vue.unref(currentStatus))])
|
186
|
-
}, [
|
187
|
-
vue.renderSlot(_ctx.$slots, "description", {}, () => [
|
188
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
189
|
-
])
|
190
|
-
], 2))
|
191
|
-
], 2)
|
192
|
-
], 6);
|
193
|
-
};
|
8
|
+
const stepProps = runtime.buildProps({
|
9
|
+
title: {
|
10
|
+
type: String,
|
11
|
+
default: ""
|
12
|
+
},
|
13
|
+
icon: {
|
14
|
+
type: icon.iconPropType
|
15
|
+
},
|
16
|
+
description: {
|
17
|
+
type: String,
|
18
|
+
default: ""
|
19
|
+
},
|
20
|
+
status: {
|
21
|
+
type: String,
|
22
|
+
values: ["", "wait", "process", "finish", "error", "success"],
|
23
|
+
default: ""
|
194
24
|
}
|
195
25
|
});
|
196
|
-
var Step = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "item.vue"]]);
|
197
26
|
|
198
|
-
exports
|
27
|
+
exports.stepProps = stepProps;
|
199
28
|
//# sourceMappingURL=item2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"item2.js","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":["useNamespace","index","ref","inject","getCurrentInstance","onMounted","watch","onBeforeUnmount","computed","isNumber","style","reactive"],"mappings":"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"}
|
1
|
+
{"version":3,"file":"item2.js","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":["buildProps","iconPropType"],"mappings":";;;;;;;AACY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;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;;;;"}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var tag$1 = require('./src/
|
6
|
-
var tag = require('./src/
|
5
|
+
var tag$1 = require('./src/tag.js');
|
6
|
+
var tag = require('./src/tag2.js');
|
7
7
|
var install = require('../../utils/vue/install.js');
|
8
8
|
|
9
9
|
const ElTag = install.withInstall(tag$1["default"]);
|
@@ -2,35 +2,106 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var index$1 = require('../../icon/index.js');
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
8
|
+
var tag = require('./tag2.js');
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
+
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
7
12
|
|
8
|
-
const
|
9
|
-
|
10
|
-
type: String,
|
11
|
-
values: ["primary", "success", "info", "warning", "danger"],
|
12
|
-
default: "primary"
|
13
|
-
},
|
14
|
-
closable: Boolean,
|
15
|
-
disableTransitions: Boolean,
|
16
|
-
hit: Boolean,
|
17
|
-
color: String,
|
18
|
-
size: {
|
19
|
-
type: String,
|
20
|
-
values: size.componentSizes
|
21
|
-
},
|
22
|
-
effect: {
|
23
|
-
type: String,
|
24
|
-
values: ["dark", "light", "plain"],
|
25
|
-
default: "light"
|
26
|
-
},
|
27
|
-
round: Boolean
|
13
|
+
const __default__ = vue.defineComponent({
|
14
|
+
name: "ElTag"
|
28
15
|
});
|
29
|
-
const
|
30
|
-
|
31
|
-
|
32
|
-
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
17
|
+
...__default__,
|
18
|
+
props: tag.tagProps,
|
19
|
+
emits: tag.tagEmits,
|
20
|
+
setup(__props, { emit }) {
|
21
|
+
const props = __props;
|
22
|
+
const tagSize = useFormCommonProps.useFormSize();
|
23
|
+
const ns = index.useNamespace("tag");
|
24
|
+
const containerKls = vue.computed(() => {
|
25
|
+
const { type, hit, effect, closable, round } = props;
|
26
|
+
return [
|
27
|
+
ns.b(),
|
28
|
+
ns.is("closable", closable),
|
29
|
+
ns.m(type || "primary"),
|
30
|
+
ns.m(tagSize.value),
|
31
|
+
ns.m(effect),
|
32
|
+
ns.is("hit", hit),
|
33
|
+
ns.is("round", round)
|
34
|
+
];
|
35
|
+
});
|
36
|
+
const handleClose = (event) => {
|
37
|
+
emit("close", event);
|
38
|
+
};
|
39
|
+
const handleClick = (event) => {
|
40
|
+
emit("click", event);
|
41
|
+
};
|
42
|
+
const handleVNodeMounted = (vnode) => {
|
43
|
+
var _a, _b, _c;
|
44
|
+
if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
|
45
|
+
vnode.component.subTree.component.bum = null;
|
46
|
+
}
|
47
|
+
};
|
48
|
+
return (_ctx, _cache) => {
|
49
|
+
return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
|
50
|
+
key: 0,
|
51
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
52
|
+
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
53
|
+
onClick: handleClick
|
54
|
+
}, [
|
55
|
+
vue.createElementVNode("span", {
|
56
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
57
|
+
}, [
|
58
|
+
vue.renderSlot(_ctx.$slots, "default")
|
59
|
+
], 2),
|
60
|
+
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
61
|
+
key: 0,
|
62
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
63
|
+
onClick: vue.withModifiers(handleClose, ["stop"])
|
64
|
+
}, {
|
65
|
+
default: vue.withCtx(() => [
|
66
|
+
vue.createVNode(vue.unref(iconsVue.Close))
|
67
|
+
]),
|
68
|
+
_: 1
|
69
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
70
|
+
], 6)) : (vue.openBlock(), vue.createBlock(vue.Transition, {
|
71
|
+
key: 1,
|
72
|
+
name: `${vue.unref(ns).namespace.value}-zoom-in-center`,
|
73
|
+
appear: "",
|
74
|
+
onVnodeMounted: handleVNodeMounted
|
75
|
+
}, {
|
76
|
+
default: vue.withCtx(() => [
|
77
|
+
vue.createElementVNode("span", {
|
78
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
79
|
+
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
80
|
+
onClick: handleClick
|
81
|
+
}, [
|
82
|
+
vue.createElementVNode("span", {
|
83
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
84
|
+
}, [
|
85
|
+
vue.renderSlot(_ctx.$slots, "default")
|
86
|
+
], 2),
|
87
|
+
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
88
|
+
key: 0,
|
89
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
90
|
+
onClick: vue.withModifiers(handleClose, ["stop"])
|
91
|
+
}, {
|
92
|
+
default: vue.withCtx(() => [
|
93
|
+
vue.createVNode(vue.unref(iconsVue.Close))
|
94
|
+
]),
|
95
|
+
_: 1
|
96
|
+
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
97
|
+
], 6)
|
98
|
+
]),
|
99
|
+
_: 3
|
100
|
+
}, 8, ["name"]));
|
101
|
+
};
|
102
|
+
}
|
103
|
+
});
|
104
|
+
var Tag = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tag.vue"]]);
|
33
105
|
|
34
|
-
exports
|
35
|
-
exports.tagProps = tagProps;
|
106
|
+
exports["default"] = Tag;
|
36
107
|
//# sourceMappingURL=tag.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tag.js","sources":["../../../../../../packages/components/tag/src/tag.
|
1
|
+
{"version":3,"file":"tag.js","sources":["../../../../../../packages/components/tag/src/tag.vue"],"sourcesContent":["<template>\n <span\n v-if=\"disableTransitions\"\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <el-icon v-if=\"closable\" :class=\"ns.e('close')\" @click.stop=\"handleClose\">\n <Close />\n </el-icon>\n </span>\n <transition\n v-else\n :name=\"`${ns.namespace.value}-zoom-in-center`\"\n appear\n @vue:mounted=\"handleVNodeMounted\"\n >\n <span\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <el-icon v-if=\"closable\" :class=\"ns.e('close')\" @click.stop=\"handleClose\">\n <Close />\n </el-icon>\n </span>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { Close } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\n\nimport { tagEmits, tagProps } from './tag'\nimport type { VNode } from 'vue'\n\ndefineOptions({\n name: 'ElTag',\n})\nconst props = defineProps(tagProps)\nconst emit = defineEmits(tagEmits)\n\nconst tagSize = useFormSize()\nconst ns = useNamespace('tag')\nconst containerKls = computed(() => {\n const { type, hit, effect, closable, round } = props\n return [\n ns.b(),\n ns.is('closable', closable),\n ns.m(type || 'primary'),\n ns.m(tagSize.value),\n ns.m(effect),\n ns.is('hit', hit),\n ns.is('round', round),\n ]\n})\n\n// methods\nconst handleClose = (event: MouseEvent) => {\n emit('close', event)\n}\n\nconst handleClick = (event: MouseEvent) => {\n emit('click', event)\n}\n\nconst handleVNodeMounted = (vnode: VNode) => {\n // @ts-ignore\n if (vnode?.component?.subTree?.component?.bum) {\n // @ts-ignore\n vnode.component.subTree.component.bum = null\n }\n}\n</script>\n"],"names":["useFormSize","useNamespace","computed"],"mappings":";;;;;;;;;;;;uCA6Cc,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,UAAUA,8BAAY,EAAA,CAAA;AAC5B,IAAM,MAAA,EAAA,GAAKC,mBAAa,KAAK,CAAA,CAAA;AAC7B,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,EAAE,IAAM,EAAA,GAAA,EAAK,MAAQ,EAAA,QAAA,EAAU,OAAU,GAAA,KAAA,CAAA;AAC/C,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAA,CAAG,EAAG,CAAA,UAAA,EAAY,QAAQ,CAAA;AAAA,QAC1B,EAAA,CAAG,CAAE,CAAA,IAAA,IAAQ,SAAS,CAAA;AAAA,QACtB,EAAA,CAAG,CAAE,CAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,QAClB,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,QACX,EAAA,CAAG,EAAG,CAAA,KAAA,EAAO,GAAG,CAAA;AAAA,QAChB,EAAA,CAAG,EAAG,CAAA,OAAA,EAAS,KAAK,CAAA;AAAA,OACtB,CAAA;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,WAAA,GAAc,CAAC,KAAsB,KAAA;AACzC,MAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,KAAsB,KAAA;AACzC,MAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAM,MAAA,kBAAA,GAAqB,CAAC,KAAiB,KAAA;AAE3C,MAAA,IAAI,EAAO,EAAA,EAAA,EAAA,EAAA,CAAA;AAET,MAAM,IAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,CAAA,EAAkB,GAAA,KAAA,IAAA,IAAA,GAAgB,KAAA,CAAA,GAAA,KAAA,CAAA,SAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,GAAA,EAAA;AAAA,QAC1C,KAAA,CAAA,SAAA,CAAA,OAAA,CAAA,SAAA,CAAA,GAAA,GAAA,IAAA,CAAA;AAAA,OACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,106 +2,35 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var iconsVue = require('@element-plus/icons-vue');
|
8
|
-
var tag = require('./tag.js');
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var size = require('../../../constants/size.js');
|
12
7
|
|
13
|
-
const
|
14
|
-
|
8
|
+
const tagProps = runtime.buildProps({
|
9
|
+
type: {
|
10
|
+
type: String,
|
11
|
+
values: ["primary", "success", "info", "warning", "danger"],
|
12
|
+
default: "primary"
|
13
|
+
},
|
14
|
+
closable: Boolean,
|
15
|
+
disableTransitions: Boolean,
|
16
|
+
hit: Boolean,
|
17
|
+
color: String,
|
18
|
+
size: {
|
19
|
+
type: String,
|
20
|
+
values: size.componentSizes
|
21
|
+
},
|
22
|
+
effect: {
|
23
|
+
type: String,
|
24
|
+
values: ["dark", "light", "plain"],
|
25
|
+
default: "light"
|
26
|
+
},
|
27
|
+
round: Boolean
|
15
28
|
});
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
setup(__props, { emit }) {
|
21
|
-
const props = __props;
|
22
|
-
const tagSize = useFormCommonProps.useFormSize();
|
23
|
-
const ns = index.useNamespace("tag");
|
24
|
-
const containerKls = vue.computed(() => {
|
25
|
-
const { type, hit, effect, closable, round } = props;
|
26
|
-
return [
|
27
|
-
ns.b(),
|
28
|
-
ns.is("closable", closable),
|
29
|
-
ns.m(type || "primary"),
|
30
|
-
ns.m(tagSize.value),
|
31
|
-
ns.m(effect),
|
32
|
-
ns.is("hit", hit),
|
33
|
-
ns.is("round", round)
|
34
|
-
];
|
35
|
-
});
|
36
|
-
const handleClose = (event) => {
|
37
|
-
emit("close", event);
|
38
|
-
};
|
39
|
-
const handleClick = (event) => {
|
40
|
-
emit("click", event);
|
41
|
-
};
|
42
|
-
const handleVNodeMounted = (vnode) => {
|
43
|
-
var _a, _b, _c;
|
44
|
-
if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
|
45
|
-
vnode.component.subTree.component.bum = null;
|
46
|
-
}
|
47
|
-
};
|
48
|
-
return (_ctx, _cache) => {
|
49
|
-
return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
|
50
|
-
key: 0,
|
51
|
-
class: vue.normalizeClass(vue.unref(containerKls)),
|
52
|
-
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
53
|
-
onClick: handleClick
|
54
|
-
}, [
|
55
|
-
vue.createElementVNode("span", {
|
56
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
57
|
-
}, [
|
58
|
-
vue.renderSlot(_ctx.$slots, "default")
|
59
|
-
], 2),
|
60
|
-
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
61
|
-
key: 0,
|
62
|
-
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
63
|
-
onClick: vue.withModifiers(handleClose, ["stop"])
|
64
|
-
}, {
|
65
|
-
default: vue.withCtx(() => [
|
66
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
67
|
-
]),
|
68
|
-
_: 1
|
69
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
70
|
-
], 6)) : (vue.openBlock(), vue.createBlock(vue.Transition, {
|
71
|
-
key: 1,
|
72
|
-
name: `${vue.unref(ns).namespace.value}-zoom-in-center`,
|
73
|
-
appear: "",
|
74
|
-
onVnodeMounted: handleVNodeMounted
|
75
|
-
}, {
|
76
|
-
default: vue.withCtx(() => [
|
77
|
-
vue.createElementVNode("span", {
|
78
|
-
class: vue.normalizeClass(vue.unref(containerKls)),
|
79
|
-
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
80
|
-
onClick: handleClick
|
81
|
-
}, [
|
82
|
-
vue.createElementVNode("span", {
|
83
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
84
|
-
}, [
|
85
|
-
vue.renderSlot(_ctx.$slots, "default")
|
86
|
-
], 2),
|
87
|
-
_ctx.closable ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
88
|
-
key: 0,
|
89
|
-
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
90
|
-
onClick: vue.withModifiers(handleClose, ["stop"])
|
91
|
-
}, {
|
92
|
-
default: vue.withCtx(() => [
|
93
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
94
|
-
]),
|
95
|
-
_: 1
|
96
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
97
|
-
], 6)
|
98
|
-
]),
|
99
|
-
_: 3
|
100
|
-
}, 8, ["name"]));
|
101
|
-
};
|
102
|
-
}
|
103
|
-
});
|
104
|
-
var Tag = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tag.vue"]]);
|
29
|
+
const tagEmits = {
|
30
|
+
close: (evt) => evt instanceof MouseEvent,
|
31
|
+
click: (evt) => evt instanceof MouseEvent
|
32
|
+
};
|
105
33
|
|
106
|
-
exports
|
34
|
+
exports.tagEmits = tagEmits;
|
35
|
+
exports.tagProps = tagProps;
|
107
36
|
//# sourceMappingURL=tag2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tag2.js","sources":["../../../../../../packages/components/tag/src/tag.
|
1
|
+
{"version":3,"file":"tag2.js","sources":["../../../../../../packages/components/tag/src/tag.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\nimport type Tag from './tag.vue'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const tagProps = buildProps({\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger'],\n default: 'primary',\n },\n /**\n * @description whether Tag can be removed\n */\n closable: Boolean,\n /**\n * @description whether to disable animations\n */\n disableTransitions: Boolean,\n /**\n * @description whether Tag has a highlighted border\n */\n hit: Boolean,\n /**\n * @description background color of the Tag\n */\n color: String,\n /**\n * @description size of Tag\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description theme of Tag\n */\n effect: {\n type: String,\n values: ['dark', 'light', 'plain'],\n default: 'light',\n },\n /**\n * @description whether Tag is rounded\n */\n round: Boolean,\n} as const)\nexport type TagProps = ExtractPropTypes<typeof tagProps>\n\nexport const tagEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type TagEmits = typeof tagEmits\n\nexport type TagInstance = InstanceType<typeof Tag>\n"],"names":["buildProps","componentSizes"],"mappings":";;;;;;;AAEY,MAAC,QAAQ,GAAGA,kBAAU,CAAC;AACnC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC/D,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,kBAAkB,EAAE,OAAO;AAC7B,EAAE,GAAG,EAAE,OAAO;AACd,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;AACtC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,CAAC,EAAE;AACS,MAAC,QAAQ,GAAG;AACxB,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;"}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var text$1 = require('./src/
|
6
|
-
var text = require('./src/
|
5
|
+
var text$1 = require('./src/text2.js');
|
6
|
+
var text = require('./src/text.js');
|
7
7
|
var install = require('../../utils/vue/install.js');
|
8
8
|
|
9
9
|
const ElText = install.withInstall(text$1["default"]);
|