element-plus 2.3.3 → 2.3.5
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 +323 -225
- package/dist/index.full.min.js +18 -18
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +18 -18
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +323 -226
- 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.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 +21 -21
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.js.map +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.min.mjs.map +1 -1
- package/dist/locale/fa.mjs +21 -21
- 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/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/src/affix.mjs +1 -1
- package/es/components/avatar/src/avatar.mjs +1 -1
- package/es/components/avatar/src/avatar2.mjs +1 -1
- package/es/components/badge/src/badge2.mjs +1 -1
- package/es/components/button/index.d.ts +15 -0
- package/es/components/button/src/button.d.ts +4 -3
- package/es/components/button/src/button.mjs +5 -1
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +15 -0
- package/es/components/button/src/button2.mjs +34 -35
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/button/src/use-button.d.ts +11 -0
- package/es/components/button/src/use-button.mjs +12 -0
- package/es/components/button/src/use-button.mjs.map +1 -1
- package/es/components/calendar/index.d.ts +15 -0
- package/es/components/calendar/src/calendar.vue.d.ts +17 -2
- package/es/components/carousel/index.d.ts +10 -0
- package/es/components/carousel/src/carousel-item.vue.d.ts +1 -0
- package/es/components/carousel/src/carousel-item2.mjs +7 -1
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.mjs +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +8 -0
- package/es/components/carousel/src/carousel2.mjs +7 -2
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/carousel/src/constants.d.ts +1 -0
- package/es/components/carousel/src/constants.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel-item.d.ts +1 -0
- package/es/components/carousel/src/use-carousel-item.mjs +7 -5
- package/es/components/carousel/src/use-carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.d.ts +8 -0
- package/es/components/carousel/src/use-carousel.mjs +21 -1
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +16 -16
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +8 -8
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/check-tag/index.d.ts +1 -0
- package/es/components/check-tag/src/check-tag.mjs +1 -1
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag.vue.d.ts +1 -0
- package/es/components/check-tag/src/check-tag2.mjs +3 -2
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.mjs +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +1 -1
- package/es/components/col/src/col2.mjs +1 -1
- package/es/components/collapse/src/collapse.mjs +1 -1
- package/es/components/color-picker/index.d.ts +15 -0
- package/es/components/color-picker/src/color-picker.vue.d.ts +15 -0
- package/es/components/color-picker/src/utils/draggable.mjs +1 -0
- package/es/components/color-picker/src/utils/draggable.mjs.map +1 -1
- package/es/components/countdown/src/countdown.mjs +1 -1
- package/es/components/countdown/src/utils.mjs +1 -1
- package/es/components/date-picker/index.d.ts +173 -172
- package/es/components/date-picker/index.mjs +1 -0
- package/es/components/date-picker/index.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
- package/es/components/date-picker/src/date-picker.d.ts +86 -86
- package/es/components/date-picker/src/date-picker.mjs +1 -5
- package/es/components/date-picker/src/date-picker.mjs.map +1 -1
- package/es/components/date-picker/src/panel-utils.d.ts +30 -0
- package/es/components/date-picker/src/props/date-picker.d.ts +77 -0
- package/es/components/date-picker/src/props/date-picker.mjs +3 -0
- package/es/components/date-picker/src/props/date-picker.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +1 -0
- package/es/components/dropdown/index.mjs +1 -0
- package/es/components/dropdown/index.mjs.map +1 -1
- package/es/components/dropdown/src/instance.d.ts +2 -0
- package/es/components/dropdown/src/instance.mjs +2 -0
- package/es/components/dropdown/src/instance.mjs.map +1 -0
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +2 -1
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.mjs +1 -1
- package/es/components/image/src/image.mjs +1 -1
- package/es/components/image/src/image2.mjs +31 -29
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.mjs +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +2 -1
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +1 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input/src/utils.mjs +1 -1
- package/es/components/input-number/src/input-number.mjs +1 -1
- package/es/components/input-number/src/input-number2.mjs +5 -3
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/loading/src/loading.mjs +1 -4
- package/es/components/loading/src/loading.mjs.map +1 -1
- package/es/components/loading/src/service.mjs +4 -4
- package/es/components/loading/src/service.mjs.map +1 -1
- package/es/components/menu/src/menu.mjs +1 -1
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.mjs +1 -1
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/message/src/message.mjs +1 -1
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/message/src/method.mjs.map +1 -1
- package/es/components/message-box/src/messageBox.mjs +1 -1
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +1 -1
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popconfirm/index.d.ts +15 -0
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/src/utils.d.ts +1 -1
- package/es/components/popper/src/utils.mjs +1 -0
- package/es/components/popper/src/utils.mjs.map +1 -1
- package/es/components/progress/index.d.ts +8 -0
- package/es/components/progress/src/progress.d.ts +2 -0
- package/es/components/progress/src/progress.mjs +2 -0
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress.vue.d.ts +8 -0
- package/es/components/progress/src/progress2.mjs +3 -1
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/src/radio.mjs +1 -1
- package/es/components/rate/src/rate.mjs +1 -1
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +2 -1
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +10 -3
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +1 -1
- package/es/components/slider/src/slider.mjs +1 -1
- package/es/components/space/src/space.mjs +1 -1
- package/es/components/space/src/use-space.mjs +1 -1
- package/es/components/statistic/src/statistic2.mjs +1 -1
- package/es/components/steps/index.d.ts +2 -0
- package/es/components/steps/src/item.vue.d.ts +1 -0
- package/es/components/steps/src/item2.mjs +10 -7
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/steps/src/steps.mjs +1 -1
- package/es/components/switch/src/switch.mjs +1 -1
- package/es/components/switch/src/switch2.mjs +1 -1
- package/es/components/table/src/composables/use-scrollbar.mjs +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -1
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-header/event-helper.mjs +7 -3
- package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
- package/es/components/table/src/table-layout.mjs +1 -1
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/util.mjs +1 -1
- package/es/components/table-v2/src/components/row.mjs +1 -1
- package/es/components/table-v2/src/composables/use-row.mjs +1 -1
- package/es/components/table-v2/src/composables/use-styles.mjs +1 -1
- package/es/components/table-v2/src/renderers/cell.mjs +1 -1
- package/es/components/table-v2/src/renderers/cell.mjs.map +1 -1
- package/es/components/table-v2/src/table-grid.mjs +1 -1
- package/es/components/tabs/src/tabs.mjs +1 -2
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/tag/index.d.ts +8 -8
- package/es/components/tag/src/tag.d.ts +2 -2
- package/es/components/tag/src/tag.mjs +2 -2
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag.vue.d.ts +8 -8
- package/es/components/tag/src/tag2.mjs +3 -3
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/time-picker/src/common/props.d.ts +27 -9
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/props/shared.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +6 -0
- package/es/components/time-picker/src/time-picker.mjs.map +1 -1
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/timeline/index.d.ts +38 -0
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +19 -0
- package/es/components/timeline/src/timeline-item2.mjs +9 -7
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +2 -2
- package/es/components/transfer/index.d.ts +15 -0
- package/es/components/transfer/src/transfer.vue.d.ts +15 -0
- package/es/components/tree/index.d.ts +2 -2
- package/es/components/tree/src/model/useDragNode.mjs +2 -2
- package/es/components/tree/src/model/useDragNode.mjs.map +1 -1
- package/es/components/tree/src/tree.mjs +9 -5
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/tree/src/tree.type.d.ts +1 -1
- package/es/components/tree/src/tree.vue.d.ts +1 -1
- package/es/components/tree-select/src/tree-select.mjs.map +1 -1
- package/es/components/tree-select/src/tree.mjs +20 -3
- package/es/components/tree-select/src/tree.mjs.map +1 -1
- package/es/components/upload/index.d.ts +8 -0
- package/es/components/upload/src/upload-content2.mjs +5 -1
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.vue.d.ts +8 -0
- package/es/components/upload/src/upload.vue.d.ts +8 -0
- package/es/components/virtual-list/src/builders/build-grid.mjs +2 -1
- package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.mjs +2 -1
- package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs +1 -2
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/components/fixed-size-grid.mjs +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/directives/click-outside/index.mjs.map +1 -1
- package/es/hooks/use-delayed-toggle/index.mjs +1 -1
- package/es/hooks/use-escape-keydown/index.mjs +2 -1
- package/es/hooks/use-escape-keydown/index.mjs.map +1 -1
- package/es/hooks/use-floating/index.mjs.map +1 -1
- package/es/hooks/use-id/index.mjs +1 -1
- package/es/hooks/use-id/index.mjs.map +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs.map +1 -1
- package/es/hooks/use-model-toggle/index.mjs +2 -1
- package/es/hooks/use-model-toggle/index.mjs.map +1 -1
- package/es/hooks/use-popper-container/index.mjs +2 -1
- package/es/hooks/use-popper-container/index.mjs.map +1 -1
- package/es/hooks/use-teleport/index.mjs +1 -1
- package/es/hooks/use-teleport/index.mjs.map +1 -1
- package/es/hooks/use-z-index/index.mjs +1 -1
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/fa.mjs +20 -20
- package/es/locale/lang/fa.mjs.map +1 -1
- package/es/utils/browser.d.ts +2 -0
- package/es/utils/browser.mjs +1 -0
- package/es/utils/browser.mjs.map +1 -1
- package/es/utils/dom/position.mjs +1 -0
- package/es/utils/dom/position.mjs.map +1 -1
- package/es/utils/dom/scroll.mjs +2 -1
- package/es/utils/dom/scroll.mjs.map +1 -1
- package/es/utils/dom/style.mjs +3 -2
- package/es/utils/dom/style.mjs.map +1 -1
- package/es/utils/i18n.mjs +1 -1
- package/es/utils/i18n.mjs.map +1 -1
- package/es/utils/index.mjs +2 -2
- package/es/utils/raf.mjs +1 -0
- package/es/utils/raf.mjs.map +1 -1
- package/es/utils/types.d.ts +2 -1
- package/es/utils/types.mjs +3 -2
- package/es/utils/types.mjs.map +1 -1
- package/es/utils/vue/global-node.mjs +1 -0
- package/es/utils/vue/global-node.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/src/affix.js +3 -3
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/avatar/src/avatar.js +2 -2
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +2 -2
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/badge/src/badge2.js +2 -2
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/button/index.d.ts +15 -0
- package/lib/components/button/src/button.d.ts +4 -3
- package/lib/components/button/src/button.js +4 -0
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +15 -0
- package/lib/components/button/src/button2.js +33 -34
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/button/src/use-button.d.ts +11 -0
- package/lib/components/button/src/use-button.js +12 -0
- package/lib/components/button/src/use-button.js.map +1 -1
- package/lib/components/calendar/index.d.ts +15 -0
- package/lib/components/calendar/src/calendar.vue.d.ts +17 -2
- package/lib/components/carousel/index.d.ts +10 -0
- package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -0
- package/lib/components/carousel/src/carousel-item2.js +7 -1
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.js +2 -2
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +8 -0
- package/lib/components/carousel/src/carousel2.js +7 -2
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/carousel/src/constants.d.ts +1 -0
- package/lib/components/carousel/src/constants.js.map +1 -1
- package/lib/components/carousel/src/use-carousel-item.d.ts +1 -0
- package/lib/components/carousel/src/use-carousel-item.js +7 -5
- package/lib/components/carousel/src/use-carousel-item.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.d.ts +8 -0
- package/lib/components/carousel/src/use-carousel.js +21 -1
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/cascader/index.d.ts +16 -16
- package/lib/components/cascader/src/cascader.js +2 -2
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +8 -8
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/check-tag/index.d.ts +1 -0
- package/lib/components/check-tag/src/check-tag.js +3 -3
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag.vue.d.ts +1 -0
- package/lib/components/check-tag/src/check-tag2.js +2 -1
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.js +3 -3
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +2 -2
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/col/src/col2.js +3 -3
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collapse/src/collapse.js +2 -2
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +15 -0
- package/lib/components/color-picker/src/color-picker.vue.d.ts +15 -0
- package/lib/components/color-picker/src/utils/draggable.js +1 -0
- package/lib/components/color-picker/src/utils/draggable.js.map +1 -1
- package/lib/components/countdown/src/countdown.js +2 -2
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/utils.js +2 -2
- package/lib/components/countdown/src/utils.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +173 -172
- package/lib/components/date-picker/index.js +4 -2
- package/lib/components/date-picker/index.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +15 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +15 -0
- package/lib/components/date-picker/src/date-picker.d.ts +86 -86
- package/lib/components/date-picker/src/date-picker.js +1 -5
- package/lib/components/date-picker/src/date-picker.js.map +1 -1
- package/lib/components/date-picker/src/panel-utils.d.ts +30 -0
- package/lib/components/date-picker/src/props/date-picker.d.ts +77 -0
- package/lib/components/date-picker/src/props/date-picker.js +3 -0
- package/lib/components/date-picker/src/props/date-picker.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +2 -2
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +1 -0
- package/lib/components/dropdown/index.js +1 -0
- package/lib/components/dropdown/index.js.map +1 -1
- package/lib/components/dropdown/src/instance.d.ts +2 -0
- package/lib/components/dropdown/src/instance.js +3 -0
- package/lib/components/dropdown/src/instance.js.map +1 -0
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/form/src/form-item2.js +2 -1
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.js +2 -2
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/image/src/image.js +2 -2
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +30 -28
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +2 -1
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input/src/utils.js +3 -3
- package/lib/components/input/src/utils.js.map +1 -1
- package/lib/components/input-number/src/input-number.js +4 -4
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +10 -8
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/loading/src/loading.js +1 -4
- package/lib/components/loading/src/loading.js.map +1 -1
- package/lib/components/loading/src/service.js +4 -4
- package/lib/components/loading/src/service.js.map +1 -1
- package/lib/components/menu/src/menu.js +1 -1
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.js +1 -1
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/message/src/message.js +1 -1
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/message-box/src/messageBox.js +1 -1
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/notification/src/notify.js +1 -1
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +8 -8
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -0
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +15 -0
- package/lib/components/popover/src/popover.js +2 -2
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popper/src/utils.d.ts +1 -1
- package/lib/components/popper/src/utils.js +1 -0
- package/lib/components/popper/src/utils.js.map +1 -1
- package/lib/components/progress/index.d.ts +8 -0
- package/lib/components/progress/src/progress.d.ts +2 -0
- package/lib/components/progress/src/progress.js +2 -0
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +8 -0
- package/lib/components/progress/src/progress2.js +3 -1
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/src/radio.js +3 -3
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/rate/src/rate.js +3 -3
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +4 -3
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/useSelect.js +11 -4
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/slider/src/button.js +2 -2
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/slider.js +2 -2
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/space/src/space.js +3 -3
- package/lib/components/space/src/space.js.map +1 -1
- package/lib/components/space/src/use-space.js +2 -2
- package/lib/components/space/src/use-space.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +2 -2
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/steps/index.d.ts +2 -0
- package/lib/components/steps/src/item.vue.d.ts +1 -0
- package/lib/components/steps/src/item2.js +11 -8
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/steps/src/steps.js +2 -2
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/switch/src/switch.js +4 -4
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +4 -4
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/composables/use-scrollbar.js +2 -2
- package/lib/components/table/src/composables/use-scrollbar.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +1 -1
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-header/event-helper.js +7 -3
- package/lib/components/table/src/table-header/event-helper.js.map +1 -1
- package/lib/components/table/src/table-layout.js +1 -1
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/util.js +4 -4
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/table-v2/src/components/row.js +2 -2
- package/lib/components/table-v2/src/components/row.js.map +1 -1
- package/lib/components/table-v2/src/composables/use-row.js +2 -2
- package/lib/components/table-v2/src/composables/use-row.js.map +1 -1
- package/lib/components/table-v2/src/composables/use-styles.js +3 -3
- package/lib/components/table-v2/src/composables/use-styles.js.map +1 -1
- package/lib/components/table-v2/src/renderers/cell.js +1 -1
- package/lib/components/table-v2/src/renderers/cell.js.map +1 -1
- package/lib/components/table-v2/src/table-grid.js +2 -2
- package/lib/components/table-v2/src/table-grid.js.map +1 -1
- package/lib/components/tabs/src/tabs.js +2 -3
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/tag/index.d.ts +8 -8
- package/lib/components/tag/src/tag.d.ts +2 -2
- package/lib/components/tag/src/tag.js +2 -2
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +8 -8
- package/lib/components/tag/src/tag2.js +3 -3
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/time-picker/src/common/props.d.ts +27 -9
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/props/shared.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +6 -0
- package/lib/components/time-picker/src/time-picker.js.map +1 -1
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/timeline/index.d.ts +38 -0
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +19 -0
- package/lib/components/timeline/src/timeline-item2.js +8 -6
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +1 -1
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +15 -0
- package/lib/components/transfer/src/transfer.vue.d.ts +15 -0
- package/lib/components/tree/index.d.ts +2 -2
- package/lib/components/tree/src/model/useDragNode.js +2 -2
- package/lib/components/tree/src/model/useDragNode.js.map +1 -1
- package/lib/components/tree/src/tree.js +8 -4
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/tree/src/tree.type.d.ts +1 -1
- package/lib/components/tree/src/tree.vue.d.ts +1 -1
- package/lib/components/tree-select/src/tree-select.js.map +1 -1
- package/lib/components/tree-select/src/tree.js +20 -3
- package/lib/components/tree-select/src/tree.js.map +1 -1
- package/lib/components/upload/index.d.ts +8 -0
- package/lib/components/upload/src/upload-content2.js +4 -0
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload-list.vue.d.ts +8 -0
- package/lib/components/upload/src/upload.vue.d.ts +8 -0
- package/lib/components/virtual-list/src/builders/build-grid.js +8 -7
- package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.js +6 -5
- package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js +2 -3
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js.map +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-grid.js +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-grid.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/hooks/use-delayed-toggle/index.js +2 -2
- package/lib/hooks/use-delayed-toggle/index.js.map +1 -1
- package/lib/hooks/use-escape-keydown/index.js +2 -1
- package/lib/hooks/use-escape-keydown/index.js.map +1 -1
- package/lib/hooks/use-floating/index.js.map +1 -1
- package/lib/hooks/use-id/index.js +1 -1
- package/lib/hooks/use-id/index.js.map +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js.map +1 -1
- package/lib/hooks/use-model-toggle/index.js +3 -2
- package/lib/hooks/use-model-toggle/index.js.map +1 -1
- package/lib/hooks/use-popper-container/index.js +2 -1
- package/lib/hooks/use-popper-container/index.js.map +1 -1
- package/lib/hooks/use-teleport/index.js +1 -1
- package/lib/hooks/use-teleport/index.js.map +1 -1
- package/lib/hooks/use-z-index/index.js +2 -2
- package/lib/hooks/use-z-index/index.js.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/fa.js +20 -20
- package/lib/locale/lang/fa.js.map +1 -1
- package/lib/utils/browser.d.ts +2 -0
- package/lib/utils/browser.js +8 -0
- package/lib/utils/browser.js.map +1 -1
- package/lib/utils/dom/position.js +1 -0
- package/lib/utils/dom/position.js.map +1 -1
- package/lib/utils/dom/scroll.js +2 -1
- package/lib/utils/dom/scroll.js.map +1 -1
- package/lib/utils/dom/style.js +3 -2
- package/lib/utils/dom/style.js.map +1 -1
- package/lib/utils/i18n.js +1 -1
- package/lib/utils/i18n.js.map +1 -1
- package/lib/utils/index.js +11 -9
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/raf.js +1 -0
- package/lib/utils/raf.js.map +1 -1
- package/lib/utils/types.d.ts +2 -1
- package/lib/utils/types.js +4 -9
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/vue/global-node.js +1 -0
- package/lib/utils/vue/global-node.js.map +1 -1
- 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-item.css +1 -1
- package/theme-chalk/el-carousel.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-progress.css +1 -1
- package/theme-chalk/el-transfer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/carousel-item.scss +8 -0
- package/theme-chalk/src/carousel.scss +9 -2
- package/theme-chalk/src/menu.scss +1 -0
- package/theme-chalk/src/progress.scss +27 -0
- package/theme-chalk/src/text.scss +1 -1
- package/theme-chalk/src/transfer.scss +1 -2
- package/web-types.json +1 -1
|
@@ -11,7 +11,6 @@ var buttonCustom = require('./button-custom.js');
|
|
|
11
11
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
12
|
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
13
|
|
|
14
|
-
const _hoisted_1 = ["aria-disabled", "disabled", "autofocus", "type"];
|
|
15
14
|
const __default__ = vue.defineComponent({
|
|
16
15
|
name: "ElButton"
|
|
17
16
|
});
|
|
@@ -23,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
23
22
|
const props = __props;
|
|
24
23
|
const buttonStyle = buttonCustom.useButtonCustomStyle(props);
|
|
25
24
|
const ns = index.useNamespace("button");
|
|
26
|
-
const { _ref, _size, _type, _disabled, shouldAddSpace, handleClick } = useButton.useButton(props, emit);
|
|
25
|
+
const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton.useButton(props, emit);
|
|
27
26
|
expose({
|
|
28
27
|
ref: _ref,
|
|
29
28
|
size: _size,
|
|
@@ -32,10 +31,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
32
31
|
shouldAddSpace
|
|
33
32
|
});
|
|
34
33
|
return (_ctx, _cache) => {
|
|
35
|
-
return vue.openBlock(), vue.
|
|
34
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), vue.mergeProps({
|
|
36
35
|
ref_key: "_ref",
|
|
37
|
-
ref: _ref
|
|
38
|
-
|
|
36
|
+
ref: _ref
|
|
37
|
+
}, vue.unref(_props), {
|
|
38
|
+
class: [
|
|
39
39
|
vue.unref(ns).b(),
|
|
40
40
|
vue.unref(ns).m(vue.unref(_type)),
|
|
41
41
|
vue.unref(ns).m(vue.unref(_size)),
|
|
@@ -47,37 +47,36 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
47
|
vue.unref(ns).is("text", _ctx.text),
|
|
48
48
|
vue.unref(ns).is("link", _ctx.link),
|
|
49
49
|
vue.unref(ns).is("has-bg", _ctx.bg)
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
50
|
+
],
|
|
51
|
+
style: vue.unref(buttonStyle),
|
|
52
|
+
onClick: vue.unref(handleClick)
|
|
53
|
+
}), {
|
|
54
|
+
default: vue.withCtx(() => [
|
|
55
|
+
_ctx.loading ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
56
|
+
_ctx.$slots.loading ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
|
|
57
|
+
key: 1,
|
|
58
|
+
class: vue.normalizeClass(vue.unref(ns).is("loading"))
|
|
59
|
+
}, {
|
|
60
|
+
default: vue.withCtx(() => [
|
|
61
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.loadingIcon)))
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["class"]))
|
|
65
|
+
], 64)) : _ctx.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 1 }, {
|
|
63
66
|
default: vue.withCtx(() => [
|
|
64
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.
|
|
67
|
+
_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon), { key: 0 })) : vue.renderSlot(_ctx.$slots, "icon", { key: 1 })
|
|
65
68
|
]),
|
|
66
|
-
_:
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, [
|
|
78
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
79
|
-
], 2)) : vue.createCommentVNode("v-if", true)
|
|
80
|
-
], 14, _hoisted_1);
|
|
69
|
+
_: 3
|
|
70
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
71
|
+
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
72
|
+
key: 2,
|
|
73
|
+
class: vue.normalizeClass({ [vue.unref(ns).em("text", "expand")]: vue.unref(shouldAddSpace) })
|
|
74
|
+
}, [
|
|
75
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
76
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
77
|
+
]),
|
|
78
|
+
_: 3
|
|
79
|
+
}, 16, ["class", "style", "onClick"]);
|
|
81
80
|
};
|
|
82
81
|
}
|
|
83
82
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <
|
|
1
|
+
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/button/src/button.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"_ref\"\n v-bind=\"_props\"\n :class=\"[\n ns.b(),\n ns.m(_type),\n ns.m(_size),\n ns.is('disabled', _disabled),\n ns.is('loading', loading),\n ns.is('plain', plain),\n ns.is('round', round),\n ns.is('circle', circle),\n ns.is('text', text),\n ns.is('link', link),\n ns.is('has-bg', bg),\n ]\"\n :style=\"buttonStyle\"\n @click=\"handleClick\"\n >\n <template v-if=\"loading\">\n <slot v-if=\"$slots.loading\" name=\"loading\" />\n <el-icon v-else :class=\"ns.is('loading')\">\n <component :is=\"loadingIcon\" />\n </el-icon>\n </template>\n <el-icon v-else-if=\"icon || $slots.icon\">\n <component :is=\"icon\" v-if=\"icon\" />\n <slot v-else name=\"icon\" />\n </el-icon>\n <span\n v-if=\"$slots.default\"\n :class=\"{ [ns.em('text', 'expand')]: shouldAddSpace }\"\n >\n <slot />\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useButton } from './use-button'\nimport { buttonEmits, buttonProps } from './button'\nimport { useButtonCustomStyle } from './button-custom'\n\ndefineOptions({\n name: 'ElButton',\n})\n\nconst props = defineProps(buttonProps)\nconst emit = defineEmits(buttonEmits)\n\nconst buttonStyle = useButtonCustomStyle(props)\nconst ns = useNamespace('button')\nconst { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } =\n useButton(props, emit)\n\ndefineExpose({\n /** @description button html element */\n ref: _ref,\n /** @description button size */\n size: _size,\n /** @description button type */\n type: _type,\n /** @description button disabled */\n disabled: _disabled,\n /** @description whether adding space */\n shouldAddSpace,\n})\n</script>\n"],"names":["useButtonCustomStyle","useNamespace","useButton"],"mappings":";;;;;;;;;;;;;uCA+Cc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,WAAA,GAAcA,kCAAqB,KAAK,CAAA,CAAA;AAC9C,IAAM,MAAA,EAAA,GAAKC,mBAAa,QAAQ,CAAA,CAAA;AAChC,IAAM,MAAA,EAAE,IAAM,EAAA,KAAA,EAAO,KAAO,EAAA,SAAA,EAAW,QAAQ,cAAgB,EAAA,WAAA,EAAA,GAC7DC,mBAAU,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEvB,IAAa,MAAA,CAAA;AAAA,MAEX,GAAK,EAAA,IAAA;AAAA,MAEL,IAAM,EAAA,KAAA;AAAA,MAEN,IAAM,EAAA,KAAA;AAAA,MAEN,QAAU,EAAA,SAAA;AAAA,MAEV,cAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,6 +5,17 @@ export declare const useButton: (props: ButtonProps, emit: SetupContext<ButtonEm
|
|
|
5
5
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
6
6
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
7
7
|
_ref: import("vue").Ref<HTMLButtonElement | undefined>;
|
|
8
|
+
_props: import("vue").ComputedRef<{
|
|
9
|
+
ariaDisabled: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
autofocus: boolean;
|
|
12
|
+
type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
13
|
+
} | {
|
|
14
|
+
ariaDisabled?: undefined;
|
|
15
|
+
disabled?: undefined;
|
|
16
|
+
autofocus?: undefined;
|
|
17
|
+
type?: undefined;
|
|
18
|
+
}>;
|
|
8
19
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
9
20
|
handleClick: (evt: MouseEvent) => void;
|
|
10
21
|
};
|
|
@@ -32,6 +32,17 @@ const useButton = (props, emit) => {
|
|
|
32
32
|
var _a, _b, _c;
|
|
33
33
|
return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a = globalConfig.value) == null ? void 0 : _a.autoInsertSpace) != null ? _c : false;
|
|
34
34
|
});
|
|
35
|
+
const _props = vue.computed(() => {
|
|
36
|
+
if (props.tag === "button") {
|
|
37
|
+
return {
|
|
38
|
+
ariaDisabled: _disabled.value || props.loading,
|
|
39
|
+
disabled: _disabled.value || props.loading,
|
|
40
|
+
autofocus: props.autofocus,
|
|
41
|
+
type: props.nativeType
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return {};
|
|
45
|
+
});
|
|
35
46
|
const shouldAddSpace = vue.computed(() => {
|
|
36
47
|
var _a;
|
|
37
48
|
const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
@@ -55,6 +66,7 @@ const useButton = (props, emit) => {
|
|
|
55
66
|
_size,
|
|
56
67
|
_type,
|
|
57
68
|
_ref,
|
|
69
|
+
_props,
|
|
58
70
|
shouldAddSpace,
|
|
59
71
|
handleClick
|
|
60
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-button.js","sources":["../../../../../../packages/components/button/src/use-button.ts"],"sourcesContent":["import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext<ButtonEmits>['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref<HTMLButtonElement>()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n shouldAddSpace,\n handleClick,\n }\n}\n"],"names":["useDeprecated","computed","inject","buttonGroupContextKey","useGlobalConfig","useFormItem","useFormSize","useFormDisabled","ref","useSlots","Text"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"use-button.js","sources":["../../../../../../packages/components/button/src/use-button.ts"],"sourcesContent":["import { Text, computed, inject, ref, useSlots } from 'vue'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { useGlobalConfig } from '@element-plus/components/config-provider'\nimport { useDeprecated } from '@element-plus/hooks'\nimport { buttonGroupContextKey } from './constants'\n\nimport type { SetupContext } from 'vue'\nimport type { ButtonEmits, ButtonProps } from './button'\n\nexport const useButton = (\n props: ButtonProps,\n emit: SetupContext<ButtonEmits>['emit']\n) => {\n useDeprecated(\n {\n from: 'type.text',\n replacement: 'link',\n version: '3.0.0',\n scope: 'props',\n ref: 'https://element-plus.org/en-US/component/button.html#button-attributes',\n },\n computed(() => props.type === 'text')\n )\n\n const buttonGroupContext = inject(buttonGroupContextKey, undefined)\n const globalConfig = useGlobalConfig('button')\n const { form } = useFormItem()\n const _size = useFormSize(computed(() => buttonGroupContext?.size))\n const _disabled = useFormDisabled()\n const _ref = ref<HTMLButtonElement>()\n const slots = useSlots()\n\n const _type = computed(() => props.type || buttonGroupContext?.type || '')\n const autoInsertSpace = computed(\n () => props.autoInsertSpace ?? globalConfig.value?.autoInsertSpace ?? false\n )\n\n const _props = computed(() => {\n if (props.tag === 'button') {\n return {\n ariaDisabled: _disabled.value || props.loading,\n disabled: _disabled.value || props.loading,\n autofocus: props.autofocus,\n type: props.nativeType,\n }\n }\n return {}\n })\n\n // add space between two characters in Chinese\n const shouldAddSpace = computed(() => {\n const defaultSlot = slots.default?.()\n if (autoInsertSpace.value && defaultSlot?.length === 1) {\n const slot = defaultSlot[0]\n if (slot?.type === Text) {\n const text = slot.children as string\n return /^\\p{Unified_Ideograph}{2}$/u.test(text.trim())\n }\n }\n return false\n })\n\n const handleClick = (evt: MouseEvent) => {\n if (props.nativeType === 'reset') {\n form?.resetFields()\n }\n emit('click', evt)\n }\n\n return {\n _disabled,\n _size,\n _type,\n _ref,\n _props,\n shouldAddSpace,\n handleClick,\n }\n}\n"],"names":["useDeprecated","computed","inject","buttonGroupContextKey","useGlobalConfig","useFormItem","useFormSize","useFormDisabled","ref","useSlots","Text"],"mappings":"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"}
|
|
@@ -85,6 +85,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
85
85
|
readonly color: StringConstructor;
|
|
86
86
|
readonly dark: BooleanConstructor;
|
|
87
87
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
88
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
88
89
|
}, {
|
|
89
90
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
90
91
|
readonly size: {
|
|
@@ -114,6 +115,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
114
115
|
readonly color: StringConstructor;
|
|
115
116
|
readonly dark: BooleanConstructor;
|
|
116
117
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
118
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
117
119
|
}>> & {
|
|
118
120
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
119
121
|
}>>;
|
|
@@ -141,6 +143,17 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
141
143
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
142
144
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
143
145
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
146
|
+
_props: import("vue").ComputedRef<{
|
|
147
|
+
ariaDisabled: boolean;
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
autofocus: boolean;
|
|
150
|
+
type: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
151
|
+
} | {
|
|
152
|
+
ariaDisabled?: undefined;
|
|
153
|
+
disabled?: undefined;
|
|
154
|
+
autofocus?: undefined;
|
|
155
|
+
type?: undefined;
|
|
156
|
+
}>;
|
|
144
157
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
145
158
|
handleClick: (evt: MouseEvent) => void;
|
|
146
159
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -236,6 +249,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
236
249
|
readonly color: StringConstructor;
|
|
237
250
|
readonly dark: BooleanConstructor;
|
|
238
251
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
252
|
+
readonly tag: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
239
253
|
}>> & {
|
|
240
254
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
241
255
|
}, {
|
|
@@ -246,6 +260,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
246
260
|
readonly text: boolean;
|
|
247
261
|
readonly round: boolean;
|
|
248
262
|
readonly circle: boolean;
|
|
263
|
+
readonly tag: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
249
264
|
readonly nativeType: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
250
265
|
readonly loadingIcon: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
251
266
|
readonly autoInsertSpace: import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -85,6 +85,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
85
85
|
readonly color: StringConstructor;
|
|
86
86
|
readonly dark: BooleanConstructor;
|
|
87
87
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
88
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
88
89
|
}, {
|
|
89
90
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
90
91
|
readonly size: {
|
|
@@ -114,11 +115,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
115
|
readonly color: StringConstructor;
|
|
115
116
|
readonly dark: BooleanConstructor;
|
|
116
117
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
118
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
117
119
|
}>> & {
|
|
118
120
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
119
121
|
}>>;
|
|
120
122
|
emit: (event: "click", evt: MouseEvent) => void;
|
|
121
|
-
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
123
|
+
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
122
124
|
ns: {
|
|
123
125
|
namespace: import("vue").ComputedRef<string>;
|
|
124
126
|
b: (blockSuffix?: string) => string;
|
|
@@ -141,8 +143,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
143
|
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
142
144
|
_type: import("vue").ComputedRef<"" | "default" | "success" | "warning" | "info" | "text" | "primary" | "danger">;
|
|
143
145
|
_disabled: import("vue").ComputedRef<boolean>;
|
|
146
|
+
_props: import("vue").ComputedRef<{
|
|
147
|
+
ariaDisabled: boolean;
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
autofocus: boolean;
|
|
150
|
+
type: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
151
|
+
} | {
|
|
152
|
+
ariaDisabled?: undefined;
|
|
153
|
+
disabled?: undefined;
|
|
154
|
+
autofocus?: undefined;
|
|
155
|
+
type?: undefined;
|
|
156
|
+
}>;
|
|
144
157
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
145
|
-
handleClick: (evt: MouseEvent) => void;
|
|
158
|
+
handleClick: (evt: MouseEvent) => void; /** @description select a specific date */
|
|
146
159
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
147
160
|
readonly size: {
|
|
148
161
|
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
@@ -236,6 +249,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
236
249
|
readonly color: StringConstructor;
|
|
237
250
|
readonly dark: BooleanConstructor;
|
|
238
251
|
readonly autoInsertSpace: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
252
|
+
readonly tag: import("../../../utils").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown, "button", boolean>;
|
|
239
253
|
}>> & {
|
|
240
254
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
241
255
|
}, {
|
|
@@ -246,6 +260,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
246
260
|
readonly text: boolean;
|
|
247
261
|
readonly round: boolean;
|
|
248
262
|
readonly circle: boolean;
|
|
263
|
+
readonly tag: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
249
264
|
readonly nativeType: import("../../../utils").EpPropMergeType<StringConstructor, "button" | "reset" | "submit", unknown>;
|
|
250
265
|
readonly loadingIcon: import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>;
|
|
251
266
|
readonly autoInsertSpace: import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
@@ -35,6 +35,14 @@ export declare const ElCarousel: import("element-plus/es/utils").SFCWithInstall<
|
|
|
35
35
|
hover: import("vue").Ref<boolean>;
|
|
36
36
|
isCardType: import("vue").ComputedRef<boolean>;
|
|
37
37
|
items: import("vue").ShallowRef<import("./src/constants").CarouselItemContext[]>;
|
|
38
|
+
isVertical: import("vue").ComputedRef<boolean>;
|
|
39
|
+
containerStyle: import("vue").ComputedRef<{
|
|
40
|
+
height: string;
|
|
41
|
+
overflow?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
height: string;
|
|
44
|
+
overflow: string;
|
|
45
|
+
}>;
|
|
38
46
|
handleButtonEnter: (arrow: "right" | "left") => void;
|
|
39
47
|
handleButtonLeave: () => void;
|
|
40
48
|
handleIndicatorClick: (index: number) => void;
|
|
@@ -188,6 +196,7 @@ export declare const ElCarousel: import("element-plus/es/utils").SFCWithInstall<
|
|
|
188
196
|
cssVarBlockName: (name: string) => string;
|
|
189
197
|
};
|
|
190
198
|
COMPONENT_NAME: string;
|
|
199
|
+
carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
|
|
191
200
|
active: import("vue").Ref<boolean>;
|
|
192
201
|
animating: import("vue").Ref<boolean>;
|
|
193
202
|
hover: import("vue").Ref<boolean>;
|
|
@@ -237,6 +246,7 @@ export declare const ElCarouselItem: import("element-plus/es/utils").SFCWithInst
|
|
|
237
246
|
cssVarBlockName: (name: string) => string;
|
|
238
247
|
};
|
|
239
248
|
COMPONENT_NAME: string;
|
|
249
|
+
carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
|
|
240
250
|
active: import("vue").Ref<boolean>;
|
|
241
251
|
animating: import("vue").Ref<boolean>;
|
|
242
252
|
hover: import("vue").Ref<boolean>;
|
|
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
cssVarBlockName: (name: string) => string;
|
|
29
29
|
};
|
|
30
30
|
COMPONENT_NAME: string;
|
|
31
|
+
carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
|
|
31
32
|
active: import("vue").Ref<boolean>;
|
|
32
33
|
animating: import("vue").Ref<boolean>;
|
|
33
34
|
hover: import("vue").Ref<boolean>;
|
|
@@ -20,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
const props = __props;
|
|
21
21
|
const ns = index.useNamespace("carousel");
|
|
22
22
|
const {
|
|
23
|
+
carouselItemRef,
|
|
23
24
|
active,
|
|
24
25
|
animating,
|
|
25
26
|
hover,
|
|
@@ -42,13 +43,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
42
43
|
});
|
|
43
44
|
return (_ctx, _cache) => {
|
|
44
45
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
46
|
+
ref_key: "carouselItemRef",
|
|
47
|
+
ref: carouselItemRef,
|
|
45
48
|
class: vue.normalizeClass([
|
|
46
49
|
vue.unref(ns).e("item"),
|
|
47
50
|
vue.unref(ns).is("active", vue.unref(active)),
|
|
48
51
|
vue.unref(ns).is("in-stage", vue.unref(inStage)),
|
|
49
52
|
vue.unref(ns).is("hover", vue.unref(hover)),
|
|
50
53
|
vue.unref(ns).is("animating", vue.unref(animating)),
|
|
51
|
-
{
|
|
54
|
+
{
|
|
55
|
+
[vue.unref(ns).em("item", "card")]: vue.unref(isCardType),
|
|
56
|
+
[vue.unref(ns).em("item", "card-vertical")]: vue.unref(isCardType) && vue.unref(isVertical)
|
|
57
|
+
}
|
|
52
58
|
]),
|
|
53
59
|
style: vue.normalizeStyle(vue.unref(itemStyle)),
|
|
54
60
|
onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleItemClick) && vue.unref(handleItemClick)(...args))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n :class=\"[\n ns.e('item'),\n ns.is('active', active),\n ns.is('in-stage', inStage),\n ns.is('hover', hover),\n ns.is('animating', animating),\n { [ns.em('item', 'card')]: isCardType },\n ]\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCarouselItem',\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\nconst COMPONENT_NAME = 'ElCarouselItem'\n// inject\nconst {\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props, COMPONENT_NAME)\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"[\n ns.e('item'),\n ns.is('active', active),\n ns.is('in-stage', inStage),\n ns.is('hover', hover),\n ns.is('animating', animating),\n {\n [ns.em('item', 'card')]: isCardType,\n [ns.em('item', 'card-vertical')]: isCardType && isVertical,\n },\n ]\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCarouselItem',\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\nconst COMPONENT_NAME = 'ElCarouselItem'\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props, COMPONENT_NAME)\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;;uCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAGlC,IAAM,MAAA;AAAA,MACJ,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,eAAA;AAAA,KACE,GAAAC,+BAAA,CAAgB,OAAO,cAAc,CAAA,CAAA;AAEzC,IAAM,MAAA,SAAA,GAAYC,aAAwB,MAAM;AAC9C,MAAA,MAAM,aAAgB,GAAA,CAAA,SAAA,EAAYC,SAAM,CAAA,UAAU,IAAI,GAAM,GAAA,GAAA,CAAA,CAAA,CAAA;AAC5D,MAAA,MAAM,UAAa,GAAA,CAAA,EAAG,aAAiB,CAAA,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAA,CAAA,GAAA,CAAA,CAAA;AACtD,MAAM,MAAA,MAAA,GAAS,CAAS,MAAA,EAAAA,SAAA,CAAM,KAAK,CAAA,CAAA,CAAA,CAAA,CAAA;AACnC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../../utils/index.js');
|
|
6
6
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
-
var
|
|
7
|
+
var types = require('../../../utils/types.js');
|
|
8
8
|
|
|
9
9
|
const carouselProps = runtime.buildProps({
|
|
10
10
|
initialIndex: {
|
|
@@ -58,7 +58,7 @@ const carouselProps = runtime.buildProps({
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
const carouselEmits = {
|
|
61
|
-
change: (current, prev) => [current, prev].every(
|
|
61
|
+
change: (current, prev) => [current, prev].every(types.isNumber)
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
exports.carouselEmits = carouselEmits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n initialIndex: {\n type: Number,\n default: 0,\n },\n height: {\n type: String,\n default: '',\n },\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n autoplay: {\n type: Boolean,\n default: true,\n },\n interval: {\n type: Number,\n default: 3000,\n },\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n loop: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const carouselEmits = {\n change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes<typeof carouselProps>\nexport type CarouselEmits = typeof carouselEmits\n"],"names":["buildProps","isNumber"],"mappings":";;;;;;;;AACY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC9B,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC;AACxB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAACC,
|
|
1
|
+
{"version":3,"file":"carousel.js","sources":["../../../../../../packages/components/carousel/src/carousel.ts"],"sourcesContent":["import { buildProps, isNumber } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselProps = buildProps({\n initialIndex: {\n type: Number,\n default: 0,\n },\n height: {\n type: String,\n default: '',\n },\n trigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n autoplay: {\n type: Boolean,\n default: true,\n },\n interval: {\n type: Number,\n default: 3000,\n },\n indicatorPosition: {\n type: String,\n values: ['', 'none', 'outside'],\n default: '',\n },\n arrow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'hover',\n },\n type: {\n type: String,\n values: ['', 'card'],\n default: '',\n },\n loop: {\n type: Boolean,\n default: true,\n },\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n pauseOnHover: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport const carouselEmits = {\n change: (current: number, prev: number) => [current, prev].every(isNumber),\n}\n\nexport type CarouselProps = ExtractPropTypes<typeof carouselProps>\nexport type CarouselEmits = typeof carouselEmits\n"],"names":["buildProps","isNumber"],"mappings":";;;;;;;;AACY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC9B,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC;AACxB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,CAACC,cAAQ,CAAC;AAC5D;;;;;"}
|
|
@@ -35,6 +35,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
35
|
hover: import("vue").Ref<boolean>;
|
|
36
36
|
isCardType: import("vue").ComputedRef<boolean>;
|
|
37
37
|
items: import("vue").ShallowRef<import("./constants").CarouselItemContext[]>;
|
|
38
|
+
isVertical: import("vue").ComputedRef<boolean>;
|
|
39
|
+
containerStyle: import("vue").ComputedRef<{
|
|
40
|
+
height: string;
|
|
41
|
+
overflow?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
height: string;
|
|
44
|
+
overflow: string;
|
|
45
|
+
}>;
|
|
38
46
|
handleButtonEnter: (arrow: "right" | "left") => void;
|
|
39
47
|
handleButtonLeave: () => void;
|
|
40
48
|
handleIndicatorClick: (index: number) => void;
|
|
@@ -31,6 +31,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
31
|
hover,
|
|
32
32
|
isCardType,
|
|
33
33
|
items,
|
|
34
|
+
isVertical,
|
|
35
|
+
containerStyle,
|
|
34
36
|
handleButtonEnter,
|
|
35
37
|
handleButtonLeave,
|
|
36
38
|
handleIndicatorClick,
|
|
@@ -55,9 +57,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
57
|
if (vue.unref(hasLabel)) {
|
|
56
58
|
classes.push(ns.em("indicators", "labels"));
|
|
57
59
|
}
|
|
58
|
-
if (props.indicatorPosition === "outside"
|
|
60
|
+
if (props.indicatorPosition === "outside") {
|
|
59
61
|
classes.push(ns.em("indicators", "outside"));
|
|
60
62
|
}
|
|
63
|
+
if (vue.unref(isVertical)) {
|
|
64
|
+
classes.push(ns.em("indicators", "right"));
|
|
65
|
+
}
|
|
61
66
|
return classes;
|
|
62
67
|
});
|
|
63
68
|
expose({
|
|
@@ -75,7 +80,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
75
80
|
}, [
|
|
76
81
|
vue.createElementVNode("div", {
|
|
77
82
|
class: vue.normalizeClass(vue.unref(ns).e("container")),
|
|
78
|
-
style: vue.normalizeStyle(
|
|
83
|
+
style: vue.normalizeStyle(vue.unref(containerStyle))
|
|
79
84
|
}, [
|
|
80
85
|
vue.unref(arrowDisplay) ? (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
81
86
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel2.js","sources":["../../../../../../packages/components/carousel/src/carousel.vue"],"sourcesContent":["<template>\n <div\n ref=\"root\"\n :class=\"carouselClasses\"\n @mouseenter.stop=\"handleMouseEnter\"\n @mouseleave.stop=\"handleMouseLeave\"\n >\n <div :class=\"ns.e('container')\" :style=\"
|
|
1
|
+
{"version":3,"file":"carousel2.js","sources":["../../../../../../packages/components/carousel/src/carousel.vue"],"sourcesContent":["<template>\n <div\n ref=\"root\"\n :class=\"carouselClasses\"\n @mouseenter.stop=\"handleMouseEnter\"\n @mouseleave.stop=\"handleMouseLeave\"\n >\n <div :class=\"ns.e('container')\" :style=\"containerStyle\">\n <transition v-if=\"arrowDisplay\" name=\"carousel-arrow-left\">\n <button\n v-show=\"\n (arrow === 'always' || hover) && (props.loop || activeIndex > 0)\n \"\n type=\"button\"\n :class=\"[ns.e('arrow'), ns.em('arrow', 'left')]\"\n @mouseenter=\"handleButtonEnter('left')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex - 1)\"\n >\n <ElIcon>\n <ArrowLeft />\n </ElIcon>\n </button>\n </transition>\n <transition v-if=\"arrowDisplay\" name=\"carousel-arrow-right\">\n <button\n v-show=\"\n (arrow === 'always' || hover) &&\n (props.loop || activeIndex < items.length - 1)\n \"\n type=\"button\"\n :class=\"[ns.e('arrow'), ns.em('arrow', 'right')]\"\n @mouseenter=\"handleButtonEnter('right')\"\n @mouseleave=\"handleButtonLeave\"\n @click.stop=\"throttledArrowClick(activeIndex + 1)\"\n >\n <ElIcon>\n <ArrowRight />\n </ElIcon>\n </button>\n </transition>\n <slot />\n </div>\n <ul v-if=\"indicatorPosition !== 'none'\" :class=\"indicatorsClasses\">\n <li\n v-for=\"(item, index) in items\"\n :key=\"index\"\n :class=\"[\n ns.e('indicator'),\n ns.em('indicator', direction),\n ns.is('active', index === activeIndex),\n ]\"\n @mouseenter=\"throttledIndicatorHover(index)\"\n @click.stop=\"handleIndicatorClick(index)\"\n >\n <button :class=\"ns.e('button')\">\n <span v-if=\"hasLabel\">{{ item.props.label }}</span>\n </button>\n </li>\n </ul>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowLeft, ArrowRight } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselEmits, carouselProps } from './carousel'\nimport { useCarousel } from './use-carousel'\n\nconst COMPONENT_NAME = 'ElCarousel'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(carouselProps)\nconst emit = defineEmits(carouselEmits)\nconst {\n root,\n activeIndex,\n arrowDisplay,\n hasLabel,\n hover,\n isCardType,\n items,\n isVertical,\n containerStyle,\n handleButtonEnter,\n handleButtonLeave,\n handleIndicatorClick,\n handleMouseEnter,\n handleMouseLeave,\n setActiveItem,\n prev,\n next,\n throttledArrowClick,\n throttledIndicatorHover,\n} = useCarousel(props, emit, COMPONENT_NAME)\nconst ns = useNamespace('carousel')\n\nconst carouselClasses = computed(() => {\n const classes = [ns.b(), ns.m(props.direction)]\n if (unref(isCardType)) {\n classes.push(ns.m('card'))\n }\n return classes\n})\n\nconst indicatorsClasses = computed(() => {\n const classes = [ns.e('indicators'), ns.em('indicators', props.direction)]\n if (unref(hasLabel)) {\n classes.push(ns.em('indicators', 'labels'))\n }\n if (props.indicatorPosition === 'outside') {\n classes.push(ns.em('indicators', 'outside'))\n }\n if (unref(isVertical)) {\n classes.push(ns.em('indicators', 'right'))\n }\n return classes\n})\n\ndefineExpose({\n /** @description manually switch slide */\n setActiveItem,\n /** @description switch to the previous slide */\n prev,\n /** @description switch to the next slide */\n next,\n})\n</script>\n"],"names":["useCarousel","useNamespace","computed","unref"],"mappings":";;;;;;;;;;;;;;;;uCAwEc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAIA,IAAM,MAAA;AAAA,MACJ,IAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,MACA,QAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,iBAAA;AAAA,MACA,iBAAA;AAAA,MACA,oBAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA;AAAA,MACA,mBAAA;AAAA,MACA,uBAAA;AAAA,KACE,GAAAA,uBAAA,CAAY,KAAO,EAAA,IAAA,EAAM,cAAc,CAAA,CAAA;AAC3C,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,eAAA,GAAkBC,aAAS,MAAM;AACrC,MAAM,MAAA,OAAA,GAAU,CAAC,EAAG,CAAA,CAAA,IAAK,EAAG,CAAA,CAAA,CAAE,KAAM,CAAA,SAAS,CAAC,CAAA,CAAA;AAC9C,MAAI,IAAAC,SAAA,CAAM,UAAU,CAAG,EAAA;AACrB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,CAAE,CAAA,MAAM,CAAC,CAAA,CAAA;AAAA,OAC3B;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,iBAAA,GAAoBD,aAAS,MAAM;AACvC,MAAM,MAAA,OAAA,GAAU,CAAC,EAAA,CAAG,CAAE,CAAA,YAAY,CAAG,EAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,KAAM,CAAA,SAAS,CAAC,CAAA,CAAA;AACzE,MAAI,IAAAC,SAAA,CAAM,QAAQ,CAAG,EAAA;AACnB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,QAAQ,CAAC,CAAA,CAAA;AAAA,OAC5C;AACA,MAAI,IAAA,KAAA,CAAM,sBAAsB,SAAW,EAAA;AACzC,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,SAAS,CAAC,CAAA,CAAA;AAAA,OAC7C;AACA,MAAI,IAAAA,SAAA,CAAM,UAAU,CAAG,EAAA;AACrB,QAAA,OAAA,CAAQ,IAAK,CAAA,EAAA,CAAG,EAAG,CAAA,YAAA,EAAc,OAAO,CAAC,CAAA,CAAA;AAAA,OAC3C;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,aAAA;AAAA,MAEA,IAAA;AAAA,MAEA,IAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -24,5 +24,6 @@ export declare type CarouselContext = {
|
|
|
24
24
|
addItem: (item: CarouselItemContext) => void;
|
|
25
25
|
removeItem: (uid: number) => void;
|
|
26
26
|
setActiveItem: (index: number) => void;
|
|
27
|
+
setContainerHeight: (height: number) => void;
|
|
27
28
|
};
|
|
28
29
|
export declare const carouselContextKey: InjectionKey<CarouselContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref<HTMLElement | undefined>\n items: Ref<CarouselItemContext[]>\n isCardType: Ref<boolean>\n isVertical: Ref<boolean>\n loop: boolean\n addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n}\n\nexport const carouselContextKey: InjectionKey<CarouselContext> =\n Symbol('carouselContextKey')\n"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB;;;;"}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../packages/components/carousel/src/constants.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue'\n\nimport type { CarouselItemProps } from './carousel-item'\n\nexport type CarouselItemStates = {\n hover: boolean\n translate: number\n scale: number\n active: boolean\n ready: boolean\n inStage: boolean\n animating: boolean\n}\n\nexport type CarouselItemContext = {\n props: CarouselItemProps\n states: CarouselItemStates\n uid: number\n translateItem: (index: number, activeIndex: number, oldIndex?: number) => void\n}\n\nexport type CarouselContext = {\n root: Ref<HTMLElement | undefined>\n items: Ref<CarouselItemContext[]>\n isCardType: Ref<boolean>\n isVertical: Ref<boolean>\n loop: boolean\n addItem: (item: CarouselItemContext) => void\n removeItem: (uid: number) => void\n setActiveItem: (index: number) => void\n setContainerHeight: (height: number) => void\n}\n\nexport const carouselContextKey: InjectionKey<CarouselContext> =\n Symbol('carouselContextKey')\n"],"names":[],"mappings":";;;;AAAY,MAAC,kBAAkB,GAAG,MAAM,CAAC,oBAAoB;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CarouselItemProps } from './carousel-item';
|
|
2
2
|
export declare const useCarouselItem: (props: CarouselItemProps, componentName: string) => {
|
|
3
|
+
carouselItemRef: import("vue").Ref<HTMLElement | undefined>;
|
|
3
4
|
active: import("vue").Ref<boolean>;
|
|
4
5
|
animating: import("vue").Ref<boolean>;
|
|
5
6
|
hover: import("vue").Ref<boolean>;
|
|
@@ -18,6 +18,7 @@ const useCarouselItem = (props, componentName) => {
|
|
|
18
18
|
error.debugWarn(componentName, "compositional hook can only be invoked inside setups");
|
|
19
19
|
}
|
|
20
20
|
const CARD_SCALE = 0.83;
|
|
21
|
+
const carouselItemRef = vue.ref();
|
|
21
22
|
const hover = vue.ref(false);
|
|
22
23
|
const translate = vue.ref(0);
|
|
23
24
|
const scale = vue.ref(1);
|
|
@@ -43,8 +44,8 @@ const useCarouselItem = (props, componentName) => {
|
|
|
43
44
|
return index;
|
|
44
45
|
}
|
|
45
46
|
function calcCardTranslate(index, activeIndex) {
|
|
46
|
-
var _a;
|
|
47
|
-
const parentWidth = ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetWidth) || 0;
|
|
47
|
+
var _a, _b;
|
|
48
|
+
const parentWidth = vue.unref(isVertical) ? ((_a = carouselContext.root.value) == null ? void 0 : _a.offsetHeight) || 0 : ((_b = carouselContext.root.value) == null ? void 0 : _b.offsetWidth) || 0;
|
|
48
49
|
if (inStage.value) {
|
|
49
50
|
return parentWidth * ((2 - CARD_SCALE) * (index - activeIndex) + 1) / 4;
|
|
50
51
|
} else if (index < activeIndex) {
|
|
@@ -74,9 +75,6 @@ const useCarouselItem = (props, componentName) => {
|
|
|
74
75
|
const _isVertical = vue.unref(isVertical);
|
|
75
76
|
active.value = isActive;
|
|
76
77
|
if (_isCardType) {
|
|
77
|
-
if (_isVertical) {
|
|
78
|
-
error.debugWarn("Carousel", "vertical direction is not supported for card mode");
|
|
79
|
-
}
|
|
80
78
|
inStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
81
79
|
translate.value = calcCardTranslate(index, activeIndex);
|
|
82
80
|
scale.value = vue.unref(active) ? 1 : CARD_SCALE;
|
|
@@ -84,6 +82,9 @@ const useCarouselItem = (props, componentName) => {
|
|
|
84
82
|
translate.value = calcTranslate(index, activeIndex, _isVertical);
|
|
85
83
|
}
|
|
86
84
|
ready.value = true;
|
|
85
|
+
if (isActive && carouselItemRef.value) {
|
|
86
|
+
carouselContext.setContainerHeight(carouselItemRef.value.offsetHeight);
|
|
87
|
+
}
|
|
87
88
|
};
|
|
88
89
|
function handleItemClick() {
|
|
89
90
|
if (carouselContext && vue.unref(isCardType)) {
|
|
@@ -111,6 +112,7 @@ const useCarouselItem = (props, componentName) => {
|
|
|
111
112
|
carouselContext.removeItem(instance.uid);
|
|
112
113
|
});
|
|
113
114
|
return {
|
|
115
|
+
carouselItemRef,
|
|
114
116
|
active,
|
|
115
117
|
animating,
|
|
116
118
|
hover,
|