@element-plus/nightly 0.0.20260414 → 0.0.20260416
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +446 -483
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +446 -483
- 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/components/affix/src/affix.d.ts +2 -2
- package/es/components/affix/src/affix.mjs +1 -2
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix.vue.d.ts +2 -2
- package/es/components/affix/src/affix.vue_vue_type_script_setup_true_lang.mjs +6 -10
- package/es/components/affix/src/affix.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/anchor/src/anchor.d.ts +2 -2
- package/es/components/anchor/src/anchor.vue.d.ts +4 -4
- package/es/components/autocomplete/src/autocomplete.d.ts +2 -2
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
- package/es/components/badge/src/badge.vue.d.ts +1 -1
- 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/calendar/src/calendar.vue.d.ts +1 -1
- package/es/components/carousel/src/carousel.d.ts +2 -2
- package/es/components/carousel/src/carousel.vue.d.ts +2 -2
- package/es/components/cascader/src/cascader.vue.d.ts +4 -4
- package/es/components/cascader-panel/src/index.vue.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/es/components/col/src/col.vue.d.ts +1 -1
- package/es/components/color-picker/src/color-picker.d.ts +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +4 -4
- package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/es/components/descriptions/src/description-item.d.ts +1 -1
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/dialog/src/dialog.d.ts +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -2
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs +91 -95
- package/es/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/divider/src/divider.d.ts +1 -1
- package/es/components/drawer/src/drawer.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +3 -3
- package/es/components/drawer/src/drawer.vue_vue_type_script_setup_true_lang.mjs +110 -114
- package/es/components/drawer/src/drawer.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
- package/es/components/dropdown/src/dropdown.d.ts +2 -2
- package/es/components/dropdown/src/dropdown.vue.d.ts +19 -19
- package/es/components/empty/src/empty.vue.d.ts +1 -1
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/form/src/form-item.d.ts +1 -1
- package/es/components/form/src/form-item.vue.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +2 -2
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +10 -10
- package/es/components/image-viewer/src/image-viewer.vue_vue_type_script_setup_true_lang.mjs +103 -107
- package/es/components/image-viewer/src/image-viewer.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/input/src/input.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +18 -18
- package/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs +17 -11
- package/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/src/input-number.d.ts +20 -0
- package/es/components/input-number/src/input-number.mjs +2 -0
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number.vue.d.ts +5 -5
- package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs +12 -6
- package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/input-otp/src/input-otp.vue.d.ts +5 -5
- package/es/components/input-tag/src/input-tag.vue.d.ts +5 -5
- package/es/components/link/src/link.vue.d.ts +1 -1
- package/es/components/mention/src/mention.d.ts +1 -1
- package/es/components/mention/src/mention.vue.d.ts +4 -4
- package/es/components/menu/src/menu.d.ts +8 -8
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +2 -2
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +3 -3
- package/es/components/popover/src/popover.d.ts +2 -2
- package/es/components/popover/src/popover.vue.d.ts +2 -2
- package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/es/components/popper/src/content.vue.d.ts +4 -4
- package/es/components/progress/src/progress.vue.d.ts +2 -2
- package/es/components/radio/src/radio-group.vue.d.ts +1 -1
- package/es/components/result/src/result.d.ts +1 -1
- 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/scrollbar/src/scrollbar.vue.d.ts +1 -1
- package/es/components/segmented/src/segmented.d.ts +1 -1
- package/es/components/select/src/select.d.ts +1 -1
- package/es/components/select/src/select.vue.d.ts +18 -18
- package/es/components/select-v2/src/defaults.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +15 -15
- package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/es/components/slider/src/button.vue.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/steps/src/item.d.ts +1 -1
- package/es/components/steps/src/steps.d.ts +3 -3
- package/es/components/switch/src/switch.vue.d.ts +2 -2
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/components/table/src/table.vue.d.ts +3 -3
- package/es/components/tag/src/tag.vue.d.ts +2 -2
- package/es/components/time-picker/src/common/picker.vue.d.ts +6 -6
- package/es/components/time-select/src/time-select.vue.d.ts +4 -4
- package/es/components/tooltip/src/content.d.ts +1 -1
- package/es/components/tooltip/src/content.mjs +1 -2
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +3 -3
- package/es/components/tooltip/src/content.vue_vue_type_script_setup_true_lang.mjs +69 -73
- package/es/components/tooltip/src/content.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs.map +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/tour.d.ts +1 -1
- package/es/components/tour/src/tour.mjs +1 -2
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour.vue.d.ts +1 -1
- package/es/components/tour/src/tour.vue_vue_type_script_setup_true_lang.mjs +36 -40
- package/es/components/tour/src/tour.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/tree-select/src/tree-select.vue.d.ts +3 -3
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -3
- package/es/components/virtual-list/src/components/fixed-size-list.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/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/src/affix.d.ts +2 -2
- package/lib/components/affix/src/affix.js +1 -2
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix.vue.d.ts +2 -2
- package/lib/components/affix/src/affix.vue_vue_type_script_setup_true_lang.js +7 -11
- package/lib/components/affix/src/affix.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/anchor/src/anchor.d.ts +2 -2
- package/lib/components/anchor/src/anchor.vue.d.ts +4 -4
- package/lib/components/autocomplete/src/autocomplete.d.ts +2 -2
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
- package/lib/components/badge/src/badge.vue.d.ts +1 -1
- 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/calendar/src/calendar.vue.d.ts +1 -1
- package/lib/components/carousel/src/carousel.d.ts +2 -2
- package/lib/components/carousel/src/carousel.vue.d.ts +2 -2
- package/lib/components/cascader/src/cascader.vue.d.ts +4 -4
- package/lib/components/cascader-panel/src/index.vue.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/lib/components/col/src/col.vue.d.ts +1 -1
- package/lib/components/color-picker/src/color-picker.d.ts +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +4 -4
- package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +1 -1
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/dialog/src/dialog.d.ts +1 -1
- package/lib/components/dialog/src/dialog.js +1 -2
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.js +98 -102
- package/lib/components/dialog/src/dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/divider/src/divider.d.ts +1 -1
- package/lib/components/drawer/src/drawer.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +3 -3
- package/lib/components/drawer/src/drawer.vue_vue_type_script_setup_true_lang.js +118 -122
- package/lib/components/drawer/src/drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown.vue.d.ts +19 -19
- package/lib/components/empty/src/empty.vue.d.ts +1 -1
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/form/src/form-item.d.ts +1 -1
- package/lib/components/form/src/form-item.vue.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +2 -2
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +10 -10
- package/lib/components/image-viewer/src/image-viewer.vue_vue_type_script_setup_true_lang.js +112 -116
- package/lib/components/image-viewer/src/image-viewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/input/src/input.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +18 -18
- package/lib/components/input/src/input.vue_vue_type_script_setup_true_lang.js +17 -11
- package/lib/components/input/src/input.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/src/input-number.d.ts +20 -0
- package/lib/components/input-number/src/input-number.js +2 -0
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number.vue.d.ts +5 -5
- package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js +12 -6
- package/lib/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/input-otp/src/input-otp.vue.d.ts +5 -5
- package/lib/components/input-tag/src/input-tag.vue.d.ts +5 -5
- package/lib/components/link/src/link.vue.d.ts +1 -1
- package/lib/components/mention/src/mention.d.ts +1 -1
- package/lib/components/mention/src/mention.vue.d.ts +4 -4
- package/lib/components/menu/src/menu.d.ts +8 -8
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +2 -2
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +3 -3
- package/lib/components/popover/src/popover.d.ts +2 -2
- package/lib/components/popover/src/popover.vue.d.ts +2 -2
- package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/lib/components/popper/src/content.vue.d.ts +4 -4
- package/lib/components/progress/src/progress.vue.d.ts +2 -2
- package/lib/components/radio/src/radio-group.vue.d.ts +1 -1
- package/lib/components/result/src/result.d.ts +1 -1
- 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/scrollbar/src/scrollbar.vue.d.ts +1 -1
- package/lib/components/segmented/src/segmented.d.ts +1 -1
- package/lib/components/select/src/select.d.ts +1 -1
- package/lib/components/select/src/select.vue.d.ts +18 -18
- package/lib/components/select-v2/src/defaults.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +15 -15
- package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/lib/components/slider/src/button.vue.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/steps/src/item.d.ts +1 -1
- package/lib/components/steps/src/steps.d.ts +3 -3
- package/lib/components/switch/src/switch.vue.d.ts +2 -2
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/components/table/src/table.vue.d.ts +3 -3
- package/lib/components/tag/src/tag.vue.d.ts +2 -2
- package/lib/components/time-picker/src/common/picker.vue.d.ts +6 -6
- package/lib/components/time-select/src/time-select.vue.d.ts +4 -4
- package/lib/components/tooltip/src/content.d.ts +1 -1
- package/lib/components/tooltip/src/content.js +1 -2
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +3 -3
- package/lib/components/tooltip/src/content.vue_vue_type_script_setup_true_lang.js +72 -76
- package/lib/components/tooltip/src/content.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/tooltip/src/content2.js.map +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/tour.d.ts +1 -1
- package/lib/components/tour/src/tour.js +1 -2
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.vue_vue_type_script_setup_true_lang.js +39 -43
- package/lib/components/tour/src/tour.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/tree-select/src/tree-select.vue.d.ts +3 -3
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-list.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/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +3 -3
- package/tags.json +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/input.scss +4 -0
- package/web-types.json +1 -1
- package/es/components/teleport/index.d.ts +0 -9
- package/es/components/teleport/index.mjs +0 -10
- package/es/components/teleport/index.mjs.map +0 -1
- package/es/components/teleport/src/teleport.d.ts +0 -21
- package/es/components/teleport/src/teleport.mjs +0 -14
- package/es/components/teleport/src/teleport.mjs.map +0 -1
- package/es/components/teleport/src/teleport.vue.d.ts +0 -39
- package/es/components/teleport/src/teleport.vue_vue_type_script_setup_true_lang.mjs +0 -20
- package/es/components/teleport/src/teleport.vue_vue_type_script_setup_true_lang.mjs.map +0 -1
- package/es/components/teleport/src/teleport2.mjs +0 -8
- package/es/components/teleport/src/teleport2.mjs.map +0 -1
- package/es/components/teleport/style/css.mjs +0 -0
- package/es/components/teleport/style/index.mjs +0 -0
- package/lib/components/teleport/index.d.ts +0 -9
- package/lib/components/teleport/index.js +0 -13
- package/lib/components/teleport/index.js.map +0 -1
- package/lib/components/teleport/src/teleport.d.ts +0 -21
- package/lib/components/teleport/src/teleport.js +0 -15
- package/lib/components/teleport/src/teleport.js.map +0 -1
- package/lib/components/teleport/src/teleport.vue.d.ts +0 -39
- package/lib/components/teleport/src/teleport.vue_vue_type_script_setup_true_lang.js +0 -21
- package/lib/components/teleport/src/teleport.vue_vue_type_script_setup_true_lang.js.map +0 -1
- package/lib/components/teleport/src/teleport2.js +0 -9
- package/lib/components/teleport/src/teleport2.js.map +0 -1
- package/lib/components/teleport/style/css.js +0 -1
- package/lib/components/teleport/style/index.js +0 -1
package/es/components/input-number/src/input-number.vue_vue_type_script_setup_true_lang.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-number.vue_vue_type_script_setup_true_lang.mjs","names":["$slots"],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAiHA,MAAM,QAAQ;EAgBd,MAAM,OAAO;EAEb,MAAM,EAAE,MAAM,WAAU;EACxB,MAAM,KAAK,aAAa,eAAc;EACtC,MAAM,QAAQ,KAAmB;EAMjC,MAAM,OAAO,SAAe;GAC1B,cAAc,MAAM;GACpB,WAAW;GACZ,CAAA;EAED,MAAM,EAAE,aAAa,aAAY;EAEjC,MAAM,cAAc,eACZ,SAAS,MAAM,WAAW,IAAI,MAAM,cAAc,MAAM,IAChE;EACA,MAAM,cAAc,eACZ,SAAS,MAAM,WAAW,IAAI,MAAM,cAAc,MAAM,IAChE;EAEA,MAAM,eAAe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MAAA,EAAC,CAAA,0BAAA;KACb,OAAK,eAAA,CAAG,MAAA,GAAE,CAAC,EAAC,WAAA,EAAc,MAAA,GAAE,CAAC,GAAE,YAAa,YAAA,MAAW,CAAA,CAAA;KACvD,WAAO,SAAQ,UAAQ,CAAA,QAAA,CAAA;QAExB,WAKO,KAAA,QAAA,iBAAA,EAAA,QAAA,CAJL,YAGU,MAAA,OAAA,EAAA,MAAA;4BAF2B,CAAnB,gBAAA,sBAAhB,YAAmC,MAAA,QAAA,EAAA,EAAA,KAAA,GAAA,CAAA,kBACnC,YAAe,MAAA,KAAA,EAAA,EAAA,KAAA,GAAA,CAAA;;oDATH,SAAQ;IAa1B,YA6BW,MAAA,QAAA,EAAA;KA5BR,IAAI,QAAA;cACD;KAAJ,KAAI;KACJ,MAAK;KACJ,MAAM,QAAA;KACN,eAAa,aAAA;KACb,aAAa,QAAA;KACb,UAAU,QAAA;KACV,UAAU,MAAA,oBAAmB;KAC7B,MAAM,MAAA,gBAAe;KACrB,KAAK,QAAA;KACL,KAAK,QAAA;KACL,MAAM,QAAA;KACN,cAAY,QAAA;KACZ,kBAAgB;KAChB,WAAW,QAAA;KACX,UAAU,QAAA;KACV,WAAS;KACT,QAAM;KACN,SAAO;KACP,SAAO;KACP,UAAQ;8BAEOA,KAAAA,OAAO;WAAS;uBACR,CAAtB,WAAsB,KAAA,QAAA,SAAA;;gBAERA,KAAAA,OAAO;WAAS;uBACR,CAAtB,WAAsB,KAAA,QAAA,SAAA"}
|
|
1
|
+
{"version":3,"file":"input-number.vue_vue_type_script_setup_true_lang.mjs","names":["$slots"],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n :type=\"formatter ? 'text' : 'number'\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = !value ? Number(value) : Number.parseFloat(String(value))\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n let newVal = value === '' ? null : Number.parseFloat(value)\n if (Number.isNaN(newVal)) {\n newVal = null\n }\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number.parseFloat(value) : ''\n if (\n (isNumber(newVal) && !Number.isNaN(newVal)) ||\n (props.formatter && Number.isNaN(newVal)) ||\n newVal === ''\n ) {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = props.formatter?.('') ?? ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAmHA,MAAM,QAAQ;EAgBd,MAAM,OAAO;EAEb,MAAM,EAAE,MAAM,WAAU;EACxB,MAAM,KAAK,aAAa,eAAc;EACtC,MAAM,QAAQ,KAAmB;EAMjC,MAAM,OAAO,SAAe;GAC1B,cAAc,MAAM;GACpB,WAAW;GACZ,CAAA;EAED,MAAM,EAAE,aAAa,aAAY;EAEjC,MAAM,cAAc,eACZ,SAAS,MAAM,WAAW,IAAI,MAAM,cAAc,MAAM,IAChE;EACA,MAAM,cAAc,eACZ,SAAS,MAAM,WAAW,IAAI,MAAM,cAAc,MAAM,IAChE;EAEA,MAAM,eAAe,eAAe;GAClC,MAAM,gBAAgB,aAAa,MAAM,KAAI;AAC7C,OAAI,CAAC,cAAY,MAAM,UAAU,EAAE;AACjC,QAAI,gBAAgB,MAAM,UACxB,WACE,eACA,+DACF;AAEF,WAAO,MAAM;SAEb,QAAO,KAAK,IAAI,aAAa,MAAM,WAAW,EAAE,cAAa;IAEhE;EACD,MAAM,kBAAkB,eAAe;AACrC,UAAO,MAAM,YAAY,MAAM,qBAAqB;IACrD;EAED,MAAM,kBAAkB,aAAY;EACpC,MAAM,sBAAsB,iBAAgB;EAE5C,MAAM,eAAe,eAAe;AAClC,OAAI,KAAK,cAAc,KACrB,QAAO,KAAK;GAEd,IAAI,eAAmD,KAAK;AAC5D,OAAI,MAAM,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,YAAmC,MAAA,QAAA,EAAA,EAAA,KAAA,GAAA,CAAA,kBACnC,YAAe,MAAA,KAAA,EAAA,EAAA,KAAA,GAAA,CAAA;;oDATH,SAAQ;IAa1B,YA+BW,MAAA,QAAA,EAAA;KA9BR,IAAI,QAAA;cACD;KAAJ,KAAI;KACH,MAAM,QAAA,YAAS,SAAA;KACf,MAAM,QAAA;KACN,eAAa,aAAA;KACb,aAAa,QAAA;KACb,UAAU,QAAA;KACV,UAAU,MAAA,oBAAmB;KAC7B,MAAM,MAAA,gBAAe;KACrB,KAAK,QAAA;KACL,KAAK,QAAA;KACL,MAAM,QAAA;KACN,cAAY,QAAA;KACZ,kBAAgB;KAChB,WAAW,QAAA;KACX,WAAW,QAAA;KACX,QAAQ,QAAA;KACR,UAAU,QAAA;KACV,WAAS;KACT,QAAM;KACN,SAAO;KACP,SAAO;KACP,UAAQ;8BAEOA,KAAAA,OAAO;WAAS;uBACR,CAAtB,WAAsB,KAAA,QAAA,SAAA;;gBAERA,KAAAA,OAAO;WAAS;uBACR,CAAtB,WAAsB,KAAA,QAAA,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-number2.mjs","names":[],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"input-number2.mjs","names":[],"sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ns.is(align, !!align),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <slot name=\"decrease-icon\">\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </slot>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <slot name=\"increase-icon\">\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </slot>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n :type=\"formatter ? 'text' : 'number'\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :aria-label=\"ariaLabel\"\n :validate-event=\"false\"\n :inputmode=\"inputmode\"\n :formatter=\"formatter\"\n :parser=\"parser\"\n :tabindex=\"tabindex\"\n @keydown=\"handleKeydown\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n >\n <template v-if=\"$slots.prefix\" #prefix>\n <slot name=\"prefix\" />\n </template>\n <template v-if=\"$slots.suffix\" #suffix>\n <slot name=\"suffix\" />\n </template>\n </el-input>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n NOOP,\n debugWarn,\n getEventCode,\n getEventKey,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { InputNumberProps } from './input-number'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = withDefaults(defineProps<InputNumberProps>(), {\n id: undefined,\n disabled: undefined,\n step: 1,\n max: Number.MAX_SAFE_INTEGER,\n min: Number.MIN_SAFE_INTEGER,\n stepStrictly: false,\n readonly: false,\n controls: true,\n controlsPosition: '',\n valueOnClear: null,\n validateEvent: true,\n inputmode: undefined,\n align: 'center',\n tabindex: 0,\n})\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n if (val >= Number.MAX_SAFE_INTEGER && coefficient === 1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the maximum safe integer limit.'\n )\n return val\n } else if (val <= Number.MIN_SAFE_INTEGER && coefficient === -1) {\n debugWarn(\n 'InputNumber',\n 'The value has reached the minimum safe integer limit.'\n )\n return val\n }\n\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst handleKeydown = (event: KeyboardEvent | Event) => {\n const code = getEventCode(event as KeyboardEvent)\n const key = getEventKey(event as KeyboardEvent)\n\n if (props.disabledScientific && ['e', 'E'].includes(key)) {\n event.preventDefault()\n return\n }\n\n switch (code) {\n case EVENT_CODE.up: {\n event.preventDefault()\n increase()\n break\n }\n case EVENT_CODE.down: {\n event.preventDefault()\n decrease()\n break\n }\n }\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n setCurrentValueToModelValue()\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = !value ? Number(value) : Number.parseFloat(String(value))\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(\n Math.round(toPrecision(newVal / step)) * step,\n precision\n )\n if (newVal !== value) {\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n data.userInput = null\n if (oldVal === newVal && value) return\n emit(UPDATE_MODEL_EVENT, newVal!)\n if (oldVal !== newVal) {\n emit(CHANGE_EVENT, newVal!, oldVal!)\n }\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n let newVal = value === '' ? null : Number.parseFloat(value)\n if (Number.isNaN(newVal)) {\n newVal = null\n }\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number.parseFloat(value) : ''\n if (\n (isNumber(newVal) && !Number.isNaN(newVal)) ||\n (props.formatter && Number.isNaN(newVal)) ||\n newVal === ''\n ) {\n setCurrentValue(newVal)\n }\n setCurrentValueToModelValue()\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n data.userInput = null\n // When non-numeric content is entered into a numeric input box,\n // the content displayed on the page is not cleared after the value is cleared. #18533\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1398528\n if (data.currentValue === null && input.value?.input) {\n input.value.input.value = props.formatter?.('') ?? ''\n }\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst setCurrentValueToModelValue = () => {\n if (data.currentValue !== props.modelValue) {\n data.currentValue = props.modelValue\n }\n}\nconst handleWheel = (e: WheelEvent) => {\n if (document.activeElement === e.target) e.preventDefault()\n}\n\nwatch(\n () => props.modelValue,\n (value, oldValue) => {\n const newValue = verifyValue(value, true)\n if (data.userInput === null && newValue !== oldValue) {\n data.currentValue = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n () => props.precision,\n () => {\n data.currentValue = verifyValue(props.modelValue)\n }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute(\n 'aria-valuenow',\n data.currentValue || data.currentValue === 0\n ? String(data.currentValue)\n : ''\n )\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n innerInput.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue ?? ''}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"mappings":""}
|
|
@@ -24,20 +24,20 @@ declare const __VLS_base: vue.DefineComponent<InputOtpProps, {
|
|
|
24
24
|
*/
|
|
25
25
|
blur: () => void;
|
|
26
26
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
27
|
-
blur: (eve: FocusEvent) => void;
|
|
28
|
-
focus: (eve: FocusEvent) => void;
|
|
29
27
|
change: (value: string) => void;
|
|
30
28
|
"update:modelValue": (value: string) => void;
|
|
29
|
+
focus: (eve: FocusEvent) => void;
|
|
30
|
+
blur: (eve: FocusEvent) => void;
|
|
31
31
|
finish: (value: string) => void;
|
|
32
32
|
}, string, vue.PublicProps, Readonly<InputOtpProps> & Readonly<{
|
|
33
33
|
onChange?: ((value: string) => any) | undefined;
|
|
34
|
-
onBlur?: ((eve: FocusEvent) => any) | undefined;
|
|
35
|
-
onFocus?: ((eve: FocusEvent) => any) | undefined;
|
|
36
34
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
35
|
+
onFocus?: ((eve: FocusEvent) => any) | undefined;
|
|
36
|
+
onBlur?: ((eve: FocusEvent) => any) | undefined;
|
|
37
37
|
onFinish?: ((value: string) => any) | undefined;
|
|
38
38
|
}>, {
|
|
39
|
-
type: "outlined" | "filled" | "underlined";
|
|
40
39
|
length: number;
|
|
40
|
+
type: "outlined" | "filled" | "underlined";
|
|
41
41
|
size: ComponentSize;
|
|
42
42
|
disabled: boolean;
|
|
43
43
|
validateEvent: boolean;
|
|
@@ -26,21 +26,21 @@ declare const __VLS_base: vue.DefineComponent<InputTagProps, {
|
|
|
26
26
|
focus: () => void;
|
|
27
27
|
blur: () => void;
|
|
28
28
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
29
|
-
blur: (evt: FocusEvent) => void;
|
|
30
|
-
focus: (evt: FocusEvent) => void;
|
|
31
29
|
change: (value?: string[] | undefined) => void;
|
|
32
30
|
"update:modelValue": (value?: string[] | undefined) => void;
|
|
33
31
|
input: (value: string) => void;
|
|
32
|
+
focus: (evt: FocusEvent) => void;
|
|
33
|
+
blur: (evt: FocusEvent) => void;
|
|
34
34
|
clear: () => void;
|
|
35
35
|
"add-tag": (value: string | string[]) => void;
|
|
36
36
|
"remove-tag": (value: string, index: number) => void;
|
|
37
37
|
"drag-tag": (oldIndex: number, newIndex: number, value: string) => void;
|
|
38
38
|
}, string, vue.PublicProps, Readonly<InputTagProps> & Readonly<{
|
|
39
39
|
onChange?: ((value?: string[] | undefined) => any) | undefined;
|
|
40
|
-
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
41
|
-
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
42
|
-
onInput?: ((value: string) => any) | undefined;
|
|
43
40
|
"onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
|
|
41
|
+
onInput?: ((value: string) => any) | undefined;
|
|
42
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
43
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
44
44
|
onClear?: (() => any) | undefined;
|
|
45
45
|
"onAdd-tag"?: ((value: string | string[]) => any) | undefined;
|
|
46
46
|
"onRemove-tag"?: ((value: string, index: number) => any) | undefined;
|
|
@@ -14,9 +14,9 @@ declare const __VLS_base: vue.DefineComponent<LinkProps, {}, {}, {}, {}, vue.Com
|
|
|
14
14
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
16
|
type: "primary" | "success" | "warning" | "info" | "danger" | "default";
|
|
17
|
+
target: "_blank" | "_parent" | "_self" | "_top" | (string & NonNullable<unknown>);
|
|
17
18
|
underline: boolean | "always" | "never" | "hover";
|
|
18
19
|
href: string;
|
|
19
|
-
target: "_blank" | "_parent" | "_self" | "_top" | (string & NonNullable<unknown>);
|
|
20
20
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -233,7 +233,7 @@ declare const mentionProps: {
|
|
|
233
233
|
};
|
|
234
234
|
type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
|
|
235
235
|
resize: {
|
|
236
|
-
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "
|
|
236
|
+
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
|
|
237
237
|
readonly required: false;
|
|
238
238
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
239
239
|
__epPropKey: true;
|
|
@@ -9,11 +9,11 @@ import * as vue from "vue";
|
|
|
9
9
|
//#region ../../packages/components/mention/src/mention.vue.d.ts
|
|
10
10
|
declare const __VLS_export: <T extends MentionOption = MentionOption>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
11
|
props: vue.PublicProps & __VLS_PrettifyLocal<MentionProps<T> & {
|
|
12
|
-
|
|
13
|
-
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
12
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
13
|
onInput?: ((value: string) => any) | undefined;
|
|
14
|
+
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
15
|
+
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
15
16
|
onSelect?: ((option: MentionOption, prefix: string) => any) | undefined;
|
|
16
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
17
17
|
onSearch?: ((pattern: string, prefix: string) => any) | undefined;
|
|
18
18
|
"onWhole-remove"?: ((pattern: string, prefix: string) => any) | undefined;
|
|
19
19
|
}> & (typeof globalThis extends {
|
|
@@ -48,7 +48,7 @@ declare const __VLS_export: <T extends MentionOption = MentionOption>(__VLS_prop
|
|
|
48
48
|
index: number;
|
|
49
49
|
}) => any;
|
|
50
50
|
};
|
|
51
|
-
emit: ((event: "
|
|
51
|
+
emit: ((event: "update:modelValue", value: string) => void) & ((event: "input", value: string) => void) & ((event: "focus", evt: FocusEvent) => void) & ((event: "blur", evt: FocusEvent) => void) & ((event: "select", option: MentionOption, prefix: string) => void) & ((event: "search", pattern: string, prefix: string) => void) & ((event: "whole-remove", pattern: string, prefix: string) => void);
|
|
52
52
|
}>) => vue.VNode & {
|
|
53
53
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
54
54
|
};
|
|
@@ -9,12 +9,12 @@ import { NavigationFailure } from "vue-router";
|
|
|
9
9
|
|
|
10
10
|
//#region ../../packages/components/menu/src/menu.d.ts
|
|
11
11
|
declare const menuProps: {
|
|
12
|
-
readonly mode: EpPropFinalized<StringConstructor, "
|
|
12
|
+
readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
13
13
|
readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
14
14
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
15
15
|
readonly uniqueOpened: BooleanConstructor;
|
|
16
16
|
readonly router: BooleanConstructor;
|
|
17
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
17
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
|
|
18
18
|
readonly collapse: BooleanConstructor;
|
|
19
19
|
readonly backgroundColor: StringConstructor;
|
|
20
20
|
readonly textColor: StringConstructor;
|
|
@@ -45,12 +45,12 @@ declare const menuEmits: {
|
|
|
45
45
|
};
|
|
46
46
|
type MenuEmits = typeof menuEmits;
|
|
47
47
|
declare const _default: vue.DefineComponent<ExtractPropTypes<{
|
|
48
|
-
readonly mode: EpPropFinalized<StringConstructor, "
|
|
48
|
+
readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
49
49
|
readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
50
50
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
51
51
|
readonly uniqueOpened: BooleanConstructor;
|
|
52
52
|
readonly router: BooleanConstructor;
|
|
53
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
53
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
|
|
54
54
|
readonly collapse: BooleanConstructor;
|
|
55
55
|
readonly backgroundColor: StringConstructor;
|
|
56
56
|
readonly textColor: StringConstructor;
|
|
@@ -78,12 +78,12 @@ declare const _default: vue.DefineComponent<ExtractPropTypes<{
|
|
|
78
78
|
open: (index: string, indexPath: string[]) => boolean;
|
|
79
79
|
select: (index: string, indexPath: string[], item: MenuItemClicked, routerResult?: Promise<void | NavigationFailure>) => boolean;
|
|
80
80
|
}, string, vue.PublicProps, Readonly<ExtractPropTypes<{
|
|
81
|
-
readonly mode: EpPropFinalized<StringConstructor, "
|
|
81
|
+
readonly mode: EpPropFinalized<StringConstructor, "horizontal" | "vertical", unknown, "vertical", boolean>;
|
|
82
82
|
readonly defaultActive: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
83
83
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
84
84
|
readonly uniqueOpened: BooleanConstructor;
|
|
85
85
|
readonly router: BooleanConstructor;
|
|
86
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
86
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "hover" | "click", unknown, "hover", boolean>;
|
|
87
87
|
readonly collapse: BooleanConstructor;
|
|
88
88
|
readonly backgroundColor: StringConstructor;
|
|
89
89
|
readonly textColor: StringConstructor;
|
|
@@ -112,12 +112,12 @@ declare const _default: vue.DefineComponent<ExtractPropTypes<{
|
|
|
112
112
|
readonly collapse: boolean;
|
|
113
113
|
readonly ellipsis: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
114
114
|
readonly persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
115
|
-
readonly mode: EpPropMergeType<StringConstructor, "
|
|
115
|
+
readonly mode: EpPropMergeType<StringConstructor, "horizontal" | "vertical", unknown>;
|
|
116
116
|
readonly showTimeout: number;
|
|
117
117
|
readonly hideTimeout: number;
|
|
118
118
|
readonly defaultActive: string;
|
|
119
119
|
readonly defaultOpeneds: string[];
|
|
120
|
-
readonly menuTrigger: EpPropMergeType<StringConstructor, "
|
|
120
|
+
readonly menuTrigger: EpPropMergeType<StringConstructor, "hover" | "click", unknown>;
|
|
121
121
|
readonly collapseTransition: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
122
122
|
readonly popperOffset: number;
|
|
123
123
|
readonly ellipsisIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
@@ -131,7 +131,7 @@ declare const messageProps: {
|
|
|
131
131
|
readonly prototype: any;
|
|
132
132
|
}) | null)[], unknown, unknown, undefined, boolean>;
|
|
133
133
|
readonly showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
134
|
-
readonly type: EpPropFinalized<StringConstructor, "
|
|
134
|
+
readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "error", unknown, "info", boolean>;
|
|
135
135
|
readonly plain: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
136
136
|
readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 16, boolean>;
|
|
137
137
|
readonly placement: EpPropFinalized<StringConstructor, "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, undefined, boolean>;
|
|
@@ -19,10 +19,9 @@ declare const __VLS_base: vue.DefineComponent<MessageProps, {
|
|
|
19
19
|
}, string, vue.PublicProps, Readonly<MessageProps> & Readonly<{
|
|
20
20
|
onDestroy?: (() => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
|
-
offset: number;
|
|
23
|
-
duration: number;
|
|
24
22
|
type: MessageType;
|
|
25
23
|
zIndex: number;
|
|
24
|
+
offset: number;
|
|
26
25
|
onClose: () => void;
|
|
27
26
|
id: string;
|
|
28
27
|
icon: IconPropType;
|
|
@@ -30,6 +29,7 @@ declare const __VLS_base: vue.DefineComponent<MessageProps, {
|
|
|
30
29
|
plain: boolean;
|
|
31
30
|
message: string | vue.VNode | (() => vue.VNode);
|
|
32
31
|
showClose: boolean;
|
|
32
|
+
duration: number;
|
|
33
33
|
customClass: string;
|
|
34
34
|
dangerouslyUseHTMLString: boolean;
|
|
35
35
|
grouping: boolean;
|
|
@@ -113,7 +113,7 @@ declare const notificationProps: {
|
|
|
113
113
|
readonly position: EpPropFinalized<StringConstructor, "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, "top-right", boolean>;
|
|
114
114
|
readonly showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
115
115
|
readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
116
|
-
readonly type: EpPropFinalized<StringConstructor, "" | "
|
|
116
|
+
readonly type: EpPropFinalized<StringConstructor, "" | "info" | "primary" | "success" | "warning" | "error", unknown, "", boolean>;
|
|
117
117
|
readonly zIndex: NumberConstructor;
|
|
118
118
|
readonly closeIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
|
119
119
|
};
|
|
@@ -18,16 +18,16 @@ declare const __VLS_base: vue.DefineComponent<NotificationProps, {
|
|
|
18
18
|
}, string, vue.PublicProps, Readonly<NotificationProps> & Readonly<{
|
|
19
19
|
onDestroy?: (() => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
|
-
offset: number;
|
|
22
|
-
duration: number;
|
|
23
21
|
type: NotificationType;
|
|
24
|
-
|
|
25
|
-
title: string;
|
|
22
|
+
offset: number;
|
|
26
23
|
position: NotificationPosition;
|
|
24
|
+
title: string;
|
|
27
25
|
id: string;
|
|
26
|
+
onClick: () => void;
|
|
28
27
|
message: string | vue.VNode | (() => vue.VNode);
|
|
29
28
|
closeIcon: IconPropType;
|
|
30
29
|
showClose: boolean;
|
|
30
|
+
duration: number;
|
|
31
31
|
customClass: string;
|
|
32
32
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -20,17 +20,17 @@ declare const __VLS_base: vue.DefineComponent<PopconfirmProps, {
|
|
|
20
20
|
popperRef: vue.ComputedRef<PopperInstance | undefined>;
|
|
21
21
|
hide: () => void;
|
|
22
22
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
23
|
-
cancel: (e: MouseEvent) => void;
|
|
24
23
|
confirm: (e: MouseEvent) => void;
|
|
24
|
+
cancel: (e: MouseEvent) => void;
|
|
25
25
|
}, string, vue.PublicProps, Readonly<PopconfirmProps> & Readonly<{
|
|
26
|
-
onCancel?: ((e: MouseEvent) => any) | undefined;
|
|
27
26
|
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
|
27
|
+
onCancel?: ((e: MouseEvent) => any) | undefined;
|
|
28
28
|
}>, {
|
|
29
|
+
width: string | number;
|
|
29
30
|
teleported: boolean;
|
|
30
31
|
effect: PopperEffect;
|
|
31
32
|
icon: IconPropType;
|
|
32
33
|
hideAfter: number;
|
|
33
|
-
width: string | number;
|
|
34
34
|
confirmButtonType: ButtonType;
|
|
35
35
|
cancelButtonType: ButtonType;
|
|
36
36
|
iconColor: string;
|
|
@@ -115,7 +115,7 @@ interface PopoverProps {
|
|
|
115
115
|
* @deprecated Removed after 3.0.0, Use `PopoverProps` instead.
|
|
116
116
|
*/
|
|
117
117
|
declare const popoverProps: {
|
|
118
|
-
readonly trigger: EpPropFinalized<(new (...args: any[]) => "
|
|
118
|
+
readonly trigger: EpPropFinalized<(new (...args: any[]) => "focus" | "hover" | "click" | "contextmenu" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>) | (((new (...args: any[]) => "focus" | "hover" | "click" | "contextmenu" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>)) | null)[], unknown, unknown, "hover", boolean>;
|
|
119
119
|
readonly triggerKeys: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => string[], boolean>;
|
|
120
120
|
readonly placement: EpPropFinalized<(new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement$1) | (((new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement$1)) | null)[], unknown, unknown, "bottom", boolean>;
|
|
121
121
|
readonly disabled: BooleanConstructor;
|
|
@@ -248,7 +248,7 @@ declare const popoverProps: {
|
|
|
248
248
|
};
|
|
249
249
|
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
250
250
|
readonly appendTo: {
|
|
251
|
-
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() =>
|
|
251
|
+
readonly type: PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>>;
|
|
252
252
|
readonly required: false;
|
|
253
253
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
254
254
|
__epPropKey: true;
|
|
@@ -32,12 +32,13 @@ declare const __VLS_base: vue.DefineComponent<PopoverProps, {
|
|
|
32
32
|
"onAfter-enter"?: (() => any) | undefined;
|
|
33
33
|
"onAfter-leave"?: (() => any) | undefined;
|
|
34
34
|
}>, {
|
|
35
|
+
width: string | number;
|
|
36
|
+
content: string;
|
|
35
37
|
offset: number;
|
|
36
38
|
teleported: boolean;
|
|
37
39
|
effect: PopperEffect;
|
|
38
40
|
tabindex: string | number;
|
|
39
41
|
visible: boolean | null;
|
|
40
|
-
content: string;
|
|
41
42
|
enterable: boolean;
|
|
42
43
|
popperStyle: string | false | vue.CSSProperties | vue.StyleValue[] | null;
|
|
43
44
|
placement: Placement;
|
|
@@ -49,7 +50,6 @@ declare const __VLS_base: vue.DefineComponent<PopoverProps, {
|
|
|
49
50
|
autoClose: number;
|
|
50
51
|
trigger: Arrayable<TooltipTriggerType>;
|
|
51
52
|
triggerKeys: string[];
|
|
52
|
-
width: string | number;
|
|
53
53
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
54
54
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
55
|
declare const _default: typeof __VLS_export;
|
|
@@ -4,7 +4,7 @@ import { SetupContext } from "vue";
|
|
|
4
4
|
|
|
5
5
|
//#region ../../packages/components/popper/src/composables/use-focus-trap.d.ts
|
|
6
6
|
declare const usePopperContentFocusTrap: (props: PopperContentProps, emit: SetupContext<PopperContentEmits>["emit"]) => {
|
|
7
|
-
focusStartRef: vue.Ref<
|
|
7
|
+
focusStartRef: vue.Ref<HTMLElement | "first" | "container" | undefined, HTMLElement | "first" | "container" | undefined>;
|
|
8
8
|
trapped: vue.Ref<boolean, boolean>;
|
|
9
9
|
onFocusAfterReleased: (event: CustomEvent) => void;
|
|
10
10
|
onFocusAfterTrapped: () => void;
|
|
@@ -28,17 +28,17 @@ declare const __VLS_base: vue.DefineComponent<PopperContentProps, {
|
|
|
28
28
|
*/
|
|
29
29
|
contentStyle: vue.ComputedRef<vue.StyleValue[]>;
|
|
30
30
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
31
|
-
blur: () => void;
|
|
32
31
|
close: () => void;
|
|
33
32
|
focus: () => void;
|
|
34
|
-
|
|
33
|
+
blur: () => void;
|
|
35
34
|
mouseleave: (evt: MouseEvent) => void;
|
|
35
|
+
mouseenter: (evt: MouseEvent) => void;
|
|
36
36
|
}, string, vue.PublicProps, Readonly<PopperContentProps> & Readonly<{
|
|
37
|
-
onBlur?: (() => any) | undefined;
|
|
38
37
|
onClose?: (() => any) | undefined;
|
|
39
38
|
onFocus?: (() => any) | undefined;
|
|
40
|
-
|
|
39
|
+
onBlur?: (() => any) | undefined;
|
|
41
40
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
41
|
+
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
42
42
|
}>, {
|
|
43
43
|
offset: number;
|
|
44
44
|
effect: PopperEffect;
|
|
@@ -14,15 +14,15 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
default?: (props: typeof __VLS_3) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: vue.DefineComponent<ProgressProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
|
|
17
|
-
|
|
17
|
+
width: number;
|
|
18
18
|
type: "line" | "circle" | "dashboard";
|
|
19
19
|
color: string | ProgressColor[] | ProgressFn;
|
|
20
20
|
strokeLinecap: NonNullable<vue.SVGAttributes["stroke-linecap"]>;
|
|
21
21
|
strokeWidth: number;
|
|
22
|
-
width: number;
|
|
23
22
|
format: ProgressFn;
|
|
24
23
|
percentage: number;
|
|
25
24
|
status: "" | "success" | "exception" | "warning";
|
|
25
|
+
duration: number;
|
|
26
26
|
showText: boolean;
|
|
27
27
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,9 +14,9 @@ declare const __VLS_base: vue.DefineComponent<RadioGroupProps, {}, {}, {}, {}, v
|
|
|
14
14
|
onChange?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
15
15
|
"onUpdate:modelValue"?: ((val: string | number | boolean | undefined) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
type: "radio" | "button";
|
|
18
17
|
fill: string;
|
|
19
18
|
props: radioOptionProp;
|
|
19
|
+
type: "radio" | "button";
|
|
20
20
|
id: string;
|
|
21
21
|
disabled: boolean;
|
|
22
22
|
modelValue: string | number | boolean;
|
|
@@ -32,7 +32,7 @@ interface ResultProps {
|
|
|
32
32
|
declare const resultProps: {
|
|
33
33
|
readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
34
34
|
readonly subTitle: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
35
|
-
readonly icon: EpPropFinalized<StringConstructor, "
|
|
35
|
+
readonly icon: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "error", unknown, "info", boolean>;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* @deprecated Removed after 3.0.0, Use `ResultProps` instead.
|
|
@@ -23,7 +23,7 @@ declare const rovingFocusGroupProps: {
|
|
|
23
23
|
loop: BooleanConstructor;
|
|
24
24
|
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
|
25
25
|
orientation: {
|
|
26
|
-
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "
|
|
26
|
+
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
|
27
27
|
readonly required: false;
|
|
28
28
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
29
29
|
__epPropKey: true;
|
|
@@ -38,7 +38,7 @@ declare const __VLS_export: vue.DefineComponent<{}, {}, {}, {}, {}, vue.Componen
|
|
|
38
38
|
loop: BooleanConstructor;
|
|
39
39
|
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
|
40
40
|
orientation: {
|
|
41
|
-
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "
|
|
41
|
+
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
|
42
42
|
readonly required: false;
|
|
43
43
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
44
44
|
__epPropKey: true;
|
|
@@ -63,7 +63,7 @@ declare const __VLS_export: vue.DefineComponent<{}, {}, {}, {}, {}, vue.Componen
|
|
|
63
63
|
loop: BooleanConstructor;
|
|
64
64
|
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
|
65
65
|
orientation: {
|
|
66
|
-
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "
|
|
66
|
+
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
|
67
67
|
readonly required: false;
|
|
68
68
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
69
69
|
__epPropKey: true;
|
|
@@ -29,8 +29,8 @@ declare const __VLS_base: vue.DefineComponent<ScrollbarProps, {
|
|
|
29
29
|
}) => any) | undefined;
|
|
30
30
|
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
|
-
tabindex: number | string;
|
|
33
32
|
height: number | string;
|
|
33
|
+
tabindex: number | string;
|
|
34
34
|
maxHeight: number | string;
|
|
35
35
|
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
36
36
|
distance: number;
|
|
@@ -62,7 +62,7 @@ interface SegmentedProps<T extends Option = Option> {
|
|
|
62
62
|
*/
|
|
63
63
|
declare const segmentedProps: {
|
|
64
64
|
ariaLabel: StringConstructor;
|
|
65
|
-
direction: EpPropFinalized<(new (...args: any[]) => "
|
|
65
|
+
direction: EpPropFinalized<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical") | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical")) | null)[], unknown, unknown, string, boolean>;
|
|
66
66
|
options: EpPropFinalized<(new (...args: any[]) => Option[]) | (() => Option[]) | (((new (...args: any[]) => Option[]) | (() => Option[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
67
67
|
modelValue: EpPropFinalized<(BooleanConstructor | NumberConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
68
68
|
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
|
@@ -115,7 +115,7 @@ declare const selectProps: {
|
|
|
115
115
|
fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, string[], boolean>;
|
|
116
116
|
tabindex: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, number, boolean>;
|
|
117
117
|
appendTo: {
|
|
118
|
-
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() =>
|
|
118
|
+
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>>;
|
|
119
119
|
readonly required: false;
|
|
120
120
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
121
121
|
__epPropKey: true;
|