@element-plus/nightly 0.0.20250707 → 0.0.20250708
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.css +1 -1
- package/dist/index.full.js +28 -16
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +28 -16
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +129 -24
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +24 -129
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +366 -58
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +58 -366
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +32 -71
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +71 -32
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +26 -127
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +127 -26
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +299 -108
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +108 -299
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +52 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -52
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +226 -65
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +65 -226
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +447 -46
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +46 -447
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +20 -20
- package/es/components/input-tag/src/composables/use-input-tag.d.ts +2 -2
- package/es/components/input-tag/src/composables/use-input-tag.mjs +24 -12
- package/es/components/input-tag/src/composables/use-input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.d.ts +1 -1
- package/es/components/input-tag/src/input-tag.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.vue.d.ts +2 -2
- package/es/components/mention/src/mention-dropdown.mjs +166 -15
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +15 -166
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +15 -100
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +100 -15
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +7 -58
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +58 -7
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +35 -17
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +17 -35
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +6 -26
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +26 -6
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +66 -112
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +112 -66
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +32 -22
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +22 -32
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +65 -5
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +5 -65
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar2.mjs +1 -1
- package/es/components/scrollbar/src/thumb.mjs +11 -139
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +139 -11
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +42 -168
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +168 -42
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/slider/src/button.mjs +91 -19
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +19 -91
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/splitter/index.mjs +2 -2
- package/es/components/splitter/src/split-panel.mjs +152 -17
- package/es/components/splitter/src/split-panel.mjs.map +1 -1
- package/es/components/splitter/src/split-panel2.mjs +17 -152
- package/es/components/splitter/src/split-panel2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +41 -35
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +35 -41
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +3 -3
- package/es/components/tabs/src/tab-bar.mjs +11 -87
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +87 -11
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tabs/src/tab-pane.mjs +82 -13
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +13 -81
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +27 -99
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +99 -27
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +8 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -8
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +132 -51
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +51 -132
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +79 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -79
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/index.d.ts +3 -3
- package/es/index.mjs +20 -20
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +129 -25
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +25 -129
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +364 -57
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +57 -364
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +32 -71
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +71 -32
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +26 -127
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +127 -26
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +299 -117
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +117 -299
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +52 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -52
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +225 -65
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +65 -225
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +447 -47
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +47 -447
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +20 -20
- package/lib/components/input-tag/src/composables/use-input-tag.d.ts +2 -2
- package/lib/components/input-tag/src/composables/use-input-tag.js +24 -12
- package/lib/components/input-tag/src/composables/use-input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.d.ts +1 -1
- package/lib/components/input-tag/src/input-tag.js +2 -2
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.vue.d.ts +2 -2
- package/lib/components/mention/src/mention-dropdown.js +166 -16
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +16 -166
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +16 -100
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +100 -16
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +7 -58
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +58 -7
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +35 -18
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +18 -35
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +6 -26
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +26 -6
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +67 -112
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +112 -67
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +32 -25
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +25 -32
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +65 -5
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +5 -65
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar2.js +1 -1
- package/lib/components/scrollbar/src/thumb.js +11 -139
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +139 -11
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +44 -168
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +168 -44
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/slider/src/button.js +91 -20
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +20 -91
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/splitter/index.js +2 -2
- package/lib/components/splitter/src/split-panel.js +152 -17
- package/lib/components/splitter/src/split-panel.js.map +1 -1
- package/lib/components/splitter/src/split-panel2.js +17 -152
- package/lib/components/splitter/src/split-panel2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +41 -36
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +36 -41
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/tabs/index.js +3 -3
- package/lib/components/tabs/src/tab-bar.js +11 -87
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +87 -11
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tabs/src/tab-pane.js +82 -13
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +13 -81
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +28 -99
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +99 -28
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +8 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -8
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +137 -51
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +51 -137
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +79 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -79
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +20 -20
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-popper.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/popper.scss +1 -0
- package/web-types.json +1 -1
@@ -1,135 +1,30 @@
|
|
1
|
-
import { defineComponent, shallowRef, ref, computed, watch, onMounted, watchEffect, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot, nextTick } from 'vue';
|
2
|
-
import { useWindowSize, useElementBounding, useEventListener } from '@vueuse/core';
|
3
|
-
import { affixProps, affixEmits } from './affix.mjs';
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
-
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
7
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
8
1
|
import { CHANGE_EVENT } from '../../../constants/event.mjs';
|
9
|
-
import {
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { isNumber, isBoolean } from '../../../utils/types.mjs';
|
10
4
|
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
width: rootWidth,
|
29
|
-
top: rootTop,
|
30
|
-
bottom: rootBottom,
|
31
|
-
update: updateRoot
|
32
|
-
} = useElementBounding(root, { windowScroll: false });
|
33
|
-
const targetRect = useElementBounding(target);
|
34
|
-
const fixed = ref(false);
|
35
|
-
const scrollTop = ref(0);
|
36
|
-
const transform = ref(0);
|
37
|
-
const rootStyle = computed(() => {
|
38
|
-
return {
|
39
|
-
height: fixed.value ? `${rootHeight.value}px` : "",
|
40
|
-
width: fixed.value ? `${rootWidth.value}px` : ""
|
41
|
-
};
|
42
|
-
});
|
43
|
-
const affixStyle = computed(() => {
|
44
|
-
if (!fixed.value)
|
45
|
-
return {};
|
46
|
-
const offset = props.offset ? addUnit(props.offset) : 0;
|
47
|
-
return {
|
48
|
-
height: `${rootHeight.value}px`,
|
49
|
-
width: `${rootWidth.value}px`,
|
50
|
-
top: props.position === "top" ? offset : "",
|
51
|
-
bottom: props.position === "bottom" ? offset : "",
|
52
|
-
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
53
|
-
zIndex: props.zIndex
|
54
|
-
};
|
55
|
-
});
|
56
|
-
const update = () => {
|
57
|
-
if (!scrollContainer.value)
|
58
|
-
return;
|
59
|
-
scrollTop.value = scrollContainer.value instanceof Window ? document.documentElement.scrollTop : scrollContainer.value.scrollTop || 0;
|
60
|
-
const { position, target: target2, offset } = props;
|
61
|
-
const rootHeightOffset = offset + rootHeight.value;
|
62
|
-
if (position === "top") {
|
63
|
-
if (target2) {
|
64
|
-
const difference = targetRect.bottom.value - rootHeightOffset;
|
65
|
-
fixed.value = offset > rootTop.value && targetRect.bottom.value > 0;
|
66
|
-
transform.value = difference < 0 ? difference : 0;
|
67
|
-
} else {
|
68
|
-
fixed.value = offset > rootTop.value;
|
69
|
-
}
|
70
|
-
} else if (target2) {
|
71
|
-
const difference = windowHeight.value - targetRect.top.value - rootHeightOffset;
|
72
|
-
fixed.value = windowHeight.value - offset < rootBottom.value && windowHeight.value > targetRect.top.value;
|
73
|
-
transform.value = difference < 0 ? -difference : 0;
|
74
|
-
} else {
|
75
|
-
fixed.value = windowHeight.value - offset < rootBottom.value;
|
76
|
-
}
|
77
|
-
};
|
78
|
-
const updateRootRect = async () => {
|
79
|
-
if (!fixed.value) {
|
80
|
-
updateRoot();
|
81
|
-
return;
|
82
|
-
}
|
83
|
-
fixed.value = false;
|
84
|
-
await nextTick();
|
85
|
-
updateRoot();
|
86
|
-
fixed.value = true;
|
87
|
-
};
|
88
|
-
const handleScroll = async () => {
|
89
|
-
updateRoot();
|
90
|
-
await nextTick();
|
91
|
-
emit("scroll", {
|
92
|
-
scrollTop: scrollTop.value,
|
93
|
-
fixed: fixed.value
|
94
|
-
});
|
95
|
-
};
|
96
|
-
watch(fixed, (val) => emit(CHANGE_EVENT, val));
|
97
|
-
onMounted(() => {
|
98
|
-
var _a;
|
99
|
-
if (props.target) {
|
100
|
-
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
101
|
-
if (!target.value)
|
102
|
-
throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`);
|
103
|
-
} else {
|
104
|
-
target.value = document.documentElement;
|
105
|
-
}
|
106
|
-
scrollContainer.value = getScrollContainer(root.value, true);
|
107
|
-
updateRoot();
|
108
|
-
});
|
109
|
-
useEventListener(scrollContainer, "scroll", handleScroll);
|
110
|
-
watchEffect(update);
|
111
|
-
expose({
|
112
|
-
update,
|
113
|
-
updateRoot: updateRootRect
|
114
|
-
});
|
115
|
-
return (_ctx, _cache) => {
|
116
|
-
return openBlock(), createElementBlock("div", {
|
117
|
-
ref_key: "root",
|
118
|
-
ref: root,
|
119
|
-
class: normalizeClass(unref(ns).b()),
|
120
|
-
style: normalizeStyle(unref(rootStyle))
|
121
|
-
}, [
|
122
|
-
createElementVNode("div", {
|
123
|
-
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
124
|
-
style: normalizeStyle(unref(affixStyle))
|
125
|
-
}, [
|
126
|
-
renderSlot(_ctx.$slots, "default")
|
127
|
-
], 6)
|
128
|
-
], 6);
|
129
|
-
};
|
5
|
+
const affixProps = buildProps({
|
6
|
+
zIndex: {
|
7
|
+
type: definePropType([Number, String]),
|
8
|
+
default: 100
|
9
|
+
},
|
10
|
+
target: {
|
11
|
+
type: String,
|
12
|
+
default: ""
|
13
|
+
},
|
14
|
+
offset: {
|
15
|
+
type: Number,
|
16
|
+
default: 0
|
17
|
+
},
|
18
|
+
position: {
|
19
|
+
type: String,
|
20
|
+
values: ["top", "bottom"],
|
21
|
+
default: "top"
|
130
22
|
}
|
131
23
|
});
|
132
|
-
|
24
|
+
const affixEmits = {
|
25
|
+
scroll: ({ scrollTop, fixed }) => isNumber(scrollTop) && isBoolean(fixed),
|
26
|
+
[CHANGE_EVENT]: (fixed) => isBoolean(fixed)
|
27
|
+
};
|
133
28
|
|
134
|
-
export {
|
29
|
+
export { affixEmits, affixProps };
|
135
30
|
//# sourceMappingURL=affix2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
1
|
+
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n} from '@element-plus/utils'\nimport { CHANGE_EVENT } from '@element-plus/constants'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n /**\n * @description affix element zIndex value\n * */\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n /**\n * @description target container. (CSS selector)\n */\n target: {\n type: String,\n default: '',\n },\n /**\n * @description offset distance\n * */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description position of affix\n * */\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\nexport type AffixPropsPublic = __ExtractPublicPropTypes<typeof affixProps>\n\nexport const affixEmits = {\n scroll: ({ scrollTop, fixed }: { scrollTop: number; fixed: boolean }) =>\n isNumber(scrollTop) && isBoolean(fixed),\n [CHANGE_EVENT]: (fixed: boolean) => isBoolean(fixed),\n}\nexport type AffixEmits = typeof affixEmits\n\nexport type AffixInstance = InstanceType<typeof Affix> & unknown\n"],"names":[],"mappings":";;;;AAOY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC;AAC3E,EAAE,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AAC7C;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Autocomplete from './src/
|
2
|
-
export { autocompleteEmits, autocompleteProps } from './src/
|
1
|
+
import Autocomplete from './src/autocomplete.mjs';
|
2
|
+
export { autocompleteEmits, autocompleteProps } from './src/autocomplete2.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElAutocomplete = withInstall(Autocomplete);
|
@@ -1,63 +1,371 @@
|
|
1
|
+
import { defineComponent, computed, useAttrs, ref, onBeforeUnmount, onMounted, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, normalizeStyle, createVNode, createElementBlock, renderSlot, Fragment, renderList, createTextVNode, toDisplayString, mergeProps, withKeys, withModifiers, createSlots } from 'vue';
|
2
|
+
import { pick, debounce } from 'lodash-unified';
|
3
|
+
import { onClickOutside } from '@vueuse/core';
|
4
|
+
import { Loading } from '@element-plus/icons-vue';
|
5
|
+
import { ElInput } from '../../input/index.mjs';
|
6
|
+
import { ElScrollbar } from '../../scrollbar/index.mjs';
|
7
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
8
|
+
import { ElIcon } from '../../icon/index.mjs';
|
9
|
+
import { autocompleteProps, autocompleteEmits } from './autocomplete2.mjs';
|
10
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
1
11
|
import { inputProps } from '../../input/src/input.mjs';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
12
|
+
import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
13
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
14
|
+
import { useId } from '../../../hooks/use-id/index.mjs';
|
15
|
+
import { isArray } from '@vue/shared';
|
16
|
+
import { INPUT_EVENT, UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
17
|
+
import { throwError } from '../../../utils/error.mjs';
|
6
18
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
default: "value"
|
12
|
-
},
|
13
|
-
modelValue: {
|
14
|
-
type: [String, Number],
|
15
|
-
default: ""
|
16
|
-
},
|
17
|
-
debounce: {
|
18
|
-
type: Number,
|
19
|
-
default: 300
|
20
|
-
},
|
21
|
-
placement: {
|
22
|
-
type: definePropType(String),
|
23
|
-
values: [
|
24
|
-
"top",
|
25
|
-
"top-start",
|
26
|
-
"top-end",
|
27
|
-
"bottom",
|
28
|
-
"bottom-start",
|
29
|
-
"bottom-end"
|
30
|
-
],
|
31
|
-
default: "bottom-start"
|
32
|
-
},
|
33
|
-
fetchSuggestions: {
|
34
|
-
type: definePropType([Function, Array]),
|
35
|
-
default: NOOP
|
36
|
-
},
|
37
|
-
popperClass: {
|
38
|
-
type: String,
|
39
|
-
default: ""
|
40
|
-
},
|
41
|
-
triggerOnFocus: {
|
42
|
-
type: Boolean,
|
43
|
-
default: true
|
44
|
-
},
|
45
|
-
selectWhenUnmatched: Boolean,
|
46
|
-
hideLoading: Boolean,
|
47
|
-
teleported: useTooltipContentProps.teleported,
|
48
|
-
appendTo: useTooltipContentProps.appendTo,
|
49
|
-
highlightFirstItem: Boolean,
|
50
|
-
fitInputWidth: Boolean
|
19
|
+
const COMPONENT_NAME = "ElAutocomplete";
|
20
|
+
const __default__ = defineComponent({
|
21
|
+
name: COMPONENT_NAME,
|
22
|
+
inheritAttrs: false
|
51
23
|
});
|
52
|
-
const
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
24
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
25
|
+
...__default__,
|
26
|
+
props: autocompleteProps,
|
27
|
+
emits: autocompleteEmits,
|
28
|
+
setup(__props, { expose, emit }) {
|
29
|
+
const props = __props;
|
30
|
+
const passInputProps = computed(() => pick(props, Object.keys(inputProps)));
|
31
|
+
const rawAttrs = useAttrs();
|
32
|
+
const disabled = useFormDisabled();
|
33
|
+
const ns = useNamespace("autocomplete");
|
34
|
+
const inputRef = ref();
|
35
|
+
const regionRef = ref();
|
36
|
+
const popperRef = ref();
|
37
|
+
const listboxRef = ref();
|
38
|
+
let readonly = false;
|
39
|
+
let ignoreFocusEvent = false;
|
40
|
+
const suggestions = ref([]);
|
41
|
+
const highlightedIndex = ref(-1);
|
42
|
+
const dropdownWidth = ref("");
|
43
|
+
const activated = ref(false);
|
44
|
+
const suggestionDisabled = ref(false);
|
45
|
+
const loading = ref(false);
|
46
|
+
const listboxId = useId();
|
47
|
+
const styles = computed(() => rawAttrs.style);
|
48
|
+
const suggestionVisible = computed(() => {
|
49
|
+
const isValidData = suggestions.value.length > 0;
|
50
|
+
return (isValidData || loading.value) && activated.value;
|
51
|
+
});
|
52
|
+
const suggestionLoading = computed(() => !props.hideLoading && loading.value);
|
53
|
+
const refInput = computed(() => {
|
54
|
+
if (inputRef.value) {
|
55
|
+
return Array.from(inputRef.value.$el.querySelectorAll("input"));
|
56
|
+
}
|
57
|
+
return [];
|
58
|
+
});
|
59
|
+
const onSuggestionShow = () => {
|
60
|
+
if (suggestionVisible.value) {
|
61
|
+
dropdownWidth.value = `${inputRef.value.$el.offsetWidth}px`;
|
62
|
+
}
|
63
|
+
};
|
64
|
+
const onHide = () => {
|
65
|
+
highlightedIndex.value = -1;
|
66
|
+
};
|
67
|
+
const getData = async (queryString) => {
|
68
|
+
if (suggestionDisabled.value)
|
69
|
+
return;
|
70
|
+
const cb = (suggestionList) => {
|
71
|
+
loading.value = false;
|
72
|
+
if (suggestionDisabled.value)
|
73
|
+
return;
|
74
|
+
if (isArray(suggestionList)) {
|
75
|
+
suggestions.value = suggestionList;
|
76
|
+
highlightedIndex.value = props.highlightFirstItem ? 0 : -1;
|
77
|
+
} else {
|
78
|
+
throwError(COMPONENT_NAME, "autocomplete suggestions must be an array");
|
79
|
+
}
|
80
|
+
};
|
81
|
+
loading.value = true;
|
82
|
+
if (isArray(props.fetchSuggestions)) {
|
83
|
+
cb(props.fetchSuggestions);
|
84
|
+
} else {
|
85
|
+
const result = await props.fetchSuggestions(queryString, cb);
|
86
|
+
if (isArray(result))
|
87
|
+
cb(result);
|
88
|
+
}
|
89
|
+
};
|
90
|
+
const debouncedGetData = debounce(getData, props.debounce);
|
91
|
+
const handleInput = (value) => {
|
92
|
+
const valuePresented = !!value;
|
93
|
+
emit(INPUT_EVENT, value);
|
94
|
+
emit(UPDATE_MODEL_EVENT, value);
|
95
|
+
suggestionDisabled.value = false;
|
96
|
+
activated.value || (activated.value = valuePresented);
|
97
|
+
if (!props.triggerOnFocus && !value) {
|
98
|
+
suggestionDisabled.value = true;
|
99
|
+
suggestions.value = [];
|
100
|
+
return;
|
101
|
+
}
|
102
|
+
debouncedGetData(value);
|
103
|
+
};
|
104
|
+
const handleMouseDown = (event) => {
|
105
|
+
var _a;
|
106
|
+
if (disabled.value)
|
107
|
+
return;
|
108
|
+
if (((_a = event.target) == null ? void 0 : _a.tagName) !== "INPUT" || refInput.value.includes(document.activeElement)) {
|
109
|
+
activated.value = true;
|
110
|
+
}
|
111
|
+
};
|
112
|
+
const handleChange = (value) => {
|
113
|
+
emit(CHANGE_EVENT, value);
|
114
|
+
};
|
115
|
+
const handleFocus = (evt) => {
|
116
|
+
var _a;
|
117
|
+
if (!ignoreFocusEvent) {
|
118
|
+
activated.value = true;
|
119
|
+
emit("focus", evt);
|
120
|
+
const queryString = (_a = props.modelValue) != null ? _a : "";
|
121
|
+
if (props.triggerOnFocus && !readonly) {
|
122
|
+
debouncedGetData(String(queryString));
|
123
|
+
}
|
124
|
+
} else {
|
125
|
+
ignoreFocusEvent = false;
|
126
|
+
}
|
127
|
+
};
|
128
|
+
const handleBlur = (evt) => {
|
129
|
+
setTimeout(() => {
|
130
|
+
var _a;
|
131
|
+
if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent()) {
|
132
|
+
ignoreFocusEvent = true;
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
activated.value && close();
|
136
|
+
emit("blur", evt);
|
137
|
+
});
|
138
|
+
};
|
139
|
+
const handleClear = () => {
|
140
|
+
activated.value = false;
|
141
|
+
emit(UPDATE_MODEL_EVENT, "");
|
142
|
+
emit("clear");
|
143
|
+
};
|
144
|
+
const handleKeyEnter = async () => {
|
145
|
+
if (suggestionVisible.value && highlightedIndex.value >= 0 && highlightedIndex.value < suggestions.value.length) {
|
146
|
+
handleSelect(suggestions.value[highlightedIndex.value]);
|
147
|
+
} else if (props.selectWhenUnmatched) {
|
148
|
+
emit("select", { value: props.modelValue });
|
149
|
+
suggestions.value = [];
|
150
|
+
highlightedIndex.value = -1;
|
151
|
+
}
|
152
|
+
};
|
153
|
+
const handleKeyEscape = (evt) => {
|
154
|
+
if (suggestionVisible.value) {
|
155
|
+
evt.preventDefault();
|
156
|
+
evt.stopPropagation();
|
157
|
+
close();
|
158
|
+
}
|
159
|
+
};
|
160
|
+
const close = () => {
|
161
|
+
activated.value = false;
|
162
|
+
};
|
163
|
+
const focus = () => {
|
164
|
+
var _a;
|
165
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
166
|
+
};
|
167
|
+
const blur = () => {
|
168
|
+
var _a;
|
169
|
+
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
170
|
+
};
|
171
|
+
const handleSelect = async (item) => {
|
172
|
+
emit(INPUT_EVENT, item[props.valueKey]);
|
173
|
+
emit(UPDATE_MODEL_EVENT, item[props.valueKey]);
|
174
|
+
emit("select", item);
|
175
|
+
suggestions.value = [];
|
176
|
+
highlightedIndex.value = -1;
|
177
|
+
};
|
178
|
+
const highlight = (index) => {
|
179
|
+
if (!suggestionVisible.value || loading.value)
|
180
|
+
return;
|
181
|
+
if (index < 0) {
|
182
|
+
highlightedIndex.value = -1;
|
183
|
+
return;
|
184
|
+
}
|
185
|
+
if (index >= suggestions.value.length) {
|
186
|
+
index = suggestions.value.length - 1;
|
187
|
+
}
|
188
|
+
const suggestion = regionRef.value.querySelector(`.${ns.be("suggestion", "wrap")}`);
|
189
|
+
const suggestionList = suggestion.querySelectorAll(`.${ns.be("suggestion", "list")} li`);
|
190
|
+
const highlightItem = suggestionList[index];
|
191
|
+
const scrollTop = suggestion.scrollTop;
|
192
|
+
const { offsetTop, scrollHeight } = highlightItem;
|
193
|
+
if (offsetTop + scrollHeight > scrollTop + suggestion.clientHeight) {
|
194
|
+
suggestion.scrollTop += scrollHeight;
|
195
|
+
}
|
196
|
+
if (offsetTop < scrollTop) {
|
197
|
+
suggestion.scrollTop -= scrollHeight;
|
198
|
+
}
|
199
|
+
highlightedIndex.value = index;
|
200
|
+
inputRef.value.ref.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
|
201
|
+
};
|
202
|
+
const stopHandle = onClickOutside(listboxRef, () => {
|
203
|
+
var _a;
|
204
|
+
if ((_a = popperRef.value) == null ? void 0 : _a.isFocusInsideContent())
|
205
|
+
return;
|
206
|
+
suggestionVisible.value && close();
|
207
|
+
});
|
208
|
+
onBeforeUnmount(() => {
|
209
|
+
stopHandle == null ? void 0 : stopHandle();
|
210
|
+
});
|
211
|
+
onMounted(() => {
|
212
|
+
inputRef.value.ref.setAttribute("role", "textbox");
|
213
|
+
inputRef.value.ref.setAttribute("aria-autocomplete", "list");
|
214
|
+
inputRef.value.ref.setAttribute("aria-controls", "id");
|
215
|
+
inputRef.value.ref.setAttribute("aria-activedescendant", `${listboxId.value}-item-${highlightedIndex.value}`);
|
216
|
+
readonly = inputRef.value.ref.hasAttribute("readonly");
|
217
|
+
});
|
218
|
+
expose({
|
219
|
+
highlightedIndex,
|
220
|
+
activated,
|
221
|
+
loading,
|
222
|
+
inputRef,
|
223
|
+
popperRef,
|
224
|
+
suggestions,
|
225
|
+
handleSelect,
|
226
|
+
handleKeyEnter,
|
227
|
+
focus,
|
228
|
+
blur,
|
229
|
+
close,
|
230
|
+
highlight,
|
231
|
+
getData
|
232
|
+
});
|
233
|
+
return (_ctx, _cache) => {
|
234
|
+
return openBlock(), createBlock(unref(ElTooltip), {
|
235
|
+
ref_key: "popperRef",
|
236
|
+
ref: popperRef,
|
237
|
+
visible: unref(suggestionVisible),
|
238
|
+
placement: _ctx.placement,
|
239
|
+
"fallback-placements": ["bottom-start", "top-start"],
|
240
|
+
"popper-class": [unref(ns).e("popper"), _ctx.popperClass],
|
241
|
+
teleported: _ctx.teleported,
|
242
|
+
"append-to": _ctx.appendTo,
|
243
|
+
"gpu-acceleration": false,
|
244
|
+
pure: "",
|
245
|
+
"manual-mode": "",
|
246
|
+
effect: "light",
|
247
|
+
trigger: "click",
|
248
|
+
transition: `${unref(ns).namespace.value}-zoom-in-top`,
|
249
|
+
persistent: "",
|
250
|
+
role: "listbox",
|
251
|
+
onBeforeShow: onSuggestionShow,
|
252
|
+
onHide
|
253
|
+
}, {
|
254
|
+
content: withCtx(() => [
|
255
|
+
createElementVNode("div", {
|
256
|
+
ref_key: "regionRef",
|
257
|
+
ref: regionRef,
|
258
|
+
class: normalizeClass([unref(ns).b("suggestion"), unref(ns).is("loading", unref(suggestionLoading))]),
|
259
|
+
style: normalizeStyle({
|
260
|
+
[_ctx.fitInputWidth ? "width" : "minWidth"]: dropdownWidth.value,
|
261
|
+
outline: "none"
|
262
|
+
}),
|
263
|
+
role: "region"
|
264
|
+
}, [
|
265
|
+
createVNode(unref(ElScrollbar), {
|
266
|
+
id: unref(listboxId),
|
267
|
+
tag: "ul",
|
268
|
+
"wrap-class": unref(ns).be("suggestion", "wrap"),
|
269
|
+
"view-class": unref(ns).be("suggestion", "list"),
|
270
|
+
role: "listbox"
|
271
|
+
}, {
|
272
|
+
default: withCtx(() => [
|
273
|
+
unref(suggestionLoading) ? (openBlock(), createElementBlock("li", { key: 0 }, [
|
274
|
+
renderSlot(_ctx.$slots, "loading", {}, () => [
|
275
|
+
createVNode(unref(ElIcon), {
|
276
|
+
class: normalizeClass(unref(ns).is("loading"))
|
277
|
+
}, {
|
278
|
+
default: withCtx(() => [
|
279
|
+
createVNode(unref(Loading))
|
280
|
+
]),
|
281
|
+
_: 1
|
282
|
+
}, 8, ["class"])
|
283
|
+
])
|
284
|
+
])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(suggestions.value, (item, index) => {
|
285
|
+
return openBlock(), createElementBlock("li", {
|
286
|
+
id: `${unref(listboxId)}-item-${index}`,
|
287
|
+
key: index,
|
288
|
+
class: normalizeClass({ highlighted: highlightedIndex.value === index }),
|
289
|
+
role: "option",
|
290
|
+
"aria-selected": highlightedIndex.value === index,
|
291
|
+
onClick: ($event) => handleSelect(item)
|
292
|
+
}, [
|
293
|
+
renderSlot(_ctx.$slots, "default", { item }, () => [
|
294
|
+
createTextVNode(toDisplayString(item[_ctx.valueKey]), 1)
|
295
|
+
])
|
296
|
+
], 10, ["id", "aria-selected", "onClick"]);
|
297
|
+
}), 128))
|
298
|
+
]),
|
299
|
+
_: 3
|
300
|
+
}, 8, ["id", "wrap-class", "view-class"])
|
301
|
+
], 6)
|
302
|
+
]),
|
303
|
+
default: withCtx(() => [
|
304
|
+
createElementVNode("div", {
|
305
|
+
ref_key: "listboxRef",
|
306
|
+
ref: listboxRef,
|
307
|
+
class: normalizeClass([unref(ns).b(), _ctx.$attrs.class]),
|
308
|
+
style: normalizeStyle(unref(styles)),
|
309
|
+
role: "combobox",
|
310
|
+
"aria-haspopup": "listbox",
|
311
|
+
"aria-expanded": unref(suggestionVisible),
|
312
|
+
"aria-owns": unref(listboxId)
|
313
|
+
}, [
|
314
|
+
createVNode(unref(ElInput), mergeProps({
|
315
|
+
ref_key: "inputRef",
|
316
|
+
ref: inputRef
|
317
|
+
}, mergeProps(unref(passInputProps), _ctx.$attrs), {
|
318
|
+
"model-value": _ctx.modelValue,
|
319
|
+
disabled: unref(disabled),
|
320
|
+
onInput: handleInput,
|
321
|
+
onChange: handleChange,
|
322
|
+
onFocus: handleFocus,
|
323
|
+
onBlur: handleBlur,
|
324
|
+
onClear: handleClear,
|
325
|
+
onKeydown: [
|
326
|
+
withKeys(withModifiers(($event) => highlight(highlightedIndex.value - 1), ["prevent"]), ["up"]),
|
327
|
+
withKeys(withModifiers(($event) => highlight(highlightedIndex.value + 1), ["prevent"]), ["down"]),
|
328
|
+
withKeys(handleKeyEnter, ["enter"]),
|
329
|
+
withKeys(close, ["tab"]),
|
330
|
+
withKeys(handleKeyEscape, ["esc"])
|
331
|
+
],
|
332
|
+
onMousedown: handleMouseDown
|
333
|
+
}), createSlots({
|
334
|
+
_: 2
|
335
|
+
}, [
|
336
|
+
_ctx.$slots.prepend ? {
|
337
|
+
name: "prepend",
|
338
|
+
fn: withCtx(() => [
|
339
|
+
renderSlot(_ctx.$slots, "prepend")
|
340
|
+
])
|
341
|
+
} : void 0,
|
342
|
+
_ctx.$slots.append ? {
|
343
|
+
name: "append",
|
344
|
+
fn: withCtx(() => [
|
345
|
+
renderSlot(_ctx.$slots, "append")
|
346
|
+
])
|
347
|
+
} : void 0,
|
348
|
+
_ctx.$slots.prefix ? {
|
349
|
+
name: "prefix",
|
350
|
+
fn: withCtx(() => [
|
351
|
+
renderSlot(_ctx.$slots, "prefix")
|
352
|
+
])
|
353
|
+
} : void 0,
|
354
|
+
_ctx.$slots.suffix ? {
|
355
|
+
name: "suffix",
|
356
|
+
fn: withCtx(() => [
|
357
|
+
renderSlot(_ctx.$slots, "suffix")
|
358
|
+
])
|
359
|
+
} : void 0
|
360
|
+
]), 1040, ["model-value", "disabled", "onKeydown"])
|
361
|
+
], 14, ["aria-expanded", "aria-owns"])
|
362
|
+
]),
|
363
|
+
_: 3
|
364
|
+
}, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]);
|
365
|
+
};
|
366
|
+
}
|
367
|
+
});
|
368
|
+
var Autocomplete = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "autocomplete.vue"]]);
|
61
369
|
|
62
|
-
export {
|
370
|
+
export { Autocomplete as default };
|
63
371
|
//# sourceMappingURL=autocomplete.mjs.map
|