@element-plus/nightly 0.0.20260406 → 0.0.20260408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +37 -8
- package/dist/index.full.min.js +6 -6
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +6 -6
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +37 -8
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/component.mjs +3 -3
- package/es/components/affix/src/affix.vue.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +1 -1
- package/es/components/anchor/src/anchor.d.ts +1 -1
- package/es/components/anchor/src/anchor.vue.d.ts +4 -4
- package/es/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs +4 -2
- package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.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.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +2 -2
- package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.mjs +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/countdown/src/countdown.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +1 -1
- 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 +2 -2
- package/es/components/dropdown/src/dropdown.vue.d.ts +6 -6
- package/es/components/dropdown/style/css.mjs +1 -1
- package/es/components/dropdown/style/index.mjs +1 -1
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/es/components/index.mjs +6 -6
- package/es/components/input/src/input.d.ts +1 -1
- package/es/components/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_vue_type_script_setup_true_lang.mjs +5 -3
- package/es/components/mention/src/mention.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/menu/src/menu.d.ts +4 -4
- package/es/components/menu/src/utils/menu-item.mjs +1 -1
- package/es/components/menu/src/utils/submenu.mjs +1 -1
- package/es/components/message/src/message.vue.d.ts +3 -3
- package/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/message/src/message.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +4 -4
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/es/components/popover/src/popover.vue.d.ts +1 -1
- package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/es/components/popper/src/content.vue.d.ts +1 -1
- package/es/components/progress/src/progress.vue.d.ts +1 -1
- package/es/components/radio/src/radio-group.vue.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/segmented/src/segmented.d.ts +1 -1
- package/es/components/select/src/option.vue.d.ts +1 -0
- package/es/components/select/src/option.vue_vue_type_script_lang.mjs +11 -0
- package/es/components/select/src/option.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/option2.mjs +2 -1
- package/es/components/select/src/option2.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +6 -5
- package/es/components/select/src/type.d.ts +1 -0
- package/es/components/select-v2/src/option-item.mjs +2 -1
- package/es/components/select-v2/src/option-item.mjs.map +1 -1
- package/es/components/select-v2/src/option-item.vue_vue_type_script_lang.mjs +13 -1
- package/es/components/select-v2/src/option-item.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +5 -5
- package/es/components/slider/src/button.vue.d.ts +1 -1
- package/es/components/slider/src/slider.vue.d.ts +1 -1
- 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/steps.d.ts +1 -1
- package/es/components/steps/src/steps.vue.d.ts +1 -1
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/components/table/src/table.vue.d.ts +2 -2
- package/es/components/tooltip/src/content.vue.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/es/components/tree-select/src/tree-select.vue.d.ts +2 -2
- 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/dynamic-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/props.d.ts +2 -2
- package/es/constants/index.mjs +2 -2
- package/es/directives/trap-focus/index.mjs +1 -1
- package/es/index.mjs +9 -9
- package/es/plugin.mjs +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +107 -107
- package/lib/components/affix/src/affix.vue.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +1 -1
- package/lib/components/anchor/src/anchor.d.ts +1 -1
- package/lib/components/anchor/src/anchor.vue.d.ts +4 -4
- package/lib/components/autocomplete/src/autocomplete.d.ts +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js +4 -2
- package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/badge/src/badge.vue.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.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +2 -2
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +12 -12
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js +11 -11
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js.map +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/countdown/src/countdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
- 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 +2 -2
- package/lib/components/dropdown/src/dropdown.vue.d.ts +6 -6
- package/lib/components/dropdown/style/css.js +1 -1
- package/lib/components/dropdown/style/index.js +1 -1
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
- package/lib/components/index.js +123 -123
- package/lib/components/input/src/input.d.ts +1 -1
- 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_vue_type_script_setup_true_lang.js +4 -2
- package/lib/components/mention/src/mention.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/menu/src/menu.d.ts +4 -4
- package/lib/components/menu/src/utils/menu-item.js +11 -11
- package/lib/components/menu/src/utils/menu-item.js.map +1 -1
- package/lib/components/menu/src/utils/submenu.js +9 -9
- package/lib/components/menu/src/utils/submenu.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +3 -3
- package/lib/components/message/src/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/lib/components/message/src/message.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +4 -4
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +1 -1
- package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/lib/components/popper/src/content.vue.d.ts +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +1 -1
- package/lib/components/radio/src/radio-group.vue.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/segmented/src/segmented.d.ts +1 -1
- package/lib/components/select/src/option.vue.d.ts +1 -0
- package/lib/components/select/src/option.vue_vue_type_script_lang.js +11 -0
- package/lib/components/select/src/option.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/option2.js +2 -1
- package/lib/components/select/src/option2.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +6 -5
- package/lib/components/select/src/type.d.ts +1 -0
- package/lib/components/select-v2/src/option-item.js +2 -1
- package/lib/components/select-v2/src/option-item.js.map +1 -1
- package/lib/components/select-v2/src/option-item.vue_vue_type_script_lang.js +13 -1
- package/lib/components/select-v2/src/option-item.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +5 -5
- package/lib/components/slider/src/button.vue.d.ts +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +1 -1
- 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/steps.d.ts +1 -1
- package/lib/components/steps/src/steps.vue.d.ts +1 -1
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/components/table/src/table.vue.d.ts +2 -2
- package/lib/components/tooltip/src/content.vue.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/lib/components/tree-select/src/tree-select.vue.d.ts +2 -2
- 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/dynamic-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/props.d.ts +2 -2
- package/lib/constants/index.js +2 -2
- package/lib/directives/trap-focus/index.js +5 -5
- package/lib/directives/trap-focus/index.js.map +1 -1
- package/lib/index.js +126 -126
- package/lib/plugin.js +12 -12
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
package/lib/components/index.js
CHANGED
|
@@ -104,146 +104,146 @@ const require_index$30 = require('./color-picker-panel/index.js');
|
|
|
104
104
|
const require_color_picker = require('./color-picker/src/color-picker.js');
|
|
105
105
|
const require_index$31 = require('./color-picker/index.js');
|
|
106
106
|
const require_index$32 = require('./container/index.js');
|
|
107
|
-
const require_countdown = require('./countdown/src/countdown.js');
|
|
108
|
-
const require_statistic = require('./statistic/src/statistic.js');
|
|
109
|
-
const require_index$33 = require('./statistic/index.js');
|
|
110
|
-
const require_index$34 = require('./countdown/index.js');
|
|
111
107
|
const require_date_picker_panel = require('./date-picker-panel/src/props/date-picker-panel.js');
|
|
112
108
|
const require_constants$14 = require('./date-picker-panel/src/constants.js');
|
|
113
|
-
const require_index$
|
|
109
|
+
const require_index$33 = require('./date-picker-panel/index.js');
|
|
114
110
|
const require_props$1 = require('./date-picker/src/props.js');
|
|
115
|
-
const require_index$
|
|
111
|
+
const require_index$34 = require('./date-picker/index.js');
|
|
116
112
|
const require_description = require('./descriptions/src/description.js');
|
|
117
113
|
const require_description_item = require('./descriptions/src/description-item.js');
|
|
118
|
-
const require_index$
|
|
114
|
+
const require_index$35 = require('./descriptions/index.js');
|
|
119
115
|
const require_dialog = require('./dialog/src/dialog.js');
|
|
120
116
|
const require_overlay = require('./overlay/src/overlay.js');
|
|
121
|
-
const require_index$
|
|
117
|
+
const require_index$36 = require('./overlay/index.js');
|
|
122
118
|
const require_constants$15 = require('./dialog/src/constants.js');
|
|
123
119
|
const require_use_dialog = require('./dialog/src/use-dialog.js');
|
|
124
|
-
const require_index$
|
|
120
|
+
const require_index$37 = require('./dialog/index.js');
|
|
125
121
|
const require_divider = require('./divider/src/divider.js');
|
|
126
|
-
const require_index$
|
|
122
|
+
const require_index$38 = require('./divider/index.js');
|
|
127
123
|
const require_drawer = require('./drawer/src/drawer.js');
|
|
128
|
-
const require_index$
|
|
124
|
+
const require_index$39 = require('./drawer/index.js');
|
|
129
125
|
const require_dropdown = require('./dropdown/src/dropdown.js');
|
|
130
126
|
const require_tokens = require('./dropdown/src/tokens.js');
|
|
131
|
-
const require_index$
|
|
127
|
+
const require_index$40 = require('./dropdown/index.js');
|
|
132
128
|
const require_empty = require('./empty/src/empty.js');
|
|
133
|
-
const require_index$
|
|
129
|
+
const require_index$41 = require('./empty/index.js');
|
|
134
130
|
const require_image = require('./image/src/image.js');
|
|
135
131
|
const require_image_viewer = require('./image-viewer/src/image-viewer.js');
|
|
136
|
-
const require_index$
|
|
137
|
-
const require_index$
|
|
132
|
+
const require_index$42 = require('./image-viewer/index.js');
|
|
133
|
+
const require_index$43 = require('./image/index.js');
|
|
138
134
|
const require_input_number = require('./input-number/src/input-number.js');
|
|
139
|
-
const require_index$
|
|
135
|
+
const require_index$44 = require('./input-number/index.js');
|
|
140
136
|
const require_input_tag = require('./input-tag/src/input-tag.js');
|
|
141
|
-
const require_index$
|
|
137
|
+
const require_index$45 = require('./input-tag/index.js');
|
|
142
138
|
const require_link = require('./link/src/link.js');
|
|
143
|
-
const require_index$
|
|
139
|
+
const require_index$46 = require('./link/index.js');
|
|
144
140
|
const require_tokens$1 = require('./menu/src/tokens.js');
|
|
145
141
|
const require_sub_menu = require('./menu/src/sub-menu.js');
|
|
146
142
|
const require_menu = require('./menu/src/menu.js');
|
|
147
143
|
const require_menu_item = require('./menu/src/menu-item.js');
|
|
148
144
|
const require_menu_item_group = require('./menu/src/menu-item-group.js');
|
|
149
|
-
const require_index$
|
|
145
|
+
const require_index$47 = require('./menu/index.js');
|
|
150
146
|
const require_page_header = require('./page-header/src/page-header.js');
|
|
151
|
-
const require_index$
|
|
147
|
+
const require_index$48 = require('./page-header/index.js');
|
|
152
148
|
const require_constants$16 = require('./pagination/src/constants.js');
|
|
153
149
|
const require_pagination = require('./pagination/src/pagination.js');
|
|
154
|
-
const require_index$
|
|
150
|
+
const require_index$49 = require('./pagination/index.js');
|
|
155
151
|
const require_popconfirm = require('./popconfirm/src/popconfirm.js');
|
|
156
|
-
const require_index$
|
|
152
|
+
const require_index$50 = require('./popconfirm/index.js');
|
|
153
|
+
const require_popover = require('./popover/src/popover.js');
|
|
154
|
+
const require_index$51 = require('./popover/index.js');
|
|
157
155
|
const require_progress = require('./progress/src/progress.js');
|
|
158
|
-
const require_index$
|
|
156
|
+
const require_index$52 = require('./progress/index.js');
|
|
159
157
|
const require_rate = require('./rate/src/rate.js');
|
|
160
|
-
const require_index$
|
|
158
|
+
const require_index$53 = require('./rate/index.js');
|
|
161
159
|
const require_result = require('./result/src/result.js');
|
|
162
|
-
const require_index$
|
|
160
|
+
const require_index$54 = require('./result/index.js');
|
|
163
161
|
const require_props$2 = require('./virtual-list/src/props.js');
|
|
164
162
|
const require_fixed_size_list = require('./virtual-list/src/components/fixed-size-list.js');
|
|
165
163
|
const require_dynamic_size_list = require('./virtual-list/src/components/dynamic-size-list.js');
|
|
166
164
|
const require_fixed_size_grid = require('./virtual-list/src/components/fixed-size-grid.js');
|
|
167
165
|
const require_dynamic_size_grid = require('./virtual-list/src/components/dynamic-size-grid.js');
|
|
168
166
|
const require_token$1 = require('./select-v2/src/token.js');
|
|
169
|
-
const require_index$
|
|
167
|
+
const require_index$55 = require('./select-v2/index.js');
|
|
170
168
|
const require_skeleton = require('./skeleton/src/skeleton.js');
|
|
171
169
|
const require_skeleton_item = require('./skeleton/src/skeleton-item.js');
|
|
172
|
-
const require_index$
|
|
170
|
+
const require_index$56 = require('./skeleton/index.js');
|
|
173
171
|
const require_constants$17 = require('./slider/src/constants.js');
|
|
174
172
|
const require_slider = require('./slider/src/slider.js');
|
|
175
|
-
const require_index$
|
|
173
|
+
const require_index$57 = require('./slider/index.js');
|
|
176
174
|
const require_item = require('./space/src/item.js');
|
|
177
175
|
const require_use_space = require('./space/src/use-space.js');
|
|
178
176
|
const require_space = require('./space/src/space.js');
|
|
179
|
-
const require_index$
|
|
177
|
+
const require_index$58 = require('./space/index.js');
|
|
178
|
+
const require_statistic = require('./statistic/src/statistic.js');
|
|
179
|
+
const require_index$59 = require('./statistic/index.js');
|
|
180
|
+
const require_countdown = require('./countdown/src/countdown.js');
|
|
181
|
+
const require_index$60 = require('./countdown/index.js');
|
|
180
182
|
const require_steps = require('./steps/src/steps.js');
|
|
181
183
|
const require_tokens$2 = require('./steps/src/tokens.js');
|
|
182
184
|
const require_item$1 = require('./steps/src/item.js');
|
|
183
|
-
const require_index$
|
|
185
|
+
const require_index$61 = require('./steps/index.js');
|
|
184
186
|
const require_switch = require('./switch/src/switch.js');
|
|
185
|
-
const require_index$
|
|
186
|
-
const require_index$
|
|
187
|
+
const require_index$62 = require('./switch/index.js');
|
|
188
|
+
const require_index$63 = require('./table/index.js');
|
|
187
189
|
const require_constants$18 = require('./table-v2/src/constants.js');
|
|
188
190
|
const require_private = require('./table-v2/src/private.js');
|
|
189
191
|
const require_row$1 = require('./table-v2/src/row.js');
|
|
190
192
|
const require_table = require('./table-v2/src/table.js');
|
|
191
193
|
const require_table_v2 = require('./table-v2/src/table-v2.js');
|
|
192
194
|
const require_auto_resizer = require('./table-v2/src/auto-resizer.js');
|
|
193
|
-
const require_index$
|
|
195
|
+
const require_index$64 = require('./table-v2/index.js');
|
|
194
196
|
const require_constants$19 = require('./tabs/src/constants.js');
|
|
195
197
|
const require_tab_bar = require('./tabs/src/tab-bar.js');
|
|
196
198
|
const require_tab_nav = require('./tabs/src/tab-nav.js');
|
|
197
199
|
const require_tabs = require('./tabs/src/tabs.js');
|
|
198
200
|
const require_tab_pane = require('./tabs/src/tab-pane.js');
|
|
199
|
-
const require_index$
|
|
201
|
+
const require_index$65 = require('./tabs/index.js');
|
|
200
202
|
const require_text = require('./text/src/text.js');
|
|
201
|
-
const require_index$
|
|
203
|
+
const require_index$66 = require('./text/index.js');
|
|
202
204
|
const require_time_select = require('./time-select/src/time-select.js');
|
|
203
|
-
const require_index$
|
|
205
|
+
const require_index$67 = require('./time-select/index.js');
|
|
204
206
|
const require_tokens$3 = require('./timeline/src/tokens.js');
|
|
205
207
|
const require_timeline = require('./timeline/src/timeline.js');
|
|
206
208
|
const require_timeline_item = require('./timeline/src/timeline-item.js');
|
|
207
|
-
const require_index$
|
|
209
|
+
const require_index$68 = require('./timeline/index.js');
|
|
208
210
|
const require_transfer = require('./transfer/src/transfer.js');
|
|
209
|
-
const require_index$
|
|
211
|
+
const require_index$69 = require('./transfer/index.js');
|
|
210
212
|
const require_tokens$4 = require('./tree/src/tokens.js');
|
|
211
213
|
const require_tree = require('./tree/src/tree.js');
|
|
212
|
-
const require_index$
|
|
213
|
-
const require_index$
|
|
214
|
-
const require_index$
|
|
214
|
+
const require_index$70 = require('./tree/index.js');
|
|
215
|
+
const require_index$71 = require('./tree-select/index.js');
|
|
216
|
+
const require_index$72 = require('./tree-v2/index.js');
|
|
215
217
|
const require_upload = require('./upload/src/upload.js');
|
|
216
218
|
const require_constants$20 = require('./upload/src/constants.js');
|
|
217
219
|
const require_upload_list = require('./upload/src/upload-list.js');
|
|
218
220
|
const require_upload_content = require('./upload/src/upload-content.js');
|
|
219
221
|
const require_upload_dragger = require('./upload/src/upload-dragger.js');
|
|
220
|
-
const require_index$
|
|
222
|
+
const require_index$73 = require('./upload/index.js');
|
|
221
223
|
const require_watermark = require('./watermark/src/watermark.js');
|
|
222
|
-
const require_index$
|
|
224
|
+
const require_index$74 = require('./watermark/index.js');
|
|
223
225
|
const require_content$3 = require('./tour/src/content.js');
|
|
224
226
|
const require_tour = require('./tour/src/tour.js');
|
|
225
227
|
const require_step = require('./tour/src/step.js');
|
|
226
|
-
const require_index$
|
|
228
|
+
const require_index$75 = require('./tour/index.js');
|
|
227
229
|
const require_anchor = require('./anchor/src/anchor.js');
|
|
228
|
-
const require_index$
|
|
230
|
+
const require_index$76 = require('./anchor/index.js');
|
|
229
231
|
const require_segmented = require('./segmented/src/segmented.js');
|
|
230
|
-
const require_index$
|
|
232
|
+
const require_index$77 = require('./segmented/index.js');
|
|
231
233
|
const require_mention = require('./mention/src/mention.js');
|
|
232
|
-
const require_index$
|
|
234
|
+
const require_index$78 = require('./mention/index.js');
|
|
233
235
|
const require_splitter = require('./splitter/src/splitter.js');
|
|
234
236
|
const require_split_panel = require('./splitter/src/split-panel.js');
|
|
235
|
-
const require_index$
|
|
236
|
-
const require_index$
|
|
237
|
+
const require_index$79 = require('./splitter/index.js');
|
|
238
|
+
const require_index$80 = require('./infinite-scroll/index.js');
|
|
237
239
|
const require_service = require('./loading/src/service.js');
|
|
238
240
|
const require_directive = require('./loading/src/directive.js');
|
|
239
|
-
const require_index$
|
|
241
|
+
const require_index$81 = require('./loading/index.js');
|
|
240
242
|
const require_message = require('./message/src/message.js');
|
|
241
|
-
const require_index$
|
|
242
|
-
const require_index$
|
|
243
|
+
const require_index$82 = require('./message/index.js');
|
|
244
|
+
const require_index$83 = require('./message-box/index.js');
|
|
243
245
|
const require_notification = require('./notification/src/notification.js');
|
|
244
|
-
const require_index$
|
|
245
|
-
const require_popover = require('./popover/src/popover.js');
|
|
246
|
-
const require_index$84 = require('./popover/index.js');
|
|
246
|
+
const require_index$84 = require('./notification/index.js');
|
|
247
247
|
|
|
248
248
|
exports.BAR_MAP = require_util.BAR_MAP;
|
|
249
249
|
exports.CAROUSEL_ITEM_NAME = require_constants$9.CAROUSEL_ITEM_NAME;
|
|
@@ -263,10 +263,10 @@ exports.DynamicSizeList = require_dynamic_size_list.default;
|
|
|
263
263
|
exports.Effect = require_popper.Effect;
|
|
264
264
|
exports.ElAffix = require_index.ElAffix;
|
|
265
265
|
exports.ElAlert = require_index$2.ElAlert;
|
|
266
|
-
exports.ElAnchor = require_index$
|
|
267
|
-
exports.ElAnchorLink = require_index$
|
|
266
|
+
exports.ElAnchor = require_index$76.ElAnchor;
|
|
267
|
+
exports.ElAnchorLink = require_index$76.ElAnchorLink;
|
|
268
268
|
exports.ElAside = require_index$32.ElAside;
|
|
269
|
-
exports.ElAutoResizer = require_index$
|
|
269
|
+
exports.ElAutoResizer = require_index$64.ElAutoResizer;
|
|
270
270
|
exports.ElAutocomplete = require_index$8.ElAutocomplete;
|
|
271
271
|
exports.ElAvatar = require_index$9.ElAvatar;
|
|
272
272
|
exports.ElAvatarGroup = require_index$9.ElAvatarGroup;
|
|
@@ -294,96 +294,96 @@ exports.ElColorPicker = require_index$31.ElColorPicker;
|
|
|
294
294
|
exports.ElColorPickerPanel = require_index$30.ElColorPickerPanel;
|
|
295
295
|
exports.ElConfigProvider = require_index$13.ElConfigProvider;
|
|
296
296
|
exports.ElContainer = require_index$32.ElContainer;
|
|
297
|
-
exports.ElCountdown = require_index$
|
|
298
|
-
exports.ElDatePicker = require_index$
|
|
299
|
-
exports.ElDatePickerPanel = require_index$
|
|
300
|
-
exports.ElDescriptions = require_index$
|
|
301
|
-
exports.ElDescriptionsItem = require_index$
|
|
302
|
-
exports.ElDialog = require_index$
|
|
303
|
-
exports.ElDivider = require_index$
|
|
304
|
-
exports.ElDrawer = require_index$
|
|
305
|
-
exports.ElDropdown = require_index$
|
|
306
|
-
exports.ElDropdownItem = require_index$
|
|
307
|
-
exports.ElDropdownMenu = require_index$
|
|
308
|
-
exports.ElEmpty = require_index$
|
|
297
|
+
exports.ElCountdown = require_index$60.ElCountdown;
|
|
298
|
+
exports.ElDatePicker = require_index$34.ElDatePicker;
|
|
299
|
+
exports.ElDatePickerPanel = require_index$33.ElDatePickerPanel;
|
|
300
|
+
exports.ElDescriptions = require_index$35.ElDescriptions;
|
|
301
|
+
exports.ElDescriptionsItem = require_index$35.ElDescriptionsItem;
|
|
302
|
+
exports.ElDialog = require_index$37.ElDialog;
|
|
303
|
+
exports.ElDivider = require_index$38.ElDivider;
|
|
304
|
+
exports.ElDrawer = require_index$39.ElDrawer;
|
|
305
|
+
exports.ElDropdown = require_index$40.ElDropdown;
|
|
306
|
+
exports.ElDropdownItem = require_index$40.ElDropdownItem;
|
|
307
|
+
exports.ElDropdownMenu = require_index$40.ElDropdownMenu;
|
|
308
|
+
exports.ElEmpty = require_index$41.ElEmpty;
|
|
309
309
|
exports.ElFooter = require_index$32.ElFooter;
|
|
310
310
|
exports.ElForm = require_index$3.ElForm;
|
|
311
311
|
exports.ElFormItem = require_index$3.ElFormItem;
|
|
312
312
|
exports.ElHeader = require_index$32.ElHeader;
|
|
313
313
|
exports.ElIcon = require_index$1.ElIcon;
|
|
314
|
-
exports.ElImage = require_index$
|
|
315
|
-
exports.ElImageViewer = require_index$
|
|
316
|
-
exports.ElInfiniteScroll = require_index$
|
|
314
|
+
exports.ElImage = require_index$43.ElImage;
|
|
315
|
+
exports.ElImageViewer = require_index$42.ElImageViewer;
|
|
316
|
+
exports.ElInfiniteScroll = require_index$80.ElInfiniteScroll;
|
|
317
317
|
exports.ElInput = require_index$6.ElInput;
|
|
318
|
-
exports.ElInputNumber = require_index$
|
|
319
|
-
exports.ElInputTag = require_index$
|
|
320
|
-
exports.ElLink = require_index$
|
|
321
|
-
exports.ElLoading = require_index$
|
|
318
|
+
exports.ElInputNumber = require_index$44.ElInputNumber;
|
|
319
|
+
exports.ElInputTag = require_index$45.ElInputTag;
|
|
320
|
+
exports.ElLink = require_index$46.ElLink;
|
|
321
|
+
exports.ElLoading = require_index$81.ElLoading;
|
|
322
322
|
exports.ElLoadingDirective = require_directive.default;
|
|
323
323
|
exports.vLoading = require_directive.default;
|
|
324
324
|
exports.ElLoadingService = require_service.default;
|
|
325
325
|
exports.ElMain = require_index$32.ElMain;
|
|
326
|
-
exports.ElMention = require_index$
|
|
327
|
-
exports.ElMenu = require_index$
|
|
328
|
-
exports.ElMenuItem = require_index$
|
|
329
|
-
exports.ElMenuItemGroup = require_index$
|
|
330
|
-
exports.ElMessage = require_index$
|
|
331
|
-
exports.ElMessageBox = require_index$
|
|
332
|
-
exports.ElNotification = require_index$
|
|
326
|
+
exports.ElMention = require_index$78.ElMention;
|
|
327
|
+
exports.ElMenu = require_index$47.ElMenu;
|
|
328
|
+
exports.ElMenuItem = require_index$47.ElMenuItem;
|
|
329
|
+
exports.ElMenuItemGroup = require_index$47.ElMenuItemGroup;
|
|
330
|
+
exports.ElMessage = require_index$82.ElMessage;
|
|
331
|
+
exports.ElMessageBox = require_index$83.ElMessageBox;
|
|
332
|
+
exports.ElNotification = require_index$84.ElNotification;
|
|
333
333
|
exports.ElOption = require_index$17.ElOption;
|
|
334
334
|
exports.ElOptionGroup = require_index$17.ElOptionGroup;
|
|
335
|
-
exports.ElOverlay = require_index$
|
|
336
|
-
exports.ElPageHeader = require_index$
|
|
337
|
-
exports.ElPagination = require_index$
|
|
338
|
-
exports.ElPopconfirm = require_index$
|
|
339
|
-
exports.ElPopover = require_index$
|
|
340
|
-
exports.ElPopoverDirective = require_index$
|
|
335
|
+
exports.ElOverlay = require_index$36.ElOverlay;
|
|
336
|
+
exports.ElPageHeader = require_index$48.ElPageHeader;
|
|
337
|
+
exports.ElPagination = require_index$49.ElPagination;
|
|
338
|
+
exports.ElPopconfirm = require_index$50.ElPopconfirm;
|
|
339
|
+
exports.ElPopover = require_index$51.ElPopover;
|
|
340
|
+
exports.ElPopoverDirective = require_index$51.ElPopoverDirective;
|
|
341
341
|
exports.ElPopper = require_index$4.ElPopper;
|
|
342
342
|
exports.ElPopperArrow = require_arrow.default;
|
|
343
343
|
exports.ElPopperContent = require_content$1.default;
|
|
344
344
|
exports.ElPopperTrigger = require_trigger$1.default;
|
|
345
|
-
exports.ElProgress = require_index$
|
|
345
|
+
exports.ElProgress = require_index$52.ElProgress;
|
|
346
346
|
exports.ElRadio = require_index$22.ElRadio;
|
|
347
347
|
exports.ElRadioButton = require_index$22.ElRadioButton;
|
|
348
348
|
exports.ElRadioGroup = require_index$22.ElRadioGroup;
|
|
349
|
-
exports.ElRate = require_index$
|
|
350
|
-
exports.ElResult = require_index$
|
|
349
|
+
exports.ElRate = require_index$53.ElRate;
|
|
350
|
+
exports.ElResult = require_index$54.ElResult;
|
|
351
351
|
exports.ElRow = require_index$26.ElRow;
|
|
352
352
|
exports.ElScrollbar = require_index$7.ElScrollbar;
|
|
353
|
-
exports.ElSegmented = require_index$
|
|
353
|
+
exports.ElSegmented = require_index$77.ElSegmented;
|
|
354
354
|
exports.ElSelect = require_index$17.ElSelect;
|
|
355
|
-
exports.ElSelectV2 = require_index$
|
|
356
|
-
exports.ElSkeleton = require_index$
|
|
357
|
-
exports.ElSkeletonItem = require_index$
|
|
358
|
-
exports.ElSlider = require_index$
|
|
359
|
-
exports.ElSpace = require_index$
|
|
360
|
-
exports.ElSplitter = require_index$
|
|
361
|
-
exports.ElSplitterPanel = require_index$
|
|
362
|
-
exports.ElStatistic = require_index$
|
|
363
|
-
exports.ElStep = require_index$
|
|
364
|
-
exports.ElSteps = require_index$
|
|
365
|
-
exports.ElSubMenu = require_index$
|
|
366
|
-
exports.ElSwitch = require_index$
|
|
367
|
-
exports.ElTabPane = require_index$
|
|
368
|
-
exports.ElTable = require_index$
|
|
369
|
-
exports.ElTableColumn = require_index$
|
|
370
|
-
exports.ElTableV2 = require_index$
|
|
371
|
-
exports.ElTabs = require_index$
|
|
355
|
+
exports.ElSelectV2 = require_index$55.ElSelectV2;
|
|
356
|
+
exports.ElSkeleton = require_index$56.ElSkeleton;
|
|
357
|
+
exports.ElSkeletonItem = require_index$56.ElSkeletonItem;
|
|
358
|
+
exports.ElSlider = require_index$57.ElSlider;
|
|
359
|
+
exports.ElSpace = require_index$58.ElSpace;
|
|
360
|
+
exports.ElSplitter = require_index$79.ElSplitter;
|
|
361
|
+
exports.ElSplitterPanel = require_index$79.ElSplitterPanel;
|
|
362
|
+
exports.ElStatistic = require_index$59.ElStatistic;
|
|
363
|
+
exports.ElStep = require_index$61.ElStep;
|
|
364
|
+
exports.ElSteps = require_index$61.ElSteps;
|
|
365
|
+
exports.ElSubMenu = require_index$47.ElSubMenu;
|
|
366
|
+
exports.ElSwitch = require_index$62.ElSwitch;
|
|
367
|
+
exports.ElTabPane = require_index$65.ElTabPane;
|
|
368
|
+
exports.ElTable = require_index$63.ElTable;
|
|
369
|
+
exports.ElTableColumn = require_index$63.ElTableColumn;
|
|
370
|
+
exports.ElTableV2 = require_index$64.ElTableV2;
|
|
371
|
+
exports.ElTabs = require_index$65.ElTabs;
|
|
372
372
|
exports.ElTag = require_index$16.ElTag;
|
|
373
|
-
exports.ElText = require_index$
|
|
373
|
+
exports.ElText = require_index$66.ElText;
|
|
374
374
|
exports.ElTimePicker = require_index$15.ElTimePicker;
|
|
375
|
-
exports.ElTimeSelect = require_index$
|
|
376
|
-
exports.ElTimeline = require_index$
|
|
377
|
-
exports.ElTimelineItem = require_index$
|
|
375
|
+
exports.ElTimeSelect = require_index$67.ElTimeSelect;
|
|
376
|
+
exports.ElTimeline = require_index$68.ElTimeline;
|
|
377
|
+
exports.ElTimelineItem = require_index$68.ElTimelineItem;
|
|
378
378
|
exports.ElTooltip = require_index$5.ElTooltip;
|
|
379
|
-
exports.ElTour = require_index$
|
|
380
|
-
exports.ElTourStep = require_index$
|
|
381
|
-
exports.ElTransfer = require_index$
|
|
382
|
-
exports.ElTree = require_index$
|
|
383
|
-
exports.ElTreeSelect = require_index$
|
|
384
|
-
exports.ElTreeV2 = require_index$
|
|
385
|
-
exports.ElUpload = require_index$
|
|
386
|
-
exports.ElWatermark = require_index$
|
|
379
|
+
exports.ElTour = require_index$75.ElTour;
|
|
380
|
+
exports.ElTourStep = require_index$75.ElTourStep;
|
|
381
|
+
exports.ElTransfer = require_index$69.ElTransfer;
|
|
382
|
+
exports.ElTree = require_index$70.ElTree;
|
|
383
|
+
exports.ElTreeSelect = require_index$71.ElTreeSelect;
|
|
384
|
+
exports.ElTreeV2 = require_index$72.ElTreeV2;
|
|
385
|
+
exports.ElUpload = require_index$73.ElUpload;
|
|
386
|
+
exports.ElWatermark = require_index$74.ElWatermark;
|
|
387
387
|
exports.FIRST_KEYS = require_dropdown.FIRST_KEYS;
|
|
388
388
|
exports.FIRST_LAST_KEYS = require_dropdown.FIRST_LAST_KEYS;
|
|
389
389
|
exports.FixedSizeGrid = require_fixed_size_grid.default;
|
|
@@ -183,7 +183,7 @@ declare const inputProps: {
|
|
|
183
183
|
};
|
|
184
184
|
readonly type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
|
|
185
185
|
readonly resize: {
|
|
186
|
-
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "
|
|
186
|
+
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
|
|
187
187
|
readonly required: false;
|
|
188
188
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
189
189
|
__epPropKey: true;
|
|
@@ -13,10 +13,10 @@ declare const __VLS_base: vue.DefineComponent<LinkProps, {}, {}, {}, {}, vue.Com
|
|
|
13
13
|
}, string, vue.PublicProps, Readonly<LinkProps> & Readonly<{
|
|
14
14
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
+
target: "_blank" | "_parent" | "_self" | "_top" | (string & NonNullable<unknown>);
|
|
16
17
|
type: "primary" | "success" | "warning" | "info" | "danger" | "default";
|
|
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;
|
|
@@ -232,7 +232,7 @@ declare const mentionProps: {
|
|
|
232
232
|
};
|
|
233
233
|
type: EpPropFinalized<(new (...args: any[]) => string) | (() => InputType) | (((new (...args: any[]) => string) | (() => InputType)) | null)[], unknown, unknown, "text", boolean>;
|
|
234
234
|
resize: {
|
|
235
|
-
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "
|
|
235
|
+
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "none" | "both" | "horizontal" | "vertical", unknown>>;
|
|
236
236
|
readonly required: false;
|
|
237
237
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
238
238
|
__epPropKey: true;
|
|
@@ -7,7 +7,6 @@ const require_index$1 = require('../../../hooks/use-id/index.js');
|
|
|
7
7
|
const require_index$2 = require('../../../hooks/use-focus-controller/index.js');
|
|
8
8
|
const require_use_form_common_props = require('../../form/src/hooks/use-form-common-props.js');
|
|
9
9
|
const require_index$3 = require('../../tooltip/index.js');
|
|
10
|
-
const require_input = require('../../input/src/input.js');
|
|
11
10
|
const require_index$4 = require('../../input/index.js');
|
|
12
11
|
const require_helper = require('./helper.js');
|
|
13
12
|
const require_mention = require('./mention.js');
|
|
@@ -26,7 +25,10 @@ var mention_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vu
|
|
|
26
25
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
27
26
|
const props = __props;
|
|
28
27
|
const emit = __emit;
|
|
29
|
-
const passInputProps = (0, vue.computed)(() =>
|
|
28
|
+
const passInputProps = (0, vue.computed)(() => {
|
|
29
|
+
const inputProps = require_index$4.ElInput.props ?? [];
|
|
30
|
+
return (0, lodash_unified.pick)(props, (0, _vue_shared.isArray)(inputProps) ? inputProps : Object.keys(inputProps));
|
|
31
|
+
});
|
|
30
32
|
const ns = require_index.useNamespace("mention");
|
|
31
33
|
const disabled = require_use_form_common_props.useFormDisabled();
|
|
32
34
|
const contentId = require_index$1.useId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, {\n inputProps,\n inputPropsDefaults,\n} from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => pick(props, Object.keys(inputProps)))\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EA0FA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAUb,MAAM,kEAAqC,OAAO,OAAO,KAAK,yBAAW,CAAC,CAAA;EAE1E,MAAM,KAAK,2BAAa,UAAS;EACjC,MAAM,WAAW,+CAAgB;EACjC,MAAM,YAAY,uBAAM;EAExB,MAAM,2BAAgC;EACtC,MAAM,2BAAkC;EACxC,MAAM,4BAA0D;EAEhE,MAAM,uBAAc,MAAK;EACzB,MAAM,4BAAiC;EACvC,MAAM,2BAA6B;EAEnC,MAAM,4CACJ,MAAM,YAAY,MAAM,YAAY,GAAG,MAAM,UAAU,QACzD;EAEA,MAAM,qDACJ,MAAM,YAAY,CAAC,UAAU,MAAM,GAAG,CAAC,gBAAgB,YAAW,CACpE;EAEA,MAAM,sCAA6B;GACjC,GAAG;GACH,GAAG,MAAM;GACV,EAAC;EAEF,MAAM,aAAa,WAAc;GAC/B,MAAM,OAAO;IACX,OAAO,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MAAc;4BAAQ,cAAS,qBACd,KAAA,QAA3B,0DAAc,UAAS,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"mention.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputPropsDefaults } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isArray, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => {\n const inputProps = ElInput.props ?? []\n const keys = isArray(inputProps) ? inputProps : Object.keys(inputProps)\n return pick(props, keys)\n})\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAuFA,MAAM,QAAQ;EAWd,MAAM,OAAO;EAUb,MAAM,yCAAgC;GACpC,MAAM,aAAa,wBAAQ,SAAS,EAAC;AAErC,mCAAY,gCADS,WAAW,GAAG,aAAa,OAAO,KAAK,WAAU,CAC/C;IACxB;EAED,MAAM,KAAK,2BAAa,UAAS;EACjC,MAAM,WAAW,+CAAgB;EACjC,MA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BAAA;IACX,uBAAqB,2BAAA;IACtB,QAAO;IACP,MAAA;IACC,QAAQ,QAAA;IACR,cAAY,QAAA;;IAEF,gCACmB,6BAAA,OAAA,EAAtB,+BAAO,YAAA,MAAW;IAEf,gCAca,sBAAA,kCAAA;cAZhB;KAAJ,KAAI;KACH,SAAS,gBAAA;KACT,yBAAU,SAAQ;KAClB,SAAS,QAAA;KACT,6BAAY,UAAS;KACrB,cAAY,QAAA;KACZ,UAAQ;KACR,SAAK,OAAA,OAAA,OAAA,6BAAA,WAAO,WAAA,OAAY,OAAK,EAAA,CAAA,OAAA,CAAA;2DAEAA,KAAAA,SAAZ,GAAG,SAAI;;MAAc;4BAAQ,cAAS,qBACd,KAAA,QAA3B,0DAAc,UAAS,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention2.js","names":[],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, {\n inputProps,\n inputPropsDefaults,\n} from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => pick(props, Object.keys(inputProps)))\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"mention2.js","names":[],"sources":["../../../../../../packages/components/mention/src/mention.vue"],"sourcesContent":["<template>\n <div ref=\"wrapperRef\" :class=\"ns.b()\">\n <el-input\n v-bind=\"mergeProps(passInputProps, $attrs)\"\n ref=\"elInputRef\"\n :model-value=\"modelValue\"\n :disabled=\"disabled\"\n :role=\"dropdownVisible ? 'combobox' : undefined\"\n :aria-activedescendant=\"dropdownVisible ? hoveringId || '' : undefined\"\n :aria-controls=\"dropdownVisible ? contentId : undefined\"\n :aria-expanded=\"dropdownVisible || undefined\"\n :aria-label=\"ariaLabel\"\n :aria-autocomplete=\"dropdownVisible ? 'none' : undefined\"\n :aria-haspopup=\"dropdownVisible ? 'listbox' : undefined\"\n @input=\"handleInputChange\"\n @keydown=\"handleInputKeyDown\"\n @mousedown=\"handleInputMouseDown\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-input>\n <el-tooltip\n ref=\"tooltipRef\"\n :visible=\"dropdownVisible\"\n :popper-class=\"[ns.e('popper'), popperClass!]\"\n :popper-style=\"popperStyle\"\n :popper-options=\"popperOptions\"\n :placement=\"computedPlacement\"\n :fallback-placements=\"computedFallbackPlacements\"\n effect=\"light\"\n pure\n :offset=\"offset\"\n :show-arrow=\"showArrow\"\n >\n <template #default>\n <div :style=\"cursorStyle\" />\n </template>\n <template #content>\n <el-mention-dropdown\n ref=\"dropdownRef\"\n :options=\"filteredOptions\"\n :disabled=\"disabled\"\n :loading=\"loading\"\n :content-id=\"contentId\"\n :aria-label=\"ariaLabel\"\n @select=\"handleSelect\"\n @click.stop=\"elInputRef?.focus()\"\n >\n <template v-for=\"(_, name) in $slots\" #[name]=\"slotProps\">\n <slot :name=\"name\" v-bind=\"slotProps\" />\n </template>\n </el-mention-dropdown>\n </template>\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends MentionOption = MentionOption\">\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputPropsDefaults } from '@element-plus/components/input'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport {\n EVENT_CODE,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport { getEventCode, isArray, isFunction } from '@element-plus/utils'\nimport { mentionDefaultProps, mentionEmits } from './mention'\nimport { filterOption, getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\nimport type { MentionProps } from './mention'\nimport type { Placement } from '@popperjs/core'\nimport type { CSSProperties } from 'vue'\nimport type { InputInstance } from '@element-plus/components/input'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\nimport type { MentionCtx, MentionOption } from './types'\n\ndefineOptions({\n name: 'ElMention',\n inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<MentionProps<T>>(), {\n ...inputPropsDefaults,\n options: () => [],\n prefix: '@',\n split: ' ',\n filterOption: () => filterOption,\n placement: 'bottom',\n offset: 0,\n popperOptions: () => ({}),\n props: () => mentionDefaultProps,\n})\nconst emit = defineEmits(mentionEmits)\ndefineSlots<\n InputInstance['$slots'] & {\n header?: () => any\n footer?: () => any\n loading?: () => any\n label?: (props: { item: T & MentionOption; index: number }) => any\n }\n>()\n\nconst passInputProps = computed(() => {\n const inputProps = ElInput.props ?? []\n const keys = isArray(inputProps) ? inputProps : Object.keys(inputProps)\n return pick(props, keys)\n})\n\nconst ns = useNamespace('mention')\nconst disabled = useFormDisabled()\nconst contentId = useId()\n\nconst elInputRef = ref<InputInstance>()\nconst tooltipRef = ref<TooltipInstance>()\nconst dropdownRef = ref<InstanceType<typeof ElMentionDropdown>>()\n\nconst visible = ref(false)\nconst cursorStyle = ref<CSSProperties>()\nconst mentionCtx = ref<MentionCtx>()\n\nconst computedPlacement = computed<Placement>(() =>\n props.showArrow ? props.placement : `${props.placement}-start`\n)\n\nconst computedFallbackPlacements = computed<Placement[]>(() =>\n props.showArrow ? ['bottom', 'top'] : ['bottom-start', 'top-start']\n)\n\nconst aliasProps = computed(() => ({\n ...mentionDefaultProps,\n ...props.props,\n}))\n\nconst mapOption = (option: T) => {\n const base = {\n label: option[aliasProps.value.label],\n value: option[aliasProps.value.value],\n disabled: option[aliasProps.value.disabled],\n }\n return { ...option, ...base }\n}\n\nconst options = computed(() => props.options.map(mapOption))\n\nconst filteredOptions = computed(() => {\n const { filterOption } = props\n if (!mentionCtx.value || !filterOption) return options.value\n return options.value.filter((option) =>\n filterOption(mentionCtx.value!.pattern, option)\n )\n})\n\nconst dropdownVisible = computed(() => {\n return visible.value && (!!filteredOptions.value.length || props.loading)\n})\n\nconst hoveringId = computed(() => {\n return `${contentId.value}-${dropdownRef.value?.hoveringIndex}`\n})\n\nconst handleInputChange = (value: string) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(INPUT_EVENT, value)\n syncAfterCursorMove()\n}\n\nconst handleInputKeyDown = (event: KeyboardEvent | Event) => {\n if (elInputRef.value?.isComposing) return\n const code = getEventCode(event as KeyboardEvent)\n\n switch (code) {\n case EVENT_CODE.left:\n case EVENT_CODE.right:\n syncAfterCursorMove()\n break\n case EVENT_CODE.up:\n case EVENT_CODE.down:\n if (!visible.value) return\n event.preventDefault()\n dropdownRef.value?.navigateOptions(\n code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) {\n props.type !== 'textarea' && syncAfterCursorMove()\n return\n }\n event.preventDefault()\n if (dropdownRef.value?.hoverOption) {\n dropdownRef.value?.selectHoverOption()\n } else {\n visible.value = false\n }\n break\n case EVENT_CODE.esc:\n if (!visible.value) return\n event.preventDefault()\n visible.value = false\n break\n case EVENT_CODE.backspace:\n if (props.whole && mentionCtx.value) {\n const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } =\n mentionCtx.value\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const matchOption = options.value.find((item) => item.value === pattern)\n const isWhole = isFunction(props.checkIsWhole)\n ? props.checkIsWhole(pattern, prefix)\n : matchOption\n if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {\n event.preventDefault()\n const newValue =\n inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1)\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('whole-remove', pattern, prefix)\n\n const newSelectionEnd = prefixIndex\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n syncDropdownVisible()\n })\n }\n }\n }\n}\n\nconst { wrapperRef } = useFocusController(elInputRef, {\n disabled,\n afterFocus() {\n syncAfterCursorMove()\n },\n beforeBlur(event) {\n return tooltipRef.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n visible.value = false\n },\n})\n\nconst handleInputMouseDown = () => {\n syncAfterCursorMove()\n}\n\n// Ensure that the original option passed by users is returned\nconst getOriginalOption = (mentionOption: MentionOption) => {\n return props.options.find((option: MentionOption) => {\n return mentionOption.value === option[aliasProps.value.value]\n })\n}\n\nconst handleSelect = (item: MentionOption) => {\n if (!mentionCtx.value) return\n const inputEl = getInputEl()\n if (!inputEl) return\n const inputValue = inputEl.value\n const { split } = props\n\n const newEndPart = inputValue.slice(mentionCtx.value.end)\n const alreadySeparated = newEndPart.startsWith(split)\n const newMiddlePart = `${item.value}${alreadySeparated ? '' : split}`\n\n const newValue =\n inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart\n\n emit(UPDATE_MODEL_EVENT, newValue)\n emit(INPUT_EVENT, newValue)\n emit('select', getOriginalOption(item)!, mentionCtx.value.prefix)\n\n const newSelectionEnd =\n mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0)\n\n nextTick(() => {\n // input value is updated\n inputEl.selectionStart = newSelectionEnd\n inputEl.selectionEnd = newSelectionEnd\n inputEl.focus()\n syncDropdownVisible()\n })\n}\n\nconst getInputEl = () =>\n props.type === 'textarea'\n ? elInputRef.value?.textarea\n : elInputRef.value?.input\n\nconst syncAfterCursorMove = () => {\n // can't use nextTick(), get cursor position will be wrong\n setTimeout(() => {\n syncCursor()\n syncDropdownVisible()\n nextTick(() => tooltipRef.value?.updatePopper())\n }, 0)\n}\n\nconst syncCursor = () => {\n const inputEl = getInputEl()\n if (!inputEl) return\n\n const caretPosition = getCursorPosition(inputEl)\n const inputRect = inputEl.getBoundingClientRect()\n const wrapperRect = wrapperRef.value!.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - wrapperRect.left}px`,\n top: `${caretPosition.top + inputRect.top - wrapperRect.top}px`,\n }\n}\n\nconst syncDropdownVisible = () => {\n const inputEl = getInputEl()\n if (document.activeElement !== inputEl) {\n visible.value = false\n return\n }\n const { prefix, split } = props\n mentionCtx.value = getMentionCtx(inputEl, prefix, split)\n if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {\n visible.value = true\n emit('search', mentionCtx.value.pattern, mentionCtx.value.prefix)\n return\n }\n visible.value = false\n}\n\ndefineExpose({\n input: elInputRef,\n tooltip: tooltipRef,\n dropdownVisible,\n})\n</script>\n"],"mappings":""}
|
|
@@ -9,7 +9,7 @@ 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;
|
|
@@ -45,7 +45,7 @@ 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;
|
|
@@ -78,7 +78,7 @@ 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;
|
|
@@ -112,7 +112,7 @@ 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;
|