@element-plus/nightly 0.0.20260526 → 0.0.20260529
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +6 -3
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +6 -3
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.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/component.mjs +3 -3
- package/es/components/affix/src/affix.vue.d.ts +2 -2
- package/es/components/alert/src/alert.vue.d.ts +1 -1
- package/es/components/anchor/src/anchor.d.ts +1 -1
- package/es/components/anchor/src/anchor.vue.d.ts +3 -3
- package/es/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +1 -1
- package/es/components/backtop/src/backtop.vue.d.ts +1 -1
- package/es/components/badge/src/badge.vue.d.ts +1 -1
- package/es/components/button/src/button-group.d.ts +2 -2
- package/es/components/button/src/button-group.vue.d.ts +1 -1
- package/es/components/button/src/button.d.ts +1 -1
- package/es/components/button/src/button.vue.d.ts +1 -1
- package/es/components/button/src/use-button.d.ts +1 -1
- package/es/components/calendar/src/calendar.d.ts +1 -1
- package/es/components/card/src/card.vue.d.ts +1 -1
- package/es/components/carousel/src/carousel.d.ts +2 -2
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.d.ts +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +2 -2
- package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/cascader-panel/src/index.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox.d.ts +8 -8
- package/es/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/es/components/collapse/src/collapse.vue.d.ts +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +2 -2
- package/es/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/es/components/config-provider/src/hooks/use-global-config.mjs +6 -2
- package/es/components/config-provider/src/hooks/use-global-config.mjs.map +1 -1
- package/es/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +7 -7
- package/es/components/date-picker/src/props.d.ts +2 -2
- package/es/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +3 -3
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/date-picker-panel/src/date-picker-panel.d.ts +8 -8
- package/es/components/date-picker-panel/src/panel-utils.d.ts +9 -9
- package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
- package/es/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
- package/es/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
- package/es/components/date-picker-panel/src/props/shared.d.ts +1 -1
- package/es/components/descriptions/src/description-item.d.ts +11 -11
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +2 -2
- package/es/components/divider/src/divider.d.ts +1 -1
- package/es/components/divider/src/divider.vue.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +3 -3
- package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +3 -3
- package/es/components/dropdown/src/dropdown.vue.d.ts +20 -20
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/input/src/input.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +2 -2
- package/es/components/input-number/src/input-number.vue.d.ts +2 -2
- package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/input-otp/src/input-otp.vue.d.ts +4 -4
- package/es/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/es/components/link/src/link.d.ts +1 -1
- package/es/components/mention/src/mention.d.ts +1 -1
- package/es/components/menu/src/menu.d.ts +8 -8
- package/es/components/menu/src/menu.mjs +1 -1
- package/es/components/message/src/instance.d.ts +1 -1
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +6 -6
- package/es/components/message-box/src/index.vue.d.ts +15 -15
- package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +7 -7
- package/es/components/pagination/src/pagination.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popover/src/popover.d.ts +1 -1
- package/es/components/popover/src/popover.vue.d.ts +1 -1
- package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/es/components/popper/src/content.vue.d.ts +1 -1
- package/es/components/popper/src/popper.d.ts +2 -2
- package/es/components/progress/src/progress.vue.d.ts +1 -1
- package/es/components/radio/src/radio-button.d.ts +3 -3
- package/es/components/radio/src/radio-group.vue.d.ts +3 -3
- package/es/components/radio/src/radio.d.ts +6 -6
- package/es/components/radio/src/radio.vue.d.ts +1 -1
- package/es/components/rate/src/rate.vue.d.ts +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +2 -2
- package/es/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -2
- package/es/components/segmented/index.d.ts +2 -2
- package/es/components/segmented/src/segmented.d.ts +2 -2
- package/es/components/segmented/src/segmented.vue.d.ts +1 -1
- package/es/components/select/src/option.d.ts +2 -2
- package/es/components/select/src/option.vue.d.ts +5 -5
- package/es/components/select/src/select.d.ts +2 -2
- package/es/components/select/src/select.vue.d.ts +22 -22
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/select/src/useOption.d.ts +2 -2
- package/es/components/select/src/useSelect.d.ts +4 -4
- package/es/components/select-v2/src/select.vue.d.ts +6 -6
- package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/es/components/slider/src/slider.vue.d.ts +2 -2
- package/es/components/space/src/space.d.ts +4 -4
- package/es/components/splitter/src/splitter.d.ts +1 -1
- package/es/components/statistic/src/statistic.vue.d.ts +2 -2
- package/es/components/steps/src/steps.d.ts +1 -1
- package/es/components/steps/src/steps.vue.d.ts +1 -1
- package/es/components/switch/src/switch.vue.d.ts +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +13 -13
- package/es/components/table/src/table/defaults.d.ts +5 -5
- package/es/components/table/src/table-column/defaults.d.ts +2 -2
- package/es/components/table/src/table-header/index.d.ts +5 -5
- package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/text/src/text.vue.d.ts +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.vue.d.ts +2 -2
- package/es/components/time-picker/src/common/picker.vue.d.ts +8 -8
- package/es/components/time-picker/src/common/props.d.ts +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
- package/es/components/time-picker/src/time-picker.d.ts +4 -4
- package/es/components/time-select/src/time-select.vue.d.ts +4 -4
- package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.d.ts +2 -2
- package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/es/components/tooltip/src/trigger.d.ts +1 -1
- package/es/components/tour/src/content.vue.d.ts +1 -1
- package/es/components/tour/src/mask.vue.d.ts +1 -1
- package/es/components/tour/src/tour.vue.d.ts +2 -2
- package/es/components/transfer/src/transfer.vue.d.ts +1 -1
- package/es/components/tree/src/tree-node.vue.d.ts +5 -5
- package/es/components/tree/src/tree.vue.d.ts +5 -5
- package/es/components/tree-select/src/tree-select-option.d.ts +5 -5
- package/es/components/tree-select/src/tree-select.vue.d.ts +9 -9
- package/es/components/tree-v2/src/composables/useTree.d.ts +8 -8
- package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/scrollbar.d.ts +3 -3
- package/es/components/virtual-list/src/props.d.ts +2 -2
- package/es/components/watermark/src/watermark.vue.d.ts +1 -1
- package/es/index.mjs +11 -11
- package/es/plugin.mjs +1 -1
- package/es/utils/vue/size.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +109 -109
- package/lib/components/affix/src/affix.vue.d.ts +2 -2
- package/lib/components/alert/src/alert.vue.d.ts +1 -1
- package/lib/components/anchor/src/anchor.d.ts +1 -1
- package/lib/components/anchor/src/anchor.vue.d.ts +3 -3
- package/lib/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +1 -1
- package/lib/components/backtop/src/backtop.vue.d.ts +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +1 -1
- package/lib/components/button/src/button-group.d.ts +2 -2
- package/lib/components/button/src/button-group.vue.d.ts +1 -1
- package/lib/components/button/src/button.d.ts +1 -1
- package/lib/components/button/src/button.vue.d.ts +1 -1
- package/lib/components/button/src/use-button.d.ts +1 -1
- package/lib/components/calendar/src/calendar.d.ts +1 -1
- package/lib/components/card/src/card.vue.d.ts +1 -1
- package/lib/components/carousel/src/carousel.d.ts +2 -2
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.d.ts +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +2 -2
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +26 -26
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox.d.ts +8 -8
- package/lib/components/checkbox/src/checkbox.vue.d.ts +2 -2
- package/lib/components/collapse/src/collapse.vue.d.ts +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +2 -2
- package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js +18 -18
- package/lib/components/color-picker/src/color-picker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/lib/components/config-provider/src/hooks/use-global-config.js +5 -1
- package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -1
- package/lib/components/countdown/src/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +7 -7
- package/lib/components/date-picker/src/props.d.ts +2 -2
- package/lib/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +3 -3
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js +18 -18
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js +23 -23
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +8 -8
- package/lib/components/date-picker-panel/src/panel-utils.d.ts +9 -9
- package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +2 -2
- package/lib/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -1
- package/lib/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -1
- package/lib/components/date-picker-panel/src/props/shared.d.ts +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +11 -11
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +2 -2
- package/lib/components/divider/src/divider.d.ts +1 -1
- package/lib/components/divider/src/divider.vue.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown.vue.d.ts +20 -20
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/lib/components/index.js +125 -125
- package/lib/components/input/src/input.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +2 -2
- package/lib/components/input-number/src/input-number.vue.d.ts +2 -2
- package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js +12 -12
- package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/input-otp/src/input-otp.vue.d.ts +4 -4
- package/lib/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/lib/components/link/src/link.d.ts +1 -1
- package/lib/components/mention/src/mention.d.ts +1 -1
- package/lib/components/menu/src/menu.d.ts +8 -8
- package/lib/components/menu/src/menu.js +7 -7
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/message/src/instance.d.ts +1 -1
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +6 -6
- package/lib/components/message-box/src/index.vue.d.ts +15 -15
- package/lib/components/message-box/src/index.vue_vue_type_script_lang.js +19 -19
- package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +7 -7
- package/lib/components/pagination/src/pagination.d.ts +2 -2
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popover/src/popover.d.ts +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +1 -1
- package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/lib/components/popper/src/content.vue.d.ts +1 -1
- package/lib/components/popper/src/popper.d.ts +2 -2
- package/lib/components/progress/src/progress.vue.d.ts +1 -1
- package/lib/components/radio/src/radio-button.d.ts +3 -3
- package/lib/components/radio/src/radio-group.vue.d.ts +3 -3
- package/lib/components/radio/src/radio.d.ts +6 -6
- package/lib/components/radio/src/radio.vue.d.ts +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -2
- package/lib/components/segmented/index.d.ts +2 -2
- package/lib/components/segmented/src/segmented.d.ts +2 -2
- package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
- package/lib/components/select/src/option.d.ts +2 -2
- package/lib/components/select/src/option.vue.d.ts +5 -5
- package/lib/components/select/src/select.d.ts +2 -2
- package/lib/components/select/src/select.vue.d.ts +22 -22
- package/lib/components/select/src/select.vue_vue_type_script_lang.js +10 -10
- package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/useOption.d.ts +2 -2
- package/lib/components/select/src/useSelect.d.ts +4 -4
- package/lib/components/select-v2/src/select.vue.d.ts +6 -6
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js +10 -10
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +2 -2
- package/lib/components/space/src/space.d.ts +4 -4
- package/lib/components/splitter/src/splitter.d.ts +1 -1
- package/lib/components/statistic/src/statistic.vue.d.ts +2 -2
- package/lib/components/steps/src/steps.d.ts +1 -1
- package/lib/components/steps/src/steps.vue.d.ts +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +13 -13
- package/lib/components/table/src/table/defaults.d.ts +5 -5
- package/lib/components/table/src/table-column/defaults.d.ts +2 -2
- package/lib/components/table/src/table-header/index.d.ts +5 -5
- package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js +9 -9
- package/lib/components/table/src/table.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/text/src/text.vue.d.ts +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.vue.d.ts +2 -2
- package/lib/components/time-picker/src/common/picker.vue.d.ts +8 -8
- package/lib/components/time-picker/src/common/props.d.ts +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js +10 -10
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker.d.ts +4 -4
- package/lib/components/time-select/src/time-select.vue.d.ts +4 -4
- package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.d.ts +2 -2
- package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/lib/components/tooltip/src/trigger.d.ts +1 -1
- package/lib/components/tour/src/content.vue.d.ts +1 -1
- package/lib/components/tour/src/mask.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +2 -2
- package/lib/components/transfer/src/transfer.vue.d.ts +1 -1
- package/lib/components/tree/src/tree-node.vue.d.ts +5 -5
- package/lib/components/tree/src/tree.vue.d.ts +5 -5
- package/lib/components/tree-select/src/tree-select-option.d.ts +5 -5
- package/lib/components/tree-select/src/tree-select.vue.d.ts +9 -9
- package/lib/components/tree-v2/src/composables/useTree.d.ts +8 -8
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/scrollbar.d.ts +3 -3
- package/lib/components/virtual-list/src/props.d.ts +2 -2
- package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
- package/lib/index.js +267 -267
- package/lib/plugin.js +12 -12
- package/lib/plugin.js.map +1 -1
- package/lib/utils/vue/size.d.ts +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/web-types.json +1 -1
|
@@ -29,18 +29,18 @@ declare const __VLS_base: _$vue.DefineComponent<InputOtpProps, {
|
|
|
29
29
|
blur: (eve: FocusEvent) => void;
|
|
30
30
|
finish: (value: string) => void;
|
|
31
31
|
}, string, _$vue.PublicProps, Readonly<InputOtpProps> & Readonly<{
|
|
32
|
-
onChange?: ((value: string) => any) | undefined;
|
|
33
32
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
33
|
+
onChange?: ((value: string) => any) | undefined;
|
|
34
34
|
onFocus?: ((eve: FocusEvent) => any) | undefined;
|
|
35
35
|
onBlur?: ((eve: FocusEvent) => any) | undefined;
|
|
36
36
|
onFinish?: ((value: string) => any) | undefined;
|
|
37
37
|
}>, {
|
|
38
|
-
size: ComponentSize;
|
|
39
|
-
length: number;
|
|
40
38
|
type: "outlined" | "filled" | "underlined";
|
|
39
|
+
length: number;
|
|
40
|
+
validator: (char: string, index: number) => boolean;
|
|
41
|
+
size: ComponentSize;
|
|
41
42
|
disabled: boolean;
|
|
42
43
|
validateEvent: boolean;
|
|
43
|
-
validator: (char: string, index: number) => boolean;
|
|
44
44
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
45
45
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
46
|
declare const _default: typeof __VLS_export;
|
|
@@ -30,22 +30,22 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
|
|
|
30
30
|
change: (value?: string[] | undefined) => void;
|
|
31
31
|
focus: (evt: FocusEvent) => void;
|
|
32
32
|
blur: (evt: FocusEvent) => void;
|
|
33
|
-
"add-tag": (value: string | string[]) => void;
|
|
34
33
|
"remove-tag": (value: string, index: number) => void;
|
|
34
|
+
"add-tag": (value: string | string[]) => void;
|
|
35
35
|
"drag-tag": (oldIndex: number, newIndex: number, value: string) => void;
|
|
36
36
|
}, string, _$vue.PublicProps, Readonly<InputTagProps> & Readonly<{
|
|
37
37
|
onClear?: (() => any) | undefined;
|
|
38
|
-
onChange?: ((value?: string[] | undefined) => any) | undefined;
|
|
39
38
|
"onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
|
|
40
39
|
onInput?: ((value: string) => any) | undefined;
|
|
40
|
+
onChange?: ((value?: string[] | undefined) => any) | undefined;
|
|
41
41
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
42
42
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
43
|
-
"onAdd-tag"?: ((value: string | string[]) => any) | undefined;
|
|
44
43
|
"onRemove-tag"?: ((value: string, index: number) => any) | undefined;
|
|
44
|
+
"onAdd-tag"?: ((value: string | string[]) => any) | undefined;
|
|
45
45
|
"onDrag-tag"?: ((oldIndex: number, newIndex: number, value: string) => any) | undefined;
|
|
46
46
|
}>, {
|
|
47
|
-
id: string;
|
|
48
47
|
effect: PopperEffect;
|
|
48
|
+
id: string;
|
|
49
49
|
disabled: boolean;
|
|
50
50
|
autocomplete: string;
|
|
51
51
|
clearIcon: IconPropType;
|
|
@@ -35,7 +35,7 @@ interface LinkProps {
|
|
|
35
35
|
* @deprecated Removed after 3.0.0, Use `LinkProps` instead.
|
|
36
36
|
*/
|
|
37
37
|
declare const linkProps: {
|
|
38
|
-
readonly type: EpPropFinalized<StringConstructor, "
|
|
38
|
+
readonly type: EpPropFinalized<StringConstructor, "default" | "info" | "primary" | "success" | "warning" | "danger", unknown, undefined, boolean>;
|
|
39
39
|
readonly underline: EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "always" | "never" | "hover", unknown, undefined, boolean>;
|
|
40
40
|
readonly disabled: BooleanConstructor;
|
|
41
41
|
readonly href: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
@@ -224,7 +224,7 @@ declare const mentionProps: {
|
|
|
224
224
|
};
|
|
225
225
|
type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
|
|
226
226
|
resize: {
|
|
227
|
-
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "
|
|
227
|
+
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "horizontal" | "vertical" | "none" | "both", unknown>>;
|
|
228
228
|
readonly required: false;
|
|
229
229
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
230
230
|
__epPropKey: true;
|
|
@@ -7,12 +7,12 @@ import { NavigationFailure } from "vue-router";
|
|
|
7
7
|
|
|
8
8
|
//#region ../../packages/components/menu/src/menu.d.ts
|
|
9
9
|
declare const menuProps: {
|
|
10
|
-
readonly mode: EpPropFinalized<StringConstructor, "
|
|
10
|
+
readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
11
11
|
readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
12
12
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
13
13
|
readonly uniqueOpened: BooleanConstructor;
|
|
14
14
|
readonly router: BooleanConstructor;
|
|
15
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
15
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
|
|
16
16
|
readonly collapse: BooleanConstructor;
|
|
17
17
|
readonly backgroundColor: StringConstructor;
|
|
18
18
|
readonly textColor: StringConstructor;
|
|
@@ -43,12 +43,12 @@ declare const menuEmits: {
|
|
|
43
43
|
};
|
|
44
44
|
type MenuEmits = typeof menuEmits;
|
|
45
45
|
declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
|
|
46
|
-
readonly mode: EpPropFinalized<StringConstructor, "
|
|
46
|
+
readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
47
47
|
readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
48
48
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
49
49
|
readonly uniqueOpened: BooleanConstructor;
|
|
50
50
|
readonly router: BooleanConstructor;
|
|
51
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
51
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
|
|
52
52
|
readonly collapse: BooleanConstructor;
|
|
53
53
|
readonly backgroundColor: StringConstructor;
|
|
54
54
|
readonly textColor: StringConstructor;
|
|
@@ -76,12 +76,12 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
|
|
|
76
76
|
open: (index: string, indexPath: string[]) => boolean;
|
|
77
77
|
select: (index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<void | NavigationFailure>) => boolean;
|
|
78
78
|
}, string, _$vue.PublicProps, Readonly<ExtractPropTypes<{
|
|
79
|
-
readonly mode: EpPropFinalized<StringConstructor, "
|
|
79
|
+
readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
80
80
|
readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
81
81
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
82
82
|
readonly uniqueOpened: BooleanConstructor;
|
|
83
83
|
readonly router: BooleanConstructor;
|
|
84
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
84
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
|
|
85
85
|
readonly collapse: BooleanConstructor;
|
|
86
86
|
readonly backgroundColor: StringConstructor;
|
|
87
87
|
readonly textColor: StringConstructor;
|
|
@@ -110,12 +110,12 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
|
|
|
110
110
|
readonly collapse: boolean;
|
|
111
111
|
readonly ellipsis: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
112
112
|
readonly persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
113
|
-
readonly mode: EpPropMergeType<StringConstructor, "
|
|
113
|
+
readonly mode: EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
|
|
114
114
|
readonly showTimeout: number;
|
|
115
115
|
readonly hideTimeout: number;
|
|
116
116
|
readonly defaultActive: string;
|
|
117
117
|
readonly defaultOpeneds: string[];
|
|
118
|
-
readonly menuTrigger: EpPropMergeType<StringConstructor, "
|
|
118
|
+
readonly menuTrigger: EpPropMergeType<StringConstructor, "hover" | "click", unknown>;
|
|
119
119
|
readonly collapseTransition: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
120
120
|
readonly popperOffset: number;
|
|
121
121
|
readonly ellipsisIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
@@ -8,9 +8,9 @@ const require_runtime$1 = require("../../../utils/vue/props/runtime.js");
|
|
|
8
8
|
const require_icon = require("../../../utils/vue/icon.js");
|
|
9
9
|
const require_vnode = require("../../../utils/vue/vnode.js");
|
|
10
10
|
const require_typescript = require("../../../utils/typescript.js");
|
|
11
|
-
const require_index = require("../../../
|
|
12
|
-
const require_index$1 = require("
|
|
13
|
-
const require_index$2 = require("
|
|
11
|
+
const require_index = require("../../../directives/click-outside/index.js");
|
|
12
|
+
const require_index$1 = require("../../../hooks/use-namespace/index.js");
|
|
13
|
+
const require_index$2 = require("../../icon/index.js");
|
|
14
14
|
const require_menu_bar = require("./utils/menu-bar.js");
|
|
15
15
|
const require_menu_collapse_transition = require("./menu-collapse-transition.js");
|
|
16
16
|
const require_use_menu_css_var = require("./use-menu-css-var.js");
|
|
@@ -165,8 +165,8 @@ var menu_default = (0, vue.defineComponent)({
|
|
|
165
165
|
const router = instance.appContext.config.globalProperties.$router;
|
|
166
166
|
const menu = (0, vue.ref)();
|
|
167
167
|
const subMenu = (0, vue.ref)();
|
|
168
|
-
const nsMenu = require_index.useNamespace("menu");
|
|
169
|
-
const nsSubMenu = require_index.useNamespace("sub-menu");
|
|
168
|
+
const nsMenu = require_index$1.useNamespace("menu");
|
|
169
|
+
const nsSubMenu = require_index$1.useNamespace("sub-menu");
|
|
170
170
|
let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH;
|
|
171
171
|
const sliceIndex = (0, vue.ref)(-1);
|
|
172
172
|
const openedMenus = (0, vue.ref)(props.defaultOpeneds && !props.collapse ? props.defaultOpeneds.slice(0) : []);
|
|
@@ -354,12 +354,12 @@ var menu_default = (0, vue.defineComponent)({
|
|
|
354
354
|
class: nsSubMenu.e("hide-arrow"),
|
|
355
355
|
popperOffset: props.popperOffset
|
|
356
356
|
}, {
|
|
357
|
-
title: () => (0, vue.h)(require_index$
|
|
357
|
+
title: () => (0, vue.h)(require_index$2.ElIcon, { class: nsSubMenu.e("icon-more") }, { default: () => (0, vue.h)(props.ellipsisIcon) }),
|
|
358
358
|
default: () => slotMore
|
|
359
359
|
}));
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
const directives = props.closeOnClickOutside ? [[require_index
|
|
362
|
+
const directives = props.closeOnClickOutside ? [[require_index.default, () => {
|
|
363
363
|
if (!openedMenus.value.length) return;
|
|
364
364
|
if (!mouseInChild.value) {
|
|
365
365
|
openedMenus.value.forEach((openedMenu) => emit("close", openedMenu, getIndexPath(openedMenu)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isUndefined","useNamespace","MENU_INJECTION_KEY","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","ElSubMenu","ElIcon","vClickoutside","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n CSSProperties,\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: String,\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n })\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,YAAYA,kBAAAA,WAAW;;;;CAIlC,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,cAAc,WAAW;EAClC,SAAS;EACV;;;;CAID,eAAe;EACb,MAAM;EACN,SAAS;EACV;;;;CAID,gBAAgB;EACd,MAAMC,kBAAAA,eAAyB,MAAM;EACrC,eAAeC,mBAAAA,QAAQ,EAAE,CAAU;EACpC;;;;CAID,cAAc;;;;CAId,QAAQ;;;;CAIR,aAAa;EACX,MAAM;EACN,QAAQ,CAAC,SAAS,QAAQ;EAC1B,SAAS;EACV;;;;CAID,UAAU;;;;;CAKV,iBAAiB;;;;;CAKjB,WAAW;;;;;CAKX,iBAAiB;;;;CAIjB,qBAAqB;;;;CAIrB,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;;;;CAID,UAAU;EACR,MAAM;EACN,SAAS;EACV;;;;CAID,cAAc;EACZ,MAAM;EACN,SAAS;EACV;;;;CAID,cAAc;EACZ,MAAMC,aAAAA;EACN,eAAeC,wBAAAA;EAChB;;;;CAID,cAAc;EACZ,MAAMH,kBAAAA,eAA6B,OAAO;EAC1C,SAAS;EACV;;;;CAID,aAAa;;;;CAIb,aAAa,EACX,MAAMA,kBAAAA,eAAuC,CAAC,QAAQ,OAAO,CAAC,EAC/D;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,YAAY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;KAG3B,CACF,GACD,EAAE;GAEN,MAAM,SAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,GAEF,MACA;IACE,KAAK,OAAO,MAAM,SAAS;IAC3B,MAAM;IACN,KAAK;IACL,OAAO,QAAQ;IACf,OAAO;MACJ,OAAO,GAAG,GAAG;MACb,OAAO,EAAE,MAAM,KAAK,GAAG;MACvB,OAAO,EAAE,WAAW,GAAG,MAAM;KAC/B;IACF,EACD,CAAC,GAAG,MAAM,GAAG,UAAU,CACxB,EACD,WACD;GAED,IAAI,MAAM,sBAAsB,MAAM,SAAS,YAC7C,QAAA,GAAA,IAAA,GAASC,iCAAAA,eAAgC,MAAM;GAGjD,OAAO;;;CAGZ,CAAC"}
|
|
1
|
+
{"version":3,"file":"menu.js","names":["buildProps","definePropType","mutable","iconPropType","More","isUndefined","useNamespace","MENU_INJECTION_KEY","SUB_MENU_INJECTION_KEY","Menubar","useMenuCssVar","flattedChildren","ElSubMenu","ElIcon","vClickoutside","ElMenuCollapseTransition"],"sources":["../../../../../../packages/components/menu/src/menu.ts"],"sourcesContent":["import {\n computed,\n defineComponent,\n getCurrentInstance,\n h,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n watchEffect,\n withDirectives,\n} from 'vue'\nimport { unrefElement, useResizeObserver } from '@vueuse/core'\nimport { isNil } from 'lodash-unified'\nimport ElIcon from '@element-plus/components/icon'\nimport { More } from '@element-plus/icons-vue'\nimport {\n buildProps,\n definePropType,\n flattedChildren,\n iconPropType,\n isArray,\n isObject,\n isString,\n isUndefined,\n mutable,\n} from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ClickOutside as vClickoutside } from '@element-plus/directives'\nimport Menubar from './utils/menu-bar'\nimport ElMenuCollapseTransition from './menu-collapse-transition.vue'\nimport ElSubMenu from './sub-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\nimport { MENU_INJECTION_KEY, SUB_MENU_INJECTION_KEY } from './tokens'\n\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { MenuItemClicked, MenuProvider, SubMenuProvider } from './types'\nimport type { NavigationFailure, Router } from 'vue-router'\nimport type {\n CSSProperties,\n Component,\n DirectiveArguments,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n VNode,\n VNodeArrayChildren,\n} from 'vue'\nimport type { UseResizeObserverReturn } from '@vueuse/core'\n\nexport const menuProps = buildProps({\n /**\n * @description menu display mode\n */\n mode: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'vertical',\n },\n /**\n * @description index of active menu on page load\n */\n defaultActive: {\n type: String,\n default: '',\n },\n /**\n * @description array that contains indexes of currently active sub-menus\n */\n defaultOpeneds: {\n type: definePropType<string[]>(Array),\n default: () => mutable([] as const),\n },\n /**\n * @description whether only one sub-menu can be active\n */\n uniqueOpened: Boolean,\n /**\n * @description whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load.\n */\n router: Boolean,\n /**\n * @description how sub-menus are triggered, only works when `mode` is 'horizontal'\n */\n menuTrigger: {\n type: String,\n values: ['hover', 'click'],\n default: 'hover',\n },\n /**\n * @description whether the menu is collapsed (available only in vertical mode)\n */\n collapse: Boolean,\n /**\n * @description background color of Menu (hex format) (deprecated, use `--bg-color` instead)\n * @deprecated use `--bg-color` instead\n */\n backgroundColor: String,\n /**\n * @description text color of Menu (hex format) (deprecated, use `--text-color` instead)\n * @deprecated use `--text-color` instead\n */\n textColor: String,\n /**\n * @description text color of currently active menu item (hex format) (deprecated, use `--active-color` instead)\n * @deprecated use `--active-color` instead\n */\n activeTextColor: String,\n /**\n * @description optional, whether menu is collapsed when clicking outside\n */\n closeOnClickOutside: Boolean,\n /**\n * @description whether to enable the collapse transition\n */\n collapseTransition: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether the menu is ellipsis (available only in horizontal mode)\n */\n ellipsis: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the popper (effective for all submenus)\n */\n popperOffset: {\n type: Number,\n default: 6,\n },\n /**\n * @description custom ellipsis icon (available only in horizontal mode and ellipsis is true)\n */\n ellipsisIcon: {\n type: iconPropType,\n default: () => More,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light` when menu is collapsed\n */\n popperEffect: {\n type: definePropType<PopperEffect>(String),\n default: 'dark',\n },\n /**\n * @description custom class name for all popup menus\n */\n popperClass: String,\n /**\n * @description custom style for all popup menus\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n /**\n * @description control timeout for all menus before showing\n */\n showTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description control timeout for all menus before hiding\n */\n hideTimeout: {\n type: Number,\n default: 300,\n },\n /**\n * @description when menu inactive and `persistent` is `false` , dropdown menu will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\nexport type MenuPropsPublic = ExtractPublicPropTypes<typeof menuProps>\n\nconst checkIndexPath = (indexPath: unknown): indexPath is string[] =>\n isArray(indexPath) && indexPath.every((path) => isString(path))\n\nexport const menuEmits = {\n close: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n open: (index: string, indexPath: string[]) =>\n isString(index) && checkIndexPath(indexPath),\n\n select: (\n index: string,\n indexPath: string[],\n item: MenuItemClicked,\n routerResult?: Promise<void | NavigationFailure>\n ) =>\n isString(index) &&\n checkIndexPath(indexPath) &&\n isObject(item) &&\n (isUndefined(routerResult) || routerResult instanceof Promise),\n}\nexport type MenuEmits = typeof menuEmits\n\nconst DEFAULT_MORE_ITEM_WIDTH = 64\n\nexport default defineComponent({\n name: 'ElMenu',\n\n props: menuProps,\n emits: menuEmits,\n\n setup(props, { emit, slots, expose }) {\n const instance = getCurrentInstance()!\n const router = instance.appContext.config.globalProperties.$router as Router\n const menu = ref<HTMLUListElement>()\n const subMenu = ref<HTMLElement>()\n const nsMenu = useNamespace('menu')\n const nsSubMenu = useNamespace('sub-menu')\n let moreItemWidth = DEFAULT_MORE_ITEM_WIDTH\n\n // data\n const sliceIndex = ref(-1)\n\n const openedMenus = ref<MenuProvider['openedMenus']>(\n props.defaultOpeneds && !props.collapse\n ? props.defaultOpeneds.slice(0)\n : []\n )\n const activeIndex = ref<MenuProvider['activeIndex']>(props.defaultActive)\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n // computed\n const isMenuPopup = computed<MenuProvider['isMenuPopup']>(\n () =>\n props.mode === 'horizontal' ||\n (props.mode === 'vertical' && props.collapse)\n )\n\n // methods\n const initMenu = () => {\n const activeItem = activeIndex.value && items.value[activeIndex.value]\n if (!activeItem || props.mode === 'horizontal' || props.collapse) return\n\n const indexPath = activeItem.indexPath\n\n // 展开该菜单项的路径上所有子菜单\n // expand all subMenus of the menu item\n indexPath.forEach((index) => {\n const subMenu = subMenus.value[index]\n subMenu && openMenu(index, subMenu.indexPath)\n })\n }\n\n const openMenu: MenuProvider['openMenu'] = (index, indexPath) => {\n if (openedMenus.value.includes(index)) return\n // 将不在该菜单路径下的其余菜单收起\n // collapse all menu that are not under current menu item\n if (props.uniqueOpened) {\n openedMenus.value = openedMenus.value.filter((index: string) =>\n indexPath.includes(index)\n )\n }\n openedMenus.value.push(index)\n emit('open', index, indexPath)\n }\n\n const close = (index: string) => {\n const i = openedMenus.value.indexOf(index)\n if (i !== -1) {\n openedMenus.value.splice(i, 1)\n }\n }\n\n const closeMenu: MenuProvider['closeMenu'] = (index, indexPath) => {\n close(index)\n emit('close', index, indexPath)\n }\n\n const handleSubMenuClick: MenuProvider['handleSubMenuClick'] = ({\n index,\n indexPath,\n }) => {\n const isOpened = openedMenus.value.includes(index)\n\n isOpened ? closeMenu(index, indexPath) : openMenu(index, indexPath)\n }\n\n const handleMenuItemClick: MenuProvider['handleMenuItemClick'] = (\n menuItem\n ) => {\n if (props.mode === 'horizontal' || props.collapse) {\n openedMenus.value = []\n }\n const { index, indexPath } = menuItem\n if (isNil(index) || isNil(indexPath)) return\n\n if (props.router && router) {\n const route = menuItem.route || index\n const routerResult = router.push(route).then((res) => {\n if (!res) activeIndex.value = index\n return res\n })\n emit(\n 'select',\n index,\n indexPath,\n { index, indexPath, route },\n routerResult\n )\n } else {\n activeIndex.value = index\n emit('select', index, indexPath, { index, indexPath })\n }\n }\n\n const updateActiveIndex = (val: string) => {\n const itemsInData = items.value\n const item =\n itemsInData[val] ||\n (activeIndex.value && itemsInData[activeIndex.value]) ||\n itemsInData[props.defaultActive]\n\n activeIndex.value = item?.index ?? val\n }\n\n const calcMenuItemWidth = (menuItem: HTMLElement) => {\n const computedStyle = getComputedStyle(menuItem)\n const marginLeft = Number.parseInt(computedStyle.marginLeft, 10)\n const marginRight = Number.parseInt(computedStyle.marginRight, 10)\n return menuItem.offsetWidth + marginLeft + marginRight || 0\n }\n\n const calcSliceIndex = () => {\n if (!menu.value) return -1\n\n const items = Array.from(menu.value.childNodes).filter(\n (item) =>\n item.nodeName !== '#comment' &&\n (item.nodeName !== '#text' || item.nodeValue)\n ) as HTMLElement[]\n\n const computedMenuStyle = getComputedStyle(menu.value)\n const paddingLeft = Number.parseInt(computedMenuStyle.paddingLeft, 10)\n const paddingRight = Number.parseInt(computedMenuStyle.paddingRight, 10)\n const menuWidth = menu.value.clientWidth - paddingLeft - paddingRight\n\n let calcWidth = 0\n let sliceIndex = 0\n items.forEach((item, index) => {\n calcWidth += calcMenuItemWidth(item)\n if (calcWidth <= menuWidth - moreItemWidth) {\n sliceIndex = index + 1\n }\n })\n return sliceIndex === items.length ? -1 : sliceIndex\n }\n\n const getIndexPath = (index: string) => subMenus.value[index].indexPath\n\n // Common computer monitor FPS is 60Hz, which means 60 redraws per second. Calculation formula: 1000ms/60 ≈ 16.67ms, In order to avoid a certain chance of repeated triggering when `resize`, set wait to 16.67 * 2 = 33.34\n const debounce = (fn: () => void, wait = 33.34) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n timer && clearTimeout(timer)\n timer = setTimeout(() => {\n fn()\n }, wait)\n }\n }\n\n let isFirstTimeRender = true\n const handleResize = () => {\n const el = unrefElement(subMenu)\n if (el) moreItemWidth = calcMenuItemWidth(el) || DEFAULT_MORE_ITEM_WIDTH\n if (sliceIndex.value === calcSliceIndex()) return\n const callback = () => {\n sliceIndex.value = -1\n nextTick(() => {\n sliceIndex.value = calcSliceIndex()\n })\n }\n // execute callback directly when first time resize to avoid shaking\n isFirstTimeRender ? callback() : debounce(callback)()\n isFirstTimeRender = false\n }\n\n watch(\n () => props.defaultActive,\n (currentActive) => {\n if (!items.value[currentActive]) {\n activeIndex.value = ''\n }\n updateActiveIndex(currentActive)\n }\n )\n\n watch(\n () => props.collapse,\n (value) => {\n if (value) openedMenus.value = []\n }\n )\n\n watch(items.value, initMenu)\n\n let resizeStopper: UseResizeObserverReturn['stop']\n watchEffect(() => {\n if (props.mode === 'horizontal' && props.ellipsis)\n resizeStopper = useResizeObserver(menu, handleResize).stop\n else resizeStopper?.()\n })\n\n const mouseInChild = ref(false)\n\n // provide\n {\n const addSubMenu: MenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n\n const removeSubMenu: MenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n\n const addMenuItem: MenuProvider['addMenuItem'] = (item) => {\n items.value[item.index] = item\n }\n\n const removeMenuItem: MenuProvider['removeMenuItem'] = (item) => {\n delete items.value[item.index]\n }\n\n provide<MenuProvider>(\n MENU_INJECTION_KEY,\n reactive({\n props,\n openedMenus,\n items,\n subMenus,\n activeIndex,\n isMenuPopup,\n\n addMenuItem,\n removeMenuItem,\n addSubMenu,\n removeSubMenu,\n openMenu,\n closeMenu,\n handleMenuItemClick,\n handleSubMenuClick,\n })\n )\n\n provide<SubMenuProvider>(`${SUB_MENU_INJECTION_KEY}${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n mouseInChild,\n level: 0,\n })\n }\n\n // lifecycle\n onMounted(() => {\n if (props.mode === 'horizontal') {\n new Menubar(instance.vnode.el!, nsMenu.namespace.value)\n }\n })\n\n {\n const open = (index: string) => {\n const { indexPath } = subMenus.value[index]\n indexPath.forEach((i) => openMenu(i, indexPath))\n }\n\n expose({\n open,\n close,\n updateActiveIndex,\n handleResize,\n })\n }\n\n const ulStyle = useMenuCssVar(props, 0)\n\n return () => {\n let slot: VNodeArrayChildren = slots.default?.() ?? []\n const vShowMore: VNode[] = []\n\n if (props.mode === 'horizontal' && menu.value) {\n const originalSlot = (\n flattedChildren(slot) as VNodeArrayChildren\n ).filter((vnode) => {\n // Filter text and comment nodes (https://github.com/vuejs/core/blob/c875019d49b4c36a88d929ccadc31ad414747c7b/packages/shared/src/shapeFlags.ts#L5)\n return (vnode as VNode)?.shapeFlag !== 8\n })\n const slotDefault =\n sliceIndex.value === -1\n ? originalSlot\n : originalSlot.slice(0, sliceIndex.value)\n\n const slotMore =\n sliceIndex.value === -1 ? [] : originalSlot.slice(sliceIndex.value)\n\n if (slotMore?.length && props.ellipsis) {\n slot = slotDefault\n vShowMore.push(\n h(\n ElSubMenu,\n {\n ref: subMenu,\n index: 'sub-menu-more',\n class: nsSubMenu.e('hide-arrow'),\n popperOffset: props.popperOffset,\n },\n {\n title: () =>\n h(\n ElIcon,\n {\n class: nsSubMenu.e('icon-more'),\n },\n {\n default: () => h(props.ellipsisIcon as Component),\n }\n ),\n default: () => slotMore,\n }\n )\n )\n }\n }\n\n const directives: DirectiveArguments = props.closeOnClickOutside\n ? [\n [\n vClickoutside,\n () => {\n if (!openedMenus.value.length) return\n\n if (!mouseInChild.value) {\n openedMenus.value.forEach((openedMenu) =>\n emit('close', openedMenu, getIndexPath(openedMenu))\n )\n\n openedMenus.value = []\n }\n },\n ],\n ]\n : []\n\n const vMenu = withDirectives(\n h(\n 'ul',\n {\n key: String(props.collapse),\n role: 'menubar',\n ref: menu,\n style: ulStyle.value,\n class: {\n [nsMenu.b()]: true,\n [nsMenu.m(props.mode)]: true,\n [nsMenu.m('collapse')]: props.collapse,\n },\n },\n [...slot, ...vShowMore]\n ),\n directives\n )\n\n if (props.collapseTransition && props.mode === 'vertical') {\n return h(ElMenuCollapseTransition, () => vMenu)\n }\n\n return vMenu\n }\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,YAAYA,kBAAAA,WAAW;;;;CAIlC,MAAM;EACJ,MAAM;EACN,QAAQ,CAAC,cAAc,WAAW;EAClC,SAAS;EACV;;;;CAID,eAAe;EACb,MAAM;EACN,SAAS;EACV;;;;CAID,gBAAgB;EACd,MAAMC,kBAAAA,eAAyB,MAAM;EACrC,eAAeC,mBAAAA,QAAQ,EAAE,CAAU;EACpC;;;;CAID,cAAc;;;;CAId,QAAQ;;;;CAIR,aAAa;EACX,MAAM;EACN,QAAQ,CAAC,SAAS,QAAQ;EAC1B,SAAS;EACV;;;;CAID,UAAU;;;;;CAKV,iBAAiB;;;;;CAKjB,WAAW;;;;;CAKX,iBAAiB;;;;CAIjB,qBAAqB;;;;CAIrB,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;;;;CAID,UAAU;EACR,MAAM;EACN,SAAS;EACV;;;;CAID,cAAc;EACZ,MAAM;EACN,SAAS;EACV;;;;CAID,cAAc;EACZ,MAAMC,aAAAA;EACN,eAAeC,wBAAAA;EAChB;;;;CAID,cAAc;EACZ,MAAMH,kBAAAA,eAA6B,OAAO;EAC1C,SAAS;EACV;;;;CAID,aAAa;;;;CAIb,aAAa,EACX,MAAMA,kBAAAA,eAAuC,CAAC,QAAQ,OAAO,CAAC,EAC/D;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,aAAa;EACX,MAAM;EACN,SAAS;EACV;;;;CAID,YAAY;EACV,MAAM;EACN,SAAS;EACV;CACF,CAAU;AAIX,MAAM,kBAAkB,eAAA,GAAA,YAAA,SACd,UAAU,IAAI,UAAU,OAAO,UAAA,GAAA,YAAA,UAAkB,KAAK,CAAC;AAEjE,MAAa,YAAY;CACvB,QAAQ,OAAe,eAAA,GAAA,YAA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AAO,EAAE,MAAM,KAAK,GAAG;MACvB,OAAO,EAAE,WAAW,GAAG,MAAM;KAC/B;IACF,EACD,CAAC,GAAG,MAAM,GAAG,UAAU,CACxB,EACD,WACD;GAED,IAAI,MAAM,sBAAsB,MAAM,SAAS,YAC7C,QAAA,GAAA,IAAA,GAASC,iCAAAA,eAAgC,MAAM;GAGjD,OAAO;;;CAGZ,CAAC"}
|
|
@@ -11,7 +11,7 @@ type MessageContext = {
|
|
|
11
11
|
vm: ComponentInternalInstance;
|
|
12
12
|
props: Mutable<MessageProps>;
|
|
13
13
|
};
|
|
14
|
-
declare const placementInstances: _$vue.ShallowReactive<Record<"bottom" | "top" | "top-
|
|
14
|
+
declare const placementInstances: _$vue.ShallowReactive<Record<"bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right", MessageContext[]>>;
|
|
15
15
|
declare const getOrCreatePlacementInstances: (placement: MessagePlacement) => MessageContext[];
|
|
16
16
|
declare const getInstance: (id: string, placement: MessagePlacement) => {
|
|
17
17
|
current: MessageContext;
|
|
@@ -133,7 +133,7 @@ declare const messageProps: {
|
|
|
133
133
|
readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "error", unknown, "info", boolean>;
|
|
134
134
|
readonly plain: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
135
135
|
readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 16, boolean>;
|
|
136
|
-
readonly placement: EpPropFinalized<StringConstructor, "bottom" | "top" | "top-
|
|
136
|
+
readonly placement: EpPropFinalized<StringConstructor, "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, undefined, boolean>;
|
|
137
137
|
readonly zIndex: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
138
138
|
readonly grouping: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
139
139
|
readonly repeatNum: EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
|
|
@@ -17,19 +17,19 @@ declare const __VLS_base: _$vue.DefineComponent<MessageProps, {
|
|
|
17
17
|
}, string, _$vue.PublicProps, Readonly<MessageProps> & Readonly<{
|
|
18
18
|
onDestroy?: (() => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
id: string;
|
|
21
20
|
type: MessageType;
|
|
21
|
+
message: string | _$vue.VNode | (() => _$vue.VNode);
|
|
22
|
+
zIndex: number;
|
|
22
23
|
onClose: () => void;
|
|
23
|
-
|
|
24
|
-
duration: number;
|
|
24
|
+
id: string;
|
|
25
25
|
icon: IconPropType;
|
|
26
|
-
|
|
26
|
+
offset: number;
|
|
27
27
|
placement: MessagePlacement;
|
|
28
28
|
plain: boolean;
|
|
29
|
-
message: string | _$vue.VNode | (() => _$vue.VNode);
|
|
30
|
-
showClose: boolean;
|
|
31
29
|
customClass: string;
|
|
32
30
|
dangerouslyUseHTMLString: boolean;
|
|
31
|
+
duration: number;
|
|
32
|
+
showClose: boolean;
|
|
33
33
|
grouping: boolean;
|
|
34
34
|
repeatNum: number;
|
|
35
35
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -89,7 +89,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
89
89
|
}>;
|
|
90
90
|
contentId: _$vue.Ref<string, string>;
|
|
91
91
|
inputId: _$vue.Ref<string, string>;
|
|
92
|
-
btnSize: _$vue.ComputedRef<"" | "
|
|
92
|
+
btnSize: _$vue.ComputedRef<"default" | "" | "small" | "large">;
|
|
93
93
|
iconComponent: _$vue.ComputedRef<string | _$vue.FunctionalComponent<any, {}, any, {}> | {
|
|
94
94
|
new (...args: any[]): any;
|
|
95
95
|
__isFragment?: never;
|
|
@@ -4031,8 +4031,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4031
4031
|
dangerouslyUseHTMLString: _$vue.Ref<boolean, boolean>;
|
|
4032
4032
|
confirmButtonText: _$vue.Ref<string, string>;
|
|
4033
4033
|
cancelButtonText: _$vue.Ref<string, string>;
|
|
4034
|
-
confirmButtonType: _$vue.Ref<"" | "
|
|
4035
|
-
cancelButtonType: _$vue.Ref<"" | "
|
|
4034
|
+
confirmButtonType: _$vue.Ref<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
|
4035
|
+
cancelButtonType: _$vue.Ref<"" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
|
4036
4036
|
confirmButtonLoading: _$vue.Ref<boolean, boolean>;
|
|
4037
4037
|
cancelButtonLoading: _$vue.Ref<boolean, boolean>;
|
|
4038
4038
|
confirmButtonLoadingIcon: _$vue.Ref<string | _$vue.FunctionalComponent<any, {}, any, {}> | {
|
|
@@ -4580,12 +4580,12 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4580
4580
|
center: boolean;
|
|
4581
4581
|
container: string;
|
|
4582
4582
|
overflow: boolean;
|
|
4583
|
-
closeOnClickModal: boolean;
|
|
4584
4583
|
closeOnPressEscape: boolean;
|
|
4584
|
+
showClose: boolean;
|
|
4585
|
+
closeOnClickModal: boolean;
|
|
4585
4586
|
lockScroll: boolean;
|
|
4586
4587
|
modal: boolean;
|
|
4587
4588
|
draggable: boolean;
|
|
4588
|
-
showClose: boolean;
|
|
4589
4589
|
roundButton: boolean;
|
|
4590
4590
|
closeOnHashChange: boolean;
|
|
4591
4591
|
boxType: MessageBoxType;
|
|
@@ -4601,7 +4601,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4601
4601
|
}>, {
|
|
4602
4602
|
ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
4603
4603
|
size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
|
4604
|
-
type: _$vue.ComputedRef<"" | "
|
|
4604
|
+
type: _$vue.ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
|
4605
4605
|
disabled: _$vue.ComputedRef<boolean>;
|
|
4606
4606
|
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
|
4607
4607
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
@@ -4629,7 +4629,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4629
4629
|
}>, {
|
|
4630
4630
|
ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
4631
4631
|
size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
|
4632
|
-
type: _$vue.ComputedRef<"" | "
|
|
4632
|
+
type: _$vue.ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
|
4633
4633
|
disabled: _$vue.ComputedRef<boolean>;
|
|
4634
4634
|
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
|
4635
4635
|
}, {}, {}, {}, {
|
|
@@ -4652,7 +4652,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4652
4652
|
}>, {
|
|
4653
4653
|
ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
4654
4654
|
size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
|
4655
|
-
type: _$vue.ComputedRef<"" | "
|
|
4655
|
+
type: _$vue.ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
|
|
4656
4656
|
disabled: _$vue.ComputedRef<boolean>;
|
|
4657
4657
|
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
|
4658
4658
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
@@ -4680,7 +4680,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4680
4680
|
setPropsDefaults: (defaults: {
|
|
4681
4681
|
readonly size?: "" | "default" | "small" | "large" | (() => "" | "default" | "small" | "large") | undefined;
|
|
4682
4682
|
readonly disabled?: boolean | (() => boolean) | undefined;
|
|
4683
|
-
readonly type?: "" | "
|
|
4683
|
+
readonly type?: "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger" | (() => "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger") | undefined;
|
|
4684
4684
|
readonly icon?: string | _$vue.FunctionalComponent<any, {}, any, {}> | {
|
|
4685
4685
|
new (...args: any[]): any;
|
|
4686
4686
|
__isFragment?: never;
|
|
@@ -4744,14 +4744,14 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4744
4744
|
}>, {
|
|
4745
4745
|
loop: boolean;
|
|
4746
4746
|
trapped: boolean;
|
|
4747
|
-
focusStartEl: HTMLElement | "
|
|
4747
|
+
focusStartEl: HTMLElement | "first" | "container";
|
|
4748
4748
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
4749
4749
|
ElInput: SFCWithInstall<{
|
|
4750
4750
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<InputProps> & Readonly<{
|
|
4751
4751
|
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
4752
|
-
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4753
4752
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
4754
4753
|
onInput?: ((value: string) => any) | undefined;
|
|
4754
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4755
4755
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
4756
4756
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
4757
4757
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
@@ -4775,9 +4775,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4775
4775
|
resizeTextarea: () => void;
|
|
4776
4776
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
4777
4777
|
clear: (evt: MouseEvent | undefined) => void;
|
|
4778
|
-
change: (value: string, evt?: Event | undefined) => void;
|
|
4779
4778
|
"update:modelValue": (value: string) => void;
|
|
4780
4779
|
input: (value: string) => void;
|
|
4780
|
+
change: (value: string, evt?: Event | undefined) => void;
|
|
4781
4781
|
focus: (evt: FocusEvent) => void;
|
|
4782
4782
|
blur: (evt: FocusEvent) => void;
|
|
4783
4783
|
mouseleave: (evt: MouseEvent) => void;
|
|
@@ -4807,9 +4807,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4807
4807
|
Defaults: {};
|
|
4808
4808
|
}, Readonly<InputProps> & Readonly<{
|
|
4809
4809
|
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
4810
|
-
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4811
4810
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
4812
4811
|
onInput?: ((value: string) => any) | undefined;
|
|
4812
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4813
4813
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
4814
4814
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
4815
4815
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
@@ -4849,9 +4849,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4849
4849
|
__isSuspense?: never;
|
|
4850
4850
|
} & _$vue.ComponentOptionsBase<Readonly<InputProps> & Readonly<{
|
|
4851
4851
|
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
4852
|
-
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4853
4852
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
4854
4853
|
onInput?: ((value: string) => any) | undefined;
|
|
4854
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4855
4855
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
4856
4856
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
4857
4857
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
@@ -4875,9 +4875,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4875
4875
|
resizeTextarea: () => void;
|
|
4876
4876
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
4877
4877
|
clear: (evt: MouseEvent | undefined) => void;
|
|
4878
|
-
change: (value: string, evt?: Event | undefined) => void;
|
|
4879
4878
|
"update:modelValue": (value: string) => void;
|
|
4880
4879
|
input: (value: string) => void;
|
|
4880
|
+
change: (value: string, evt?: Event | undefined) => void;
|
|
4881
4881
|
focus: (evt: FocusEvent) => void;
|
|
4882
4882
|
blur: (evt: FocusEvent) => void;
|
|
4883
4883
|
mouseleave: (evt: MouseEvent) => void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
require("../../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
const require_icon = require("../../../utils/vue/icon.js");
|
|
3
3
|
const require_validator = require("../../../utils/vue/validator.js");
|
|
4
|
-
const require_index = require("../../../
|
|
5
|
-
const require_index$1 = require("../../../hooks/use-
|
|
6
|
-
const require_index$2 = require("../../../hooks/use-
|
|
7
|
-
const require_index$3 = require("../../../hooks/use-
|
|
8
|
-
const require_index$4 = require("
|
|
9
|
-
const require_index$5 = require("../../
|
|
10
|
-
const require_index$6 = require("../../
|
|
4
|
+
const require_index = require("../../../directives/trap-focus/index.js");
|
|
5
|
+
const require_index$1 = require("../../../hooks/use-draggable/index.js");
|
|
6
|
+
const require_index$2 = require("../../../hooks/use-lockscreen/index.js");
|
|
7
|
+
const require_index$3 = require("../../../hooks/use-same-target/index.js");
|
|
8
|
+
const require_index$4 = require("../../../hooks/use-id/index.js");
|
|
9
|
+
const require_index$5 = require("../../icon/index.js");
|
|
10
|
+
const require_index$6 = require("../../focus-trap/index.js");
|
|
11
|
+
const require_index$7 = require("../../input/index.js");
|
|
11
12
|
const require_use_global_config = require("../../config-provider/src/hooks/use-global-config.js");
|
|
12
|
-
const require_index$
|
|
13
|
-
const require_index$8 = require("../../../directives/trap-focus/index.js");
|
|
13
|
+
const require_index$8 = require("../../button/index.js");
|
|
14
14
|
const require_index$9 = require("../../overlay/index.js");
|
|
15
15
|
let _element_plus_icons_vue = require("@element-plus/icons-vue");
|
|
16
16
|
let vue = require("vue");
|
|
@@ -18,13 +18,13 @@ let _vue_shared = require("@vue/shared");
|
|
|
18
18
|
//#region ../../packages/components/message-box/src/index.vue?vue&type=script&lang.ts
|
|
19
19
|
var index_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
20
20
|
name: "ElMessageBox",
|
|
21
|
-
directives: { TrapFocus: require_index
|
|
21
|
+
directives: { TrapFocus: require_index.default },
|
|
22
22
|
components: {
|
|
23
|
-
ElButton: require_index$
|
|
24
|
-
ElFocusTrap: require_index$
|
|
25
|
-
ElInput: require_index$
|
|
23
|
+
ElButton: require_index$8.ElButton,
|
|
24
|
+
ElFocusTrap: require_index$6.default,
|
|
25
|
+
ElInput: require_index$7.ElInput,
|
|
26
26
|
ElOverlay: require_index$9.ElOverlay,
|
|
27
|
-
ElIcon: require_index$
|
|
27
|
+
ElIcon: require_index$5.ElIcon,
|
|
28
28
|
...require_icon.TypeComponents
|
|
29
29
|
},
|
|
30
30
|
inheritAttrs: false,
|
|
@@ -120,8 +120,8 @@ var index_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
120
120
|
const type = state.type;
|
|
121
121
|
return { [ns.bm("icon", type)]: type && require_icon.TypeComponentsMap[type] };
|
|
122
122
|
});
|
|
123
|
-
const contentId = require_index$
|
|
124
|
-
const inputId = require_index$
|
|
123
|
+
const contentId = require_index$4.useId();
|
|
124
|
+
const inputId = require_index$4.useId();
|
|
125
125
|
const iconComponent = (0, vue.computed)(() => {
|
|
126
126
|
const type = state.type;
|
|
127
127
|
return state.icon || type && require_icon.TypeComponentsMap[type] || "";
|
|
@@ -153,7 +153,7 @@ var index_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
153
153
|
state.validateError = false;
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
-
const { isDragging } = require_index.useDraggable(rootRef, headerRef, (0, vue.computed)(() => props.draggable), (0, vue.computed)(() => props.overflow));
|
|
156
|
+
const { isDragging } = require_index$1.useDraggable(rootRef, headerRef, (0, vue.computed)(() => props.draggable), (0, vue.computed)(() => props.overflow));
|
|
157
157
|
(0, vue.onMounted)(async () => {
|
|
158
158
|
await (0, vue.nextTick)();
|
|
159
159
|
if (props.closeOnHashChange) window.addEventListener("hashchange", doClose);
|
|
@@ -171,7 +171,7 @@ var index_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
171
171
|
const handleWrapperClick = () => {
|
|
172
172
|
if (props.closeOnClickModal) handleAction(state.distinguishCancelAndClose ? "close" : "cancel");
|
|
173
173
|
};
|
|
174
|
-
const overlayEvent = require_index$
|
|
174
|
+
const overlayEvent = require_index$3.useSameTarget(handleWrapperClick);
|
|
175
175
|
const handleInputEnter = (e) => {
|
|
176
176
|
if (state.inputType !== "textarea" && !inputRef.value?.isComposing) {
|
|
177
177
|
e.preventDefault();
|
|
@@ -221,7 +221,7 @@ var index_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
221
221
|
const onCloseRequested = () => {
|
|
222
222
|
if (props.closeOnPressEscape) handleClose();
|
|
223
223
|
};
|
|
224
|
-
if (props.lockScroll) require_index$
|
|
224
|
+
if (props.lockScroll) require_index$2.useLockscreen(visible, { ns });
|
|
225
225
|
return {
|
|
226
226
|
...(0, vue.toRefs)(state),
|
|
227
227
|
ns,
|