@element-plus/nightly 0.0.20240926 → 0.0.20240927
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +23 -4
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +23 -4
- 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/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 +119 -26
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +26 -119
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +81 -365
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +365 -81
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +33 -85
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +85 -33
- 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/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel.mjs +205 -62
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +62 -205
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +39 -15
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +15 -39
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-group.mjs +73 -30
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +30 -73
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +90 -19
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +19 -90
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +10 -62
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +62 -10
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.mjs +1 -1
- package/es/components/dialog/src/dialog-content.mjs +26 -89
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +89 -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/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +2 -2
- package/es/components/index.mjs +24 -24
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +345 -60
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +60 -345
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -35
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +35 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +64 -145
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +145 -64
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +17 -102
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +102 -17
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +59 -9
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +9 -59
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +71 -25
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +25 -71
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +4 -4
- package/es/components/popper/src/content.mjs +93 -137
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +137 -93
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/popper/src/popper.mjs +25 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -25
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +66 -6
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +6 -66
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio.mjs +34 -73
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +73 -34
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar.mjs +64 -11
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +11 -64
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/scrollbar/src/thumb.mjs +11 -130
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +130 -11
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +36 -39
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +39 -36
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +229 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -229
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/store/tree.mjs +11 -0
- package/es/components/table/src/store/tree.mjs.map +1 -1
- package/es/components/table/src/store/watcher.mjs +2 -0
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/utils-helper.d.ts +1 -0
- package/es/components/table/src/table/utils-helper.mjs +5 -1
- package/es/components/table/src/table/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table.mjs +3 -1
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +22 -4
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +72 -13
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +13 -72
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +183 -29
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +29 -183
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tour/index.mjs +3 -3
- package/es/components/tour/src/content.mjs +44 -68
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +68 -44
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +44 -169
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step2.mjs +169 -44
- package/es/components/tour/src/step2.mjs.map +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -128
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +128 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +29 -175
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +175 -29
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +28 -209
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +209 -28
- 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/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +119 -27
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +27 -119
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +80 -363
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +363 -80
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +37 -85
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +85 -37
- 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/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel.js +205 -63
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +63 -205
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +39 -16
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +16 -39
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-group.js +73 -31
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +31 -73
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +90 -19
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +19 -90
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +9 -62
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +62 -9
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.js +1 -1
- package/lib/components/dialog/src/dialog-content.js +26 -88
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +88 -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/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +2 -2
- package/lib/components/index.js +24 -24
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +343 -59
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +59 -343
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -35
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +35 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +65 -144
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +144 -65
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +18 -102
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +102 -18
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +59 -9
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +9 -59
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +71 -25
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +25 -71
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +4 -4
- package/lib/components/popper/src/content.js +98 -137
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +137 -98
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/popper/src/popper.js +28 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -28
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +66 -6
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +6 -66
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio.js +36 -73
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +73 -36
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar.js +64 -11
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +11 -64
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/scrollbar/src/thumb.js +11 -130
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +130 -11
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +37 -39
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +39 -37
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +228 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -228
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/store/tree.js +11 -0
- package/lib/components/table/src/store/tree.js.map +1 -1
- package/lib/components/table/src/store/watcher.js +2 -0
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/utils-helper.d.ts +1 -0
- package/lib/components/table/src/table/utils-helper.js +5 -1
- package/lib/components/table/src/table/utils-helper.js.map +1 -1
- package/lib/components/table/src/table.js +3 -1
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +22 -4
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +72 -13
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +13 -72
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +183 -29
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +29 -183
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tour/index.js +3 -3
- package/lib/components/tour/src/content.js +47 -68
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +68 -47
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +44 -168
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step2.js +168 -44
- package/lib/components/tour/src/step2.js.map +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -128
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +128 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-list.js +30 -175
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +175 -30
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +28 -209
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +209 -28
- 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
|
@@ -1,135 +1,16 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, computed, onBeforeUnmount, toRef, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, vShow } from 'vue';
|
|
2
|
-
import { isClient, useEventListener } from '@vueuse/core';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import '../../../
|
|
5
|
-
import { scrollbarContextKey } from './constants.mjs';
|
|
6
|
-
import { BAR_MAP, renderThumbStyle } from './util.mjs';
|
|
7
|
-
import { thumbProps } from './thumb2.mjs';
|
|
8
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
-
import { throwError } from '../../../utils/error.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
11
3
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
throwError(COMPONENT_NAME, "can not inject scrollbar context");
|
|
22
|
-
const instance = ref();
|
|
23
|
-
const thumb = ref();
|
|
24
|
-
const thumbState = ref({});
|
|
25
|
-
const visible = ref(false);
|
|
26
|
-
let cursorDown = false;
|
|
27
|
-
let cursorLeave = false;
|
|
28
|
-
let originalOnSelectStart = isClient ? document.onselectstart : null;
|
|
29
|
-
const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
|
|
30
|
-
const thumbStyle = computed(() => renderThumbStyle({
|
|
31
|
-
size: props.size,
|
|
32
|
-
move: props.move,
|
|
33
|
-
bar: bar.value
|
|
34
|
-
}));
|
|
35
|
-
const offsetRatio = computed(() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]);
|
|
36
|
-
const clickThumbHandler = (e) => {
|
|
37
|
-
var _a;
|
|
38
|
-
e.stopPropagation();
|
|
39
|
-
if (e.ctrlKey || [1, 2].includes(e.button))
|
|
40
|
-
return;
|
|
41
|
-
(_a = window.getSelection()) == null ? void 0 : _a.removeAllRanges();
|
|
42
|
-
startDrag(e);
|
|
43
|
-
const el = e.currentTarget;
|
|
44
|
-
if (!el)
|
|
45
|
-
return;
|
|
46
|
-
thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]);
|
|
47
|
-
};
|
|
48
|
-
const clickTrackHandler = (e) => {
|
|
49
|
-
if (!thumb.value || !instance.value || !scrollbar.wrapElement)
|
|
50
|
-
return;
|
|
51
|
-
const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]);
|
|
52
|
-
const thumbHalf = thumb.value[bar.value.offset] / 2;
|
|
53
|
-
const thumbPositionPercentage = (offset - thumbHalf) * 100 * offsetRatio.value / instance.value[bar.value.offset];
|
|
54
|
-
scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
|
|
55
|
-
};
|
|
56
|
-
const startDrag = (e) => {
|
|
57
|
-
e.stopImmediatePropagation();
|
|
58
|
-
cursorDown = true;
|
|
59
|
-
document.addEventListener("mousemove", mouseMoveDocumentHandler);
|
|
60
|
-
document.addEventListener("mouseup", mouseUpDocumentHandler);
|
|
61
|
-
originalOnSelectStart = document.onselectstart;
|
|
62
|
-
document.onselectstart = () => false;
|
|
63
|
-
};
|
|
64
|
-
const mouseMoveDocumentHandler = (e) => {
|
|
65
|
-
if (!instance.value || !thumb.value)
|
|
66
|
-
return;
|
|
67
|
-
if (cursorDown === false)
|
|
68
|
-
return;
|
|
69
|
-
const prevPage = thumbState.value[bar.value.axis];
|
|
70
|
-
if (!prevPage)
|
|
71
|
-
return;
|
|
72
|
-
const offset = (instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
|
|
73
|
-
const thumbClickPosition = thumb.value[bar.value.offset] - prevPage;
|
|
74
|
-
const thumbPositionPercentage = (offset - thumbClickPosition) * 100 * offsetRatio.value / instance.value[bar.value.offset];
|
|
75
|
-
scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
|
|
76
|
-
};
|
|
77
|
-
const mouseUpDocumentHandler = () => {
|
|
78
|
-
cursorDown = false;
|
|
79
|
-
thumbState.value[bar.value.axis] = 0;
|
|
80
|
-
document.removeEventListener("mousemove", mouseMoveDocumentHandler);
|
|
81
|
-
document.removeEventListener("mouseup", mouseUpDocumentHandler);
|
|
82
|
-
restoreOnselectstart();
|
|
83
|
-
if (cursorLeave)
|
|
84
|
-
visible.value = false;
|
|
85
|
-
};
|
|
86
|
-
const mouseMoveScrollbarHandler = () => {
|
|
87
|
-
cursorLeave = false;
|
|
88
|
-
visible.value = !!props.size;
|
|
89
|
-
};
|
|
90
|
-
const mouseLeaveScrollbarHandler = () => {
|
|
91
|
-
cursorLeave = true;
|
|
92
|
-
visible.value = cursorDown;
|
|
93
|
-
};
|
|
94
|
-
onBeforeUnmount(() => {
|
|
95
|
-
restoreOnselectstart();
|
|
96
|
-
document.removeEventListener("mouseup", mouseUpDocumentHandler);
|
|
97
|
-
});
|
|
98
|
-
const restoreOnselectstart = () => {
|
|
99
|
-
if (document.onselectstart !== originalOnSelectStart)
|
|
100
|
-
document.onselectstart = originalOnSelectStart;
|
|
101
|
-
};
|
|
102
|
-
useEventListener(toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler);
|
|
103
|
-
useEventListener(toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler);
|
|
104
|
-
return (_ctx, _cache) => {
|
|
105
|
-
return openBlock(), createBlock(Transition, {
|
|
106
|
-
name: unref(ns).b("fade"),
|
|
107
|
-
persisted: ""
|
|
108
|
-
}, {
|
|
109
|
-
default: withCtx(() => [
|
|
110
|
-
withDirectives(createElementVNode("div", {
|
|
111
|
-
ref_key: "instance",
|
|
112
|
-
ref: instance,
|
|
113
|
-
class: normalizeClass([unref(ns).e("bar"), unref(ns).is(unref(bar).key)]),
|
|
114
|
-
onMousedown: clickTrackHandler
|
|
115
|
-
}, [
|
|
116
|
-
createElementVNode("div", {
|
|
117
|
-
ref_key: "thumb",
|
|
118
|
-
ref: thumb,
|
|
119
|
-
class: normalizeClass(unref(ns).e("thumb")),
|
|
120
|
-
style: normalizeStyle(unref(thumbStyle)),
|
|
121
|
-
onMousedown: clickThumbHandler
|
|
122
|
-
}, null, 38)
|
|
123
|
-
], 34), [
|
|
124
|
-
[vShow, _ctx.always || visible.value]
|
|
125
|
-
])
|
|
126
|
-
]),
|
|
127
|
-
_: 1
|
|
128
|
-
}, 8, ["name"]);
|
|
129
|
-
};
|
|
130
|
-
}
|
|
4
|
+
const thumbProps = buildProps({
|
|
5
|
+
vertical: Boolean,
|
|
6
|
+
size: String,
|
|
7
|
+
move: Number,
|
|
8
|
+
ratio: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
always: Boolean
|
|
131
13
|
});
|
|
132
|
-
var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "thumb.vue"]]);
|
|
133
14
|
|
|
134
|
-
export {
|
|
15
|
+
export { thumbProps };
|
|
135
16
|
//# sourceMappingURL=thumb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thumb.mjs","sources":["../../../../../../packages/components/scrollbar/src/thumb.
|
|
1
|
+
{"version":3,"file":"thumb.mjs","sources":["../../../../../../packages/components/scrollbar/src/thumb.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Thumb from './thumb.vue'\n\nexport const thumbProps = buildProps({\n vertical: Boolean,\n size: String,\n move: Number,\n ratio: {\n type: Number,\n required: true,\n },\n always: Boolean,\n} as const)\nexport type ThumbProps = ExtractPropTypes<typeof thumbProps>\n\nexport type ThumbInstance = InstanceType<typeof Thumb>\n"],"names":[],"mappings":";;;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC;;;;"}
|
|
@@ -1,16 +1,135 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, computed, onBeforeUnmount, toRef, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, vShow } from 'vue';
|
|
2
|
+
import { isClient, useEventListener } from '@vueuse/core';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { scrollbarContextKey } from './constants.mjs';
|
|
6
|
+
import { BAR_MAP, renderThumbStyle } from './util.mjs';
|
|
7
|
+
import { thumbProps } from './thumb.mjs';
|
|
8
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
3
11
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const COMPONENT_NAME = "Thumb";
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
__name: "thumb",
|
|
15
|
+
props: thumbProps,
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const scrollbar = inject(scrollbarContextKey);
|
|
19
|
+
const ns = useNamespace("scrollbar");
|
|
20
|
+
if (!scrollbar)
|
|
21
|
+
throwError(COMPONENT_NAME, "can not inject scrollbar context");
|
|
22
|
+
const instance = ref();
|
|
23
|
+
const thumb = ref();
|
|
24
|
+
const thumbState = ref({});
|
|
25
|
+
const visible = ref(false);
|
|
26
|
+
let cursorDown = false;
|
|
27
|
+
let cursorLeave = false;
|
|
28
|
+
let originalOnSelectStart = isClient ? document.onselectstart : null;
|
|
29
|
+
const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
|
|
30
|
+
const thumbStyle = computed(() => renderThumbStyle({
|
|
31
|
+
size: props.size,
|
|
32
|
+
move: props.move,
|
|
33
|
+
bar: bar.value
|
|
34
|
+
}));
|
|
35
|
+
const offsetRatio = computed(() => instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]);
|
|
36
|
+
const clickThumbHandler = (e) => {
|
|
37
|
+
var _a;
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
if (e.ctrlKey || [1, 2].includes(e.button))
|
|
40
|
+
return;
|
|
41
|
+
(_a = window.getSelection()) == null ? void 0 : _a.removeAllRanges();
|
|
42
|
+
startDrag(e);
|
|
43
|
+
const el = e.currentTarget;
|
|
44
|
+
if (!el)
|
|
45
|
+
return;
|
|
46
|
+
thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]);
|
|
47
|
+
};
|
|
48
|
+
const clickTrackHandler = (e) => {
|
|
49
|
+
if (!thumb.value || !instance.value || !scrollbar.wrapElement)
|
|
50
|
+
return;
|
|
51
|
+
const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]);
|
|
52
|
+
const thumbHalf = thumb.value[bar.value.offset] / 2;
|
|
53
|
+
const thumbPositionPercentage = (offset - thumbHalf) * 100 * offsetRatio.value / instance.value[bar.value.offset];
|
|
54
|
+
scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
|
|
55
|
+
};
|
|
56
|
+
const startDrag = (e) => {
|
|
57
|
+
e.stopImmediatePropagation();
|
|
58
|
+
cursorDown = true;
|
|
59
|
+
document.addEventListener("mousemove", mouseMoveDocumentHandler);
|
|
60
|
+
document.addEventListener("mouseup", mouseUpDocumentHandler);
|
|
61
|
+
originalOnSelectStart = document.onselectstart;
|
|
62
|
+
document.onselectstart = () => false;
|
|
63
|
+
};
|
|
64
|
+
const mouseMoveDocumentHandler = (e) => {
|
|
65
|
+
if (!instance.value || !thumb.value)
|
|
66
|
+
return;
|
|
67
|
+
if (cursorDown === false)
|
|
68
|
+
return;
|
|
69
|
+
const prevPage = thumbState.value[bar.value.axis];
|
|
70
|
+
if (!prevPage)
|
|
71
|
+
return;
|
|
72
|
+
const offset = (instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
|
|
73
|
+
const thumbClickPosition = thumb.value[bar.value.offset] - prevPage;
|
|
74
|
+
const thumbPositionPercentage = (offset - thumbClickPosition) * 100 * offsetRatio.value / instance.value[bar.value.offset];
|
|
75
|
+
scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
|
|
76
|
+
};
|
|
77
|
+
const mouseUpDocumentHandler = () => {
|
|
78
|
+
cursorDown = false;
|
|
79
|
+
thumbState.value[bar.value.axis] = 0;
|
|
80
|
+
document.removeEventListener("mousemove", mouseMoveDocumentHandler);
|
|
81
|
+
document.removeEventListener("mouseup", mouseUpDocumentHandler);
|
|
82
|
+
restoreOnselectstart();
|
|
83
|
+
if (cursorLeave)
|
|
84
|
+
visible.value = false;
|
|
85
|
+
};
|
|
86
|
+
const mouseMoveScrollbarHandler = () => {
|
|
87
|
+
cursorLeave = false;
|
|
88
|
+
visible.value = !!props.size;
|
|
89
|
+
};
|
|
90
|
+
const mouseLeaveScrollbarHandler = () => {
|
|
91
|
+
cursorLeave = true;
|
|
92
|
+
visible.value = cursorDown;
|
|
93
|
+
};
|
|
94
|
+
onBeforeUnmount(() => {
|
|
95
|
+
restoreOnselectstart();
|
|
96
|
+
document.removeEventListener("mouseup", mouseUpDocumentHandler);
|
|
97
|
+
});
|
|
98
|
+
const restoreOnselectstart = () => {
|
|
99
|
+
if (document.onselectstart !== originalOnSelectStart)
|
|
100
|
+
document.onselectstart = originalOnSelectStart;
|
|
101
|
+
};
|
|
102
|
+
useEventListener(toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler);
|
|
103
|
+
useEventListener(toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler);
|
|
104
|
+
return (_ctx, _cache) => {
|
|
105
|
+
return openBlock(), createBlock(Transition, {
|
|
106
|
+
name: unref(ns).b("fade"),
|
|
107
|
+
persisted: ""
|
|
108
|
+
}, {
|
|
109
|
+
default: withCtx(() => [
|
|
110
|
+
withDirectives(createElementVNode("div", {
|
|
111
|
+
ref_key: "instance",
|
|
112
|
+
ref: instance,
|
|
113
|
+
class: normalizeClass([unref(ns).e("bar"), unref(ns).is(unref(bar).key)]),
|
|
114
|
+
onMousedown: clickTrackHandler
|
|
115
|
+
}, [
|
|
116
|
+
createElementVNode("div", {
|
|
117
|
+
ref_key: "thumb",
|
|
118
|
+
ref: thumb,
|
|
119
|
+
class: normalizeClass(unref(ns).e("thumb")),
|
|
120
|
+
style: normalizeStyle(unref(thumbStyle)),
|
|
121
|
+
onMousedown: clickThumbHandler
|
|
122
|
+
}, null, 38)
|
|
123
|
+
], 34), [
|
|
124
|
+
[vShow, _ctx.always || visible.value]
|
|
125
|
+
])
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
}, 8, ["name"]);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
13
131
|
});
|
|
132
|
+
var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "thumb.vue"]]);
|
|
14
133
|
|
|
15
|
-
export {
|
|
134
|
+
export { Thumb as default };
|
|
16
135
|
//# sourceMappingURL=thumb2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thumb2.mjs","sources":["../../../../../../packages/components/scrollbar/src/thumb.
|
|
1
|
+
{"version":3,"file":"thumb2.mjs","sources":["../../../../../../packages/components/scrollbar/src/thumb.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"always || visible\"\n ref=\"instance\"\n :class=\"[ns.e('bar'), ns.is(bar.key)]\"\n @mousedown=\"clickTrackHandler\"\n >\n <div\n ref=\"thumb\"\n :class=\"ns.e('thumb')\"\n :style=\"thumbStyle\"\n @mousedown=\"clickThumbHandler\"\n />\n </div>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, ref, toRef } from 'vue'\nimport { useEventListener } from '@vueuse/core'\nimport { isClient, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { scrollbarContextKey } from './constants'\nimport { BAR_MAP, renderThumbStyle } from './util'\nimport { thumbProps } from './thumb'\n\nconst COMPONENT_NAME = 'Thumb'\nconst props = defineProps(thumbProps)\n\nconst scrollbar = inject(scrollbarContextKey)\nconst ns = useNamespace('scrollbar')\n\nif (!scrollbar) throwError(COMPONENT_NAME, 'can not inject scrollbar context')\n\nconst instance = ref<HTMLDivElement>()\nconst thumb = ref<HTMLDivElement>()\n\nconst thumbState = ref<Partial<Record<'X' | 'Y', number>>>({})\nconst visible = ref(false)\n\nlet cursorDown = false\nlet cursorLeave = false\nlet originalOnSelectStart:\n | ((this: GlobalEventHandlers, ev: Event) => any)\n | null = isClient ? document.onselectstart : null\n\nconst bar = computed(() => BAR_MAP[props.vertical ? 'vertical' : 'horizontal'])\n\nconst thumbStyle = computed(() =>\n renderThumbStyle({\n size: props.size,\n move: props.move,\n bar: bar.value,\n })\n)\n\nconst offsetRatio = computed(\n () =>\n // offsetRatioX = original width of thumb / current width of thumb / ratioX\n // offsetRatioY = original height of thumb / current height of thumb / ratioY\n // instance height = wrap height - GAP\n instance.value![bar.value.offset] ** 2 /\n scrollbar.wrapElement![bar.value.scrollSize] /\n props.ratio /\n thumb.value![bar.value.offset]\n)\n\nconst clickThumbHandler = (e: MouseEvent) => {\n // prevent click event of middle and right button\n e.stopPropagation()\n if (e.ctrlKey || [1, 2].includes(e.button)) return\n\n window.getSelection()?.removeAllRanges()\n startDrag(e)\n\n const el = e.currentTarget as HTMLDivElement\n if (!el) return\n thumbState.value[bar.value.axis] =\n el[bar.value.offset] -\n (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction])\n}\n\nconst clickTrackHandler = (e: MouseEvent) => {\n if (!thumb.value || !instance.value || !scrollbar.wrapElement) return\n\n const offset = Math.abs(\n (e.target as HTMLElement).getBoundingClientRect()[bar.value.direction] -\n e[bar.value.client]\n )\n const thumbHalf = thumb.value[bar.value.offset] / 2\n const thumbPositionPercentage =\n ((offset - thumbHalf) * 100 * offsetRatio.value) /\n instance.value[bar.value.offset]\n\n scrollbar.wrapElement[bar.value.scroll] =\n (thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize]) /\n 100\n}\n\nconst startDrag = (e: MouseEvent) => {\n e.stopImmediatePropagation()\n cursorDown = true\n document.addEventListener('mousemove', mouseMoveDocumentHandler)\n document.addEventListener('mouseup', mouseUpDocumentHandler)\n originalOnSelectStart = document.onselectstart\n document.onselectstart = () => false\n}\n\nconst mouseMoveDocumentHandler = (e: MouseEvent) => {\n if (!instance.value || !thumb.value) return\n if (cursorDown === false) return\n\n const prevPage = thumbState.value[bar.value.axis]\n if (!prevPage) return\n\n const offset =\n (instance.value.getBoundingClientRect()[bar.value.direction] -\n e[bar.value.client]) *\n -1\n const thumbClickPosition = thumb.value[bar.value.offset] - prevPage\n const thumbPositionPercentage =\n ((offset - thumbClickPosition) * 100 * offsetRatio.value) /\n instance.value[bar.value.offset]\n scrollbar.wrapElement[bar.value.scroll] =\n (thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize]) /\n 100\n}\n\nconst mouseUpDocumentHandler = () => {\n cursorDown = false\n thumbState.value[bar.value.axis] = 0\n document.removeEventListener('mousemove', mouseMoveDocumentHandler)\n document.removeEventListener('mouseup', mouseUpDocumentHandler)\n restoreOnselectstart()\n if (cursorLeave) visible.value = false\n}\n\nconst mouseMoveScrollbarHandler = () => {\n cursorLeave = false\n visible.value = !!props.size\n}\n\nconst mouseLeaveScrollbarHandler = () => {\n cursorLeave = true\n visible.value = cursorDown\n}\n\nonBeforeUnmount(() => {\n restoreOnselectstart()\n document.removeEventListener('mouseup', mouseUpDocumentHandler)\n})\n\nconst restoreOnselectstart = () => {\n if (document.onselectstart !== originalOnSelectStart)\n document.onselectstart = originalOnSelectStart\n}\n\nuseEventListener(\n toRef(scrollbar, 'scrollbarElement'),\n 'mousemove',\n mouseMoveScrollbarHandler\n)\nuseEventListener(\n toRef(scrollbar, 'scrollbarElement'),\n 'mouseleave',\n mouseLeaveScrollbarHandler\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA8BA,IAAM,MAAA,SAAA,GAAY,OAAO,mBAAmB,CAAA,CAAA;AAC5C,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AAEnC,IAAA,IAAI,CAAC,SAAA;AAAW,MAA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,KAAM,CAAA,SAAA,EAAW,kBAAkB,CAAA,EACnC,sCAEF,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import { CircleClose, ArrowDown } from '@element-plus/icons-vue';
|
|
|
6
6
|
import '../../tag/index.mjs';
|
|
7
7
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
8
8
|
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
9
|
-
import { useTooltipContentProps } from '../../tooltip/src/
|
|
9
|
+
import { useTooltipContentProps } from '../../tooltip/src/content2.mjs';
|
|
10
10
|
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
11
11
|
import { tagProps } from '../../tag/src/tag.mjs';
|
|
12
12
|
import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
|
|
@@ -8,7 +8,7 @@ import '../../tag/index.mjs';
|
|
|
8
8
|
import { defaultProps } from './useProps.mjs';
|
|
9
9
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
10
10
|
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
11
|
-
import { useTooltipContentProps } from '../../tooltip/src/
|
|
11
|
+
import { useTooltipContentProps } from '../../tooltip/src/content2.mjs';
|
|
12
12
|
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
13
13
|
import { tagProps } from '../../tag/src/tag.mjs';
|
|
14
14
|
import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Steps from './src/
|
|
2
|
+
import Steps from './src/steps2.mjs';
|
|
3
3
|
import Step from './src/item.mjs';
|
|
4
4
|
export { stepProps } from './src/item2.mjs';
|
|
5
|
-
export { stepsEmits, stepsProps } from './src/
|
|
5
|
+
export { stepsEmits, stepsProps } from './src/steps.mjs';
|
|
6
6
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
7
7
|
|
|
8
8
|
const ElSteps = withInstall(Steps, {
|
|
@@ -1,46 +1,43 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, watch, provide, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
2
1
|
import '../../../constants/index.mjs';
|
|
3
|
-
import '../../../
|
|
4
|
-
import {
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
-
import { useOrderedChildren } from '../../../hooks/use-ordered-children/index.mjs';
|
|
2
|
+
import '../../../utils/index.mjs';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
8
4
|
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
5
|
+
import { isNumber } from '../../../utils/types.mjs';
|
|
9
6
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
], 2);
|
|
40
|
-
};
|
|
7
|
+
const stepsProps = buildProps({
|
|
8
|
+
space: {
|
|
9
|
+
type: [Number, String],
|
|
10
|
+
default: ""
|
|
11
|
+
},
|
|
12
|
+
active: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 0
|
|
15
|
+
},
|
|
16
|
+
direction: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "horizontal",
|
|
19
|
+
values: ["horizontal", "vertical"]
|
|
20
|
+
},
|
|
21
|
+
alignCenter: {
|
|
22
|
+
type: Boolean
|
|
23
|
+
},
|
|
24
|
+
simple: {
|
|
25
|
+
type: Boolean
|
|
26
|
+
},
|
|
27
|
+
finishStatus: {
|
|
28
|
+
type: String,
|
|
29
|
+
values: ["wait", "process", "finish", "error", "success"],
|
|
30
|
+
default: "finish"
|
|
31
|
+
},
|
|
32
|
+
processStatus: {
|
|
33
|
+
type: String,
|
|
34
|
+
values: ["wait", "process", "finish", "error", "success"],
|
|
35
|
+
default: "process"
|
|
41
36
|
}
|
|
42
37
|
});
|
|
43
|
-
|
|
38
|
+
const stepsEmits = {
|
|
39
|
+
[CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber)
|
|
40
|
+
};
|
|
44
41
|
|
|
45
|
-
export {
|
|
42
|
+
export { stepsEmits, stepsProps };
|
|
46
43
|
//# sourceMappingURL=steps.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.mjs","sources":["../../../../../../packages/components/steps/src/steps.
|
|
1
|
+
{"version":3,"file":"steps.mjs","sources":["../../../../../../packages/components/steps/src/steps.ts"],"sourcesContent":["import { CHANGE_EVENT } from '@element-plus/constants'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport type Steps from './steps.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const stepsProps = buildProps({\n /**\n * @description the spacing of each step, will be responsive if omitted. Supports percentage.\n */\n space: {\n type: [Number, String],\n default: '',\n },\n /**\n * @description current activation step\n */\n active: {\n type: Number,\n default: 0,\n },\n /**\n * @description display direction\n */\n direction: {\n type: String,\n default: 'horizontal',\n values: ['horizontal', 'vertical'],\n },\n /**\n * @description center title and description\n */\n alignCenter: {\n type: Boolean,\n },\n /**\n * @description whether to apply simple theme\n */\n simple: {\n type: Boolean,\n },\n /**\n * @description status of end step\n */\n finishStatus: {\n type: String,\n values: ['wait', 'process', 'finish', 'error', 'success'],\n default: 'finish',\n },\n /**\n * @description status of current step\n */\n processStatus: {\n type: String,\n values: ['wait', 'process', 'finish', 'error', 'success'],\n default: 'process',\n },\n} as const)\nexport type StepsProps = ExtractPropTypes<typeof stepsProps>\n\nexport const stepsEmits = {\n [CHANGE_EVENT]: (newVal: number, oldVal: number) =>\n [newVal, oldVal].every(isNumber),\n}\nexport type StepsEmits = typeof stepsEmits\n\nexport type StepsInstance = InstanceType<typeof Steps>\n"],"names":[],"mappings":";;;;;;AAEY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;AAC7D,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;AAC7D,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,CAAC,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;AACtE;;;;"}
|
|
@@ -1,43 +1,46 @@
|
|
|
1
|
+
import { defineComponent, getCurrentInstance, watch, provide, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
1
2
|
import '../../../constants/index.mjs';
|
|
2
|
-
import '../../../
|
|
3
|
-
import {
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { stepsProps, stepsEmits } from './steps.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
7
|
+
import { useOrderedChildren } from '../../../hooks/use-ordered-children/index.mjs';
|
|
4
8
|
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
5
|
-
import { isNumber } from '../../../utils/types.mjs';
|
|
6
9
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
10
|
+
const __default__ = defineComponent({
|
|
11
|
+
name: "ElSteps"
|
|
12
|
+
});
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
...__default__,
|
|
15
|
+
props: stepsProps,
|
|
16
|
+
emits: stepsEmits,
|
|
17
|
+
setup(__props, { emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const ns = useNamespace("steps");
|
|
20
|
+
const {
|
|
21
|
+
children: steps,
|
|
22
|
+
addChild: addStep,
|
|
23
|
+
removeChild: removeStep
|
|
24
|
+
} = useOrderedChildren(getCurrentInstance(), "ElStep");
|
|
25
|
+
watch(steps, () => {
|
|
26
|
+
steps.value.forEach((instance, index) => {
|
|
27
|
+
instance.setIndex(index);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
provide("ElSteps", { props, steps, addStep, removeStep });
|
|
31
|
+
watch(() => props.active, (newVal, oldVal) => {
|
|
32
|
+
emit(CHANGE_EVENT, newVal, oldVal);
|
|
33
|
+
});
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return openBlock(), createElementBlock("div", {
|
|
36
|
+
class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.simple ? "simple" : _ctx.direction)])
|
|
37
|
+
}, [
|
|
38
|
+
renderSlot(_ctx.$slots, "default")
|
|
39
|
+
], 2);
|
|
40
|
+
};
|
|
36
41
|
}
|
|
37
42
|
});
|
|
38
|
-
|
|
39
|
-
[CHANGE_EVENT]: (newVal, oldVal) => [newVal, oldVal].every(isNumber)
|
|
40
|
-
};
|
|
43
|
+
var Steps = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "steps.vue"]]);
|
|
41
44
|
|
|
42
|
-
export {
|
|
45
|
+
export { Steps as default };
|
|
43
46
|
//# sourceMappingURL=steps2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps2.mjs","sources":["../../../../../../packages/components/steps/src/steps.
|
|
1
|
+
{"version":3,"file":"steps2.mjs","sources":["../../../../../../packages/components/steps/src/steps.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.m(simple ? 'simple' : direction)]\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, provide, watch } from 'vue'\nimport { CHANGE_EVENT } from '@element-plus/constants'\nimport { useNamespace, useOrderedChildren } from '@element-plus/hooks'\nimport { stepsEmits, stepsProps } from './steps'\n\nimport type { StepItemState } from './item.vue'\n\ndefineOptions({\n name: 'ElSteps',\n})\n\nconst props = defineProps(stepsProps)\nconst emit = defineEmits(stepsEmits)\n\nconst ns = useNamespace('steps')\nconst {\n children: steps,\n addChild: addStep,\n removeChild: removeStep,\n} = useOrderedChildren<StepItemState>(getCurrentInstance()!, 'ElStep')\n\nwatch(steps, () => {\n steps.value.forEach((instance: StepItemState, index: number) => {\n instance.setIndex(index)\n })\n})\n\nprovide('ElSteps', { props, steps, addStep, removeStep })\n\nwatch(\n () => props.active,\n (newVal: number, oldVal: number) => {\n emit(CHANGE_EVENT, newVal, oldVal)\n }\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCAcc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA;AAAA,MACJ,QAAU,EAAA,KAAA;AAAA,MACV,QAAU,EAAA,OAAA;AAAA,MACV,WAAa,EAAA,UAAA;AAAA,KACX,GAAA,kBAAA,CAAkC,kBAAmB,EAAA,EAAI,QAAQ,CAAA,CAAA;AAErE,IAAA,KAAA,CAAM,OAAO,MAAM;AACjB,MAAA,KAAA,CAAM,KAAM,CAAA,OAAA,CAAQ,CAAC,QAAA,EAAyB,KAAkB,KAAA;AAC9D,QAAA,QAAA,CAAS,SAAS,KAAK,CAAA,CAAA;AAAA,OACxB,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAED,IAAA,OAAA,CAAQ,WAAW,EAAE,KAAA,EAAO,KAAO,EAAA,OAAA,EAAS,YAAY,CAAA,CAAA;AAExD,IAAA,KAAA,CACE,MAAM,KAAA,CAAM,MACZ,EAAA,CAAC,QAAgB,MAAmB,KAAA;AAClC,MAAK,IAAA,CAAA,YAAA,EAAc,QAAQ,MAAM,CAAA,CAAA;AAAA,KAErC,CAAA,CAAA;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Switch from './src/
|
|
3
|
-
export { switchEmits, switchProps } from './src/
|
|
2
|
+
import Switch from './src/switch.mjs';
|
|
3
|
+
export { switchEmits, switchProps } from './src/switch2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElSwitch = withInstall(Switch);
|