@element-plus/nightly 0.0.20250727 → 0.0.20250728
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +48 -19
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +48 -20
- 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/anchor/index.mjs +3 -3
- package/es/components/anchor/src/anchor-link.mjs +5 -81
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +81 -5
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/components/anchor/src/anchor.mjs +207 -40
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +40 -207
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +1 -1
- package/es/components/card/index.mjs +1 -1
- package/es/components/card/src/card.d.ts +6 -2
- package/es/components/card/src/card.mjs +3 -2
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card.vue.d.ts +2 -2
- package/es/components/card/src/card2.mjs +7 -1
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +69 -7
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +7 -69
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +18 -95
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +95 -18
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider-props.d.ts +7 -0
- package/es/components/config-provider/src/config-provider-props.mjs +3 -0
- package/es/components/config-provider/src/config-provider-props.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +12 -0
- package/es/components/date-picker/src/composables/use-range-picker.mjs +5 -1
- package/es/components/date-picker/src/composables/use-range-picker.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs +2 -2
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +3 -8
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +3 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +10 -5
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +3 -0
- package/es/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +3 -0
- package/es/components/date-picker/src/date-picker-com/panel-year-range.vue.d.ts +3 -0
- package/es/components/date-picker/src/date-picker.d.ts +3 -0
- package/es/components/date-picker/src/panel-utils.d.ts +24 -3
- package/es/components/date-picker/src/props/date-picker.d.ts +1 -0
- package/es/components/date-picker/src/props/panel-date-pick.d.ts +1 -0
- package/es/components/date-picker/src/props/panel-date-range.d.ts +1 -0
- package/es/components/date-picker/src/props/panel-month-range.d.ts +1 -0
- package/es/components/date-picker/src/props/panel-year-range.d.ts +1 -0
- package/es/components/date-picker/src/props/shared.d.ts +2 -0
- package/es/components/date-picker/src/props/shared.mjs +8 -0
- package/es/components/date-picker/src/props/shared.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/index.mjs +16 -16
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +70 -215
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +215 -70
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +71 -25
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +25 -71
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/mention/index.mjs +2 -2
- package/es/components/mention/src/mention.mjs +65 -285
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +285 -65
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +210 -16
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +16 -210
- package/es/components/pagination/src/components/pager2.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/pagination.mjs +2 -2
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +258 -83
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +83 -258
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +62 -30
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +30 -62
- package/es/components/result/src/result2.mjs.map +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/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +18 -8
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +8 -18
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +67 -21
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +21 -67
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +1 -0
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +4 -0
- package/es/components/time-picker/src/common/props.d.ts +1 -0
- package/es/components/time-picker/src/common/props.mjs +4 -0
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +3 -0
- 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/tour/index.mjs +2 -2
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/mask.mjs +75 -18
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +18 -75
- package/es/components/tour/src/mask2.mjs.map +1 -1
- package/es/components/tour/src/tour.mjs +154 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +69 -154
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/tree/src/tree.mjs +4 -1
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/upload/index.mjs +4 -4
- package/es/components/upload/src/upload-content.mjs +33 -196
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +196 -33
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +25 -173
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +173 -25
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.mjs +97 -125
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +125 -97
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/index.d.ts +38 -4
- package/es/index.mjs +16 -16
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +3 -3
- package/lib/components/anchor/src/anchor-link.js +5 -81
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +81 -5
- package/lib/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/components/anchor/src/anchor.js +206 -40
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +40 -206
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +1 -1
- package/lib/components/card/index.js +1 -0
- package/lib/components/card/index.js.map +1 -1
- package/lib/components/card/src/card.d.ts +6 -2
- package/lib/components/card/src/card.js +3 -1
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card.vue.d.ts +2 -2
- package/lib/components/card/src/card2.js +7 -1
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +69 -7
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +7 -69
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +18 -95
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +95 -18
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/config-provider/src/config-provider-props.d.ts +7 -0
- package/lib/components/config-provider/src/config-provider-props.js +3 -0
- package/lib/components/config-provider/src/config-provider-props.js.map +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +12 -0
- package/lib/components/date-picker/src/composables/use-range-picker.js +5 -1
- package/lib/components/date-picker/src/composables/use-range-picker.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +3 -8
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +3 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +9 -4
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +3 -0
- package/lib/components/date-picker/src/date-picker-com/panel-month-range.vue.d.ts +3 -0
- package/lib/components/date-picker/src/date-picker-com/panel-year-range.vue.d.ts +3 -0
- package/lib/components/date-picker/src/date-picker.d.ts +3 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +24 -3
- package/lib/components/date-picker/src/props/date-picker.d.ts +1 -0
- package/lib/components/date-picker/src/props/panel-date-pick.d.ts +1 -0
- package/lib/components/date-picker/src/props/panel-date-range.d.ts +1 -0
- package/lib/components/date-picker/src/props/panel-month-range.d.ts +1 -0
- package/lib/components/date-picker/src/props/panel-year-range.d.ts +1 -0
- package/lib/components/date-picker/src/props/shared.d.ts +2 -0
- package/lib/components/date-picker/src/props/shared.js +8 -0
- package/lib/components/date-picker/src/props/shared.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/index.js +16 -15
- package/lib/components/index.js.map +1 -1
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +70 -214
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +214 -70
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +71 -26
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +26 -71
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/mention/index.js +2 -2
- package/lib/components/mention/src/mention.js +64 -283
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention2.js +283 -64
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +210 -16
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +16 -210
- package/lib/components/pagination/src/components/pager2.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/pagination.js +2 -2
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +257 -83
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +83 -257
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +62 -32
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +32 -62
- package/lib/components/result/src/result2.js.map +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/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +18 -8
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +8 -18
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +67 -21
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +21 -67
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +1 -0
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +4 -0
- package/lib/components/time-picker/src/common/props.d.ts +1 -0
- package/lib/components/time-picker/src/common/props.js +4 -0
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +3 -0
- 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/tour/index.js +2 -2
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/mask.js +75 -18
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +18 -75
- package/lib/components/tour/src/mask2.js.map +1 -1
- package/lib/components/tour/src/tour.js +153 -69
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +69 -153
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/tree/src/tree.js +4 -1
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/upload/index.js +4 -4
- package/lib/components/upload/src/upload-content.js +32 -195
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +195 -32
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +26 -173
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +173 -26
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.js +100 -125
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +125 -100
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/index.d.ts +38 -4
- package/lib/index.js +16 -15
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
@@ -1,71 +1,291 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, computed, ref, openBlock, createElementBlock, normalizeClass, unref, createVNode, mergeProps, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, normalizeStyle, withModifiers, nextTick } from 'vue';
|
2
|
+
import { pick } from 'lodash-unified';
|
3
|
+
import { ElInput } from '../../input/index.mjs';
|
4
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
5
|
+
import { mentionProps, mentionEmits } from './mention.mjs';
|
6
|
+
import { getCursorPosition, getMentionCtx } from './helper.mjs';
|
7
|
+
import ElMentionDropdown from './mention-dropdown2.mjs';
|
8
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
3
9
|
import { inputProps } from '../../input/src/input.mjs';
|
4
|
-
import {
|
5
|
-
import {
|
10
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
11
|
+
import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
12
|
+
import { useId } from '../../../hooks/use-id/index.mjs';
|
13
|
+
import { useFocusController } from '../../../hooks/use-focus-controller/index.mjs';
|
14
|
+
import { UPDATE_MODEL_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
|
15
|
+
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
16
|
+
import { isFunction } from '@vue/shared';
|
6
17
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
if (
|
32
|
-
return
|
33
|
-
return
|
34
|
-
}
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
18
|
+
const __default__ = defineComponent({
|
19
|
+
name: "ElMention",
|
20
|
+
inheritAttrs: false
|
21
|
+
});
|
22
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
23
|
+
...__default__,
|
24
|
+
props: mentionProps,
|
25
|
+
emits: mentionEmits,
|
26
|
+
setup(__props, { expose, emit }) {
|
27
|
+
const props = __props;
|
28
|
+
const passInputProps = computed(() => pick(props, Object.keys(inputProps)));
|
29
|
+
const ns = useNamespace("mention");
|
30
|
+
const disabled = useFormDisabled();
|
31
|
+
const contentId = useId();
|
32
|
+
const elInputRef = ref();
|
33
|
+
const tooltipRef = ref();
|
34
|
+
const dropdownRef = ref();
|
35
|
+
const visible = ref(false);
|
36
|
+
const cursorStyle = ref();
|
37
|
+
const mentionCtx = ref();
|
38
|
+
const computedPlacement = computed(() => props.showArrow ? props.placement : `${props.placement}-start`);
|
39
|
+
const computedFallbackPlacements = computed(() => props.showArrow ? ["bottom", "top"] : ["bottom-start", "top-start"]);
|
40
|
+
const filteredOptions = computed(() => {
|
41
|
+
const { filterOption, options } = props;
|
42
|
+
if (!mentionCtx.value || !filterOption)
|
43
|
+
return options;
|
44
|
+
return options.filter((option) => filterOption(mentionCtx.value.pattern, option));
|
45
|
+
});
|
46
|
+
const dropdownVisible = computed(() => {
|
47
|
+
return visible.value && (!!filteredOptions.value.length || props.loading);
|
48
|
+
});
|
49
|
+
const hoveringId = computed(() => {
|
50
|
+
var _a;
|
51
|
+
return `${contentId.value}-${(_a = dropdownRef.value) == null ? void 0 : _a.hoveringIndex}`;
|
52
|
+
});
|
53
|
+
const handleInputChange = (value) => {
|
54
|
+
emit(UPDATE_MODEL_EVENT, value);
|
55
|
+
emit(INPUT_EVENT, value);
|
56
|
+
syncAfterCursorMove();
|
57
|
+
};
|
58
|
+
const handleInputKeyDown = (event) => {
|
59
|
+
var _a, _b, _c, _d;
|
60
|
+
if (!("code" in event) || ((_a = elInputRef.value) == null ? void 0 : _a.isComposing))
|
61
|
+
return;
|
62
|
+
switch (event.code) {
|
63
|
+
case EVENT_CODE.left:
|
64
|
+
case EVENT_CODE.right:
|
65
|
+
syncAfterCursorMove();
|
66
|
+
break;
|
67
|
+
case EVENT_CODE.up:
|
68
|
+
case EVENT_CODE.down:
|
69
|
+
if (!visible.value)
|
70
|
+
return;
|
71
|
+
event.preventDefault();
|
72
|
+
(_b = dropdownRef.value) == null ? void 0 : _b.navigateOptions(event.code === EVENT_CODE.up ? "prev" : "next");
|
73
|
+
break;
|
74
|
+
case EVENT_CODE.enter:
|
75
|
+
case EVENT_CODE.numpadEnter:
|
76
|
+
if (!visible.value)
|
77
|
+
return;
|
78
|
+
event.preventDefault();
|
79
|
+
if ((_c = dropdownRef.value) == null ? void 0 : _c.hoverOption) {
|
80
|
+
(_d = dropdownRef.value) == null ? void 0 : _d.selectHoverOption();
|
81
|
+
} else {
|
82
|
+
visible.value = false;
|
83
|
+
}
|
84
|
+
break;
|
85
|
+
case EVENT_CODE.esc:
|
86
|
+
if (!visible.value)
|
87
|
+
return;
|
88
|
+
event.preventDefault();
|
89
|
+
visible.value = false;
|
90
|
+
break;
|
91
|
+
case EVENT_CODE.backspace:
|
92
|
+
if (props.whole && mentionCtx.value) {
|
93
|
+
const { splitIndex, selectionEnd, pattern, prefixIndex, prefix } = mentionCtx.value;
|
94
|
+
const inputEl = getInputEl();
|
95
|
+
if (!inputEl)
|
96
|
+
return;
|
97
|
+
const inputValue = inputEl.value;
|
98
|
+
const matchOption = props.options.find((item) => item.value === pattern);
|
99
|
+
const isWhole = isFunction(props.checkIsWhole) ? props.checkIsWhole(pattern, prefix) : matchOption;
|
100
|
+
if (isWhole && splitIndex !== -1 && splitIndex + 1 === selectionEnd) {
|
101
|
+
event.preventDefault();
|
102
|
+
const newValue = inputValue.slice(0, prefixIndex) + inputValue.slice(splitIndex + 1);
|
103
|
+
emit(UPDATE_MODEL_EVENT, newValue);
|
104
|
+
emit(INPUT_EVENT, newValue);
|
105
|
+
emit("whole-remove", pattern, prefix);
|
106
|
+
const newSelectionEnd = prefixIndex;
|
107
|
+
nextTick(() => {
|
108
|
+
inputEl.selectionStart = newSelectionEnd;
|
109
|
+
inputEl.selectionEnd = newSelectionEnd;
|
110
|
+
syncDropdownVisible();
|
111
|
+
});
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
};
|
116
|
+
const { wrapperRef } = useFocusController(elInputRef, {
|
117
|
+
disabled,
|
118
|
+
afterFocus() {
|
119
|
+
syncAfterCursorMove();
|
120
|
+
},
|
121
|
+
beforeBlur(event) {
|
122
|
+
var _a;
|
123
|
+
return (_a = tooltipRef.value) == null ? void 0 : _a.isFocusInsideContent(event);
|
124
|
+
},
|
125
|
+
afterBlur() {
|
126
|
+
visible.value = false;
|
127
|
+
}
|
128
|
+
});
|
129
|
+
const handleInputMouseDown = () => {
|
130
|
+
syncAfterCursorMove();
|
131
|
+
};
|
132
|
+
const handleSelect = (item) => {
|
133
|
+
if (!mentionCtx.value)
|
134
|
+
return;
|
135
|
+
const inputEl = getInputEl();
|
136
|
+
if (!inputEl)
|
137
|
+
return;
|
138
|
+
const inputValue = inputEl.value;
|
139
|
+
const { split } = props;
|
140
|
+
const newEndPart = inputValue.slice(mentionCtx.value.end);
|
141
|
+
const alreadySeparated = newEndPart.startsWith(split);
|
142
|
+
const newMiddlePart = `${item.value}${alreadySeparated ? "" : split}`;
|
143
|
+
const newValue = inputValue.slice(0, mentionCtx.value.start) + newMiddlePart + newEndPart;
|
144
|
+
emit(UPDATE_MODEL_EVENT, newValue);
|
145
|
+
emit(INPUT_EVENT, newValue);
|
146
|
+
emit("select", item, mentionCtx.value.prefix);
|
147
|
+
const newSelectionEnd = mentionCtx.value.start + newMiddlePart.length + (alreadySeparated ? 1 : 0);
|
148
|
+
nextTick(() => {
|
149
|
+
inputEl.selectionStart = newSelectionEnd;
|
150
|
+
inputEl.selectionEnd = newSelectionEnd;
|
151
|
+
inputEl.focus();
|
152
|
+
syncDropdownVisible();
|
153
|
+
});
|
154
|
+
};
|
155
|
+
const getInputEl = () => {
|
156
|
+
var _a, _b;
|
157
|
+
return props.type === "textarea" ? (_a = elInputRef.value) == null ? void 0 : _a.textarea : (_b = elInputRef.value) == null ? void 0 : _b.input;
|
158
|
+
};
|
159
|
+
const syncAfterCursorMove = () => {
|
160
|
+
setTimeout(() => {
|
161
|
+
syncCursor();
|
162
|
+
syncDropdownVisible();
|
163
|
+
nextTick(() => {
|
164
|
+
var _a;
|
165
|
+
return (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
|
166
|
+
});
|
167
|
+
}, 0);
|
168
|
+
};
|
169
|
+
const syncCursor = () => {
|
170
|
+
const inputEl = getInputEl();
|
171
|
+
if (!inputEl)
|
172
|
+
return;
|
173
|
+
const caretPosition = getCursorPosition(inputEl);
|
174
|
+
const inputRect = inputEl.getBoundingClientRect();
|
175
|
+
const elInputRect = elInputRef.value.$el.getBoundingClientRect();
|
176
|
+
cursorStyle.value = {
|
177
|
+
position: "absolute",
|
178
|
+
width: 0,
|
179
|
+
height: `${caretPosition.height}px`,
|
180
|
+
left: `${caretPosition.left + inputRect.left - elInputRect.left}px`,
|
181
|
+
top: `${caretPosition.top + inputRect.top - elInputRect.top}px`
|
182
|
+
};
|
183
|
+
};
|
184
|
+
const syncDropdownVisible = () => {
|
185
|
+
const inputEl = getInputEl();
|
186
|
+
if (document.activeElement !== inputEl) {
|
187
|
+
visible.value = false;
|
188
|
+
return;
|
189
|
+
}
|
190
|
+
const { prefix, split } = props;
|
191
|
+
mentionCtx.value = getMentionCtx(inputEl, prefix, split);
|
192
|
+
if (mentionCtx.value && mentionCtx.value.splitIndex === -1) {
|
193
|
+
visible.value = true;
|
194
|
+
emit("search", mentionCtx.value.pattern, mentionCtx.value.prefix);
|
195
|
+
return;
|
196
|
+
}
|
197
|
+
visible.value = false;
|
198
|
+
};
|
199
|
+
expose({
|
200
|
+
input: elInputRef,
|
201
|
+
tooltip: tooltipRef,
|
202
|
+
dropdownVisible
|
203
|
+
});
|
204
|
+
return (_ctx, _cache) => {
|
205
|
+
return openBlock(), createElementBlock("div", {
|
206
|
+
ref_key: "wrapperRef",
|
207
|
+
ref: wrapperRef,
|
208
|
+
class: normalizeClass(unref(ns).b())
|
209
|
+
}, [
|
210
|
+
createVNode(unref(ElInput), mergeProps(mergeProps(unref(passInputProps), _ctx.$attrs), {
|
211
|
+
ref_key: "elInputRef",
|
212
|
+
ref: elInputRef,
|
213
|
+
"model-value": _ctx.modelValue,
|
214
|
+
disabled: unref(disabled),
|
215
|
+
role: unref(dropdownVisible) ? "combobox" : void 0,
|
216
|
+
"aria-activedescendant": unref(dropdownVisible) ? unref(hoveringId) || "" : void 0,
|
217
|
+
"aria-controls": unref(dropdownVisible) ? unref(contentId) : void 0,
|
218
|
+
"aria-expanded": unref(dropdownVisible) || void 0,
|
219
|
+
"aria-label": _ctx.ariaLabel,
|
220
|
+
"aria-autocomplete": unref(dropdownVisible) ? "none" : void 0,
|
221
|
+
"aria-haspopup": unref(dropdownVisible) ? "listbox" : void 0,
|
222
|
+
onInput: handleInputChange,
|
223
|
+
onKeydown: handleInputKeyDown,
|
224
|
+
onMousedown: handleInputMouseDown
|
225
|
+
}), createSlots({
|
226
|
+
_: 2
|
227
|
+
}, [
|
228
|
+
renderList(_ctx.$slots, (_, name) => {
|
229
|
+
return {
|
230
|
+
name,
|
231
|
+
fn: withCtx((slotProps) => [
|
232
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
|
233
|
+
])
|
234
|
+
};
|
235
|
+
})
|
236
|
+
]), 1040, ["model-value", "disabled", "role", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "aria-autocomplete", "aria-haspopup"]),
|
237
|
+
createVNode(unref(ElTooltip), {
|
238
|
+
ref_key: "tooltipRef",
|
239
|
+
ref: tooltipRef,
|
240
|
+
visible: unref(dropdownVisible),
|
241
|
+
"popper-class": [unref(ns).e("popper"), _ctx.popperClass],
|
242
|
+
"popper-options": _ctx.popperOptions,
|
243
|
+
placement: unref(computedPlacement),
|
244
|
+
"fallback-placements": unref(computedFallbackPlacements),
|
245
|
+
effect: "light",
|
246
|
+
pure: "",
|
247
|
+
offset: _ctx.offset,
|
248
|
+
"show-arrow": _ctx.showArrow
|
249
|
+
}, {
|
250
|
+
default: withCtx(() => [
|
251
|
+
createElementVNode("div", {
|
252
|
+
style: normalizeStyle(cursorStyle.value)
|
253
|
+
}, null, 4)
|
254
|
+
]),
|
255
|
+
content: withCtx(() => {
|
256
|
+
var _a;
|
257
|
+
return [
|
258
|
+
createVNode(ElMentionDropdown, {
|
259
|
+
ref_key: "dropdownRef",
|
260
|
+
ref: dropdownRef,
|
261
|
+
options: unref(filteredOptions),
|
262
|
+
disabled: unref(disabled),
|
263
|
+
loading: _ctx.loading,
|
264
|
+
"content-id": unref(contentId),
|
265
|
+
"aria-label": _ctx.ariaLabel,
|
266
|
+
onSelect: handleSelect,
|
267
|
+
onClick: withModifiers((_a = elInputRef.value) == null ? void 0 : _a.focus, ["stop"])
|
268
|
+
}, createSlots({
|
269
|
+
_: 2
|
270
|
+
}, [
|
271
|
+
renderList(_ctx.$slots, (_, name) => {
|
272
|
+
return {
|
273
|
+
name,
|
274
|
+
fn: withCtx((slotProps) => [
|
275
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
|
276
|
+
])
|
277
|
+
};
|
278
|
+
})
|
279
|
+
]), 1032, ["options", "disabled", "loading", "content-id", "aria-label", "onClick"])
|
280
|
+
];
|
281
|
+
}),
|
282
|
+
_: 3
|
283
|
+
}, 8, ["visible", "popper-class", "popper-options", "placement", "fallback-placements", "offset", "show-arrow"])
|
284
|
+
], 2);
|
285
|
+
};
|
58
286
|
}
|
59
287
|
});
|
60
|
-
|
61
|
-
[UPDATE_MODEL_EVENT]: (value) => isString(value),
|
62
|
-
"whole-remove": (pattern, prefix) => isString(pattern) && isString(prefix),
|
63
|
-
input: (value) => isString(value),
|
64
|
-
search: (pattern, prefix) => isString(pattern) && isString(prefix),
|
65
|
-
select: (option, prefix) => isString(option.value) && isString(prefix),
|
66
|
-
focus: (evt) => evt instanceof FocusEvent,
|
67
|
-
blur: (evt) => evt instanceof FocusEvent
|
68
|
-
};
|
288
|
+
var Mention = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mention.vue"]]);
|
69
289
|
|
70
|
-
export {
|
290
|
+
export { Mention as default };
|
71
291
|
//# sourceMappingURL=mention2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mention2.mjs","sources":["../../../../../../packages/components/mention/src/mention.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isFunction,\n isString,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { inputProps } from '@element-plus/components/input'\nimport { filterOption } from './helper'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Mention from './mention.vue'\nimport type { MentionOption } from './types'\nimport type { Options } from '@element-plus/components/popper'\n\nexport const mentionProps = buildProps({\n ...inputProps,\n /**\n * @description mention options list\n */\n options: {\n type: definePropType<MentionOption[]>(Array),\n default: () => [],\n },\n /**\n * @description prefix character to trigger mentions. The string length must be exactly 1.\n */\n prefix: {\n type: definePropType<string | string[]>([String, Array]),\n default: '@',\n validator: (val: string | string[]) => {\n if (isString(val)) return val.length === 1\n return val.every((v) => isString(v) && v.length === 1)\n },\n },\n /**\n * @description character to split mentions. The string length must be exactly 1.\n */\n split: {\n type: String,\n default: ' ',\n validator: (val: string) => val.length === 1,\n },\n /**\n * @description customize filter option logic.\n */\n filterOption: {\n type: definePropType<false | typeof filterOption>([Boolean, Function]),\n default: () => filterOption,\n validator: (val) => {\n if (val === false) return true\n return isFunction(val)\n },\n },\n /**\n * @description set popup placement\n */\n placement: {\n type: definePropType<'bottom' | 'top'>(String),\n default: 'bottom',\n },\n /**\n * @description whether the dropdown panel has an arrow\n */\n showArrow: Boolean,\n /**\n * @description offset of the dropdown panel\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description when backspace is pressed to delete, whether the mention content is deleted as a whole\n */\n whole: Boolean,\n /**\n * @description when backspace is pressed to delete, check if the mention is a whole\n */\n checkIsWhole: {\n type: definePropType<(pattern: string, prefix: string) => boolean>(\n Function\n ),\n },\n /**\n * @description input value\n */\n modelValue: String,\n /**\n * @description whether the dropdown panel of mentions is in a loading state.\n */\n loading: Boolean,\n /**\n * @description custom class name for dropdown panel\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({} as Partial<Options>),\n },\n})\n\nexport const mentionEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n 'whole-remove': (pattern: string, prefix: string) =>\n isString(pattern) && isString(prefix),\n input: (value: string) => isString(value),\n search: (pattern: string, prefix: string) =>\n isString(pattern) && isString(prefix),\n select: (option: MentionOption, prefix: string) =>\n isString(option.value) && isString(prefix),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n}\n\nexport type MentionEmits = typeof mentionEmits\nexport type MentionProps = ExtractPropTypes<typeof mentionProps>\nexport type MentionPropsPublic = __ExtractPublicPropTypes<typeof mentionProps>\nexport type MentionInstance = InstanceType<typeof Mention> & unknown\n\nexport type { MentionOption } from './types'\n"],"names":[],"mappings":";;;;;;AASY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,GAAG,UAAU;AACf,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,GAAG;AAChB,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK;AACxB,MAAM,IAAI,QAAQ,CAAC,GAAG,CAA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AI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD,EAAE,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC;AAC5E,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AACnC,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAC,OAAO,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC;AACpE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC;AACxE,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC1C;;;;"}
|
1
|
+
{"version":3,"file":"mention2.mjs","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-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>\nimport { computed, mergeProps, nextTick, ref } from 'vue'\nimport { pick } from 'lodash-unified'\nimport { useFocusController, useId, useNamespace } from '@element-plus/hooks'\nimport ElInput, { inputProps } 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 { isFunction } from '@element-plus/utils'\nimport { mentionEmits, mentionProps } from './mention'\nimport { getCursorPosition, getMentionCtx } from './helper'\nimport ElMentionDropdown from './mention-dropdown.vue'\n\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 = defineProps(mentionProps)\nconst emit = defineEmits(mentionEmits)\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 filteredOptions = computed(() => {\n const { filterOption, options } = props\n if (!mentionCtx.value || !filterOption) return options\n return options.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 (!('code' in event) || elInputRef.value?.isComposing) return\n\n switch (event.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 event.code === EVENT_CODE.up ? 'prev' : 'next'\n )\n break\n case EVENT_CODE.enter:\n case EVENT_CODE.numpadEnter:\n if (!visible.value) return\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 = props.options.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\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', 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 elInputRect = elInputRef.value!.$el.getBoundingClientRect()\n\n cursorStyle.value = {\n position: 'absolute',\n width: 0,\n height: `${caretPosition.height}px`,\n left: `${caretPosition.left + inputRect.left - elInputRect.left}px`,\n top: `${caretPosition.top + inputRect.top - elInputRect.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"],"names":[],"mappings":";;;;;;;;;;;;;;;;;mCAgFc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,cAAA,GAAiB,SAAS,MAAM,IAAA,CAAK,OAAO,MAAO,CAAA,IAAA,CAAK,UAAU,CAAC,CAAC,CAAA,CAAA;AAE1E,IAAM,MAAA,EAAA,GAAK,aAAa,SAAS,CAAA,CAAA;AACjC,IAAA,MAAM,WAAW,eAAgB,EAAA,CAAA;AACjC,IAAA,MAAM,YAAY,KAAM,EA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AA,SAAuB,CAAA,GAAA,GAAA,WAAa,CAAA,GAAA,CAAA,EAAA,CAAA;AACvD,OAAA,CAAA;AACE,KAAA,CAAA;AACA,IAAA,MAAA,mBAA0B,GAAA,MAAA;AAC1B,MAAA,MAAA,OAAA,GAAA,UAAA,EAAA,CAAA;AAAA,MACF,IAAA,QAAA,CAAA,aAAA,KAAA,OAAA,EAAA;AACA,QAAA,OAAgB,CAAA,KAAA,GAAA,KAAA,CAAA;AAAA,QAClB,OAAA;AAEA,OAAa;AAAA,MACX,MAAO,EAAA,MAAA,EAAA,KAAA,EAAA,GAAA,KAAA,CAAA;AAAA,MACP,UAAS,CAAA,KAAA,GAAA,aAAA,CAAA,OAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;AAAA,MACT,IAAA,UAAA,CAAA,KAAA,IAAA,UAAA,CAAA,KAAA,CAAA,UAAA,KAAA,CAAA,CAAA,EAAA;AAAA,QACD,OAAA,CAAA,KAAA,GAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,20 +1,214 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeClass, unref, withKeys, createCommentVNode, createBlock, Fragment, renderList, toDisplayString } from 'vue';
|
2
|
+
import { DArrowLeft, MoreFilled, DArrowRight } from '@element-plus/icons-vue';
|
3
|
+
import { paginationPagerProps } from './pager2.mjs';
|
4
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { CHANGE_EVENT } from '../../../../constants/event.mjs';
|
6
|
+
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
|
7
|
+
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
2
8
|
|
3
|
-
const
|
4
|
-
|
5
|
-
type: Number,
|
6
|
-
default: 1
|
7
|
-
},
|
8
|
-
pageCount: {
|
9
|
-
type: Number,
|
10
|
-
required: true
|
11
|
-
},
|
12
|
-
pagerCount: {
|
13
|
-
type: Number,
|
14
|
-
default: 7
|
15
|
-
},
|
16
|
-
disabled: Boolean
|
9
|
+
const __default__ = defineComponent({
|
10
|
+
name: "ElPaginationPager"
|
17
11
|
});
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
13
|
+
...__default__,
|
14
|
+
props: paginationPagerProps,
|
15
|
+
emits: [CHANGE_EVENT],
|
16
|
+
setup(__props, { emit }) {
|
17
|
+
const props = __props;
|
18
|
+
const nsPager = useNamespace("pager");
|
19
|
+
const nsIcon = useNamespace("icon");
|
20
|
+
const { t } = useLocale();
|
21
|
+
const showPrevMore = ref(false);
|
22
|
+
const showNextMore = ref(false);
|
23
|
+
const quickPrevHover = ref(false);
|
24
|
+
const quickNextHover = ref(false);
|
25
|
+
const quickPrevFocus = ref(false);
|
26
|
+
const quickNextFocus = ref(false);
|
27
|
+
const pagers = computed(() => {
|
28
|
+
const pagerCount = props.pagerCount;
|
29
|
+
const halfPagerCount = (pagerCount - 1) / 2;
|
30
|
+
const currentPage = Number(props.currentPage);
|
31
|
+
const pageCount = Number(props.pageCount);
|
32
|
+
let showPrevMore2 = false;
|
33
|
+
let showNextMore2 = false;
|
34
|
+
if (pageCount > pagerCount) {
|
35
|
+
if (currentPage > pagerCount - halfPagerCount) {
|
36
|
+
showPrevMore2 = true;
|
37
|
+
}
|
38
|
+
if (currentPage < pageCount - halfPagerCount) {
|
39
|
+
showNextMore2 = true;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
const array = [];
|
43
|
+
if (showPrevMore2 && !showNextMore2) {
|
44
|
+
const startPage = pageCount - (pagerCount - 2);
|
45
|
+
for (let i = startPage; i < pageCount; i++) {
|
46
|
+
array.push(i);
|
47
|
+
}
|
48
|
+
} else if (!showPrevMore2 && showNextMore2) {
|
49
|
+
for (let i = 2; i < pagerCount; i++) {
|
50
|
+
array.push(i);
|
51
|
+
}
|
52
|
+
} else if (showPrevMore2 && showNextMore2) {
|
53
|
+
const offset = Math.floor(pagerCount / 2) - 1;
|
54
|
+
for (let i = currentPage - offset; i <= currentPage + offset; i++) {
|
55
|
+
array.push(i);
|
56
|
+
}
|
57
|
+
} else {
|
58
|
+
for (let i = 2; i < pageCount; i++) {
|
59
|
+
array.push(i);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
return array;
|
63
|
+
});
|
64
|
+
const prevMoreKls = computed(() => [
|
65
|
+
"more",
|
66
|
+
"btn-quickprev",
|
67
|
+
nsIcon.b(),
|
68
|
+
nsPager.is("disabled", props.disabled)
|
69
|
+
]);
|
70
|
+
const nextMoreKls = computed(() => [
|
71
|
+
"more",
|
72
|
+
"btn-quicknext",
|
73
|
+
nsIcon.b(),
|
74
|
+
nsPager.is("disabled", props.disabled)
|
75
|
+
]);
|
76
|
+
const tabindex = computed(() => props.disabled ? -1 : 0);
|
77
|
+
watch(() => [props.pageCount, props.pagerCount, props.currentPage], ([pageCount, pagerCount, currentPage]) => {
|
78
|
+
const halfPagerCount = (pagerCount - 1) / 2;
|
79
|
+
let showPrev = false;
|
80
|
+
let showNext = false;
|
81
|
+
if (pageCount > pagerCount) {
|
82
|
+
showPrev = currentPage > pagerCount - halfPagerCount;
|
83
|
+
showNext = currentPage < pageCount - halfPagerCount;
|
84
|
+
}
|
85
|
+
quickPrevHover.value && (quickPrevHover.value = showPrev);
|
86
|
+
quickNextHover.value && (quickNextHover.value = showNext);
|
87
|
+
showPrevMore.value = showPrev;
|
88
|
+
showNextMore.value = showNext;
|
89
|
+
}, { immediate: true });
|
90
|
+
function onMouseEnter(forward = false) {
|
91
|
+
if (props.disabled)
|
92
|
+
return;
|
93
|
+
if (forward) {
|
94
|
+
quickPrevHover.value = true;
|
95
|
+
} else {
|
96
|
+
quickNextHover.value = true;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
function onFocus(forward = false) {
|
100
|
+
if (forward) {
|
101
|
+
quickPrevFocus.value = true;
|
102
|
+
} else {
|
103
|
+
quickNextFocus.value = true;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
function onEnter(e) {
|
107
|
+
const target = e.target;
|
108
|
+
if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("number")) {
|
109
|
+
const newPage = Number(target.textContent);
|
110
|
+
if (newPage !== props.currentPage) {
|
111
|
+
emit(CHANGE_EVENT, newPage);
|
112
|
+
}
|
113
|
+
} else if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("more")) {
|
114
|
+
onPagerClick(e);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
function onPagerClick(event) {
|
118
|
+
const target = event.target;
|
119
|
+
if (target.tagName.toLowerCase() === "ul" || props.disabled) {
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
let newPage = Number(target.textContent);
|
123
|
+
const pageCount = props.pageCount;
|
124
|
+
const currentPage = props.currentPage;
|
125
|
+
const pagerCountOffset = props.pagerCount - 2;
|
126
|
+
if (target.className.includes("more")) {
|
127
|
+
if (target.className.includes("quickprev")) {
|
128
|
+
newPage = currentPage - pagerCountOffset;
|
129
|
+
} else if (target.className.includes("quicknext")) {
|
130
|
+
newPage = currentPage + pagerCountOffset;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
if (!Number.isNaN(+newPage)) {
|
134
|
+
if (newPage < 1) {
|
135
|
+
newPage = 1;
|
136
|
+
}
|
137
|
+
if (newPage > pageCount) {
|
138
|
+
newPage = pageCount;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
if (newPage !== currentPage) {
|
142
|
+
emit(CHANGE_EVENT, newPage);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
return (_ctx, _cache) => {
|
146
|
+
return openBlock(), createElementBlock("ul", {
|
147
|
+
class: normalizeClass(unref(nsPager).b()),
|
148
|
+
onClick: onPagerClick,
|
149
|
+
onKeyup: withKeys(onEnter, ["enter"])
|
150
|
+
}, [
|
151
|
+
_ctx.pageCount > 0 ? (openBlock(), createElementBlock("li", {
|
152
|
+
key: 0,
|
153
|
+
class: normalizeClass([[
|
154
|
+
unref(nsPager).is("active", _ctx.currentPage === 1),
|
155
|
+
unref(nsPager).is("disabled", _ctx.disabled)
|
156
|
+
], "number"]),
|
157
|
+
"aria-current": _ctx.currentPage === 1,
|
158
|
+
"aria-label": unref(t)("el.pagination.currentPage", { pager: 1 }),
|
159
|
+
tabindex: unref(tabindex)
|
160
|
+
}, " 1 ", 10, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true),
|
161
|
+
showPrevMore.value ? (openBlock(), createElementBlock("li", {
|
162
|
+
key: 1,
|
163
|
+
class: normalizeClass(unref(prevMoreKls)),
|
164
|
+
tabindex: unref(tabindex),
|
165
|
+
"aria-label": unref(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
|
166
|
+
onMouseenter: ($event) => onMouseEnter(true),
|
167
|
+
onMouseleave: ($event) => quickPrevHover.value = false,
|
168
|
+
onFocus: ($event) => onFocus(true),
|
169
|
+
onBlur: ($event) => quickPrevFocus.value = false
|
170
|
+
}, [
|
171
|
+
(quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(DArrowLeft), { key: 0 })) : (openBlock(), createBlock(unref(MoreFilled), { key: 1 }))
|
172
|
+
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true),
|
173
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagers), (pager) => {
|
174
|
+
return openBlock(), createElementBlock("li", {
|
175
|
+
key: pager,
|
176
|
+
class: normalizeClass([[
|
177
|
+
unref(nsPager).is("active", _ctx.currentPage === pager),
|
178
|
+
unref(nsPager).is("disabled", _ctx.disabled)
|
179
|
+
], "number"]),
|
180
|
+
"aria-current": _ctx.currentPage === pager,
|
181
|
+
"aria-label": unref(t)("el.pagination.currentPage", { pager }),
|
182
|
+
tabindex: unref(tabindex)
|
183
|
+
}, toDisplayString(pager), 11, ["aria-current", "aria-label", "tabindex"]);
|
184
|
+
}), 128)),
|
185
|
+
showNextMore.value ? (openBlock(), createElementBlock("li", {
|
186
|
+
key: 2,
|
187
|
+
class: normalizeClass(unref(nextMoreKls)),
|
188
|
+
tabindex: unref(tabindex),
|
189
|
+
"aria-label": unref(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
|
190
|
+
onMouseenter: ($event) => onMouseEnter(),
|
191
|
+
onMouseleave: ($event) => quickNextHover.value = false,
|
192
|
+
onFocus: ($event) => onFocus(),
|
193
|
+
onBlur: ($event) => quickNextFocus.value = false
|
194
|
+
}, [
|
195
|
+
(quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? (openBlock(), createBlock(unref(DArrowRight), { key: 0 })) : (openBlock(), createBlock(unref(MoreFilled), { key: 1 }))
|
196
|
+
], 42, ["tabindex", "aria-label", "onMouseenter", "onMouseleave", "onFocus", "onBlur"])) : createCommentVNode("v-if", true),
|
197
|
+
_ctx.pageCount > 1 ? (openBlock(), createElementBlock("li", {
|
198
|
+
key: 3,
|
199
|
+
class: normalizeClass([[
|
200
|
+
unref(nsPager).is("active", _ctx.currentPage === _ctx.pageCount),
|
201
|
+
unref(nsPager).is("disabled", _ctx.disabled)
|
202
|
+
], "number"]),
|
203
|
+
"aria-current": _ctx.currentPage === _ctx.pageCount,
|
204
|
+
"aria-label": unref(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
|
205
|
+
tabindex: unref(tabindex)
|
206
|
+
}, toDisplayString(_ctx.pageCount), 11, ["aria-current", "aria-label", "tabindex"])) : createCommentVNode("v-if", true)
|
207
|
+
], 42, ["onKeyup"]);
|
208
|
+
};
|
209
|
+
}
|
210
|
+
});
|
211
|
+
var Pager = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "pager.vue"]]);
|
18
212
|
|
19
|
-
export {
|
213
|
+
export { Pager as default };
|
20
214
|
//# sourceMappingURL=pager.mjs.map
|