@element-plus/nightly 0.0.20260623 → 0.0.20260625
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 +5 -5
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +5 -5
- 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/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +1 -1
- package/es/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/style/css.mjs +1 -1
- package/es/components/autocomplete/style/index.mjs +1 -1
- package/es/components/badge/src/badge.d.ts +1 -1
- package/es/components/badge/src/badge.vue.d.ts +1 -1
- package/es/components/button/src/button-group.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 +2 -2
- package/es/components/button/src/use-button.d.ts +1 -1
- package/es/components/calendar/style/css.mjs +1 -1
- package/es/components/calendar/style/index.mjs +1 -1
- package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
- package/es/components/carousel/src/carousel.d.ts +1 -1
- package/es/components/cascader/src/cascader.d.ts +2 -2
- package/es/components/cascader/src/cascader.vue.d.ts +9 -9
- package/es/components/cascader/style/css.mjs +1 -1
- package/es/components/cascader/style/index.mjs +1 -1
- package/es/components/cascader-panel/src/index.vue.d.ts +3 -3
- package/es/components/check-tag/src/check-tag.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +7 -7
- package/es/components/checkbox/src/checkbox-group.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +5 -5
- package/es/components/checkbox/src/checkbox.vue.d.ts +7 -7
- package/es/components/col/src/col.vue.d.ts +1 -1
- package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/es/components/collapse/src/collapse.d.ts +1 -1
- package/es/components/collapse/src/collapse.vue.d.ts +2 -2
- package/es/components/color-picker/src/color-picker.d.ts +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +6 -6
- package/es/components/color-picker-panel/src/color-picker-panel.d.ts +1 -1
- package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +2 -2
- package/es/components/config-provider/src/config-provider.d.ts +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +7 -7
- package/es/components/date-picker/src/props.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +1 -1
- package/es/components/date-picker-panel/src/date-picker-panel.d.ts +3 -3
- package/es/components/date-picker-panel/src/panel-utils.d.ts +12 -12
- package/es/components/descriptions/src/description-item.d.ts +9 -9
- package/es/components/descriptions/src/description.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +4 -4
- package/es/components/divider/src/divider.d.ts +1 -1
- package/es/components/divider/src/divider.vue.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +4 -4
- package/es/components/dropdown/src/dropdown.d.ts +3 -3
- package/es/components/dropdown/src/dropdown.vue.d.ts +36 -36
- package/es/components/dropdown/style/css.mjs +2 -2
- package/es/components/dropdown/style/index.mjs +2 -2
- package/es/components/form/src/form-item.d.ts +1 -1
- package/es/components/form/src/form.d.ts +2 -2
- package/es/components/image/src/image.vue.d.ts +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +4 -4
- package/es/components/input-number/src/input-number.d.ts +2 -2
- package/es/components/input-number/src/input-number.vue.d.ts +5 -5
- package/es/components/input-otp/src/input-otp.d.ts +1 -1
- package/es/components/input-otp/src/input-otp.mjs.map +1 -1
- package/es/components/input-otp/src/input-otp.vue.d.ts +4 -6
- package/es/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.mjs +4 -4
- package/es/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/input-otp/src/input-otp2.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.d.ts +1 -1
- package/es/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/es/components/link/src/link.d.ts +1 -1
- package/es/components/mention/style/css.mjs +1 -1
- package/es/components/mention/style/index.mjs +1 -1
- package/es/components/menu/src/menu.d.ts +4 -4
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/message/src/message.vue.d.ts +3 -3
- package/es/components/message-box/src/index.vue.d.ts +23 -23
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +2 -2
- package/es/components/page-header/src/page-header.vue.d.ts +1 -1
- package/es/components/pagination/src/pagination.d.ts +1 -1
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/es/components/popover/src/popover.d.ts +2 -2
- package/es/components/popover/src/popover.vue.d.ts +1 -1
- package/es/components/popper/src/composables/use-content.d.ts +2 -2
- package/es/components/radio/src/radio-button.vue.d.ts +3 -3
- package/es/components/radio/src/radio-group.vue.d.ts +6 -6
- package/es/components/radio/src/radio.vue.d.ts +5 -5
- package/es/components/rate/src/rate.vue.d.ts +3 -3
- package/es/components/result/src/result.d.ts +1 -1
- package/es/components/result/src/result.vue.d.ts +1 -1
- package/es/components/row/src/row.vue.d.ts +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
- package/es/components/segmented/index.d.ts +3 -3
- package/es/components/segmented/src/segmented.vue.d.ts +2 -2
- package/es/components/select/src/select.d.ts +2 -2
- package/es/components/select/src/select.vue.d.ts +33 -33
- package/es/components/select/style/css.mjs +1 -1
- package/es/components/select/style/index.mjs +1 -1
- package/es/components/select-v2/src/defaults.d.ts +2 -2
- package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +30 -30
- package/es/components/select-v2/style/css.mjs +1 -1
- package/es/components/select-v2/style/index.mjs +1 -1
- package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/es/components/slider/src/slider.vue.d.ts +8 -8
- package/es/components/steps/src/item.d.ts +1 -1
- package/es/components/steps/src/item.vue.d.ts +1 -1
- package/es/components/steps/src/steps.d.ts +2 -2
- package/es/components/switch/src/switch.vue.d.ts +4 -4
- package/es/components/table/src/filter-panel.vue.d.ts +48 -48
- package/es/components/table/src/table-header/index.d.ts +20 -20
- package/es/components/table/style/css.mjs +1 -1
- package/es/components/table/style/index.mjs +1 -1
- package/es/components/table-v2/src/components/row.d.ts +1 -1
- package/es/components/table-v2/src/table-grid.d.ts +2 -2
- package/es/components/table-v2/src/table-v2.d.ts +3 -3
- package/es/components/tabs/src/tab-nav.d.ts +1 -1
- package/es/components/tabs/src/tabs.d.ts +5 -5
- package/es/components/tag/src/tag.d.ts +1 -1
- package/es/components/text/src/text.d.ts +1 -1
- package/es/components/text/src/text.vue.d.ts +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +9 -9
- package/es/components/time-picker/src/common/props.d.ts +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +7 -7
- package/es/components/time-picker/style/css.mjs +1 -1
- package/es/components/time-picker/style/index.mjs +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +3 -3
- package/es/components/time-select/style/css.mjs +1 -1
- package/es/components/time-select/style/index.mjs +1 -1
- package/es/components/timeline/src/timeline-item.d.ts +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +3 -3
- package/es/components/tooltip/src/trigger.d.ts +1 -1
- package/es/components/tour/src/content.d.ts +1 -1
- package/es/components/tour/src/step.d.ts +2 -2
- package/es/components/tour/src/step.vue.d.ts +1 -1
- package/es/components/tour/src/tour.d.ts +2 -2
- package/es/components/tour/src/tour.vue.d.ts +4 -4
- package/es/components/transfer/src/transfer.vue.d.ts +2 -2
- package/es/components/tree/src/tree-node.vue.d.ts +21 -21
- package/es/components/tree/src/tree.vue.d.ts +27 -27
- package/es/components/tree-select/src/tree-select.vue.d.ts +23 -23
- package/es/components/tree-v2/src/tree.vue.d.ts +3 -3
- package/es/components/upload/src/upload.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/es/hooks/use-floating/index.d.ts +4 -4
- package/es/hooks/use-popper/index.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +1 -1
- package/lib/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/style/css.js +1 -1
- package/lib/components/autocomplete/style/index.js +1 -1
- package/lib/components/badge/src/badge.d.ts +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +1 -1
- package/lib/components/button/src/button-group.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 +2 -2
- package/lib/components/button/src/use-button.d.ts +1 -1
- package/lib/components/calendar/style/css.js +1 -1
- package/lib/components/calendar/style/index.js +1 -1
- package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
- package/lib/components/carousel/src/carousel.d.ts +1 -1
- package/lib/components/cascader/src/cascader.d.ts +2 -2
- package/lib/components/cascader/src/cascader.vue.d.ts +9 -9
- package/lib/components/cascader/style/css.js +1 -1
- package/lib/components/cascader/style/index.js +1 -1
- package/lib/components/cascader-panel/src/index.vue.d.ts +3 -3
- package/lib/components/check-tag/src/check-tag.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +7 -7
- package/lib/components/checkbox/src/checkbox-group.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +5 -5
- package/lib/components/checkbox/src/checkbox.vue.d.ts +7 -7
- package/lib/components/col/src/col.vue.d.ts +1 -1
- package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/lib/components/collapse/src/collapse.d.ts +1 -1
- package/lib/components/collapse/src/collapse.vue.d.ts +2 -2
- package/lib/components/color-picker/src/color-picker.d.ts +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +6 -6
- package/lib/components/color-picker-panel/src/color-picker-panel.d.ts +1 -1
- package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +2 -2
- package/lib/components/config-provider/src/config-provider.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +7 -7
- package/lib/components/date-picker/src/props.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-month-range.vue.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-year-range.vue.d.ts +1 -1
- package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +3 -3
- package/lib/components/date-picker-panel/src/panel-utils.d.ts +12 -12
- package/lib/components/descriptions/src/description-item.d.ts +9 -9
- package/lib/components/descriptions/src/description.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +4 -4
- package/lib/components/divider/src/divider.d.ts +1 -1
- package/lib/components/divider/src/divider.vue.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +4 -4
- package/lib/components/dropdown/src/dropdown.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown.vue.d.ts +36 -36
- package/lib/components/dropdown/style/css.js +2 -2
- package/lib/components/dropdown/style/index.js +2 -2
- package/lib/components/form/src/form-item.d.ts +1 -1
- package/lib/components/form/src/form.d.ts +2 -2
- package/lib/components/image/src/image.vue.d.ts +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +4 -4
- package/lib/components/input-number/src/input-number.d.ts +2 -2
- package/lib/components/input-number/src/input-number.vue.d.ts +5 -5
- package/lib/components/input-otp/src/input-otp.d.ts +1 -1
- package/lib/components/input-otp/src/input-otp.js.map +1 -1
- package/lib/components/input-otp/src/input-otp.vue.d.ts +4 -6
- package/lib/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.js +3 -3
- package/lib/components/input-otp/src/input-otp.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/input-otp/src/input-otp2.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.d.ts +1 -1
- package/lib/components/input-tag/src/input-tag.vue.d.ts +4 -4
- package/lib/components/link/src/link.d.ts +1 -1
- package/lib/components/mention/style/css.js +1 -1
- package/lib/components/mention/style/index.js +1 -1
- package/lib/components/menu/src/menu.d.ts +4 -4
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/message/src/message.vue.d.ts +3 -3
- package/lib/components/message-box/src/index.vue.d.ts +23 -23
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +2 -2
- package/lib/components/page-header/src/page-header.vue.d.ts +1 -1
- package/lib/components/pagination/src/pagination.d.ts +1 -1
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/lib/components/popover/src/popover.d.ts +2 -2
- package/lib/components/popover/src/popover.vue.d.ts +1 -1
- package/lib/components/popper/src/composables/use-content.d.ts +2 -2
- package/lib/components/radio/src/radio-button.vue.d.ts +3 -3
- package/lib/components/radio/src/radio-group.vue.d.ts +6 -6
- package/lib/components/radio/src/radio.vue.d.ts +5 -5
- package/lib/components/rate/src/rate.vue.d.ts +3 -3
- package/lib/components/result/src/result.d.ts +1 -1
- package/lib/components/result/src/result.vue.d.ts +1 -1
- package/lib/components/row/src/row.vue.d.ts +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
- package/lib/components/segmented/index.d.ts +3 -3
- package/lib/components/segmented/src/segmented.vue.d.ts +2 -2
- package/lib/components/select/src/select.d.ts +2 -2
- package/lib/components/select/src/select.vue.d.ts +33 -33
- package/lib/components/select/style/css.js +1 -1
- package/lib/components/select/style/index.js +1 -1
- package/lib/components/select-v2/src/defaults.d.ts +2 -2
- package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +30 -30
- package/lib/components/select-v2/style/css.js +1 -1
- package/lib/components/select-v2/style/index.js +1 -1
- package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +8 -8
- package/lib/components/steps/src/item.d.ts +1 -1
- package/lib/components/steps/src/item.vue.d.ts +1 -1
- package/lib/components/steps/src/steps.d.ts +2 -2
- package/lib/components/switch/src/switch.vue.d.ts +4 -4
- package/lib/components/table/src/filter-panel.vue.d.ts +48 -48
- package/lib/components/table/src/table-header/index.d.ts +20 -20
- package/lib/components/table/style/css.js +1 -1
- package/lib/components/table/style/index.js +1 -1
- package/lib/components/table-v2/src/components/row.d.ts +1 -1
- package/lib/components/table-v2/src/table-grid.d.ts +2 -2
- package/lib/components/table-v2/src/table-v2.d.ts +3 -3
- package/lib/components/tabs/src/tab-nav.d.ts +1 -1
- package/lib/components/tabs/src/tabs.d.ts +5 -5
- package/lib/components/tag/src/tag.d.ts +1 -1
- package/lib/components/text/src/text.d.ts +1 -1
- package/lib/components/text/src/text.vue.d.ts +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +9 -9
- package/lib/components/time-picker/src/common/props.d.ts +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +7 -7
- package/lib/components/time-picker/style/css.js +1 -1
- package/lib/components/time-picker/style/index.js +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +3 -3
- package/lib/components/time-select/style/css.js +1 -1
- package/lib/components/time-select/style/index.js +1 -1
- package/lib/components/timeline/src/timeline-item.d.ts +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -3
- package/lib/components/tooltip/src/trigger.d.ts +1 -1
- package/lib/components/tour/src/content.d.ts +1 -1
- package/lib/components/tour/src/step.d.ts +2 -2
- package/lib/components/tour/src/step.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.d.ts +2 -2
- package/lib/components/tour/src/tour.vue.d.ts +4 -4
- package/lib/components/transfer/src/transfer.vue.d.ts +2 -2
- package/lib/components/tree/src/tree-node.vue.d.ts +21 -21
- package/lib/components/tree/src/tree.vue.d.ts +27 -27
- package/lib/components/tree-select/src/tree-select.vue.d.ts +23 -23
- package/lib/components/tree-v2/src/tree.vue.d.ts +3 -3
- package/lib/components/upload/src/upload.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/lib/hooks/use-floating/index.d.ts +4 -4
- package/lib/hooks/use-popper/index.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-input-otp.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/input-otp.scss +1 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.vue_vue_type_script_setup_true_lang.mjs","names":["$slots"],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n size: 'default',\n disabled: undefined,\n validateEvent: true,\n})\nconst emit = defineEmits(inputOtpEmits)\n\nconst initialValue = computed(() => {\n const value = String(props.modelValue ?? '')\n return Array.from({ length: props.length }, (_, i) => value.charAt(i))\n})\n\nconst separators = computed(() => {\n const { separator } = props\n const _separator = isFunction(separator) ? separator : () => separator\n return Array.from({ length: props.length - 1 }, (_, i) => _separator(i))\n})\n\nconst innerValue = ref<string[]>(initialValue.value)\nconst isFocused = ref(false)\nconst inputRefs = ref<(HTMLInputElement | undefined)[]>([])\n\nconst ns = useNamespace('input-otp')\nconst { t } = useLocale()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst disabled = useFormDisabled()\nlet modelValueOnFocus = props.modelValue\n\nconst getFirstIndex = (maxIndex: number) => {\n const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex)\n return index === -1 ? maxIndex : index\n}\n\nconst handleFocus = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst updateModelValue = (emitFinish = true) => {\n const value = innerValue.value.join('').slice(0, props.length)\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n if (emitFinish && value.length === props.length) {\n emit('finish', value)\n }\n }\n}\n\nconst handleKeydown = (event: KeyboardEvent, index: number) => {\n const code = getEventCode(event)\n let preventDefault = true\n\n switch (code) {\n case EVENT_CODE.backspace:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index - 1)\n updateModelValue()\n break\n case EVENT_CODE.delete:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index)\n updateModelValue()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.left:\n focus(index - 1)\n break\n case EVENT_CODE.down:\n case EVENT_CODE.right:\n focus(index + 1)\n break\n default:\n preventDefault = false\n }\n\n if (preventDefault) {\n event.preventDefault()\n }\n}\n\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement\n const targetIndex = getFirstIndex(index)\n let focusIndex = targetIndex + 1\n let value = target.value\n\n // Safari and Firefox do not trigger the paste event during autofill,\n // so the paste logic needs to be handled in the input event\n if (value.length > 1) {\n const chars = castValues(value, targetIndex)\n\n // Avoid innerValue inconsistency with the input box value after pasting when char has no change\n target.value = innerValue.value[index] ?? ''\n\n chars.forEach((char, i) => (innerValue.value[targetIndex + i] = char))\n focus(targetIndex + chars.length)\n updateModelValue()\n return\n }\n\n if (!props.validator(value, targetIndex)) {\n target.value = innerValue.value[index] ?? ''\n value = target.value\n focusIndex = targetIndex\n }\n\n innerValue.value[targetIndex] = value\n if (targetIndex !== index) {\n target.value = innerValue.value[index] ?? ''\n }\n focus(focusIndex)\n updateModelValue()\n}\n\nconst castValues = (value: InputOtpProps['modelValue'], startIndex = 0) => {\n const chars = `${value ?? ''}`.split('')\n const result: string[] = []\n for (const char of chars) {\n if (result.length + startIndex >= props.length) {\n break\n }\n if (props.validator(char, result.length + startIndex)) {\n result.push(char)\n }\n }\n return result\n}\n\nconst focus = (index: number = 0) => {\n const focusIndex = clamp(index, 0, props.length - 1)\n const target = inputRefs.value?.[focusIndex]\n\n if (document.activeElement !== target) {\n target?.focus()\n }\n rAF(() => {\n // When it is called, the focus may have already been captured by another element.\n // e.g. typing quickly and deleting.\n if (!props.readonly && document.activeElement === target) {\n ;(target as HTMLInputElement | null)?.select()\n }\n })\n}\n\nconst blur = () => {\n const target = inputRefs.value?.find(\n (input) => document.activeElement === input\n )\n target?.blur()\n}\n\nwatch(\n () => props.modelValue,\n () => {\n innerValue.value = initialValue.value\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n }\n)\n\nwatch(\n () => props.length,\n () => {\n innerValue.value = initialValue.value\n updateModelValue(false)\n }\n)\n\nwatch(isFocused, (value) => {\n if (value) {\n modelValueOnFocus = props.modelValue\n return\n }\n if (modelValueOnFocus !== props.modelValue) {\n emit(CHANGE_EVENT, props.modelValue as string)\n }\n})\n\ndefineExpose({\n /**\n * @description HTML input elements array\n */\n inputRefs,\n /**\n * @description Focus an OTP input field\n */\n focus,\n /**\n * @description Blur the focused OTP input field\n */\n blur,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEA,MAAM,QAAQ;EAQd,MAAM,OAAO;EAEb,MA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A,CAAoB,MAAA,oBAAmB,GAAW,QAAA,aAAa,MAAA,EAAC,CAAA,yBAAA,GAAqC,KAAA;IAKrG,mBAAiB,MAAA,oBAAmB,GAAG,MAAA,SAAQ,EAAE,UAAU,KAAA;yBAE5D,mBA0BW,UAAA,MAAA,WA1BoB,QAAA,SAAb,GAAG,UAAK;4DAAmB,OAAK,EAAA,CAChD,mBAiBQ,SAAA,EAjBA,OAAK,eAAE,MAAA,GAAE,CAAC,EAAC,cAAA,CAAA,EAAA,EAAA,CACjB,mBAeE,SAAA;;cAdI;KAAJ,KAAI;KACH,OAAO,WAAA,MAAW;KAClB,OAAK,eAAE,MAAA,GAAE,CAAC,EAAC,QAAA,CAAA;KACX,MAAM,QAAA,OAAI,aAAA;KACV,UAAU,MAAA,SAAQ;KAClB,UAAU,QAAA;KACV,WAAW,QAAA;KACZ,cAAa;KACZ,cAAY,MAAA,EAAC,CAAA,4BAAA,EAAA,OAAsC,QAAK,GAAA,CAAA;KACxD,SAAO;KACP,QAAM;KACN,UAAK,WAAE,MAAM,MAAK;KAClB,YAAO,WAAE,cAAc,QAAQ,MAAK;KACpC,UAAK,WAAE,YAAY,QAAQ,MAAK;oCAI5BA,KAAAA,OAAO,aAAa,WAAA,MAAW,WAAW,QAAQ,QAAA,SAAM,IADjE,WAMO,KAAA,QAAA,aAAA;;KAHG;aAGH,EAAA,WAAA,EADL,YAA2C,8BAArB,WAAA,MAAW,OAAK,CAAA,EAAA,CAAA,GAAA,mBAAA,QAAA,KAAA,CAAA,EAAA,GAAA"}
|
|
1
|
+
{"version":3,"file":"input-otp.vue_vue_type_script_setup_true_lang.mjs","names":["$slots"],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n disabled: undefined,\n validateEvent: true,\n})\nconst emit = defineEmits(inputOtpEmits)\n\nconst initialValue = computed(() => {\n const value = String(props.modelValue ?? '')\n return Array.from({ length: props.length }, (_, i) => value.charAt(i))\n})\n\nconst separators = computed(() => {\n const { separator } = props\n const _separator = isFunction(separator) ? separator : () => separator\n return Array.from({ length: props.length - 1 }, (_, i) => _separator(i))\n})\n\nconst innerValue = ref<string[]>(initialValue.value)\nconst isFocused = ref(false)\nconst inputRefs = ref<(HTMLInputElement | undefined)[]>([])\n\nconst ns = useNamespace('input-otp')\nconst { t } = useLocale()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst size = useFormSize()\nconst disabled = useFormDisabled()\nlet modelValueOnFocus = props.modelValue\n\nconst getFirstIndex = (maxIndex: number) => {\n const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex)\n return index === -1 ? maxIndex : index\n}\n\nconst handleFocus = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst updateModelValue = (emitFinish = true) => {\n const value = innerValue.value.join('').slice(0, props.length)\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n if (emitFinish && value.length === props.length) {\n emit('finish', value)\n }\n }\n}\n\nconst handleKeydown = (event: KeyboardEvent, index: number) => {\n const code = getEventCode(event)\n let preventDefault = true\n\n switch (code) {\n case EVENT_CODE.backspace:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index - 1)\n updateModelValue()\n break\n case EVENT_CODE.delete:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index)\n updateModelValue()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.left:\n focus(index - 1)\n break\n case EVENT_CODE.down:\n case EVENT_CODE.right:\n focus(index + 1)\n break\n default:\n preventDefault = false\n }\n\n if (preventDefault) {\n event.preventDefault()\n }\n}\n\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement\n const targetIndex = getFirstIndex(index)\n let focusIndex = targetIndex + 1\n let value = target.value\n\n // Safari and Firefox do not trigger the paste event during autofill,\n // so the paste logic needs to be handled in the input event\n if (value.length > 1) {\n const chars = castValues(value, targetIndex)\n\n // Avoid innerValue inconsistency with the input box value after pasting when char has no change\n target.value = innerValue.value[index] ?? ''\n\n chars.forEach((char, i) => (innerValue.value[targetIndex + i] = char))\n focus(targetIndex + chars.length)\n updateModelValue()\n return\n }\n\n if (!props.validator(value, targetIndex)) {\n target.value = innerValue.value[index] ?? ''\n value = target.value\n focusIndex = targetIndex\n }\n\n innerValue.value[targetIndex] = value\n if (targetIndex !== index) {\n target.value = innerValue.value[index] ?? ''\n }\n focus(focusIndex)\n updateModelValue()\n}\n\nconst castValues = (value: InputOtpProps['modelValue'], startIndex = 0) => {\n const chars = `${value ?? ''}`.split('')\n const result: string[] = []\n for (const char of chars) {\n if (result.length + startIndex >= props.length) {\n break\n }\n if (props.validator(char, result.length + startIndex)) {\n result.push(char)\n }\n }\n return result\n}\n\nconst focus = (index: number = 0) => {\n const focusIndex = clamp(index, 0, props.length - 1)\n const target = inputRefs.value?.[focusIndex]\n\n if (document.activeElement !== target) {\n target?.focus()\n }\n rAF(() => {\n // When it is called, the focus may have already been captured by another element.\n // e.g. typing quickly and deleting.\n if (!props.readonly && document.activeElement === target) {\n ;(target as HTMLInputElement | null)?.select()\n }\n })\n}\n\nconst blur = () => {\n const target = inputRefs.value?.find(\n (input) => document.activeElement === input\n )\n target?.blur()\n}\n\nwatch(\n () => props.modelValue,\n () => {\n innerValue.value = initialValue.value\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n }\n)\n\nwatch(\n () => props.length,\n () => {\n innerValue.value = initialValue.value\n updateModelValue(false)\n }\n)\n\nwatch(isFocused, (value) => {\n if (value) {\n modelValueOnFocus = props.modelValue\n return\n }\n if (modelValueOnFocus !== props.modelValue) {\n emit(CHANGE_EVENT, props.modelValue as string)\n }\n})\n\ndefineExpose({\n /**\n * @description HTML input elements array\n */\n inputRefs,\n /**\n * @description Focus an OTP input field\n */\n focus,\n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
{"version":3,"file":"input-otp2.mjs","names":[],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n
|
|
1
|
+
{"version":3,"file":"input-otp2.mjs","names":[],"sources":["../../../../../../packages/components/input-otp/src/input-otp.vue"],"sourcesContent":["<template>\n <div\n :id=\"inputId\"\n :class=\"[ns.b(), ns.m(size), ns.m(type), ns.is('disabled', disabled)]\"\n role=\"group\"\n :aria-label=\"\n !isLabeledByFormItem\n ? ariaLabel || t('el.inputOTP.groupLabel')\n : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem?.labelId : undefined\"\n >\n <template v-for=\"(_, index) in length\" :key=\"index\">\n <label :class=\"ns.e('input-field')\">\n <input\n ref=\"inputRefs\"\n :value=\"innerValue[index]\"\n :class=\"ns.e('input')\"\n :type=\"mask ? 'password' : 'text'\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :inputmode=\"inputmode\"\n autocomplete=\"one-time-code\"\n :aria-label=\"t('el.inputOTP.defaultLabel', { index: index + 1 })\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n @click=\"focus(index)\"\n @keydown=\"handleKeydown($event, index)\"\n @input=\"handleInput($event, index)\"\n />\n </label>\n <slot\n v-if=\"($slots.separator || separators[index]) && index < length - 1\"\n name=\"separator\"\n :index=\"index\"\n >\n <component :is=\"() => separators[index]\" />\n </slot>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { clamp } from '@vueuse/core'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { NOOP, getEventCode, isFunction, rAF } from '@element-plus/utils'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n CHANGE_EVENT,\n EVENT_CODE,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputOtpEmits } from './input-otp'\n\nimport type { InputOtpProps } from './input-otp'\n\ndefineOptions({\n name: 'ElInputOtp',\n})\n\nconst props = withDefaults(defineProps<InputOtpProps>(), {\n length: 6,\n validator: () => true,\n type: 'outlined',\n disabled: undefined,\n validateEvent: true,\n})\nconst emit = defineEmits(inputOtpEmits)\n\nconst initialValue = computed(() => {\n const value = String(props.modelValue ?? '')\n return Array.from({ length: props.length }, (_, i) => value.charAt(i))\n})\n\nconst separators = computed(() => {\n const { separator } = props\n const _separator = isFunction(separator) ? separator : () => separator\n return Array.from({ length: props.length - 1 }, (_, i) => _separator(i))\n})\n\nconst innerValue = ref<string[]>(initialValue.value)\nconst isFocused = ref(false)\nconst inputRefs = ref<(HTMLInputElement | undefined)[]>([])\n\nconst ns = useNamespace('input-otp')\nconst { t } = useLocale()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\nconst size = useFormSize()\nconst disabled = useFormDisabled()\nlet modelValueOnFocus = props.modelValue\n\nconst getFirstIndex = (maxIndex: number) => {\n const index = innerValue.value.findIndex((char, i) => !char && i <= maxIndex)\n return index === -1 ? maxIndex : index\n}\n\nconst handleFocus = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = true\n emit('focus', event)\n}\n\nconst handleBlur = (event: FocusEvent) => {\n if (inputRefs.value?.includes(event.relatedTarget as any)) {\n return\n }\n\n isFocused.value = false\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch(NOOP)\n }\n}\n\nconst updateModelValue = (emitFinish = true) => {\n const value = innerValue.value.join('').slice(0, props.length)\n if (value !== props.modelValue) {\n emit(UPDATE_MODEL_EVENT, value)\n if (emitFinish && value.length === props.length) {\n emit('finish', value)\n }\n }\n}\n\nconst handleKeydown = (event: KeyboardEvent, index: number) => {\n const code = getEventCode(event)\n let preventDefault = true\n\n switch (code) {\n case EVENT_CODE.backspace:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index - 1)\n updateModelValue()\n break\n case EVENT_CODE.delete:\n if (props.readonly) break\n innerValue.value[index] = ''\n focus(index)\n updateModelValue()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.left:\n focus(index - 1)\n break\n case EVENT_CODE.down:\n case EVENT_CODE.right:\n focus(index + 1)\n break\n default:\n preventDefault = false\n }\n\n if (preventDefault) {\n event.preventDefault()\n }\n}\n\nconst handleInput = (event: Event, index: number) => {\n const target = event.target as HTMLInputElement\n const targetIndex = getFirstIndex(index)\n let focusIndex = targetIndex + 1\n let value = target.value\n\n // Safari and Firefox do not trigger the paste event during autofill,\n // so the paste logic needs to be handled in the input event\n if (value.length > 1) {\n const chars = castValues(value, targetIndex)\n\n // Avoid innerValue inconsistency with the input box value after pasting when char has no change\n target.value = innerValue.value[index] ?? ''\n\n chars.forEach((char, i) => (innerValue.value[targetIndex + i] = char))\n focus(targetIndex + chars.length)\n updateModelValue()\n return\n }\n\n if (!props.validator(value, targetIndex)) {\n target.value = innerValue.value[index] ?? ''\n value = target.value\n focusIndex = targetIndex\n }\n\n innerValue.value[targetIndex] = value\n if (targetIndex !== index) {\n target.value = innerValue.value[index] ?? ''\n }\n focus(focusIndex)\n updateModelValue()\n}\n\nconst castValues = (value: InputOtpProps['modelValue'], startIndex = 0) => {\n const chars = `${value ?? ''}`.split('')\n const result: string[] = []\n for (const char of chars) {\n if (result.length + startIndex >= props.length) {\n break\n }\n if (props.validator(char, result.length + startIndex)) {\n result.push(char)\n }\n }\n return result\n}\n\nconst focus = (index: number = 0) => {\n const focusIndex = clamp(index, 0, props.length - 1)\n const target = inputRefs.value?.[focusIndex]\n\n if (document.activeElement !== target) {\n target?.focus()\n }\n rAF(() => {\n // When it is called, the focus may have already been captured by another element.\n // e.g. typing quickly and deleting.\n if (!props.readonly && document.activeElement === target) {\n ;(target as HTMLInputElement | null)?.select()\n }\n })\n}\n\nconst blur = () => {\n const target = inputRefs.value?.find(\n (input) => document.activeElement === input\n )\n target?.blur()\n}\n\nwatch(\n () => props.modelValue,\n () => {\n innerValue.value = initialValue.value\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n }\n)\n\nwatch(\n () => props.length,\n () => {\n innerValue.value = initialValue.value\n updateModelValue(false)\n }\n)\n\nwatch(isFocused, (value) => {\n if (value) {\n modelValueOnFocus = props.modelValue\n return\n }\n if (modelValueOnFocus !== props.modelValue) {\n emit(CHANGE_EVENT, props.modelValue as string)\n }\n})\n\ndefineExpose({\n /**\n * @description HTML input elements array\n */\n inputRefs,\n /**\n * @description Focus an OTP input field\n */\n focus,\n /**\n * @description Blur the focused OTP input field\n */\n blur,\n})\n</script>\n"],"mappings":""}
|
|
@@ -127,7 +127,7 @@ declare const inputTagProps: {
|
|
|
127
127
|
readonly max: NumberConstructor;
|
|
128
128
|
readonly tagType: {
|
|
129
129
|
readonly default: "info";
|
|
130
|
-
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "primary" | "success" | "
|
|
130
|
+
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "primary" | "success" | "info" | "warning" | "danger", unknown>>;
|
|
131
131
|
readonly required: false;
|
|
132
132
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
133
133
|
readonly __epPropKey: true;
|
|
@@ -24,9 +24,9 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
|
|
|
24
24
|
focus: () => void;
|
|
25
25
|
blur: () => void;
|
|
26
26
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
27
|
+
change: (value?: string[] | undefined) => void;
|
|
27
28
|
clear: () => void;
|
|
28
29
|
"update:modelValue": (value?: string[] | undefined) => void;
|
|
29
|
-
change: (value?: string[] | undefined) => void;
|
|
30
30
|
focus: (evt: FocusEvent) => void;
|
|
31
31
|
blur: (evt: FocusEvent) => void;
|
|
32
32
|
input: (value: string) => void;
|
|
@@ -34,9 +34,9 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
|
|
|
34
34
|
"remove-tag": (value: string, index: number) => void;
|
|
35
35
|
"drag-tag": (oldIndex: number, newIndex: number, value: string) => void;
|
|
36
36
|
}, string, _$vue.PublicProps, Readonly<InputTagProps> & Readonly<{
|
|
37
|
+
onChange?: ((value?: string[] | undefined) => any) | undefined;
|
|
37
38
|
onClear?: (() => any) | undefined;
|
|
38
39
|
"onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
|
|
39
|
-
onChange?: ((value?: string[] | undefined) => any) | undefined;
|
|
40
40
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
41
41
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
42
42
|
onInput?: ((value: string) => any) | undefined;
|
|
@@ -44,8 +44,8 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
|
|
|
44
44
|
"onRemove-tag"?: ((value: string, index: number) => any) | undefined;
|
|
45
45
|
"onDrag-tag"?: ((oldIndex: number, newIndex: number, value: string) => any) | undefined;
|
|
46
46
|
}>, {
|
|
47
|
-
id: string;
|
|
48
47
|
disabled: boolean;
|
|
48
|
+
id: string;
|
|
49
49
|
tabindex: string | number;
|
|
50
50
|
validateEvent: boolean;
|
|
51
51
|
effect: PopperEffect;
|
|
@@ -53,7 +53,7 @@ declare const __VLS_base: _$vue.DefineComponent<InputTagProps, {
|
|
|
53
53
|
clearIcon: IconPropType;
|
|
54
54
|
saveOnBlur: boolean;
|
|
55
55
|
trigger: "Enter" | "Space";
|
|
56
|
-
tagType: "primary" | "success" | "
|
|
56
|
+
tagType: "primary" | "success" | "info" | "warning" | "danger";
|
|
57
57
|
tagEffect: "dark" | "light" | "plain";
|
|
58
58
|
delimiter: string | RegExp;
|
|
59
59
|
maxCollapseTags: number;
|
|
@@ -35,7 +35,7 @@ interface LinkProps {
|
|
|
35
35
|
* @deprecated Removed after 3.0.0, Use `LinkProps` instead.
|
|
36
36
|
*/
|
|
37
37
|
declare const linkProps: {
|
|
38
|
-
readonly type: EpPropFinalized<StringConstructor, "
|
|
38
|
+
readonly type: EpPropFinalized<StringConstructor, "primary" | "default" | "success" | "info" | "warning" | "danger", unknown, undefined, boolean>;
|
|
39
39
|
readonly underline: EpPropFinalized<readonly [BooleanConstructor, StringConstructor], boolean | "always" | "never" | "hover", unknown, undefined, boolean>;
|
|
40
40
|
readonly disabled: BooleanConstructor;
|
|
41
41
|
readonly href: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
@@ -12,7 +12,7 @@ declare const menuProps: {
|
|
|
12
12
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
13
13
|
readonly uniqueOpened: BooleanConstructor;
|
|
14
14
|
readonly router: BooleanConstructor;
|
|
15
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
15
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
|
|
16
16
|
readonly collapse: BooleanConstructor;
|
|
17
17
|
readonly backgroundColor: StringConstructor;
|
|
18
18
|
readonly textColor: StringConstructor;
|
|
@@ -48,7 +48,7 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
|
|
|
48
48
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
49
49
|
readonly uniqueOpened: BooleanConstructor;
|
|
50
50
|
readonly router: BooleanConstructor;
|
|
51
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
51
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
|
|
52
52
|
readonly collapse: BooleanConstructor;
|
|
53
53
|
readonly backgroundColor: StringConstructor;
|
|
54
54
|
readonly textColor: StringConstructor;
|
|
@@ -81,7 +81,7 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
|
|
|
81
81
|
readonly defaultOpeneds: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => [], boolean>;
|
|
82
82
|
readonly uniqueOpened: BooleanConstructor;
|
|
83
83
|
readonly router: BooleanConstructor;
|
|
84
|
-
readonly menuTrigger: EpPropFinalized<StringConstructor, "
|
|
84
|
+
readonly menuTrigger: EpPropFinalized<StringConstructor, "click" | "hover", unknown, "hover", boolean>;
|
|
85
85
|
readonly collapse: BooleanConstructor;
|
|
86
86
|
readonly backgroundColor: StringConstructor;
|
|
87
87
|
readonly textColor: StringConstructor;
|
|
@@ -115,7 +115,7 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
|
|
|
115
115
|
readonly hideTimeout: number;
|
|
116
116
|
readonly defaultActive: string;
|
|
117
117
|
readonly defaultOpeneds: string[];
|
|
118
|
-
readonly menuTrigger: EpPropMergeType<StringConstructor, "
|
|
118
|
+
readonly menuTrigger: EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
|
|
119
119
|
readonly collapseTransition: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
120
120
|
readonly popperOffset: number;
|
|
121
121
|
readonly ellipsisIcon: EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>;
|
|
@@ -130,7 +130,7 @@ declare const messageProps: {
|
|
|
130
130
|
readonly prototype: any;
|
|
131
131
|
}) | null)[], unknown, unknown, undefined, boolean>;
|
|
132
132
|
readonly showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
133
|
-
readonly type: EpPropFinalized<StringConstructor, "primary" | "success" | "
|
|
133
|
+
readonly type: EpPropFinalized<StringConstructor, "primary" | "success" | "info" | "warning" | "error", unknown, "info", boolean>;
|
|
134
134
|
readonly plain: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
135
135
|
readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 16, boolean>;
|
|
136
136
|
readonly placement: EpPropFinalized<StringConstructor, "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, undefined, boolean>;
|
|
@@ -17,15 +17,15 @@ declare const __VLS_base: _$vue.DefineComponent<MessageProps, {
|
|
|
17
17
|
}, string, _$vue.PublicProps, Readonly<MessageProps> & Readonly<{
|
|
18
18
|
onDestroy?: (() => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
id: string;
|
|
21
20
|
type: MessageType;
|
|
21
|
+
id: string;
|
|
22
|
+
icon: IconPropType;
|
|
22
23
|
zIndex: number;
|
|
23
24
|
offset: number;
|
|
24
25
|
placement: MessagePlacement;
|
|
25
|
-
icon: IconPropType;
|
|
26
26
|
message: string | _$vue.VNode | (() => _$vue.VNode);
|
|
27
|
-
onClose: () => void;
|
|
28
27
|
showClose: boolean;
|
|
28
|
+
onClose: () => void;
|
|
29
29
|
plain: boolean;
|
|
30
30
|
customClass: string;
|
|
31
31
|
dangerouslyUseHTMLString: boolean;
|
|
@@ -229,7 +229,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
229
229
|
autofocus: _$vue.Ref<boolean, boolean>;
|
|
230
230
|
title: _$vue.Ref<string | undefined, string | undefined>;
|
|
231
231
|
message: _$vue.Ref<string, string>;
|
|
232
|
-
type: _$vue.Ref<"" | "primary" | "success" | "
|
|
232
|
+
type: _$vue.Ref<"" | "primary" | "success" | "info" | "warning" | "error", "" | "primary" | "success" | "info" | "warning" | "error">;
|
|
233
233
|
icon: _$vue.Ref<string | _$vue.FunctionalComponent<any, {}, any, {}> | {
|
|
234
234
|
new (...args: any[]): any;
|
|
235
235
|
__isFragment?: never;
|
|
@@ -4031,8 +4031,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4031
4031
|
dangerouslyUseHTMLString: _$vue.Ref<boolean, boolean>;
|
|
4032
4032
|
confirmButtonText: _$vue.Ref<string, string>;
|
|
4033
4033
|
cancelButtonText: _$vue.Ref<string, string>;
|
|
4034
|
-
confirmButtonType: _$vue.Ref<"" | "
|
|
4035
|
-
cancelButtonType: _$vue.Ref<"" | "
|
|
4034
|
+
confirmButtonType: _$vue.Ref<"" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text", "" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text">;
|
|
4035
|
+
cancelButtonType: _$vue.Ref<"" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text", "" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text">;
|
|
4036
4036
|
confirmButtonLoading: _$vue.Ref<boolean, boolean>;
|
|
4037
4037
|
cancelButtonLoading: _$vue.Ref<boolean, boolean>;
|
|
4038
4038
|
confirmButtonLoadingIcon: _$vue.Ref<string | _$vue.FunctionalComponent<any, {}, any, {}> | {
|
|
@@ -4578,14 +4578,14 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4578
4578
|
onVanish?: ((...args: any[]) => any) | undefined;
|
|
4579
4579
|
}>, {
|
|
4580
4580
|
center: boolean;
|
|
4581
|
-
container: string;
|
|
4582
|
-
overflow: boolean;
|
|
4583
4581
|
closeOnClickModal: boolean;
|
|
4584
4582
|
closeOnPressEscape: boolean;
|
|
4585
4583
|
lockScroll: boolean;
|
|
4586
4584
|
modal: boolean;
|
|
4587
4585
|
draggable: boolean;
|
|
4586
|
+
overflow: boolean;
|
|
4588
4587
|
showClose: boolean;
|
|
4588
|
+
container: string;
|
|
4589
4589
|
roundButton: boolean;
|
|
4590
4590
|
closeOnHashChange: boolean;
|
|
4591
4591
|
boxType: MessageBoxType;
|
|
@@ -4601,7 +4601,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4601
4601
|
}>, {
|
|
4602
4602
|
ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
4603
4603
|
size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
|
4604
|
-
type: _$vue.ComputedRef<"" | "
|
|
4604
|
+
type: _$vue.ComputedRef<"primary" | "" | "default" | "success" | "info" | "warning" | "danger" | "text">;
|
|
4605
4605
|
disabled: _$vue.ComputedRef<boolean>;
|
|
4606
4606
|
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
|
4607
4607
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
@@ -4609,6 +4609,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4609
4609
|
}, _$vue.PublicProps, {
|
|
4610
4610
|
disabled: boolean;
|
|
4611
4611
|
type: ButtonType;
|
|
4612
|
+
tag: string | _$vue.Component;
|
|
4612
4613
|
text: boolean;
|
|
4613
4614
|
round: boolean;
|
|
4614
4615
|
dashed: boolean;
|
|
@@ -4616,7 +4617,6 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4616
4617
|
loadingIcon: IconPropType;
|
|
4617
4618
|
plain: boolean;
|
|
4618
4619
|
autoInsertSpace: boolean;
|
|
4619
|
-
tag: string | _$vue.Component;
|
|
4620
4620
|
}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
|
4621
4621
|
P: {};
|
|
4622
4622
|
B: {};
|
|
@@ -4629,12 +4629,13 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4629
4629
|
}>, {
|
|
4630
4630
|
ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
4631
4631
|
size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
|
4632
|
-
type: _$vue.ComputedRef<"" | "
|
|
4632
|
+
type: _$vue.ComputedRef<"primary" | "" | "default" | "success" | "info" | "warning" | "danger" | "text">;
|
|
4633
4633
|
disabled: _$vue.ComputedRef<boolean>;
|
|
4634
4634
|
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
|
4635
4635
|
}, {}, {}, {}, {
|
|
4636
4636
|
disabled: boolean;
|
|
4637
4637
|
type: ButtonType;
|
|
4638
|
+
tag: string | _$vue.Component;
|
|
4638
4639
|
text: boolean;
|
|
4639
4640
|
round: boolean;
|
|
4640
4641
|
dashed: boolean;
|
|
@@ -4642,7 +4643,6 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4642
4643
|
loadingIcon: IconPropType;
|
|
4643
4644
|
plain: boolean;
|
|
4644
4645
|
autoInsertSpace: boolean;
|
|
4645
|
-
tag: string | _$vue.Component;
|
|
4646
4646
|
}>;
|
|
4647
4647
|
__isFragment?: never;
|
|
4648
4648
|
__isTeleport?: never;
|
|
@@ -4652,7 +4652,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4652
4652
|
}>, {
|
|
4653
4653
|
ref: _$vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
|
|
4654
4654
|
size: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
|
4655
|
-
type: _$vue.ComputedRef<"" | "
|
|
4655
|
+
type: _$vue.ComputedRef<"primary" | "" | "default" | "success" | "info" | "warning" | "danger" | "text">;
|
|
4656
4656
|
disabled: _$vue.ComputedRef<boolean>;
|
|
4657
4657
|
shouldAddSpace: _$vue.ComputedRef<boolean>;
|
|
4658
4658
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
@@ -4660,6 +4660,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4660
4660
|
}, string, {
|
|
4661
4661
|
disabled: boolean;
|
|
4662
4662
|
type: ButtonType;
|
|
4663
|
+
tag: string | _$vue.Component;
|
|
4663
4664
|
text: boolean;
|
|
4664
4665
|
round: boolean;
|
|
4665
4666
|
dashed: boolean;
|
|
@@ -4667,7 +4668,6 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4667
4668
|
loadingIcon: IconPropType;
|
|
4668
4669
|
plain: boolean;
|
|
4669
4670
|
autoInsertSpace: boolean;
|
|
4670
|
-
tag: string | _$vue.Component;
|
|
4671
4671
|
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
|
4672
4672
|
$slots: {
|
|
4673
4673
|
loading?: (props: {}) => any;
|
|
@@ -4680,7 +4680,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4680
4680
|
setPropsDefaults: (defaults: {
|
|
4681
4681
|
readonly size?: "" | "default" | "small" | "large" | (() => "" | "default" | "small" | "large") | undefined;
|
|
4682
4682
|
readonly disabled?: boolean | (() => boolean) | undefined;
|
|
4683
|
-
readonly type?: "" | "
|
|
4683
|
+
readonly type?: "" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text" | (() => "" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text") | undefined;
|
|
4684
4684
|
readonly icon?: string | _$vue.FunctionalComponent<any, {}, any, {}> | {
|
|
4685
4685
|
new (...args: any[]): any;
|
|
4686
4686
|
__isFragment?: never;
|
|
@@ -4748,9 +4748,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4748
4748
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
4749
4749
|
ElInput: SFCWithInstall<{
|
|
4750
4750
|
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<InputProps> & Readonly<{
|
|
4751
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4751
4752
|
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
4752
4753
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
4753
|
-
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4754
4754
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
4755
4755
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
4756
4756
|
onInput?: ((value: string) => any) | undefined;
|
|
@@ -4774,9 +4774,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4774
4774
|
clear: (evt?: MouseEvent) => void;
|
|
4775
4775
|
resizeTextarea: () => void;
|
|
4776
4776
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
4777
|
+
change: (value: string, evt?: Event | undefined) => void;
|
|
4777
4778
|
clear: (evt: MouseEvent | undefined) => void;
|
|
4778
4779
|
"update:modelValue": (value: string) => void;
|
|
4779
|
-
change: (value: string, evt?: Event | undefined) => void;
|
|
4780
4780
|
focus: (evt: FocusEvent) => void;
|
|
4781
4781
|
blur: (evt: FocusEvent) => void;
|
|
4782
4782
|
input: (value: string) => void;
|
|
@@ -4787,11 +4787,11 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4787
4787
|
compositionupdate: (evt: CompositionEvent) => void;
|
|
4788
4788
|
compositionend: (evt: CompositionEvent) => void;
|
|
4789
4789
|
}, _$vue.PublicProps, {
|
|
4790
|
-
modelValue: string | number | null;
|
|
4791
4790
|
disabled: boolean;
|
|
4791
|
+
type: InputType;
|
|
4792
|
+
modelValue: string | number | null;
|
|
4792
4793
|
tabindex: string | number;
|
|
4793
4794
|
validateEvent: boolean;
|
|
4794
|
-
type: InputType;
|
|
4795
4795
|
modelModifiers: InputModelModifiers;
|
|
4796
4796
|
autocomplete: string;
|
|
4797
4797
|
clearIcon: IconPropType;
|
|
@@ -4806,9 +4806,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4806
4806
|
M: {};
|
|
4807
4807
|
Defaults: {};
|
|
4808
4808
|
}, Readonly<InputProps> & Readonly<{
|
|
4809
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4809
4810
|
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
4810
4811
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
4811
|
-
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4812
4812
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
4813
4813
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
4814
4814
|
onInput?: ((value: string) => any) | undefined;
|
|
@@ -4832,11 +4832,11 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4832
4832
|
clear: (evt?: MouseEvent) => void;
|
|
4833
4833
|
resizeTextarea: () => void;
|
|
4834
4834
|
}, {}, {}, {}, {
|
|
4835
|
-
modelValue: string | number | null;
|
|
4836
4835
|
disabled: boolean;
|
|
4836
|
+
type: InputType;
|
|
4837
|
+
modelValue: string | number | null;
|
|
4837
4838
|
tabindex: string | number;
|
|
4838
4839
|
validateEvent: boolean;
|
|
4839
|
-
type: InputType;
|
|
4840
4840
|
modelModifiers: InputModelModifiers;
|
|
4841
4841
|
autocomplete: string;
|
|
4842
4842
|
clearIcon: IconPropType;
|
|
@@ -4848,9 +4848,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4848
4848
|
__isTeleport?: never;
|
|
4849
4849
|
__isSuspense?: never;
|
|
4850
4850
|
} & _$vue.ComponentOptionsBase<Readonly<InputProps> & Readonly<{
|
|
4851
|
+
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4851
4852
|
onClear?: ((evt: MouseEvent | undefined) => any) | undefined;
|
|
4852
4853
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
4853
|
-
onChange?: ((value: string, evt?: Event | undefined) => any) | undefined;
|
|
4854
4854
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
4855
4855
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
4856
4856
|
onInput?: ((value: string) => any) | undefined;
|
|
@@ -4874,9 +4874,9 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4874
4874
|
clear: (evt?: MouseEvent) => void;
|
|
4875
4875
|
resizeTextarea: () => void;
|
|
4876
4876
|
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
4877
|
+
change: (value: string, evt?: Event | undefined) => void;
|
|
4877
4878
|
clear: (evt: MouseEvent | undefined) => void;
|
|
4878
4879
|
"update:modelValue": (value: string) => void;
|
|
4879
|
-
change: (value: string, evt?: Event | undefined) => void;
|
|
4880
4880
|
focus: (evt: FocusEvent) => void;
|
|
4881
4881
|
blur: (evt: FocusEvent) => void;
|
|
4882
4882
|
input: (value: string) => void;
|
|
@@ -4887,11 +4887,11 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
4887
4887
|
compositionupdate: (evt: CompositionEvent) => void;
|
|
4888
4888
|
compositionend: (evt: CompositionEvent) => void;
|
|
4889
4889
|
}, string, {
|
|
4890
|
-
modelValue: string | number | null;
|
|
4891
4890
|
disabled: boolean;
|
|
4891
|
+
type: InputType;
|
|
4892
|
+
modelValue: string | number | null;
|
|
4892
4893
|
tabindex: string | number;
|
|
4893
4894
|
validateEvent: boolean;
|
|
4894
|
-
type: InputType;
|
|
4895
4895
|
modelModifiers: InputModelModifiers;
|
|
4896
4896
|
autocomplete: string;
|
|
4897
4897
|
clearIcon: IconPropType;
|
|
@@ -112,7 +112,7 @@ declare const notificationProps: {
|
|
|
112
112
|
readonly position: EpPropFinalized<StringConstructor, "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, "top-right", boolean>;
|
|
113
113
|
readonly showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
114
114
|
readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
115
|
-
readonly type: EpPropFinalized<StringConstructor, "" | "primary" | "success" | "
|
|
115
|
+
readonly type: EpPropFinalized<StringConstructor, "" | "primary" | "success" | "info" | "warning" | "error", unknown, "", boolean>;
|
|
116
116
|
readonly zIndex: NumberConstructor;
|
|
117
117
|
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>;
|
|
118
118
|
};
|
|
@@ -16,13 +16,13 @@ declare const __VLS_base: _$vue.DefineComponent<NotificationProps, {
|
|
|
16
16
|
}, string, _$vue.PublicProps, Readonly<NotificationProps> & Readonly<{
|
|
17
17
|
onDestroy?: (() => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
id: string;
|
|
20
19
|
type: NotificationType;
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
21
22
|
offset: number;
|
|
22
23
|
onClick: () => void;
|
|
23
24
|
position: NotificationPosition;
|
|
24
25
|
message: string | _$vue.VNode | (() => _$vue.VNode);
|
|
25
|
-
title: string;
|
|
26
26
|
closeIcon: IconPropType;
|
|
27
27
|
showClose: boolean;
|
|
28
28
|
customClass: string;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_base: _$vue.DefineComponent<PageHeaderProps, {}, {}, {}, {},
|
|
|
22
22
|
}, string, _$vue.PublicProps, Readonly<PageHeaderProps> & Readonly<{
|
|
23
23
|
onBack?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
-
content: string;
|
|
26
25
|
icon: IconPropType;
|
|
26
|
+
content: string;
|
|
27
27
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
29
|
declare const _default: typeof __VLS_export;
|
|
@@ -136,9 +136,9 @@ declare const _default: _$vue.DefineComponent<ExtractPropTypes<{
|
|
|
136
136
|
}>, {
|
|
137
137
|
readonly layout: string;
|
|
138
138
|
readonly disabled: boolean;
|
|
139
|
+
readonly small: boolean;
|
|
139
140
|
readonly popperClass: string;
|
|
140
141
|
readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
141
|
-
readonly small: boolean;
|
|
142
142
|
readonly background: boolean;
|
|
143
143
|
readonly pagerCount: number;
|
|
144
144
|
readonly pageSizes: number[];
|
|
@@ -79,8 +79,8 @@ declare const popconfirmProps: {
|
|
|
79
79
|
readonly title: StringConstructor;
|
|
80
80
|
readonly confirmButtonText: StringConstructor;
|
|
81
81
|
readonly cancelButtonText: StringConstructor;
|
|
82
|
-
readonly confirmButtonType: EpPropFinalized<StringConstructor, "" | "
|
|
83
|
-
readonly cancelButtonType: EpPropFinalized<StringConstructor, "" | "
|
|
82
|
+
readonly confirmButtonType: EpPropFinalized<StringConstructor, "" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text", unknown, "primary", boolean>;
|
|
83
|
+
readonly cancelButtonType: EpPropFinalized<StringConstructor, "" | "primary" | "default" | "success" | "info" | "warning" | "danger" | "text", unknown, "text", boolean>;
|
|
84
84
|
readonly icon: 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>;
|
|
85
85
|
readonly iconColor: EpPropFinalized<StringConstructor, unknown, unknown, "#f90", boolean>;
|
|
86
86
|
readonly hideIcon: BooleanConstructor;
|
|
@@ -24,9 +24,9 @@ declare const __VLS_base: _$vue.DefineComponent<PopconfirmProps, {
|
|
|
24
24
|
onConfirm?: ((e: MouseEvent) => any) | undefined;
|
|
25
25
|
onCancel?: ((e: MouseEvent) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
+
icon: IconPropType;
|
|
27
28
|
teleported: boolean;
|
|
28
29
|
effect: PopperEffect;
|
|
29
|
-
icon: IconPropType;
|
|
30
30
|
width: string | number;
|
|
31
31
|
hideAfter: number;
|
|
32
32
|
confirmButtonType: ButtonType;
|
|
@@ -112,9 +112,9 @@ interface PopoverProps {
|
|
|
112
112
|
* @deprecated Removed after 3.0.0, Use `PopoverProps` instead.
|
|
113
113
|
*/
|
|
114
114
|
declare const popoverProps: {
|
|
115
|
-
readonly trigger: EpPropFinalized<(new (...args: any[]) => "focus" | "
|
|
115
|
+
readonly trigger: EpPropFinalized<(new (...args: any[]) => "focus" | "click" | "hover" | "contextmenu" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>) | (((new (...args: any[]) => "focus" | "click" | "hover" | "contextmenu" | TooltipTriggerType[]) | (() => Arrayable<TooltipTriggerType>)) | null)[], unknown, unknown, "hover", boolean>;
|
|
116
116
|
readonly triggerKeys: EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | (((new (...args: any[]) => string[]) | (() => string[])) | null)[], unknown, unknown, () => string[], boolean>;
|
|
117
|
-
readonly placement: EpPropFinalized<(new (...args: any[]) => "
|
|
117
|
+
readonly placement: EpPropFinalized<(new (...args: any[]) => "right" | "left" | "auto" | "bottom" | "top" | "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[]) => "right" | "left" | "auto" | "bottom" | "top" | "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>;
|
|
118
118
|
readonly disabled: BooleanConstructor;
|
|
119
119
|
readonly visible: EpPropFinalized<(new (...args: any[]) => boolean) | (() => boolean | null) | (((new (...args: any[]) => boolean) | (() => boolean | null)) | null)[], unknown, unknown, null, boolean>;
|
|
120
120
|
readonly transition: StringConstructor;
|
|
@@ -30,9 +30,9 @@ declare const __VLS_base: _$vue.DefineComponent<PopoverProps, {
|
|
|
30
30
|
"onAfter-enter"?: (() => any) | undefined;
|
|
31
31
|
"onAfter-leave"?: (() => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
|
+
tabindex: string | number;
|
|
33
34
|
persistent: boolean;
|
|
34
35
|
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
|
35
|
-
tabindex: string | number;
|
|
36
36
|
teleported: boolean;
|
|
37
37
|
visible: boolean | null;
|
|
38
38
|
effect: PopperEffect;
|
|
@@ -51,9 +51,9 @@ declare const usePopperContent: (props: PopperContentProps) => {
|
|
|
51
51
|
popperEscapeOffsets: _$_popperjs_core0.SideObject;
|
|
52
52
|
};
|
|
53
53
|
offset?: {
|
|
54
|
-
auto?: _$_popperjs_core0.Offsets | undefined;
|
|
55
|
-
left?: _$_popperjs_core0.Offsets | undefined;
|
|
56
54
|
right?: _$_popperjs_core0.Offsets | undefined;
|
|
55
|
+
left?: _$_popperjs_core0.Offsets | undefined;
|
|
56
|
+
auto?: _$_popperjs_core0.Offsets | undefined;
|
|
57
57
|
bottom?: _$_popperjs_core0.Offsets | undefined;
|
|
58
58
|
top?: _$_popperjs_core0.Offsets | undefined;
|
|
59
59
|
"auto-start"?: _$_popperjs_core0.Offsets | undefined;
|
|
@@ -7,11 +7,11 @@ type __VLS_Slots = {} & {
|
|
|
7
7
|
default?: (props: typeof __VLS_1) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: _$vue.DefineComponent<RadioButtonProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<RadioButtonProps> & Readonly<{}>, {
|
|
10
|
-
modelValue: string | number | boolean;
|
|
11
10
|
disabled: boolean;
|
|
12
|
-
|
|
13
|
-
value: string | number | boolean;
|
|
11
|
+
modelValue: string | number | boolean;
|
|
14
12
|
label: string | number | boolean;
|
|
13
|
+
value: string | number | boolean;
|
|
14
|
+
name: string;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|