@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
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
8
8
|
default: undefined;
|
|
9
9
|
};
|
|
10
|
+
value: {
|
|
11
|
+
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
10
14
|
indeterminate: BooleanConstructor;
|
|
11
15
|
disabled: BooleanConstructor;
|
|
12
16
|
checked: BooleanConstructor;
|
|
@@ -14,6 +18,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
18
|
type: StringConstructor;
|
|
15
19
|
default: undefined;
|
|
16
20
|
};
|
|
21
|
+
trueValue: {
|
|
22
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
falseValue: {
|
|
26
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
17
29
|
trueLabel: {
|
|
18
30
|
type: (NumberConstructor | StringConstructor)[];
|
|
19
31
|
default: undefined;
|
|
@@ -52,6 +64,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
64
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
53
65
|
default: undefined;
|
|
54
66
|
};
|
|
67
|
+
value: {
|
|
68
|
+
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
55
71
|
indeterminate: BooleanConstructor;
|
|
56
72
|
disabled: BooleanConstructor;
|
|
57
73
|
checked: BooleanConstructor;
|
|
@@ -59,6 +75,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
75
|
type: StringConstructor;
|
|
60
76
|
default: undefined;
|
|
61
77
|
};
|
|
78
|
+
trueValue: {
|
|
79
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
80
|
+
default: undefined;
|
|
81
|
+
};
|
|
82
|
+
falseValue: {
|
|
83
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
62
86
|
trueLabel: {
|
|
63
87
|
type: (NumberConstructor | StringConstructor)[];
|
|
64
88
|
default: undefined;
|
|
@@ -102,6 +126,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
102
126
|
checkboxSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
103
127
|
hasOwnLabel: import("vue").ComputedRef<boolean>;
|
|
104
128
|
model: import("vue").WritableComputedRef<any>;
|
|
129
|
+
actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
|
|
105
130
|
handleChange: (e: Event) => void;
|
|
106
131
|
onClickRoot: (e: MouseEvent) => Promise<void>;
|
|
107
132
|
ns: {
|
|
@@ -136,6 +161,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
136
161
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
137
162
|
default: undefined;
|
|
138
163
|
};
|
|
164
|
+
value: {
|
|
165
|
+
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
166
|
+
default: undefined;
|
|
167
|
+
};
|
|
139
168
|
indeterminate: BooleanConstructor;
|
|
140
169
|
disabled: BooleanConstructor;
|
|
141
170
|
checked: BooleanConstructor;
|
|
@@ -143,6 +172,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
172
|
type: StringConstructor;
|
|
144
173
|
default: undefined;
|
|
145
174
|
};
|
|
175
|
+
trueValue: {
|
|
176
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
177
|
+
default: undefined;
|
|
178
|
+
};
|
|
179
|
+
falseValue: {
|
|
180
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
181
|
+
default: undefined;
|
|
182
|
+
};
|
|
146
183
|
trueLabel: {
|
|
147
184
|
type: (NumberConstructor | StringConstructor)[];
|
|
148
185
|
default: undefined;
|
|
@@ -175,6 +212,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
175
212
|
onChange?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
|
|
176
213
|
"onUpdate:modelValue"?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
|
|
177
214
|
}, {
|
|
215
|
+
value: string | number | boolean | Record<string, any>;
|
|
178
216
|
modelValue: string | number | boolean;
|
|
179
217
|
label: string | number | boolean | Record<string, any>;
|
|
180
218
|
id: string;
|
|
@@ -184,6 +222,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
184
222
|
border: boolean;
|
|
185
223
|
indeterminate: boolean;
|
|
186
224
|
checked: boolean;
|
|
225
|
+
trueValue: string | number;
|
|
226
|
+
falseValue: string | number;
|
|
187
227
|
trueLabel: string | number;
|
|
188
228
|
falseLabel: string | number;
|
|
189
229
|
controls: string;
|
|
@@ -31,6 +31,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
31
|
checkboxSize,
|
|
32
32
|
hasOwnLabel,
|
|
33
33
|
model,
|
|
34
|
+
actualValue,
|
|
34
35
|
handleChange,
|
|
35
36
|
onClickRoot
|
|
36
37
|
} = useCheckbox.useCheckbox(props, slots);
|
|
@@ -63,7 +64,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
64
|
vue.createElementVNode("span", {
|
|
64
65
|
class: vue.normalizeClass(vue.unref(spanKls))
|
|
65
66
|
}, [
|
|
66
|
-
_ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
67
|
+
_ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
67
68
|
key: 0,
|
|
68
69
|
id: vue.unref(inputId),
|
|
69
70
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(model) ? model.value = $event : null),
|
|
@@ -73,8 +74,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
73
74
|
name: _ctx.name,
|
|
74
75
|
tabindex: _ctx.tabindex,
|
|
75
76
|
disabled: vue.unref(isDisabled),
|
|
76
|
-
"true-value": _ctx.trueLabel,
|
|
77
|
-
"false-value": _ctx.falseLabel,
|
|
77
|
+
"true-value": _ctx.trueValue || _ctx.trueLabel,
|
|
78
|
+
"false-value": _ctx.falseValue || _ctx.falseLabel,
|
|
78
79
|
onChange: _cache[1] || (_cache[1] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
|
|
79
80
|
onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
|
|
80
81
|
onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
|
|
@@ -90,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
90
91
|
type: "checkbox",
|
|
91
92
|
indeterminate: _ctx.indeterminate,
|
|
92
93
|
disabled: vue.unref(isDisabled),
|
|
93
|
-
value:
|
|
94
|
+
value: vue.unref(actualValue),
|
|
94
95
|
name: _ctx.name,
|
|
95
96
|
tabindex: _ctx.tabindex,
|
|
96
97
|
onChange: _cache[6] || (_cache[6] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox2.js","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span :class=\"spanKls\">\n <input\n v-if=\"trueLabel || falseLabel\"\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :true-value=\"trueLabel\"\n :false-value=\"falseLabel\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <input\n v-else\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :disabled=\"isDisabled\"\n :value=\"
|
|
1
|
+
{"version":3,"file":"checkbox2.js","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span :class=\"spanKls\">\n <input\n v-if=\"trueValue || falseValue || trueLabel || falseLabel\"\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :true-value=\"trueValue || trueLabel\"\n :false-value=\"falseValue || falseLabel\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <input\n v-else\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :disabled=\"isDisabled\"\n :value=\"actualValue\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span v-if=\"hasOwnLabel\" :class=\"ns.e('label')\">\n <slot />\n <template v-if=\"!$slots.default\">{{ label }}</template>\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkboxEmits, checkboxProps } from './checkbox'\nimport { useCheckbox } from './composables'\n\ndefineOptions({\n name: 'ElCheckbox',\n})\n\nconst props = defineProps(checkboxProps)\ndefineEmits(checkboxEmits)\nconst slots = useSlots()\n\nconst {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n model,\n actualValue,\n handleChange,\n onClickRoot,\n} = useCheckbox(props, slots)\n\nconst ns = useNamespace('checkbox')\n\nconst compKls = computed(() => {\n return [\n ns.b(),\n ns.m(checkboxSize.value),\n ns.is('disabled', isDisabled.value),\n ns.is('bordered', props.border),\n ns.is('checked', isChecked.value),\n ]\n})\n\nconst spanKls = computed(() => {\n return [\n ns.e('input'),\n ns.is('disabled', isDisabled.value),\n ns.is('checked', isChecked.value),\n ns.is('indeterminate', props.indeterminate),\n ns.is('focus', isFocused.value),\n ]\n})\n</script>\n"],"names":["useSlots","useCheckbox","useNamespace","computed"],"mappings":";;;;;;;;;;;;;;uCAwDc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAAC,uBAAA,CAAY,OAAO,KAAK,CAAA,CAAA;AAE5B,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAA,CAAG,CAAE,CAAA,YAAA,CAAa,KAAK,CAAA;AAAA,QACvB,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,QAC9B,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAClC,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,OAAA,GAAUA,aAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,EAAA,CAAG,EAAE,OAAO,CAAA;AAAA,QACZ,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,QAChC,EAAG,CAAA,EAAA,CAAG,eAAiB,EAAA,KAAA,CAAM,aAAa,CAAA;AAAA,QAC1C,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAChC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -21,7 +21,7 @@ const useCheckboxEvent = (props, {
|
|
|
21
21
|
const { emit } = vue.getCurrentInstance();
|
|
22
22
|
function getLabeledValue(value) {
|
|
23
23
|
var _a, _b;
|
|
24
|
-
return
|
|
24
|
+
return [true, props.trueValue, props.trueLabel].includes(value) ? (_a = props.trueValue || props.trueLabel) != null ? _a : true : (_b = props.falseValue || props.falseLabel) != null ? _b : false;
|
|
25
25
|
}
|
|
26
26
|
function emitChangeEvent(checked, e) {
|
|
27
27
|
emit("change", getLabeledValue(checked), e);
|
|
@@ -39,7 +39,7 @@ const useCheckboxEvent = (props, {
|
|
|
39
39
|
const eventTargets = e.composedPath();
|
|
40
40
|
const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
|
|
41
41
|
if (!hasLabel) {
|
|
42
|
-
model.value = getLabeledValue([false, props.falseLabel].includes(model.value));
|
|
42
|
+
model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
|
|
43
43
|
await vue.nextTick();
|
|
44
44
|
emitChangeEvent(model.value, e);
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-checkbox-event.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-event.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, nextTick, watch } from 'vue'\nimport { useFormItem } from '@element-plus/components/form'\nimport { debugWarn } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { useFormItemInputId } from '@element-plus/components/form'\nimport type { CheckboxProps } from '../checkbox'\nimport type {\n CheckboxDisabled,\n CheckboxModel,\n CheckboxStatus,\n} from '../composables'\n\nexport const useCheckboxEvent = (\n props: CheckboxProps,\n {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n }: Pick<CheckboxModel, 'model' | 'isLimitExceeded'> &\n Pick<CheckboxStatus, 'hasOwnLabel'> &\n Pick<CheckboxDisabled, 'isDisabled'> &\n Pick<ReturnType<typeof useFormItemInputId>, 'isLabeledByFormItem'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const { formItem } = useFormItem()\n const { emit } = getCurrentInstance()!\n\n function getLabeledValue(value: string | number | boolean) {\n return
|
|
1
|
+
{"version":3,"file":"use-checkbox-event.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-event.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, nextTick, watch } from 'vue'\nimport { useFormItem } from '@element-plus/components/form'\nimport { debugWarn } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { useFormItemInputId } from '@element-plus/components/form'\nimport type { CheckboxProps } from '../checkbox'\nimport type {\n CheckboxDisabled,\n CheckboxModel,\n CheckboxStatus,\n} from '../composables'\n\nexport const useCheckboxEvent = (\n props: CheckboxProps,\n {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n }: Pick<CheckboxModel, 'model' | 'isLimitExceeded'> &\n Pick<CheckboxStatus, 'hasOwnLabel'> &\n Pick<CheckboxDisabled, 'isDisabled'> &\n Pick<ReturnType<typeof useFormItemInputId>, 'isLabeledByFormItem'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const { formItem } = useFormItem()\n const { emit } = getCurrentInstance()!\n\n function getLabeledValue(value: string | number | boolean) {\n return [true, props.trueValue, props.trueLabel].includes(value)\n ? (props.trueValue || props.trueLabel) ?? true\n : (props.falseValue || props.falseLabel) ?? false\n }\n\n function emitChangeEvent(\n checked: string | number | boolean,\n e: InputEvent | MouseEvent\n ) {\n emit('change', getLabeledValue(checked), e)\n }\n\n function handleChange(e: Event) {\n if (isLimitExceeded.value) return\n\n const target = e.target as HTMLInputElement\n emit('change', getLabeledValue(target.checked), e)\n }\n\n async function onClickRoot(e: MouseEvent) {\n if (isLimitExceeded.value) return\n\n if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {\n // fix: https://github.com/element-plus/element-plus/issues/9981\n const eventTargets: EventTarget[] = e.composedPath()\n const hasLabel = eventTargets.some(\n (item) => (item as HTMLElement).tagName === 'LABEL'\n )\n if (!hasLabel) {\n model.value = getLabeledValue(\n [false, props.falseValue, props.falseLabel].includes(model.value)\n )\n await nextTick()\n emitChangeEvent(model.value, e)\n }\n }\n }\n\n const validateEvent = computed(\n () => checkboxGroup?.validateEvent || props.validateEvent\n )\n\n watch(\n () => props.modelValue,\n () => {\n if (validateEvent.value) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n )\n\n return {\n handleChange,\n onClickRoot,\n }\n}\n"],"names":["inject","checkboxGroupContextKey","useFormItem","getCurrentInstance","nextTick","computed","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W;AACf,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -7,5 +7,6 @@ export declare const useCheckboxStatus: (props: CheckboxProps, slots: ComponentI
|
|
|
7
7
|
isFocused: import("vue").Ref<boolean>;
|
|
8
8
|
checkboxSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
9
9
|
hasOwnLabel: import("vue").ComputedRef<boolean>;
|
|
10
|
+
actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
|
|
10
11
|
};
|
|
11
12
|
export declare type CheckboxStatus = ReturnType<typeof useCheckboxStatus>;
|
|
@@ -14,18 +14,24 @@ var useFormCommonProps = require('../../../form/src/hooks/use-form-common-props.
|
|
|
14
14
|
const useCheckboxStatus = (props, slots, { model }) => {
|
|
15
15
|
const checkboxGroup = vue.inject(constants.checkboxGroupContextKey, void 0);
|
|
16
16
|
const isFocused = vue.ref(false);
|
|
17
|
+
const actualValue = vue.computed(() => {
|
|
18
|
+
if (!types.isPropAbsent(props.value)) {
|
|
19
|
+
return props.value;
|
|
20
|
+
}
|
|
21
|
+
return props.label;
|
|
22
|
+
});
|
|
17
23
|
const isChecked = vue.computed(() => {
|
|
18
24
|
const value = model.value;
|
|
19
25
|
if (types.isBoolean(value)) {
|
|
20
26
|
return value;
|
|
21
27
|
} else if (shared.isArray(value)) {
|
|
22
|
-
if (shared.isObject(
|
|
23
|
-
return value.map(vue.toRaw).some((o) => lodashUnified.isEqual(o,
|
|
28
|
+
if (shared.isObject(actualValue.value)) {
|
|
29
|
+
return value.map(vue.toRaw).some((o) => lodashUnified.isEqual(o, actualValue.value));
|
|
24
30
|
} else {
|
|
25
|
-
return value.map(vue.toRaw).includes(
|
|
31
|
+
return value.map(vue.toRaw).includes(actualValue.value);
|
|
26
32
|
}
|
|
27
33
|
} else if (value !== null && value !== void 0) {
|
|
28
|
-
return value === props.trueLabel;
|
|
34
|
+
return value === props.trueValue || value === props.trueLabel;
|
|
29
35
|
} else {
|
|
30
36
|
return !!value;
|
|
31
37
|
}
|
|
@@ -41,14 +47,15 @@ const useCheckboxStatus = (props, slots, { model }) => {
|
|
|
41
47
|
return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
|
|
42
48
|
}));
|
|
43
49
|
const hasOwnLabel = vue.computed(() => {
|
|
44
|
-
return !!slots.default || !
|
|
50
|
+
return !!slots.default || !types.isPropAbsent(actualValue.value);
|
|
45
51
|
});
|
|
46
52
|
return {
|
|
47
53
|
checkboxButtonSize,
|
|
48
54
|
isChecked,
|
|
49
55
|
isFocused,
|
|
50
56
|
checkboxSize,
|
|
51
|
-
hasOwnLabel
|
|
57
|
+
hasOwnLabel,
|
|
58
|
+
actualValue
|
|
52
59
|
};
|
|
53
60
|
};
|
|
54
61
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-checkbox-status.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual
|
|
1
|
+
{"version":3,"file":"use-checkbox-status.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject, isPropAbsent } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const actualValue = computed(() => {\n // In version 2.x, if there's no props.value, props.label will act as props.value\n // In version 3.x, remove this computed value, use props.value instead.\n if (!isPropAbsent(props.value)) {\n return props.value\n }\n return props.label\n })\n const isChecked = computed<boolean>(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(actualValue.value)) {\n return value.map(toRaw).some((o) => isEqual(o, actualValue.value))\n } else {\n return value.map(toRaw).includes(actualValue.value)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueValue || value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed<boolean>(() => {\n return !!slots.default || !isPropAbsent(actualValue.value)\n })\n\n return {\n checkboxButtonSize,\n isChecked,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n actualValue,\n }\n}\n\nexport type CheckboxStatus = ReturnType<typeof useCheckboxStatus>\n"],"names":["inject","checkboxGroupContextKey","ref","computed","isPropAbsent","isBoolean","isArray","isObject","toRaw","isEqual","useFormSize"],"mappings":";;;;;;;;;;;;;AAKY,MAAC,iBAAiB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC9D,EAAE,MAAM,aAAa,GAAGA,UAAM,CAACC,iCAAuB,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,EAAE,MAAM,SAAS,GAAGC,OAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,EAAE,MAAM,WAAW,GAAGC,YAAQ,CAAC,MAAM;AACrC,IAAI,IAAI,CAACC,kBAAY,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACpC,MAAM,OAAO,KAAK,CAAC,KAAK,CAAC;AACzB,KAAK;AACL,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC;AACvB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,SAAS,GAAGD,YAAQ,CAAC,MAAM;AACnC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAC9B,IAAI,IAAIE,eAAS,CAAC,KAAK,C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IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,CAAC,CAAC;AACN,EAAE,MAAM,WAAW,GAAGA,YAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAACC,kBAAY,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC/D,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -10,6 +10,7 @@ export declare const useCheckbox: (props: CheckboxProps, slots: ComponentInterna
|
|
|
10
10
|
checkboxSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
11
11
|
hasOwnLabel: import("vue").ComputedRef<boolean>;
|
|
12
12
|
model: import("vue").WritableComputedRef<any>;
|
|
13
|
+
actualValue: import("vue").ComputedRef<string | number | boolean | Record<string, any> | undefined>;
|
|
13
14
|
handleChange: (e: Event) => void;
|
|
14
15
|
onClickRoot: (e: MouseEvent) => Promise<void>;
|
|
15
16
|
};
|
|
@@ -2,25 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
5
6
|
require('../../../form/index.js');
|
|
6
7
|
require('../../../../utils/index.js');
|
|
8
|
+
require('../../../../hooks/index.js');
|
|
7
9
|
var useCheckboxDisabled = require('./use-checkbox-disabled.js');
|
|
8
10
|
var useCheckboxEvent = require('./use-checkbox-event.js');
|
|
9
11
|
var useCheckboxModel = require('./use-checkbox-model.js');
|
|
10
12
|
var useCheckboxStatus = require('./use-checkbox-status.js');
|
|
11
|
-
var shared = require('@vue/shared');
|
|
12
13
|
var useFormItem = require('../../../form/src/hooks/use-form-item.js');
|
|
14
|
+
var shared = require('@vue/shared');
|
|
15
|
+
var index = require('../../../../hooks/use-deprecated/index.js');
|
|
16
|
+
var types = require('../../../../utils/types.js');
|
|
13
17
|
|
|
14
|
-
const setStoreValue = (props, { model }) => {
|
|
15
|
-
function addToStore() {
|
|
16
|
-
if (shared.isArray(model.value) && !model.value.includes(props.label)) {
|
|
17
|
-
model.value.push(props.label);
|
|
18
|
-
} else {
|
|
19
|
-
model.value = props.trueLabel || true;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
props.checked && addToStore();
|
|
23
|
-
};
|
|
24
18
|
const useCheckbox = (props, slots) => {
|
|
25
19
|
const { formItem: elFormItem } = useFormItem.useFormItem();
|
|
26
20
|
const { model, isGroup, isLimitExceeded } = useCheckboxModel.useCheckboxModel(props);
|
|
@@ -29,7 +23,8 @@ const useCheckbox = (props, slots) => {
|
|
|
29
23
|
isChecked,
|
|
30
24
|
checkboxButtonSize,
|
|
31
25
|
checkboxSize,
|
|
32
|
-
hasOwnLabel
|
|
26
|
+
hasOwnLabel,
|
|
27
|
+
actualValue
|
|
33
28
|
} = useCheckboxStatus.useCheckboxStatus(props, slots, { model });
|
|
34
29
|
const { isDisabled } = useCheckboxDisabled.useCheckboxDisabled({ model, isChecked });
|
|
35
30
|
const { inputId, isLabeledByFormItem } = useFormItem.useFormItemInputId(props, {
|
|
@@ -44,7 +39,38 @@ const useCheckbox = (props, slots) => {
|
|
|
44
39
|
isDisabled,
|
|
45
40
|
isLabeledByFormItem
|
|
46
41
|
});
|
|
47
|
-
setStoreValue(
|
|
42
|
+
const setStoreValue = () => {
|
|
43
|
+
function addToStore() {
|
|
44
|
+
if (shared.isArray(model.value) && !model.value.includes(actualValue.value)) {
|
|
45
|
+
model.value.push(actualValue.value);
|
|
46
|
+
} else {
|
|
47
|
+
model.value = props.trueValue || props.trueLabel || true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
props.checked && addToStore();
|
|
51
|
+
};
|
|
52
|
+
setStoreValue();
|
|
53
|
+
index.useDeprecated({
|
|
54
|
+
from: "label act as value",
|
|
55
|
+
replacement: "value",
|
|
56
|
+
version: "3.0.0",
|
|
57
|
+
scope: "el-checkbox",
|
|
58
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
59
|
+
}, vue.computed(() => isGroup.value && types.isPropAbsent(props.value)));
|
|
60
|
+
index.useDeprecated({
|
|
61
|
+
from: "true-label",
|
|
62
|
+
replacement: "true-value",
|
|
63
|
+
version: "3.0.0",
|
|
64
|
+
scope: "el-checkbox",
|
|
65
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
66
|
+
}, vue.computed(() => !!props.trueLabel));
|
|
67
|
+
index.useDeprecated({
|
|
68
|
+
from: "false-label",
|
|
69
|
+
replacement: "false-value",
|
|
70
|
+
version: "3.0.0",
|
|
71
|
+
scope: "el-checkbox",
|
|
72
|
+
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
73
|
+
}, vue.computed(() => !!props.falseLabel));
|
|
48
74
|
return {
|
|
49
75
|
inputId,
|
|
50
76
|
isLabeledByFormItem,
|
|
@@ -55,6 +81,7 @@ const useCheckbox = (props, slots) => {
|
|
|
55
81
|
checkboxSize,
|
|
56
82
|
hasOwnLabel,
|
|
57
83
|
model,
|
|
84
|
+
actualValue,
|
|
58
85
|
handleChange,
|
|
59
86
|
onClickRoot
|
|
60
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-checkbox.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox.ts"],"sourcesContent":["import { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { isArray } from '@element-plus/utils'\nimport { useCheckboxDisabled } from './use-checkbox-disabled'\nimport { useCheckboxEvent } from './use-checkbox-event'\nimport { useCheckboxModel } from './use-checkbox-model'\nimport { useCheckboxStatus } from './use-checkbox-status'\
|
|
1
|
+
{"version":3,"file":"use-checkbox.js","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { isArray, isPropAbsent } from '@element-plus/utils'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { useCheckboxDisabled } from './use-checkbox-disabled'\nimport { useCheckboxEvent } from './use-checkbox-event'\nimport { useCheckboxModel } from './use-checkbox-model'\nimport { useCheckboxStatus } from './use-checkbox-status'\nimport type { ComponentInternalInstance } from 'vue'\n\nimport type { CheckboxProps } from '../checkbox'\n\nexport const useCheckbox = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots']\n) => {\n const { formItem: elFormItem } = useFormItem()\n const { model, isGroup, isLimitExceeded } = useCheckboxModel(props)\n const {\n isFocused,\n isChecked,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n actualValue,\n } = useCheckboxStatus(props, slots, { model })\n const { isDisabled } = useCheckboxDisabled({ model, isChecked })\n const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n disableIdGeneration: hasOwnLabel,\n disableIdManagement: isGroup,\n })\n const { handleChange, onClickRoot } = useCheckboxEvent(props, {\n model,\n isLimitExceeded,\n hasOwnLabel,\n isDisabled,\n isLabeledByFormItem,\n })\n\n const setStoreValue = () => {\n function addToStore() {\n if (isArray(model.value) && !model.value.includes(actualValue.value)) {\n model.value.push(actualValue.value)\n } else {\n model.value = props.trueValue || props.trueLabel || true\n }\n }\n props.checked && addToStore()\n }\n\n setStoreValue()\n\n useDeprecated(\n {\n from: 'label act as value',\n replacement: 'value',\n version: '3.0.0',\n scope: 'el-checkbox',\n ref: 'https://element-plus.org/en-US/component/checkbox.html',\n },\n computed(() => isGroup.value && isPropAbsent(props.value))\n )\n\n useDeprecated(\n {\n from: 'true-label',\n replacement: 'true-value',\n version: '3.0.0',\n scope: 'el-checkbox',\n ref: 'https://element-plus.org/en-US/component/checkbox.html',\n },\n computed(() => !!props.trueLabel)\n )\n\n useDeprecated(\n {\n from: 'false-label',\n replacement: 'false-value',\n version: '3.0.0',\n scope: 'el-checkbox',\n ref: 'https://element-plus.org/en-US/component/checkbox.html',\n },\n computed(() => !!props.falseLabel)\n )\n\n return {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxButtonSize,\n checkboxSize,\n hasOwnLabel,\n model,\n actualValue,\n handleChange,\n onClickRoot,\n }\n}\n"],"names":["useFormItem","useCheckboxModel","useCheckboxStatus","useCheckboxDisabled","useFormItemInputId","useCheckboxEvent","isArray","useDeprecated","computed","isPropAbsent"],"mappings":";;;;;;;;;;;;;;;;;AAQY,MAAC,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK;AAC7C,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAGA,uBAAW,EAAE,CAAC;AACjD,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAGC,iCAAgB,CAAC,KAAK,CAAC,CAAC;AACtE,EAAE,MAAM;AACR,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,kBAAkB;AACtB,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,GAAG,GAAGC,mCAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;AACjD,EAAE,MAAM,EAAE,UAAU,EAAE,GAAGC,uCAAmB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AACnE,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,GAAGC,8BAAkB,CAAC,KAAK,EAAE;AACrE,IAAI,eAAe,EAAE,UAAU;AAC/B,IAAI,mBAAmB,EAAE,WAAW;AACpC,IAAI,mBAAmB,EAAE,OAAO;AAChC,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAGC,iCAAgB,CAAC,KAAK,EAAE;AAChE,IAAI,KAAK;AACT,IAAI,eAAe;AAC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I,WAAW,EAAE,aAAa;AAC9B,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,KAAK,EAAE,aAAa;AACxB,IAAI,GAAG,EAAE,wDAAwD;AACjE,GAAG,EAAEC,YAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACzC,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,mBAAmB;AACvB,IAAI,SAAS;AACb,IAAI,UAAU;AACd,IAAI,SAAS;AACb,IAAI,kBAAkB;AACtB,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,KAAK;AACT,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,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 col$1 = require('./src/
|
|
7
|
-
var col = require('./src/
|
|
6
|
+
var col$1 = require('./src/col2.js');
|
|
7
|
+
var col = require('./src/col.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElCol = install.withInstall(col$1["default"]);
|
|
@@ -2,75 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
5
|
require('../../../utils/index.js');
|
|
7
|
-
require('../../../
|
|
8
|
-
require('
|
|
9
|
-
var col = require('./col2.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
-
var constants = require('../../row/src/constants.js');
|
|
12
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
|
-
var types = require('../../../utils/types.js');
|
|
14
|
-
var shared = require('@vue/shared');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
+
var typescript = require('../../../utils/typescript.js');
|
|
15
8
|
|
|
16
|
-
const
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
classes.push(ns.is("guttered"));
|
|
57
|
-
}
|
|
58
|
-
return [ns.b(), classes];
|
|
59
|
-
});
|
|
60
|
-
return (_ctx, _cache) => {
|
|
61
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
|
62
|
-
class: vue.normalizeClass(vue.unref(colKls)),
|
|
63
|
-
style: vue.normalizeStyle(vue.unref(style))
|
|
64
|
-
}, {
|
|
65
|
-
default: vue.withCtx(() => [
|
|
66
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
67
|
-
]),
|
|
68
|
-
_: 3
|
|
69
|
-
}, 8, ["class", "style"]);
|
|
70
|
-
};
|
|
9
|
+
const colProps = runtime.buildProps({
|
|
10
|
+
tag: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "div"
|
|
13
|
+
},
|
|
14
|
+
span: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 24
|
|
17
|
+
},
|
|
18
|
+
offset: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
pull: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
push: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 0
|
|
29
|
+
},
|
|
30
|
+
xs: {
|
|
31
|
+
type: runtime.definePropType([Number, Object]),
|
|
32
|
+
default: () => typescript.mutable({})
|
|
33
|
+
},
|
|
34
|
+
sm: {
|
|
35
|
+
type: runtime.definePropType([Number, Object]),
|
|
36
|
+
default: () => typescript.mutable({})
|
|
37
|
+
},
|
|
38
|
+
md: {
|
|
39
|
+
type: runtime.definePropType([Number, Object]),
|
|
40
|
+
default: () => typescript.mutable({})
|
|
41
|
+
},
|
|
42
|
+
lg: {
|
|
43
|
+
type: runtime.definePropType([Number, Object]),
|
|
44
|
+
default: () => typescript.mutable({})
|
|
45
|
+
},
|
|
46
|
+
xl: {
|
|
47
|
+
type: runtime.definePropType([Number, Object]),
|
|
48
|
+
default: () => typescript.mutable({})
|
|
71
49
|
}
|
|
72
50
|
});
|
|
73
|
-
var Col = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "col.vue"]]);
|
|
74
51
|
|
|
75
|
-
exports
|
|
52
|
+
exports.colProps = colProps;
|
|
76
53
|
//# sourceMappingURL=col.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"col.js","sources":["../../../../../../packages/components/col/src/col.
|
|
1
|
+
{"version":3,"file":"col.js","sources":["../../../../../../packages/components/col/src/col.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Col from './col.vue'\n\nexport type ColSizeObject = {\n span?: number\n offset?: number\n pull?: number\n push?: number\n}\nexport type ColSize = number | ColSizeObject\n\nexport const colProps = buildProps({\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description number of column the grid spans\n */\n span: {\n type: Number,\n default: 24,\n },\n /**\n * @description number of spacing on the left side of the grid\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the left\n */\n pull: {\n type: Number,\n default: 0,\n },\n /**\n * @description number of columns that grid moves to the right\n */\n push: {\n type: Number,\n default: 0,\n },\n /**\n * @description `<768px` Responsive columns or column props object\n */\n xs: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥768px` Responsive columns or column props object\n */\n sm: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥992px` Responsive columns or column props object\n */\n md: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1200px` Responsive columns or column props object\n */\n lg: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n /**\n * @description `≥1920px` Responsive columns or column props object\n */\n xl: {\n type: definePropType<ColSize>([Number, Object]),\n default: () => mutable({} as const),\n },\n} as const)\nexport type ColProps = ExtractPropTypes<typeof colProps>\nexport type ColInstance = InstanceType<typeof Col>\n"],"names":["buildProps","definePropType","mutable"],"mappings":";;;;;;;;AACY,MAAC,QAAQ,GAAGA,kBAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,I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