@element-plus/nightly 0.0.20240227 → 0.0.20240229
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +292 -284
- package/dist/index.full.min.js +26 -26
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +26 -26
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +293 -285
- 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/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/calendar/src/calendar2.mjs +5 -5
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/use-calendar.mjs +1 -11
- package/es/components/calendar/src/use-calendar.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +43 -21
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +21 -43
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +7 -0
- package/es/components/carousel/src/carousel.d.ts +1 -0
- package/es/components/carousel/src/carousel.mjs +4 -0
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +7 -0
- package/es/components/carousel/src/carousel2.mjs +100 -66
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.d.ts +2 -0
- package/es/components/carousel/src/use-carousel.mjs +23 -0
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +120 -0
- package/es/components/checkbox/src/checkbox-button.mjs +5 -4
- package/es/components/checkbox/src/checkbox-button.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +40 -0
- package/es/components/checkbox/src/checkbox.d.ts +24 -1
- package/es/components/checkbox/src/checkbox.mjs +12 -0
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +40 -0
- package/es/components/checkbox/src/checkbox2.mjs +5 -4
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-event.mjs +2 -2
- package/es/components/checkbox/src/composables/use-checkbox-event.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -0
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +15 -8
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox.d.ts +1 -0
- package/es/components/checkbox/src/composables/use-checkbox.mjs +40 -13
- package/es/components/checkbox/src/composables/use-checkbox.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +43 -66
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +66 -43
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/date-picker/src/composables/use-basic-date-table.mjs +1 -1
- package/es/components/date-picker/src/composables/use-basic-date-table.mjs.map +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/menu/index.d.ts +0 -6
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +35 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -35
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/menu/src/menu.mjs +2 -0
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.d.ts +0 -4
- package/es/components/menu/src/sub-menu.mjs +2 -15
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +0 -3
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +94 -137
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +137 -94
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/radio/index.d.ts +77 -54
- package/es/components/radio/src/radio-button.d.ts +4 -2
- package/es/components/radio/src/radio-button.mjs +1 -5
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button.vue.d.ts +16 -7
- package/es/components/radio/src/radio-button2.mjs +4 -4
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.d.ts +3 -3
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +10 -10
- package/es/components/radio/src/radio.d.ts +10 -6
- package/es/components/radio/src/radio.mjs +13 -9
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio.vue.d.ts +23 -18
- package/es/components/radio/src/radio2.mjs +4 -4
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/radio/src/use-radio.d.ts +4 -5
- package/es/components/radio/src/use-radio.mjs +21 -3
- package/es/components/radio/src/use-radio.mjs.map +1 -1
- package/es/components/select/index.d.ts +0 -3
- package/es/components/select/src/select.d.ts +0 -1
- package/es/components/select/src/select.mjs +0 -4
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +0 -3
- package/es/components/select/src/useSelect.mjs +3 -19
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/select-dropdown.mjs +5 -10
- package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.mjs +10 -11
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/switch/index.d.ts +0 -19
- package/es/components/switch/src/switch.d.ts +0 -4
- package/es/components/switch/src/switch.mjs +0 -16
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch.vue.d.ts +0 -19
- package/es/components/switch/src/switch2.mjs +3 -37
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tabs/index.d.ts +0 -12
- package/es/components/tabs/src/tabs.d.ts +0 -18
- package/es/components/tabs/src/tabs.mjs +7 -29
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/time-select/index.d.ts +0 -12
- package/es/components/time-select/src/time-select.vue.d.ts +0 -6
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/transfer/index.d.ts +400 -0
- package/es/components/transfer/src/transfer-panel.vue.d.ts +80 -0
- package/es/components/transfer/src/transfer.vue.d.ts +400 -0
- package/es/components/tree-select/src/select.d.ts +1 -1
- package/es/components/tree-select/src/select.mjs +15 -11
- package/es/components/tree-select/src/select.mjs.map +1 -1
- package/es/components/tree-select/src/tree.mjs +5 -6
- package/es/components/tree-select/src/tree.mjs.map +1 -1
- package/es/components/tree-v2/index.d.ts +80 -0
- package/es/components/tree-v2/src/tree-node.vue.d.ts +80 -0
- package/es/components/tree-v2/src/tree.vue.d.ts +80 -0
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +1 -1
- package/es/components/upload/src/upload.mjs +118 -104
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +104 -118
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/index.mjs +6 -6
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/calendar/src/calendar2.js +4 -4
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/use-calendar.js +0 -10
- package/lib/components/calendar/src/use-calendar.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +43 -21
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +21 -43
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/carousel/index.d.ts +7 -0
- package/lib/components/carousel/src/carousel.d.ts +1 -0
- package/lib/components/carousel/src/carousel.js +4 -0
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +7 -0
- package/lib/components/carousel/src/carousel2.js +99 -65
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.d.ts +2 -0
- package/lib/components/carousel/src/use-carousel.js +23 -0
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +120 -0
- package/lib/components/checkbox/src/checkbox-button.js +5 -4
- package/lib/components/checkbox/src/checkbox-button.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +40 -0
- package/lib/components/checkbox/src/checkbox.d.ts +24 -1
- package/lib/components/checkbox/src/checkbox.js +12 -0
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +40 -0
- package/lib/components/checkbox/src/checkbox2.js +5 -4
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-event.js +2 -2
- package/lib/components/checkbox/src/composables/use-checkbox-event.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -0
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +13 -6
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox.d.ts +1 -0
- package/lib/components/checkbox/src/composables/use-checkbox.js +40 -13
- package/lib/components/checkbox/src/composables/use-checkbox.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +43 -66
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +66 -43
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/date-picker/src/composables/use-basic-date-table.js +1 -1
- package/lib/components/date-picker/src/composables/use-basic-date-table.js.map +1 -1
- package/lib/components/index.js +6 -6
- package/lib/components/menu/index.d.ts +0 -6
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +35 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -35
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/menu/src/menu.js +2 -0
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.d.ts +0 -4
- package/lib/components/menu/src/sub-menu.js +10 -23
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +0 -3
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +99 -137
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +137 -99
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/radio/index.d.ts +77 -54
- package/lib/components/radio/src/radio-button.d.ts +4 -2
- package/lib/components/radio/src/radio-button.js +1 -5
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button.vue.d.ts +16 -7
- package/lib/components/radio/src/radio-button2.js +4 -4
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group.d.ts +3 -3
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +10 -10
- package/lib/components/radio/src/radio.d.ts +10 -6
- package/lib/components/radio/src/radio.js +13 -9
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio.vue.d.ts +23 -18
- package/lib/components/radio/src/radio2.js +4 -4
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/radio/src/use-radio.d.ts +4 -5
- package/lib/components/radio/src/use-radio.js +21 -3
- package/lib/components/radio/src/use-radio.js.map +1 -1
- package/lib/components/select/index.d.ts +0 -3
- package/lib/components/select/src/select.d.ts +0 -1
- package/lib/components/select/src/select.js +0 -4
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +0 -3
- package/lib/components/select/src/useSelect.js +4 -20
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/select-dropdown.js +5 -10
- package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.js +10 -11
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/switch/index.d.ts +0 -19
- package/lib/components/switch/src/switch.d.ts +0 -4
- package/lib/components/switch/src/switch.js +0 -16
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +0 -19
- package/lib/components/switch/src/switch2.js +9 -43
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tabs/index.d.ts +0 -12
- package/lib/components/tabs/src/tabs.d.ts +0 -18
- package/lib/components/tabs/src/tabs.js +7 -29
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/time-select/index.d.ts +0 -12
- package/lib/components/time-select/src/time-select.vue.d.ts +0 -6
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/transfer/index.d.ts +400 -0
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +80 -0
- package/lib/components/transfer/src/transfer.vue.d.ts +400 -0
- package/lib/components/tree-select/src/select.d.ts +1 -1
- package/lib/components/tree-select/src/select.js +14 -10
- package/lib/components/tree-select/src/select.js.map +1 -1
- package/lib/components/tree-select/src/tree.js +5 -6
- package/lib/components/tree-select/src/tree.js.map +1 -1
- package/lib/components/tree-v2/index.d.ts +80 -0
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +80 -0
- package/lib/components/tree-v2/src/tree.vue.d.ts +80 -0
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-list.js +1 -1
- package/lib/components/upload/src/upload.js +118 -107
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +107 -118
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/index.js +6 -6
- 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/tags.json +1 -1
- package/theme-chalk/el-carousel.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/carousel.scss +8 -0
- package/web-types.json +1 -1
|
@@ -1,124 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useHandlers } from './use-handlers.mjs';
|
|
7
|
-
import { uploadProps } from './upload.mjs';
|
|
8
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
-
import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
1
|
+
import { NOOP } from '@vue/shared';
|
|
2
|
+
import '../../../utils/index.mjs';
|
|
3
|
+
import { ajaxUpload } from './ajax.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { mutable } from '../../../utils/typescript.mjs';
|
|
10
6
|
|
|
11
|
-
const
|
|
12
|
-
|
|
7
|
+
const uploadListTypes = ["text", "picture", "picture-card"];
|
|
8
|
+
let fileId = 1;
|
|
9
|
+
const genFileId = () => Date.now() + fileId++;
|
|
10
|
+
const uploadBaseProps = buildProps({
|
|
11
|
+
action: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "#"
|
|
14
|
+
},
|
|
15
|
+
headers: {
|
|
16
|
+
type: definePropType(Object)
|
|
17
|
+
},
|
|
18
|
+
method: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "post"
|
|
21
|
+
},
|
|
22
|
+
data: {
|
|
23
|
+
type: definePropType([Object, Function, Promise]),
|
|
24
|
+
default: () => mutable({})
|
|
25
|
+
},
|
|
26
|
+
multiple: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
name: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "file"
|
|
33
|
+
},
|
|
34
|
+
drag: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
38
|
+
withCredentials: Boolean,
|
|
39
|
+
showFileList: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
accept: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ""
|
|
46
|
+
},
|
|
47
|
+
fileList: {
|
|
48
|
+
type: definePropType(Array),
|
|
49
|
+
default: () => mutable([])
|
|
50
|
+
},
|
|
51
|
+
autoUpload: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: true
|
|
54
|
+
},
|
|
55
|
+
listType: {
|
|
56
|
+
type: String,
|
|
57
|
+
values: uploadListTypes,
|
|
58
|
+
default: "text"
|
|
59
|
+
},
|
|
60
|
+
httpRequest: {
|
|
61
|
+
type: definePropType(Function),
|
|
62
|
+
default: ajaxUpload
|
|
63
|
+
},
|
|
64
|
+
disabled: Boolean,
|
|
65
|
+
limit: Number
|
|
13
66
|
});
|
|
14
|
-
const
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
handleStart,
|
|
54
|
-
handleRemove
|
|
55
|
-
});
|
|
56
|
-
return (_ctx, _cache) => {
|
|
57
|
-
return openBlock(), createElementBlock("div", null, [
|
|
58
|
-
unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
|
|
59
|
-
key: 0,
|
|
60
|
-
disabled: unref(disabled),
|
|
61
|
-
"list-type": _ctx.listType,
|
|
62
|
-
files: unref(uploadFiles),
|
|
63
|
-
crossorigin: _ctx.crossorigin,
|
|
64
|
-
"handle-preview": _ctx.onPreview,
|
|
65
|
-
onRemove: unref(handleRemove)
|
|
66
|
-
}, createSlots({
|
|
67
|
-
append: withCtx(() => [
|
|
68
|
-
createVNode(UploadContent, mergeProps({
|
|
69
|
-
ref_key: "uploadRef",
|
|
70
|
-
ref: uploadRef
|
|
71
|
-
}, unref(uploadContentProps)), {
|
|
72
|
-
default: withCtx(() => [
|
|
73
|
-
_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
|
|
74
|
-
!_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
|
|
75
|
-
]),
|
|
76
|
-
_: 3
|
|
77
|
-
}, 16)
|
|
78
|
-
]),
|
|
79
|
-
_: 2
|
|
80
|
-
}, [
|
|
81
|
-
_ctx.$slots.file ? {
|
|
82
|
-
name: "default",
|
|
83
|
-
fn: withCtx(({ file }) => [
|
|
84
|
-
renderSlot(_ctx.$slots, "file", { file })
|
|
85
|
-
])
|
|
86
|
-
} : void 0
|
|
87
|
-
]), 1032, ["disabled", "list-type", "files", "crossorigin", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true),
|
|
88
|
-
!unref(isPictureCard) || unref(isPictureCard) && !_ctx.showFileList ? (openBlock(), createBlock(UploadContent, mergeProps({
|
|
89
|
-
key: 1,
|
|
90
|
-
ref_key: "uploadRef",
|
|
91
|
-
ref: uploadRef
|
|
92
|
-
}, unref(uploadContentProps)), {
|
|
93
|
-
default: withCtx(() => [
|
|
94
|
-
_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "trigger", { key: 0 }) : createCommentVNode("v-if", true),
|
|
95
|
-
!_ctx.$slots.trigger && _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("v-if", true)
|
|
96
|
-
]),
|
|
97
|
-
_: 3
|
|
98
|
-
}, 16)) : createCommentVNode("v-if", true),
|
|
99
|
-
_ctx.$slots.trigger ? renderSlot(_ctx.$slots, "default", { key: 2 }) : createCommentVNode("v-if", true),
|
|
100
|
-
renderSlot(_ctx.$slots, "tip"),
|
|
101
|
-
!unref(isPictureCard) && _ctx.showFileList ? (openBlock(), createBlock(UploadList, {
|
|
102
|
-
key: 3,
|
|
103
|
-
disabled: unref(disabled),
|
|
104
|
-
"list-type": _ctx.listType,
|
|
105
|
-
files: unref(uploadFiles),
|
|
106
|
-
crossorigin: _ctx.crossorigin,
|
|
107
|
-
"handle-preview": _ctx.onPreview,
|
|
108
|
-
onRemove: unref(handleRemove)
|
|
109
|
-
}, createSlots({ _: 2 }, [
|
|
110
|
-
_ctx.$slots.file ? {
|
|
111
|
-
name: "default",
|
|
112
|
-
fn: withCtx(({ file }) => [
|
|
113
|
-
renderSlot(_ctx.$slots, "file", { file })
|
|
114
|
-
])
|
|
115
|
-
} : void 0
|
|
116
|
-
]), 1032, ["disabled", "list-type", "files", "crossorigin", "handle-preview", "onRemove"])) : createCommentVNode("v-if", true)
|
|
117
|
-
]);
|
|
118
|
-
};
|
|
67
|
+
const uploadProps = buildProps({
|
|
68
|
+
...uploadBaseProps,
|
|
69
|
+
beforeUpload: {
|
|
70
|
+
type: definePropType(Function),
|
|
71
|
+
default: NOOP
|
|
72
|
+
},
|
|
73
|
+
beforeRemove: {
|
|
74
|
+
type: definePropType(Function)
|
|
75
|
+
},
|
|
76
|
+
onRemove: {
|
|
77
|
+
type: definePropType(Function),
|
|
78
|
+
default: NOOP
|
|
79
|
+
},
|
|
80
|
+
onChange: {
|
|
81
|
+
type: definePropType(Function),
|
|
82
|
+
default: NOOP
|
|
83
|
+
},
|
|
84
|
+
onPreview: {
|
|
85
|
+
type: definePropType(Function),
|
|
86
|
+
default: NOOP
|
|
87
|
+
},
|
|
88
|
+
onSuccess: {
|
|
89
|
+
type: definePropType(Function),
|
|
90
|
+
default: NOOP
|
|
91
|
+
},
|
|
92
|
+
onProgress: {
|
|
93
|
+
type: definePropType(Function),
|
|
94
|
+
default: NOOP
|
|
95
|
+
},
|
|
96
|
+
onError: {
|
|
97
|
+
type: definePropType(Function),
|
|
98
|
+
default: NOOP
|
|
99
|
+
},
|
|
100
|
+
onExceed: {
|
|
101
|
+
type: definePropType(Function),
|
|
102
|
+
default: NOOP
|
|
103
|
+
},
|
|
104
|
+
crossorigin: {
|
|
105
|
+
type: definePropType(String)
|
|
119
106
|
}
|
|
120
107
|
});
|
|
121
|
-
var Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "upload.vue"]]);
|
|
122
108
|
|
|
123
|
-
export {
|
|
109
|
+
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps };
|
|
124
110
|
//# sourceMappingURL=upload2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload2.mjs","sources":["../../../../../../packages/components/upload/src/upload.
|
|
1
|
+
{"version":3,"file":"upload2.mjs","sources":["../../../../../../packages/components/upload/src/upload.ts"],"sourcesContent":["import { NOOP } from '@vue/shared'\nimport { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { ajaxUpload } from './ajax'\nimport type { Awaitable, Mutable } from '@element-plus/utils'\n\nimport type { UploadAjaxError } from './ajax'\nimport type { ExtractPropTypes } from 'vue'\nimport type Upload from './upload.vue'\n\nexport const uploadListTypes = ['text', 'picture', 'picture-card'] as const\n\nlet fileId = 1\nexport const genFileId = () => Date.now() + fileId++\n\nexport type UploadStatus = 'ready' | 'uploading' | 'success' | 'fail'\nexport interface UploadProgressEvent extends ProgressEvent {\n percent: number\n}\n\nexport interface UploadRequestOptions {\n action: string\n method: string\n data: Record<string, string | Blob | [string | Blob, string]>\n filename: string\n file: UploadRawFile\n headers: Headers | Record<string, string | number | null | undefined>\n onError: (evt: UploadAjaxError) => void\n onProgress: (evt: UploadProgressEvent) => void\n onSuccess: (response: any) => void\n withCredentials: boolean\n}\nexport interface UploadFile {\n name: string\n percentage?: number\n status: UploadStatus\n size?: number\n response?: unknown\n uid: number\n url?: string\n raw?: UploadRawFile\n}\nexport type UploadUserFile = Omit<UploadFile, 'status' | 'uid'> &\n Partial<Pick<UploadFile, 'status' | 'uid'>>\n\nexport type UploadFiles = UploadFile[]\nexport interface UploadRawFile extends File {\n uid: number\n}\nexport type UploadRequestHandler = (\n options: UploadRequestOptions\n) => XMLHttpRequest | Promise<unknown>\nexport interface UploadHooks {\n beforeUpload: (\n rawFile: UploadRawFile\n ) => Awaitable<void | undefined | null | boolean | File | Blob>\n beforeRemove: (\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => Awaitable<boolean>\n onRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void\n onChange: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void\n onPreview: (uploadFile: UploadFile) => void\n onSuccess: (\n response: any,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onProgress: (\n evt: UploadProgressEvent,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onError: (\n error: Error,\n uploadFile: UploadFile,\n uploadFiles: UploadFiles\n ) => void\n onExceed: (files: File[], uploadFiles: UploadUserFile[]) => void\n}\n\nexport type UploadData = Mutable<Record<string, any>>\n\nexport const uploadBaseProps = buildProps({\n /**\n * @description request URL\n */\n action: {\n type: String,\n default: '#',\n },\n /**\n * @description request headers\n */\n headers: {\n type: definePropType<Headers | Record<string, any>>(Object),\n },\n /**\n * @description set upload request method\n */\n method: {\n type: String,\n default: 'post',\n },\n /**\n * @description additions options of request\n */\n data: {\n type: definePropType<\n | Awaitable<UploadData>\n | ((rawFile: UploadRawFile) => Awaitable<UploadData>)\n >([Object, Function, Promise]),\n default: () => mutable({} as const),\n },\n /**\n * @description whether uploading multiple files is permitted\n */\n multiple: {\n type: Boolean,\n default: false,\n },\n /**\n * @description key name for uploaded file\n */\n name: {\n type: String,\n default: 'file',\n },\n /**\n * @description whether to activate drag and drop mode\n */\n drag: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether cookies are sent\n */\n withCredentials: Boolean,\n /**\n * @description whether to show the uploaded file list\n */\n showFileList: {\n type: Boolean,\n default: true,\n },\n /**\n * @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true`\n */\n accept: {\n type: String,\n default: '',\n },\n /**\n * @description default uploaded files\n */\n fileList: {\n type: definePropType<UploadUserFile[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether to auto upload file\n */\n autoUpload: {\n type: Boolean,\n default: true,\n },\n /**\n * @description type of file list\n */\n listType: {\n type: String,\n values: uploadListTypes,\n default: 'text',\n },\n /**\n * @description override default xhr behavior, allowing you to implement your own upload-file's request\n */\n httpRequest: {\n type: definePropType<UploadRequestHandler>(Function),\n default: ajaxUpload,\n },\n /**\n * @description whether to disable upload\n */\n disabled: Boolean,\n /**\n * @description maximum number of uploads allowed\n */\n limit: Number,\n} as const)\n\nexport const uploadProps = buildProps({\n ...uploadBaseProps,\n /**\n * @description hook function before uploading with the file to be uploaded as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, uploading will be aborted\n */\n beforeUpload: {\n type: definePropType<UploadHooks['beforeUpload']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function before removing a file with the file and file list as its parameters. If `false` is returned or a `Promise` is returned and then is rejected, removing will be aborted\n */\n beforeRemove: {\n type: definePropType<UploadHooks['beforeRemove']>(Function),\n },\n /**\n * @description hook function when files are removed\n */\n onRemove: {\n type: definePropType<UploadHooks['onRemove']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when select file or upload file success or upload file fail\n */\n onChange: {\n type: definePropType<UploadHooks['onChange']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when clicking the uploaded files\n */\n onPreview: {\n type: definePropType<UploadHooks['onPreview']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when uploaded successfully\n */\n onSuccess: {\n type: definePropType<UploadHooks['onSuccess']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when some progress occurs\n */\n onProgress: {\n type: definePropType<UploadHooks['onProgress']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when some errors occurs\n */\n onError: {\n type: definePropType<UploadHooks['onError']>(Function),\n default: NOOP,\n },\n /**\n * @description hook function when limit is exceeded\n */\n onExceed: {\n type: definePropType<UploadHooks['onExceed']>(Function),\n default: NOOP,\n },\n /**\n * @description set HTML attribute: crossorigin.\n */\n crossorigin: {\n type: definePropType<'anonymous' | 'use-credentials' | ''>(String),\n },\n} as const)\n\nexport type UploadProps = ExtractPropTypes<typeof uploadProps>\n\nexport type UploadInstance = InstanceType<typeof Upload>\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,eAAe,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE;AACnE,IAAI,MAAM,GAAG,CAAC,CAAC;AACH,MAAC,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG;AACzC,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrD,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI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AI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC;;;;"}
|
|
@@ -2,7 +2,7 @@ import { watch } from 'vue';
|
|
|
2
2
|
import { isNil } from 'lodash-unified';
|
|
3
3
|
import { useVModel } from '@vueuse/core';
|
|
4
4
|
import '../../../utils/index.mjs';
|
|
5
|
-
import { genFileId } from './
|
|
5
|
+
import { genFileId } from './upload2.mjs';
|
|
6
6
|
import { debugWarn, throwError } from '../../../utils/error.mjs';
|
|
7
7
|
|
|
8
8
|
const SCOPE = "ElUpload";
|
package/es/index.mjs
CHANGED
|
@@ -27,7 +27,7 @@ export { buttonGroupContextKey } from './components/button/src/constants.mjs';
|
|
|
27
27
|
export { ElButton, ElButtonGroup } from './components/button/index.mjs';
|
|
28
28
|
export { calendarEmits, calendarProps } from './components/calendar/src/calendar.mjs';
|
|
29
29
|
export { ElCalendar } from './components/calendar/index.mjs';
|
|
30
|
-
export { cardProps } from './components/card/src/
|
|
30
|
+
export { cardProps } from './components/card/src/card2.mjs';
|
|
31
31
|
export { ElCard } from './components/card/index.mjs';
|
|
32
32
|
export { carouselEmits, carouselProps } from './components/carousel/src/carousel.mjs';
|
|
33
33
|
export { carouselItemProps } from './components/carousel/src/carousel-item.mjs';
|
|
@@ -44,7 +44,7 @@ export { checkboxGroupEmits, checkboxGroupProps } from './components/checkbox/sr
|
|
|
44
44
|
export { checkboxEmits, checkboxProps } from './components/checkbox/src/checkbox.mjs';
|
|
45
45
|
export { checkboxGroupContextKey } from './components/checkbox/src/constants.mjs';
|
|
46
46
|
export { ElCheckbox, ElCheckboxButton, ElCheckboxGroup } from './components/checkbox/index.mjs';
|
|
47
|
-
export { colProps } from './components/col/src/
|
|
47
|
+
export { colProps } from './components/col/src/col.mjs';
|
|
48
48
|
export { ElCol } from './components/col/index.mjs';
|
|
49
49
|
export { collapseEmits, collapseProps, emitChangeFn } from './components/collapse/src/collapse.mjs';
|
|
50
50
|
export { collapseItemProps } from './components/collapse/src/collapse-item.mjs';
|
|
@@ -99,7 +99,7 @@ export { linkEmits, linkProps } from './components/link/src/link.mjs';
|
|
|
99
99
|
export { ElLink } from './components/link/index.mjs';
|
|
100
100
|
export { menuEmits, menuProps } from './components/menu/src/menu.mjs';
|
|
101
101
|
export { menuItemEmits, menuItemProps } from './components/menu/src/menu-item.mjs';
|
|
102
|
-
export { menuItemGroupProps } from './components/menu/src/menu-item-
|
|
102
|
+
export { menuItemGroupProps } from './components/menu/src/menu-item-group2.mjs';
|
|
103
103
|
export { subMenuProps } from './components/menu/src/sub-menu.mjs';
|
|
104
104
|
export { ElMenu, ElMenuItem, ElMenuItemGroup, ElSubMenu } from './components/menu/index.mjs';
|
|
105
105
|
export { overlayEmits, overlayProps } from './components/overlay/src/overlay.mjs';
|
|
@@ -113,12 +113,12 @@ export { popconfirmEmits, popconfirmProps } from './components/popconfirm/src/po
|
|
|
113
113
|
export { ElPopconfirm } from './components/popconfirm/index.mjs';
|
|
114
114
|
export { Effect, popperProps, roleTypes, usePopperProps } from './components/popper/src/popper.mjs';
|
|
115
115
|
export { popperTriggerProps, usePopperTriggerProps } from './components/popper/src/trigger.mjs';
|
|
116
|
-
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './components/popper/src/
|
|
116
|
+
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './components/popper/src/content.mjs';
|
|
117
117
|
export { popperArrowProps, usePopperArrowProps } from './components/popper/src/arrow.mjs';
|
|
118
118
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './components/popper/src/constants.mjs';
|
|
119
119
|
export { default as ElPopperArrow } from './components/popper/src/arrow2.mjs';
|
|
120
120
|
export { default as ElPopperTrigger } from './components/popper/src/trigger2.mjs';
|
|
121
|
-
export { default as ElPopperContent } from './components/popper/src/
|
|
121
|
+
export { default as ElPopperContent } from './components/popper/src/content2.mjs';
|
|
122
122
|
export { ElPopper } from './components/popper/index.mjs';
|
|
123
123
|
export { progressProps } from './components/progress/src/progress.mjs';
|
|
124
124
|
export { ElProgress } from './components/progress/index.mjs';
|
|
@@ -196,7 +196,7 @@ export { ElTransfer } from './components/transfer/index.mjs';
|
|
|
196
196
|
export { ElTree } from './components/tree/index.mjs';
|
|
197
197
|
export { ElTreeSelect } from './components/tree-select/index.mjs';
|
|
198
198
|
export { ElTreeV2 } from './components/tree-v2/index.mjs';
|
|
199
|
-
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './components/upload/src/
|
|
199
|
+
export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './components/upload/src/upload2.mjs';
|
|
200
200
|
export { uploadContentProps } from './components/upload/src/upload-content.mjs';
|
|
201
201
|
export { uploadListEmits, uploadListProps } from './components/upload/src/upload-list.mjs';
|
|
202
202
|
export { uploadDraggerEmits, uploadDraggerProps } from './components/upload/src/upload-dragger.mjs';
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.20240229";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20240229'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -101,10 +101,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
101
101
|
"selected-day": vue.unref(realSelectedDay),
|
|
102
102
|
onPick: vue.unref(pickDay)
|
|
103
103
|
}, vue.createSlots({ _: 2 }, [
|
|
104
|
-
_ctx.$slots["date-cell"]
|
|
104
|
+
_ctx.$slots["date-cell"] ? {
|
|
105
105
|
name: "date-cell",
|
|
106
106
|
fn: vue.withCtx((data) => [
|
|
107
|
-
|
|
107
|
+
vue.renderSlot(_ctx.$slots, "date-cell", vue.normalizeProps(vue.guardReactiveProps(data)))
|
|
108
108
|
])
|
|
109
109
|
} : void 0
|
|
110
110
|
]), 1032, ["date", "selected-day", "onPick"])
|
|
@@ -121,10 +121,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
121
121
|
"hide-header": index !== 0,
|
|
122
122
|
onPick: vue.unref(pickDay)
|
|
123
123
|
}, vue.createSlots({ _: 2 }, [
|
|
124
|
-
_ctx.$slots["date-cell"]
|
|
124
|
+
_ctx.$slots["date-cell"] ? {
|
|
125
125
|
name: "date-cell",
|
|
126
126
|
fn: vue.withCtx((data) => [
|
|
127
|
-
|
|
127
|
+
vue.renderSlot(_ctx.$slots, "date-cell", vue.normalizeProps(vue.guardReactiveProps(data)))
|
|
128
128
|
])
|
|
129
129
|
} : void 0
|
|
130
130
|
]), 1032, ["date", "selected-day", "range", "hide-header", "onPick"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar2.js","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template
|
|
1
|
+
{"version":3,"file":"calendar2.js","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template v-if=\"$slots['date-cell']\" #date-cell=\"data\">\n <slot name=\"date-cell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template v-if=\"$slots['date-cell']\" #date-cell=\"data\">\n <slot name=\"date-cell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\n\nimport DateTable from './date-table.vue'\nimport { useCalendar } from './use-calendar'\nimport { calendarEmits, calendarProps } from './calendar'\n\nconst ns = useNamespace('calendar')\n\nconst COMPONENT_NAME = 'ElCalendar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst {\n calculateValidatedDateRange,\n date,\n pickDay,\n realSelectedDay,\n selectDate,\n validatedRange,\n} = useCalendar(props, emit, COMPONENT_NAME)\n\nconst { t } = useLocale()\n\nconst i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n})\n\ndefineExpose({\n /** @description currently selected date */\n selectedDay: realSelectedDay,\n /** @description select a specific date */\n pickDay,\n /** @description select date */\n selectDate,\n /** @description Calculate the validate date range according to the start and end dates */\n calculateValidatedDateRange,\n})\n</script>\n"],"names":["useNamespace","useCalendar","useLocale","computed"],"mappings":";;;;;;;;;;;;;;;uCAyDc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AALA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAUlC,IAAM,MAAA;AAAA,MACJ,2BAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,KACE,GAAAC,uBAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAE3C,IAAM,MAAA,EAAE,MAAMC,iBAAU,EAAA,CAAA;AAExB,IAAM,MAAA,QAAA,GAAWC,aAAS,MAAM;AAC9B,MAAA,MAAM,WAAc,GAAA,CAAA,mBAAA,EAAsB,IAAK,CAAA,KAAA,CAAM,OAAO,GAAG,CAAA,CAAA,CAAA,CAAA;AAC/D,MAAO,OAAA,CAAA,EAAG,KAAK,KAAM,CAAA,IAAA,MAAU,CAAE,CAAA,oBAAoB,CAAK,CAAA,CAAA,EAAA,CAAA,CAAE,WAAW,CAAA,CAAA,CAAA,CAAA;AAAA,KACxE,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,WAAa,EAAA,eAAA;AAAA,MAEb,OAAA;AAAA,MAEA,UAAA;AAAA,MAEA,2BAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,7 +10,6 @@ require('../../../constants/index.js');
|
|
|
10
10
|
var index = require('../../../hooks/use-locale/index.js');
|
|
11
11
|
var event = require('../../../constants/event.js');
|
|
12
12
|
var error = require('../../../utils/error.js');
|
|
13
|
-
var index$1 = require('../../../hooks/use-deprecated/index.js');
|
|
14
13
|
|
|
15
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
15
|
|
|
@@ -40,7 +39,6 @@ const threeConsecutiveMonth = (start, end) => {
|
|
|
40
39
|
];
|
|
41
40
|
};
|
|
42
41
|
const useCalendar = (props, emit, componentName) => {
|
|
43
|
-
const slots = vue.useSlots();
|
|
44
42
|
const { lang } = index.useLocale();
|
|
45
43
|
const selectedDay = vue.ref();
|
|
46
44
|
const now = dayjs__default["default"]().locale(lang.value);
|
|
@@ -121,14 +119,6 @@ const useCalendar = (props, emit, componentName) => {
|
|
|
121
119
|
pickDay(day);
|
|
122
120
|
}
|
|
123
121
|
};
|
|
124
|
-
index$1.useDeprecated({
|
|
125
|
-
from: '"dateCell"',
|
|
126
|
-
replacement: '"date-cell"',
|
|
127
|
-
scope: "ElCalendar",
|
|
128
|
-
version: "2.3.0",
|
|
129
|
-
ref: "https://element-plus.org/en-US/component/calendar.html#slots",
|
|
130
|
-
type: "Slot"
|
|
131
|
-
}, vue.computed(() => !!slots.dateCell));
|
|
132
122
|
return {
|
|
133
123
|
calculateValidatedDateRange,
|
|
134
124
|
date,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-calendar.js","sources":["../../../../../../packages/components/calendar/src/use-calendar.ts"],"sourcesContent":["import { computed, ref, useSlots } from 'vue'\nimport dayjs from 'dayjs'\nimport { useDeprecated, useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { CalendarDateType, CalendarEmits, CalendarProps } from './calendar'\n\nconst adjacentMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the first month and the first day of the last month is in the same week\n const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, 'week')\n const lastMonthStartDay = isSameWeek\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nconst threeConsecutiveMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const secondMonthFirstDay = start.add(1, 'month').startOf('month')\n\n // Whether the last day of the first month and the second month is in the same week\n const secondMonthStartDay = firstMonthLastDay.isSame(\n secondMonthFirstDay,\n 'week'\n )\n ? secondMonthFirstDay.add(1, 'week')\n : secondMonthFirstDay\n\n const secondMonthLastDay = secondMonthStartDay.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the second month and the last day of the last month is in the same week\n const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, 'week')\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [secondMonthStartDay.startOf('week'), secondMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nexport const useCalendar = (\n props: CalendarProps,\n emit: SetupContext<CalendarEmits>['emit'],\n componentName: string\n) => {\n const slots = useSlots()\n const { lang } = useLocale()\n\n const selectedDay = ref<Dayjs>()\n const now = dayjs().locale(lang.value)\n\n const realSelectedDay = computed<Dayjs | undefined>({\n get() {\n if (!props.modelValue) return selectedDay.value\n return date.value\n },\n set(val) {\n if (!val) return\n selectedDay.value = val\n const result = val.toDate()\n\n emit(INPUT_EVENT, result)\n emit(UPDATE_MODEL_EVENT, result)\n },\n })\n\n // if range is valid, we get a two-digit array\n const validatedRange = computed(() => {\n if (!props.range) return []\n const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value))\n const [startDayjs, endDayjs] = rangeArrDayjs\n if (startDayjs.isAfter(endDayjs)) {\n debugWarn(componentName, 'end time should be greater than start time')\n return []\n }\n if (startDayjs.isSame(endDayjs, 'month')) {\n // same month\n return calculateValidatedDateRange(startDayjs, endDayjs)\n } else {\n // two months\n if (startDayjs.add(1, 'month').month() !== endDayjs.month()) {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n return calculateValidatedDateRange(startDayjs, endDayjs)\n }\n })\n\n const date: ComputedRef<Dayjs> = computed(() => {\n if (!props.modelValue) {\n return (\n realSelectedDay.value ||\n (validatedRange.value.length ? validatedRange.value[0][0] : now)\n )\n } else {\n return dayjs(props.modelValue).locale(lang.value)\n }\n })\n const prevMonthDayjs = computed(() => date.value.subtract(1, 'month').date(1))\n const nextMonthDayjs = computed(() => date.value.add(1, 'month').date(1))\n const prevYearDayjs = computed(() => date.value.subtract(1, 'year').date(1))\n const nextYearDayjs = computed(() => date.value.add(1, 'year').date(1))\n\n // https://github.com/element-plus/element-plus/issues/3155\n // Calculate the validate date range according to the start and end dates\n const calculateValidatedDateRange = (\n startDayjs: Dayjs,\n endDayjs: Dayjs\n ): [Dayjs, Dayjs][] => {\n const firstDay = startDayjs.startOf('week')\n const lastDay = endDayjs.endOf('week')\n const firstMonth = firstDay.get('month')\n const lastMonth = lastDay.get('month')\n\n // Current mouth\n if (firstMonth === lastMonth) {\n return [[firstDay, lastDay]]\n }\n // Two adjacent months\n else if ((firstMonth + 1) % 12 === lastMonth) {\n return adjacentMonth(firstDay, lastDay)\n }\n // Three consecutive months (compatible: 2021-01-30 to 2021-02-28)\n else if (\n firstMonth + 2 === lastMonth ||\n (firstMonth + 1) % 11 === lastMonth\n ) {\n return threeConsecutiveMonth(firstDay, lastDay)\n }\n // Other cases\n else {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n }\n\n const pickDay = (day: Dayjs) => {\n realSelectedDay.value = day\n }\n\n const selectDate = (type: CalendarDateType) => {\n const dateMap: Record<CalendarDateType, Dayjs> = {\n 'prev-month': prevMonthDayjs.value,\n 'next-month': nextMonthDayjs.value,\n 'prev-year': prevYearDayjs.value,\n 'next-year': nextYearDayjs.value,\n today: now,\n }\n\n const day = dateMap[type]\n\n if (!day.isSame(date.value, 'day')) {\n pickDay(day)\n }\n }\n\n useDeprecated(\n {\n from: '\"dateCell\"',\n replacement: '\"date-cell\"',\n scope: 'ElCalendar',\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/calendar.html#slots',\n type: 'Slot',\n },\n computed(() => !!slots.dateCell)\n )\n\n return {\n calculateValidatedDateRange,\n date,\n realSelectedDay,\n pickDay,\n selectDate,\n validatedRange,\n }\n}\n"],"names":["useSlots","useLocale","ref","dayjs","computed","INPUT_EVENT","UPDATE_MODEL_EVENT","debugWarn","useDeprecated"],"mappings":";;;;;;;;;;;;;;;;;;AAKA,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK;AACtC,EAAE,MAAM,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACjD,EAAE,MAAM,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACjD,EAAE,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;AACzE,EAAE,MAAM,iBAAiB,GAAG,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,iBAAiB,CAAC;AAC9F,EAAE,OAAO;AACT,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC;AAC9B,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC;AAC5C,GAAG,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK;AAC9C,EAAE,MAAM,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACjD,EAAE,MAAM,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC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AAM,WAAW,EAAE,aAAa,CAAC,KAAK;AACtC,MAAM,KAAK,EAAE,GAAG;AAChB,KAAK,CAAC;AACN,IAAI,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACxC,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;AACnB,KAAK;AACL,GAAG,CAAC;AACJ,EAAEC,qBAAa,CAAC;AAChB,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,WAAW,EAAE,aAAa;AAC9B,IAAI,KAAK,EAAE,YAAY;AACvB,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,GAAG,EAAE,8DAA8D;AACvE,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG,EAAEJ,YAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;AACvC,EAAE,OAAO;AACT,IAAI,2BAA2B;AAC/B,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"use-calendar.js","sources":["../../../../../../packages/components/calendar/src/use-calendar.ts"],"sourcesContent":["import { computed, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport { useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { INPUT_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type { CalendarDateType, CalendarEmits, CalendarProps } from './calendar'\n\nconst adjacentMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the first month and the first day of the last month is in the same week\n const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, 'week')\n const lastMonthStartDay = isSameWeek\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nconst threeConsecutiveMonth = (start: Dayjs, end: Dayjs): [Dayjs, Dayjs][] => {\n const firstMonthLastDay = start.endOf('month')\n const secondMonthFirstDay = start.add(1, 'month').startOf('month')\n\n // Whether the last day of the first month and the second month is in the same week\n const secondMonthStartDay = firstMonthLastDay.isSame(\n secondMonthFirstDay,\n 'week'\n )\n ? secondMonthFirstDay.add(1, 'week')\n : secondMonthFirstDay\n\n const secondMonthLastDay = secondMonthStartDay.endOf('month')\n const lastMonthFirstDay = end.startOf('month')\n\n // Whether the last day of the second month and the last day of the last month is in the same week\n const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, 'week')\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [start, firstMonthLastDay],\n [secondMonthStartDay.startOf('week'), secondMonthLastDay],\n [lastMonthStartDay.startOf('week'), end],\n ]\n}\n\nexport const useCalendar = (\n props: CalendarProps,\n emit: SetupContext<CalendarEmits>['emit'],\n componentName: string\n) => {\n const { lang } = useLocale()\n\n const selectedDay = ref<Dayjs>()\n const now = dayjs().locale(lang.value)\n\n const realSelectedDay = computed<Dayjs | undefined>({\n get() {\n if (!props.modelValue) return selectedDay.value\n return date.value\n },\n set(val) {\n if (!val) return\n selectedDay.value = val\n const result = val.toDate()\n\n emit(INPUT_EVENT, result)\n emit(UPDATE_MODEL_EVENT, result)\n },\n })\n\n // if range is valid, we get a two-digit array\n const validatedRange = computed(() => {\n if (!props.range) return []\n const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value))\n const [startDayjs, endDayjs] = rangeArrDayjs\n if (startDayjs.isAfter(endDayjs)) {\n debugWarn(componentName, 'end time should be greater than start time')\n return []\n }\n if (startDayjs.isSame(endDayjs, 'month')) {\n // same month\n return calculateValidatedDateRange(startDayjs, endDayjs)\n } else {\n // two months\n if (startDayjs.add(1, 'month').month() !== endDayjs.month()) {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n return calculateValidatedDateRange(startDayjs, endDayjs)\n }\n })\n\n const date: ComputedRef<Dayjs> = computed(() => {\n if (!props.modelValue) {\n return (\n realSelectedDay.value ||\n (validatedRange.value.length ? validatedRange.value[0][0] : now)\n )\n } else {\n return dayjs(props.modelValue).locale(lang.value)\n }\n })\n const prevMonthDayjs = computed(() => date.value.subtract(1, 'month').date(1))\n const nextMonthDayjs = computed(() => date.value.add(1, 'month').date(1))\n const prevYearDayjs = computed(() => date.value.subtract(1, 'year').date(1))\n const nextYearDayjs = computed(() => date.value.add(1, 'year').date(1))\n\n // https://github.com/element-plus/element-plus/issues/3155\n // Calculate the validate date range according to the start and end dates\n const calculateValidatedDateRange = (\n startDayjs: Dayjs,\n endDayjs: Dayjs\n ): [Dayjs, Dayjs][] => {\n const firstDay = startDayjs.startOf('week')\n const lastDay = endDayjs.endOf('week')\n const firstMonth = firstDay.get('month')\n const lastMonth = lastDay.get('month')\n\n // Current mouth\n if (firstMonth === lastMonth) {\n return [[firstDay, lastDay]]\n }\n // Two adjacent months\n else if ((firstMonth + 1) % 12 === lastMonth) {\n return adjacentMonth(firstDay, lastDay)\n }\n // Three consecutive months (compatible: 2021-01-30 to 2021-02-28)\n else if (\n firstMonth + 2 === lastMonth ||\n (firstMonth + 1) % 11 === lastMonth\n ) {\n return threeConsecutiveMonth(firstDay, lastDay)\n }\n // Other cases\n else {\n debugWarn(\n componentName,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n }\n\n const pickDay = (day: Dayjs) => {\n realSelectedDay.value = day\n }\n\n const selectDate = (type: CalendarDateType) => {\n const dateMap: Record<CalendarDateType, Dayjs> = {\n 'prev-month': prevMonthDayjs.value,\n 'next-month': nextMonthDayjs.value,\n 'prev-year': prevYearDayjs.value,\n 'next-year': nextYearDayjs.value,\n today: now,\n }\n\n const day = dateMap[type]\n\n if (!day.isSame(date.value, 'day')) {\n pickDay(day)\n }\n }\n\n return {\n calculateValidatedDateRange,\n date,\n realSelectedDay,\n pickDay,\n selectDate,\n validatedRange,\n }\n}\n"],"names":["useLocale","ref","dayjs","computed","INPUT_EVENT","UPDATE_MODEL_EVENT","debugWarn"],"mappings":";;;;;;;;;;;;;;;;;AAKA,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK;AACtC,EAAE,MAAM,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACjD,EAAE,MAAM,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACjD,EAAE,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;AACzE,EAAE,MAAM,iBAAiB,GAAG,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,iBAAiB,CAAC;AAC9F,EAAE,OAAO;AACT,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC;AAC9B,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC;AAC5C,GAAG,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK;AAC9C,EAAE,MAAM,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACjD,EAAE,MAAM,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrE,EAAE,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC,EAAE,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C,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;AACnB,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,2BAA2B;AAC/B,IAAI,IAAI;AACR,IAAI,eAAe;AACnB,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
|
-
var card$1 = require('./src/
|
|
7
|
-
var card = require('./src/
|
|
6
|
+
var card$1 = require('./src/card.js');
|
|
7
|
+
var card = require('./src/card2.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElCard = install.withInstall(card$1["default"]);
|
|
@@ -2,29 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
7
|
+
var card = require('./card2.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "ElCard"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: card.cardProps,
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const ns = index.useNamespace("card");
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
21
|
+
class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).is(`${_ctx.shadow}-shadow`)])
|
|
22
|
+
}, [
|
|
23
|
+
_ctx.$slots.header || _ctx.header ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: vue.normalizeClass(vue.unref(ns).e("header"))
|
|
26
|
+
}, [
|
|
27
|
+
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
28
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.header), 1)
|
|
29
|
+
])
|
|
30
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
31
|
+
vue.createElementVNode("div", {
|
|
32
|
+
class: vue.normalizeClass([vue.unref(ns).e("body"), _ctx.bodyClass]),
|
|
33
|
+
style: vue.normalizeStyle(_ctx.bodyStyle)
|
|
34
|
+
}, [
|
|
35
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
36
|
+
], 6),
|
|
37
|
+
_ctx.$slots.footer || _ctx.footer ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
38
|
+
key: 1,
|
|
39
|
+
class: vue.normalizeClass(vue.unref(ns).e("footer"))
|
|
40
|
+
}, [
|
|
41
|
+
vue.renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
42
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.footer), 1)
|
|
43
|
+
])
|
|
44
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
45
|
+
], 2);
|
|
46
|
+
};
|
|
26
47
|
}
|
|
27
48
|
});
|
|
49
|
+
var Card = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "card.vue"]]);
|
|
28
50
|
|
|
29
|
-
exports
|
|
51
|
+
exports["default"] = Card;
|
|
30
52
|
//# sourceMappingURL=card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../../../../../packages/components/card/src/card.
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../../../../../packages/components/card/src/card.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is(`${shadow}-shadow`)]\">\n <div v-if=\"$slots.header || header\" :class=\"ns.e('header')\">\n <slot name=\"header\">{{ header }}</slot>\n </div>\n <div :class=\"[ns.e('body'), bodyClass]\" :style=\"bodyStyle\">\n <slot />\n </div>\n <div v-if=\"$slots.footer || footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\">{{ footer }}</slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { cardProps } from './card'\n\ndefineOptions({\n name: 'ElCard',\n})\n\ndefineProps(cardProps)\n\nconst ns = useNamespace('card')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;uCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|