@element-plus/nightly 0.0.20250109 → 0.0.20250111
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +26 -9
- package/dist/index.full.min.js +19 -19
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +19 -19
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +26 -10
- 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/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/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-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +89 -36
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +36 -89
- package/es/components/alert/src/alert2.mjs.map +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 +42 -192
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +192 -42
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +364 -79
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +79 -364
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +20 -42
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +42 -20
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel.mjs +61 -204
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +204 -61
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +14 -38
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +38 -14
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +40 -402
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +402 -40
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +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/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +47 -319
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +319 -47
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.d.ts +2 -0
- package/es/components/image/src/image.mjs +64 -232
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +5 -1
- package/es/components/image/src/image2.mjs +235 -64
- 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 +45 -412
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +412 -45
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +24 -24
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +102 -431
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +431 -102
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/pagination/src/components/prev.mjs +17 -35
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +35 -17
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +36 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -36
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +53 -207
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +207 -53
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +28 -62
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +62 -28
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar.mjs +10 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -10
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/scrollbar/src/thumb.mjs +129 -11
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +11 -129
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/slider/index.mjs +2 -2
- package/es/components/slider/src/slider.mjs +88 -238
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +238 -88
- package/es/components/slider/src/slider2.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/index.mjs +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.mjs +2 -2
- package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
- package/es/components/time-picker/src/common/props.d.ts +25 -0
- package/es/components/time-picker/src/common/props.mjs +3 -2
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-select/src/time-select.d.ts +1 -0
- package/es/components/time-select/src/time-select.mjs +4 -0
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +3 -0
- package/es/components/time-select/src/time-select2.mjs +12 -4
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content.mjs +110 -48
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +48 -110
- package/es/components/tooltip-v2/src/content2.mjs.map +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 +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tour/index.mjs +3 -3
- package/es/components/tour/src/content.mjs +67 -43
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +43 -67
- package/es/components/tour/src/content2.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/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +68 -153
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +153 -68
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content.mjs +196 -33
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +33 -196
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger.mjs +10 -47
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +47 -10
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +24 -24
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +88 -37
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +37 -88
- package/lib/components/alert/src/alert2.js.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 +42 -191
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +191 -42
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +363 -79
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +79 -363
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +20 -42
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +42 -20
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel.js +62 -204
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +204 -62
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +15 -38
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +38 -15
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +40 -400
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +400 -40
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +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/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +48 -323
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +323 -48
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.d.ts +2 -0
- package/lib/components/image/src/image.js +64 -231
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +5 -1
- package/lib/components/image/src/image2.js +234 -64
- 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 +46 -412
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +412 -46
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +24 -23
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +102 -430
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +430 -102
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/mention/src/mention.js +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/pagination/src/components/prev.js +18 -35
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +35 -18
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +36 -8
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +8 -36
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +53 -207
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +207 -53
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +30 -62
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +62 -30
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar.js +10 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -10
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/scrollbar/src/thumb.js +129 -11
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +11 -129
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/slider/index.js +2 -2
- package/lib/components/slider/src/slider.js +89 -238
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +238 -89
- package/lib/components/slider/src/slider2.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/index.js +1 -0
- package/lib/components/time-picker/index.js.map +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
- package/lib/components/time-picker/src/common/props.d.ts +25 -0
- package/lib/components/time-picker/src/common/props.js +3 -1
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-select/src/time-select.d.ts +1 -0
- package/lib/components/time-select/src/time-select.js +4 -0
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +3 -0
- package/lib/components/time-select/src/time-select2.js +12 -4
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content.js +110 -48
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +48 -110
- package/lib/components/tooltip-v2/src/content2.js.map +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 +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tour/index.js +3 -3
- package/lib/components/tour/src/content.js +67 -46
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +46 -67
- package/lib/components/tour/src/content2.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/step.js +1 -1
- package/lib/components/tour/src/tour.js +67 -151
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +151 -67
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content.js +194 -31
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +31 -194
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload-dragger.js +11 -47
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +47 -11
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +24 -23
- 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/theme-chalk/el-dialog.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/dialog.scss +1 -0
- package/web-types.json +1 -1
@@ -1,92 +1,242 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import
|
1
|
+
import { defineComponent, reactive, computed, toRefs, provide, openBlock, createElementBlock, unref, normalizeClass, createElementVNode, normalizeStyle, createVNode, createBlock, createCommentVNode, Fragment, renderList, withModifiers } from 'vue';
|
2
|
+
import { useEventListener } from '@vueuse/core';
|
3
|
+
import { ElInputNumber } from '../../input-number/index.mjs';
|
4
|
+
import { sliderContextKey } from './constants.mjs';
|
5
|
+
import { sliderProps, sliderEmits } from './slider.mjs';
|
6
|
+
import SliderButton from './button2.mjs';
|
7
|
+
import SliderMarker from './marker.mjs';
|
8
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
9
|
+
import { useSlide } from './composables/use-slide.mjs';
|
10
|
+
import { useStops } from './composables/use-stops.mjs';
|
11
|
+
import { useMarks } from './composables/use-marks.mjs';
|
12
|
+
import { useWatch } from './composables/use-watch.mjs';
|
13
|
+
import { useLifecycle } from './composables/use-lifecycle.mjs';
|
14
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
15
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
16
|
+
import { useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
17
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
8
18
|
|
9
|
-
const
|
10
|
-
|
11
|
-
type: definePropType([Number, Array]),
|
12
|
-
default: 0
|
13
|
-
},
|
14
|
-
id: {
|
15
|
-
type: String,
|
16
|
-
default: void 0
|
17
|
-
},
|
18
|
-
min: {
|
19
|
-
type: Number,
|
20
|
-
default: 0
|
21
|
-
},
|
22
|
-
max: {
|
23
|
-
type: Number,
|
24
|
-
default: 100
|
25
|
-
},
|
26
|
-
step: {
|
27
|
-
type: Number,
|
28
|
-
default: 1
|
29
|
-
},
|
30
|
-
showInput: Boolean,
|
31
|
-
showInputControls: {
|
32
|
-
type: Boolean,
|
33
|
-
default: true
|
34
|
-
},
|
35
|
-
size: useSizeProp,
|
36
|
-
inputSize: useSizeProp,
|
37
|
-
showStops: Boolean,
|
38
|
-
showTooltip: {
|
39
|
-
type: Boolean,
|
40
|
-
default: true
|
41
|
-
},
|
42
|
-
formatTooltip: {
|
43
|
-
type: definePropType(Function),
|
44
|
-
default: void 0
|
45
|
-
},
|
46
|
-
disabled: Boolean,
|
47
|
-
range: Boolean,
|
48
|
-
vertical: Boolean,
|
49
|
-
height: String,
|
50
|
-
debounce: {
|
51
|
-
type: Number,
|
52
|
-
default: 300
|
53
|
-
},
|
54
|
-
rangeStartLabel: {
|
55
|
-
type: String,
|
56
|
-
default: void 0
|
57
|
-
},
|
58
|
-
rangeEndLabel: {
|
59
|
-
type: String,
|
60
|
-
default: void 0
|
61
|
-
},
|
62
|
-
formatValueText: {
|
63
|
-
type: definePropType(Function),
|
64
|
-
default: void 0
|
65
|
-
},
|
66
|
-
tooltipClass: {
|
67
|
-
type: String,
|
68
|
-
default: void 0
|
69
|
-
},
|
70
|
-
placement: {
|
71
|
-
type: String,
|
72
|
-
values: placements,
|
73
|
-
default: "top"
|
74
|
-
},
|
75
|
-
marks: {
|
76
|
-
type: definePropType(Object)
|
77
|
-
},
|
78
|
-
validateEvent: {
|
79
|
-
type: Boolean,
|
80
|
-
default: true
|
81
|
-
},
|
82
|
-
...useAriaProps(["ariaLabel"])
|
19
|
+
const __default__ = defineComponent({
|
20
|
+
name: "ElSlider"
|
83
21
|
});
|
84
|
-
const
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
22
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
23
|
+
...__default__,
|
24
|
+
props: sliderProps,
|
25
|
+
emits: sliderEmits,
|
26
|
+
setup(__props, { expose, emit }) {
|
27
|
+
const props = __props;
|
28
|
+
const ns = useNamespace("slider");
|
29
|
+
const { t } = useLocale();
|
30
|
+
const initData = reactive({
|
31
|
+
firstValue: 0,
|
32
|
+
secondValue: 0,
|
33
|
+
oldValue: 0,
|
34
|
+
dragging: false,
|
35
|
+
sliderSize: 1
|
36
|
+
});
|
37
|
+
const {
|
38
|
+
elFormItem,
|
39
|
+
slider,
|
40
|
+
firstButton,
|
41
|
+
secondButton,
|
42
|
+
sliderDisabled,
|
43
|
+
minValue,
|
44
|
+
maxValue,
|
45
|
+
runwayStyle,
|
46
|
+
barStyle,
|
47
|
+
resetSize,
|
48
|
+
emitChange,
|
49
|
+
onSliderWrapperPrevent,
|
50
|
+
onSliderClick,
|
51
|
+
onSliderDown,
|
52
|
+
onSliderMarkerDown,
|
53
|
+
setFirstValue,
|
54
|
+
setSecondValue
|
55
|
+
} = useSlide(props, initData, emit);
|
56
|
+
const { stops, getStopStyle } = useStops(props, initData, minValue, maxValue);
|
57
|
+
const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
|
58
|
+
formItemContext: elFormItem
|
59
|
+
});
|
60
|
+
const sliderWrapperSize = useFormSize();
|
61
|
+
const sliderInputSize = computed(() => props.inputSize || sliderWrapperSize.value);
|
62
|
+
const groupLabel = computed(() => {
|
63
|
+
return props.ariaLabel || t("el.slider.defaultLabel", {
|
64
|
+
min: props.min,
|
65
|
+
max: props.max
|
66
|
+
});
|
67
|
+
});
|
68
|
+
const firstButtonLabel = computed(() => {
|
69
|
+
if (props.range) {
|
70
|
+
return props.rangeStartLabel || t("el.slider.defaultRangeStartLabel");
|
71
|
+
} else {
|
72
|
+
return groupLabel.value;
|
73
|
+
}
|
74
|
+
});
|
75
|
+
const firstValueText = computed(() => {
|
76
|
+
return props.formatValueText ? props.formatValueText(firstValue.value) : `${firstValue.value}`;
|
77
|
+
});
|
78
|
+
const secondButtonLabel = computed(() => {
|
79
|
+
return props.rangeEndLabel || t("el.slider.defaultRangeEndLabel");
|
80
|
+
});
|
81
|
+
const secondValueText = computed(() => {
|
82
|
+
return props.formatValueText ? props.formatValueText(secondValue.value) : `${secondValue.value}`;
|
83
|
+
});
|
84
|
+
const sliderKls = computed(() => [
|
85
|
+
ns.b(),
|
86
|
+
ns.m(sliderWrapperSize.value),
|
87
|
+
ns.is("vertical", props.vertical),
|
88
|
+
{ [ns.m("with-input")]: props.showInput }
|
89
|
+
]);
|
90
|
+
const markList = useMarks(props);
|
91
|
+
useWatch(props, initData, minValue, maxValue, emit, elFormItem);
|
92
|
+
const precision = computed(() => {
|
93
|
+
const precisions = [props.min, props.max, props.step].map((item) => {
|
94
|
+
const decimal = `${item}`.split(".")[1];
|
95
|
+
return decimal ? decimal.length : 0;
|
96
|
+
});
|
97
|
+
return Math.max.apply(null, precisions);
|
98
|
+
});
|
99
|
+
const { sliderWrapper } = useLifecycle(props, initData, resetSize);
|
100
|
+
const { firstValue, secondValue, sliderSize } = toRefs(initData);
|
101
|
+
const updateDragging = (val) => {
|
102
|
+
initData.dragging = val;
|
103
|
+
};
|
104
|
+
useEventListener(sliderWrapper, "touchstart", onSliderWrapperPrevent, {
|
105
|
+
passive: false
|
106
|
+
});
|
107
|
+
useEventListener(sliderWrapper, "touchmove", onSliderWrapperPrevent, {
|
108
|
+
passive: false
|
109
|
+
});
|
110
|
+
provide(sliderContextKey, {
|
111
|
+
...toRefs(props),
|
112
|
+
sliderSize,
|
113
|
+
disabled: sliderDisabled,
|
114
|
+
precision,
|
115
|
+
emitChange,
|
116
|
+
resetSize,
|
117
|
+
updateDragging
|
118
|
+
});
|
119
|
+
expose({
|
120
|
+
onSliderClick
|
121
|
+
});
|
122
|
+
return (_ctx, _cache) => {
|
123
|
+
var _a, _b;
|
124
|
+
return openBlock(), createElementBlock("div", {
|
125
|
+
id: _ctx.range ? unref(inputId) : void 0,
|
126
|
+
ref_key: "sliderWrapper",
|
127
|
+
ref: sliderWrapper,
|
128
|
+
class: normalizeClass(unref(sliderKls)),
|
129
|
+
role: _ctx.range ? "group" : void 0,
|
130
|
+
"aria-label": _ctx.range && !unref(isLabeledByFormItem) ? unref(groupLabel) : void 0,
|
131
|
+
"aria-labelledby": _ctx.range && unref(isLabeledByFormItem) ? (_a = unref(elFormItem)) == null ? void 0 : _a.labelId : void 0
|
132
|
+
}, [
|
133
|
+
createElementVNode("div", {
|
134
|
+
ref_key: "slider",
|
135
|
+
ref: slider,
|
136
|
+
class: normalizeClass([
|
137
|
+
unref(ns).e("runway"),
|
138
|
+
{ "show-input": _ctx.showInput && !_ctx.range },
|
139
|
+
unref(ns).is("disabled", unref(sliderDisabled))
|
140
|
+
]),
|
141
|
+
style: normalizeStyle(unref(runwayStyle)),
|
142
|
+
onMousedown: unref(onSliderDown),
|
143
|
+
onTouchstartPassive: unref(onSliderDown)
|
144
|
+
}, [
|
145
|
+
createElementVNode("div", {
|
146
|
+
class: normalizeClass(unref(ns).e("bar")),
|
147
|
+
style: normalizeStyle(unref(barStyle))
|
148
|
+
}, null, 6),
|
149
|
+
createVNode(SliderButton, {
|
150
|
+
id: !_ctx.range ? unref(inputId) : void 0,
|
151
|
+
ref_key: "firstButton",
|
152
|
+
ref: firstButton,
|
153
|
+
"model-value": unref(firstValue),
|
154
|
+
vertical: _ctx.vertical,
|
155
|
+
"tooltip-class": _ctx.tooltipClass,
|
156
|
+
placement: _ctx.placement,
|
157
|
+
role: "slider",
|
158
|
+
"aria-label": _ctx.range || !unref(isLabeledByFormItem) ? unref(firstButtonLabel) : void 0,
|
159
|
+
"aria-labelledby": !_ctx.range && unref(isLabeledByFormItem) ? (_b = unref(elFormItem)) == null ? void 0 : _b.labelId : void 0,
|
160
|
+
"aria-valuemin": _ctx.min,
|
161
|
+
"aria-valuemax": _ctx.range ? unref(secondValue) : _ctx.max,
|
162
|
+
"aria-valuenow": unref(firstValue),
|
163
|
+
"aria-valuetext": unref(firstValueText),
|
164
|
+
"aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
|
165
|
+
"aria-disabled": unref(sliderDisabled),
|
166
|
+
"onUpdate:modelValue": unref(setFirstValue)
|
167
|
+
}, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
|
168
|
+
_ctx.range ? (openBlock(), createBlock(SliderButton, {
|
169
|
+
key: 0,
|
170
|
+
ref_key: "secondButton",
|
171
|
+
ref: secondButton,
|
172
|
+
"model-value": unref(secondValue),
|
173
|
+
vertical: _ctx.vertical,
|
174
|
+
"tooltip-class": _ctx.tooltipClass,
|
175
|
+
placement: _ctx.placement,
|
176
|
+
role: "slider",
|
177
|
+
"aria-label": unref(secondButtonLabel),
|
178
|
+
"aria-valuemin": unref(firstValue),
|
179
|
+
"aria-valuemax": _ctx.max,
|
180
|
+
"aria-valuenow": unref(secondValue),
|
181
|
+
"aria-valuetext": unref(secondValueText),
|
182
|
+
"aria-orientation": _ctx.vertical ? "vertical" : "horizontal",
|
183
|
+
"aria-disabled": unref(sliderDisabled),
|
184
|
+
"onUpdate:modelValue": unref(setSecondValue)
|
185
|
+
}, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : createCommentVNode("v-if", true),
|
186
|
+
_ctx.showStops ? (openBlock(), createElementBlock("div", { key: 1 }, [
|
187
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(stops), (item, key) => {
|
188
|
+
return openBlock(), createElementBlock("div", {
|
189
|
+
key,
|
190
|
+
class: normalizeClass(unref(ns).e("stop")),
|
191
|
+
style: normalizeStyle(unref(getStopStyle)(item))
|
192
|
+
}, null, 6);
|
193
|
+
}), 128))
|
194
|
+
])) : createCommentVNode("v-if", true),
|
195
|
+
unref(markList).length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
196
|
+
createElementVNode("div", null, [
|
197
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
|
198
|
+
return openBlock(), createElementBlock("div", {
|
199
|
+
key,
|
200
|
+
style: normalizeStyle(unref(getStopStyle)(item.position)),
|
201
|
+
class: normalizeClass([unref(ns).e("stop"), unref(ns).e("marks-stop")])
|
202
|
+
}, null, 6);
|
203
|
+
}), 128))
|
204
|
+
]),
|
205
|
+
createElementVNode("div", {
|
206
|
+
class: normalizeClass(unref(ns).e("marks"))
|
207
|
+
}, [
|
208
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(markList), (item, key) => {
|
209
|
+
return openBlock(), createBlock(unref(SliderMarker), {
|
210
|
+
key,
|
211
|
+
mark: item.mark,
|
212
|
+
style: normalizeStyle(unref(getStopStyle)(item.position)),
|
213
|
+
onMousedown: withModifiers(($event) => unref(onSliderMarkerDown)(item.position), ["stop"])
|
214
|
+
}, null, 8, ["mark", "style", "onMousedown"]);
|
215
|
+
}), 128))
|
216
|
+
], 2)
|
217
|
+
], 64)) : createCommentVNode("v-if", true)
|
218
|
+
], 46, ["onMousedown", "onTouchstartPassive"]),
|
219
|
+
_ctx.showInput && !_ctx.range ? (openBlock(), createBlock(unref(ElInputNumber), {
|
220
|
+
key: 0,
|
221
|
+
ref: "input",
|
222
|
+
"model-value": unref(firstValue),
|
223
|
+
class: normalizeClass(unref(ns).e("input")),
|
224
|
+
step: _ctx.step,
|
225
|
+
disabled: unref(sliderDisabled),
|
226
|
+
controls: _ctx.showInputControls,
|
227
|
+
min: _ctx.min,
|
228
|
+
max: _ctx.max,
|
229
|
+
precision: unref(precision),
|
230
|
+
debounce: _ctx.debounce,
|
231
|
+
size: unref(sliderInputSize),
|
232
|
+
"onUpdate:modelValue": unref(setFirstValue),
|
233
|
+
onChange: unref(emitChange)
|
234
|
+
}, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "precision", "debounce", "size", "onUpdate:modelValue", "onChange"])) : createCommentVNode("v-if", true)
|
235
|
+
], 10, ["id", "role", "aria-label", "aria-labelledby"]);
|
236
|
+
};
|
237
|
+
}
|
238
|
+
});
|
239
|
+
var Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "slider.vue"]]);
|
90
240
|
|
91
|
-
export {
|
241
|
+
export { Slider as default };
|
92
242
|
//# sourceMappingURL=slider2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"slider2.mjs","sources":["../../../../../../packages/components/slider/src/slider.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport {\n buildProps,\n definePropType,\n isArray,\n isNumber,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { SliderMarkerProps } from './marker'\nimport type Slider from './slider.vue'\n\ntype SliderMarks = Record<number, string | SliderMarkerProps['mark']>\n\nexport interface SliderInitData {\n firstValue: number\n secondValue: number\n oldValue?: Arrayable<number>\n dragging: boolean\n sliderSize: number\n}\n\nexport const sliderProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<Arrayable<number>>([Number, Array]),\n default: 0,\n },\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description minimum value\n */\n min: {\n type: Number,\n default: 0,\n },\n /**\n * @description maximum value\n */\n max: {\n type: Number,\n default: 100,\n },\n /**\n * @description step size\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether to display an input box, works when `range` is false\n */\n showInput: Boolean,\n /**\n * @description whether to display control buttons when `show-input` is true\n */\n showInputControls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description size of the slider wrapper, will not work in vertical mode\n */\n size: useSizeProp,\n /**\n * @description size of the input box, when set `size`, the default is the value of `size`\n */\n inputSize: useSizeProp,\n /**\n * @description whether to display breakpoints\n */\n showStops: Boolean,\n /**\n * @description whether to display tooltip value\n */\n showTooltip: {\n type: Boolean,\n default: true,\n },\n /**\n * @description format to display tooltip value\n */\n formatTooltip: {\n type: definePropType<(val: number) => number | string>(Function),\n default: undefined,\n },\n /**\n * @description whether Slider is disabled\n */\n disabled: Boolean,\n /**\n * @description whether to select a range\n */\n range: Boolean,\n /**\n * @description vertical mode\n */\n vertical: Boolean,\n /**\n * @description slider height, required in vertical mode\n */\n height: String,\n /**\n * @description debounce delay when typing, in milliseconds, works when `show-input` is true\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description when `range` is true, screen reader label for the start of the range\n */\n rangeStartLabel: {\n type: String,\n default: undefined,\n },\n /**\n * @description when `range` is true, screen reader label for the end of the range\n */\n rangeEndLabel: {\n type: String,\n default: undefined,\n },\n /**\n * @description format to display the `aria-valuenow` attribute for screen readers\n */\n formatValueText: {\n type: definePropType<(val: number) => string>(Function),\n default: undefined,\n },\n /**\n * @description custom class name for the tooltip\n */\n tooltipClass: {\n type: String,\n default: undefined,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n /**\n * @description marks, type of key must be `number` and must in closed interval `[min, max]`, each mark can custom style\n */\n marks: {\n type: definePropType<SliderMarks>(Object),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type SliderProps = ExtractPropTypes<typeof sliderProps>\n\nconst isValidValue = (value: Arrayable<number>) =>\n isNumber(value) || (isArray(value) && value.every(isNumber))\nexport const sliderEmits = {\n [UPDATE_MODEL_EVENT]: isValidValue,\n [INPUT_EVENT]: isValidValue,\n [CHANGE_EVENT]: isValidValue,\n}\nexport type SliderEmits = typeof sliderEmits\n\nexport type SliderInstance = InstanceType<typeof Slider>\n"],"names":[],"mappings":";;;;;;;;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AAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACH,MAAM,YAAY,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC/E,MAAC,WAAW,GAAG;AAC3B,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,WAAW,GAAG,YAAY;AAC7B,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B;;;;"}
|
1
|
+
{"version":3,"file":"slider2.mjs","sources":["../../../../../../packages/components/slider/src/slider.vue"],"sourcesContent":["<template>\n <div\n :id=\"range ? inputId : undefined\"\n ref=\"sliderWrapper\"\n :class=\"sliderKls\"\n :role=\"range ? 'group' : undefined\"\n :aria-label=\"range && !isLabeledByFormItem ? groupLabel : undefined\"\n :aria-labelledby=\"\n range && isLabeledByFormItem ? elFormItem?.labelId : undefined\n \"\n >\n <div\n ref=\"slider\"\n :class=\"[\n ns.e('runway'),\n { 'show-input': showInput && !range },\n ns.is('disabled', sliderDisabled),\n ]\"\n :style=\"runwayStyle\"\n @mousedown=\"onSliderDown\"\n @touchstart.passive=\"onSliderDown\"\n >\n <div :class=\"ns.e('bar')\" :style=\"barStyle\" />\n <slider-button\n :id=\"!range ? inputId : undefined\"\n ref=\"firstButton\"\n :model-value=\"firstValue\"\n :vertical=\"vertical\"\n :tooltip-class=\"tooltipClass\"\n :placement=\"placement\"\n role=\"slider\"\n :aria-label=\"\n range || !isLabeledByFormItem ? firstButtonLabel : undefined\n \"\n :aria-labelledby=\"\n !range && isLabeledByFormItem ? elFormItem?.labelId : undefined\n \"\n :aria-valuemin=\"min\"\n :aria-valuemax=\"range ? secondValue : max\"\n :aria-valuenow=\"firstValue\"\n :aria-valuetext=\"firstValueText\"\n :aria-orientation=\"vertical ? 'vertical' : 'horizontal'\"\n :aria-disabled=\"sliderDisabled\"\n @update:model-value=\"setFirstValue\"\n />\n <slider-button\n v-if=\"range\"\n ref=\"secondButton\"\n :model-value=\"secondValue\"\n :vertical=\"vertical\"\n :tooltip-class=\"tooltipClass\"\n :placement=\"placement\"\n role=\"slider\"\n :aria-label=\"secondButtonLabel\"\n :aria-valuemin=\"firstValue\"\n :aria-valuemax=\"max\"\n :aria-valuenow=\"secondValue\"\n :aria-valuetext=\"secondValueText\"\n :aria-orientation=\"vertical ? 'vertical' : 'horizontal'\"\n :aria-disabled=\"sliderDisabled\"\n @update:model-value=\"setSecondValue\"\n />\n <div v-if=\"showStops\">\n <div\n v-for=\"(item, key) in stops\"\n :key=\"key\"\n :class=\"ns.e('stop')\"\n :style=\"getStopStyle(item)\"\n />\n </div>\n <template v-if=\"markList.length > 0\">\n <div>\n <div\n v-for=\"(item, key) in markList\"\n :key=\"key\"\n :style=\"getStopStyle(item.position)\"\n :class=\"[ns.e('stop'), ns.e('marks-stop')]\"\n />\n </div>\n <div :class=\"ns.e('marks')\">\n <slider-marker\n v-for=\"(item, key) in markList\"\n :key=\"key\"\n :mark=\"item.mark\"\n :style=\"getStopStyle(item.position)\"\n @mousedown.stop=\"onSliderMarkerDown(item.position)\"\n />\n </div>\n </template>\n </div>\n <el-input-number\n v-if=\"showInput && !range\"\n ref=\"input\"\n :model-value=\"firstValue\"\n :class=\"ns.e('input')\"\n :step=\"step\"\n :disabled=\"sliderDisabled\"\n :controls=\"showInputControls\"\n :min=\"min\"\n :max=\"max\"\n :precision=\"precision\"\n :debounce=\"debounce\"\n :size=\"sliderInputSize\"\n @update:model-value=\"setFirstValue\"\n @change=\"emitChange\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, reactive, toRefs } from 'vue'\nimport { useEventListener } from '@vueuse/core'\nimport ElInputNumber from '@element-plus/components/input-number'\nimport { useFormItemInputId, useFormSize } from '@element-plus/components/form'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { sliderContextKey } from './constants'\nimport { sliderEmits, sliderProps } from './slider'\nimport SliderButton from './button.vue'\nimport SliderMarker from './marker'\nimport {\n useLifecycle,\n useMarks,\n useSlide,\n useStops,\n useWatch,\n} from './composables'\nimport type { SliderInitData } from './slider'\n\ndefineOptions({\n name: 'ElSlider',\n})\n\nconst props = defineProps(sliderProps)\nconst emit = defineEmits(sliderEmits)\n\nconst ns = useNamespace('slider')\nconst { t } = useLocale()\n\nconst initData = reactive<SliderInitData>({\n firstValue: 0,\n secondValue: 0,\n oldValue: 0,\n dragging: false,\n sliderSize: 1,\n})\n\nconst {\n elFormItem,\n slider,\n firstButton,\n secondButton,\n sliderDisabled,\n minValue,\n maxValue,\n runwayStyle,\n barStyle,\n resetSize,\n emitChange,\n onSliderWrapperPrevent,\n onSliderClick,\n onSliderDown,\n onSliderMarkerDown,\n setFirstValue,\n setSecondValue,\n} = useSlide(props, initData, emit)\n\nconst { stops, getStopStyle } = useStops(props, initData, minValue, maxValue)\n\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: elFormItem,\n})\n\nconst sliderWrapperSize = useFormSize()\nconst sliderInputSize = computed(\n () => props.inputSize || sliderWrapperSize.value\n)\n\nconst groupLabel = computed<string>(() => {\n return (\n props.ariaLabel ||\n t('el.slider.defaultLabel', {\n min: props.min,\n max: props.max,\n })\n )\n})\n\nconst firstButtonLabel = computed<string>(() => {\n if (props.range) {\n return props.rangeStartLabel || t('el.slider.defaultRangeStartLabel')\n } else {\n return groupLabel.value\n }\n})\n\nconst firstValueText = computed<string>(() => {\n return props.formatValueText\n ? props.formatValueText(firstValue.value)\n : `${firstValue.value}`\n})\n\nconst secondButtonLabel = computed<string>(() => {\n return props.rangeEndLabel || t('el.slider.defaultRangeEndLabel')\n})\n\nconst secondValueText = computed<string>(() => {\n return props.formatValueText\n ? props.formatValueText(secondValue.value)\n : `${secondValue.value}`\n})\n\nconst sliderKls = computed(() => [\n ns.b(),\n ns.m(sliderWrapperSize.value),\n ns.is('vertical', props.vertical),\n { [ns.m('with-input')]: props.showInput },\n])\n\nconst markList = useMarks(props)\n\nuseWatch(props, initData, minValue, maxValue, emit, elFormItem!)\n\nconst precision = computed(() => {\n const precisions = [props.min, props.max, props.step].map((item) => {\n const decimal = `${item}`.split('.')[1]\n return decimal ? decimal.length : 0\n })\n return Math.max.apply(null, precisions)\n})\n\nconst { sliderWrapper } = useLifecycle(props, initData, resetSize)\n\nconst { firstValue, secondValue, sliderSize } = toRefs(initData)\n\nconst updateDragging = (val: boolean) => {\n initData.dragging = val\n}\n\nuseEventListener(sliderWrapper, 'touchstart', onSliderWrapperPrevent, {\n passive: false,\n})\nuseEventListener(sliderWrapper, 'touchmove', onSliderWrapperPrevent, {\n passive: false,\n})\n\nprovide(sliderContextKey, {\n ...toRefs(props),\n sliderSize,\n disabled: sliderDisabled,\n precision,\n emitChange,\n resetSize,\n upd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AA,EAAA;AAAA,MACV,OAAA,EAAA,KAAA;AACD,KAAiB,CAAA,CAAA;AAAoD,IAAA,OAC1D,CAAA,gBAAA,EAAA;AAAA,MACV,GAAA,MAAA,CAAA,KAAA,CAAA;AAED,MAAA,UAA0B;AAAA,MACxB,UAAU,cAAK;AAAA,MACf,SAAA;AAAA,MACA,UAAU;AAAA,MACV,SAAA;AAAA,MACA,cAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,MAAA,CAAA;AAAA,MACD,aAAA;AAED,KAAa,CAAA,CAAA;AAAA,IACX,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,IAAA,EAAA,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,26 +1,72 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, ref, computed, useAttrs, onMounted, onUpdated, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
|
2
|
+
import { textProps } from './text2.mjs';
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
+
import { isUndefined } from '../../../utils/types.mjs';
|
3
7
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
8
|
+
const __default__ = defineComponent({
|
9
|
+
name: "ElText"
|
10
|
+
});
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
12
|
+
...__default__,
|
13
|
+
props: textProps,
|
14
|
+
setup(__props) {
|
15
|
+
const props = __props;
|
16
|
+
const textRef = ref();
|
17
|
+
const textSize = useFormSize();
|
18
|
+
const ns = useNamespace("text");
|
19
|
+
const textKls = computed(() => [
|
20
|
+
ns.b(),
|
21
|
+
ns.m(props.type),
|
22
|
+
ns.m(textSize.value),
|
23
|
+
ns.is("truncated", props.truncated),
|
24
|
+
ns.is("line-clamp", !isUndefined(props.lineClamp))
|
25
|
+
]);
|
26
|
+
const inheritTitle = useAttrs().title;
|
27
|
+
const bindTitle = () => {
|
28
|
+
var _a, _b, _c, _d, _e;
|
29
|
+
if (inheritTitle)
|
30
|
+
return;
|
31
|
+
let shouldAddTitle = false;
|
32
|
+
const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || "";
|
33
|
+
if (props.truncated) {
|
34
|
+
const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth;
|
35
|
+
const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth;
|
36
|
+
if (width && scrollWidth && scrollWidth > width) {
|
37
|
+
shouldAddTitle = true;
|
38
|
+
}
|
39
|
+
} else if (!isUndefined(props.lineClamp)) {
|
40
|
+
const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight;
|
41
|
+
const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight;
|
42
|
+
if (height && scrollHeight && scrollHeight > height) {
|
43
|
+
shouldAddTitle = true;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
if (shouldAddTitle) {
|
47
|
+
textRef.value.setAttribute("title", text);
|
48
|
+
} else {
|
49
|
+
textRef.value.removeAttribute("title");
|
50
|
+
}
|
51
|
+
};
|
52
|
+
onMounted(bindTitle);
|
53
|
+
onUpdated(bindTitle);
|
54
|
+
return (_ctx, _cache) => {
|
55
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
56
|
+
ref_key: "textRef",
|
57
|
+
ref: textRef,
|
58
|
+
class: normalizeClass(unref(textKls)),
|
59
|
+
style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
60
|
+
}, {
|
61
|
+
default: withCtx(() => [
|
62
|
+
renderSlot(_ctx.$slots, "default")
|
63
|
+
]),
|
64
|
+
_: 3
|
65
|
+
}, 8, ["class", "style"]);
|
66
|
+
};
|
22
67
|
}
|
23
68
|
});
|
69
|
+
var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
|
24
70
|
|
25
|
-
export {
|
71
|
+
export { Text as default };
|
26
72
|
//# sourceMappingURL=text.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.
|
1
|
+
{"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"textRef\"\n :class=\"textKls\"\n :style=\"{ '-webkit-line-clamp': lineClamp }\"\n >\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, ref, useAttrs } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { textProps } from './text'\n\ndefineOptions({\n name: 'ElText',\n})\n\nconst props = defineProps(textProps)\nconst textRef = ref<HTMLElement>()\n\nconst textSize = useFormSize()\nconst ns = useNamespace('text')\n\nconst textKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.m(textSize.value),\n ns.is('truncated', props.truncated),\n ns.is('line-clamp', !isUndefined(props.lineClamp)),\n])\n\nconst inheritTitle = useAttrs().title\n\nconst bindTitle = () => {\n if (inheritTitle) return\n let shouldAddTitle = false\n const text = textRef.value?.textContent || ''\n if (props.truncated) {\n const width = textRef.value?.offsetWidth\n const scrollWidth = textRef.value?.scrollWidth\n if (width && scrollWidth && scrollWidth > width) {\n shouldAddTitle = true\n }\n } else if (!isUndefined(props.lineClamp)) {\n const height = textRef.value?.offsetHeight\n const scrollHeight = textRef.value?.scrollHeight\n if (height && scrollHeight && scrollHeight > height) {\n shouldAddTitle = true\n }\n }\n if (shouldAddTitle) {\n textRef.value!.setAttribute('title', text)\n } else {\n textRef.value!.removeAttribute('title')\n }\n}\n\nonMounted(bindTitle)\nonUpdated(bindTitle)\n</script>\n"],"names":[],"mappings":";;;;;;;mCAkBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAA,MAAM,UAAU,GAAiB,EAAA,CAAA;AAEjC,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAAA,MAC7B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACf,EAAA,CAAG,CAAE,CAAA,QAAA,CAAS,KAAK,CAAA;AAAA,MACnB,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,KAAA,CAAM,SAAS,CAAA;AAAA,MAClC,GAAG,EAAG,CAAA,YAAA,EAAc,CAAC,WAAY,CAAA,KAAA,CAAM,SAAS,CAAC,CAAA;AAAA,KAClD,CAAA,CAAA;AAED,IAAM,MAAA,YAAA,GAAe,UAAW,CAAA,KAAA,CAAA;AAEhC,IAAA,MAAM,YAAY,MAAM;AACtB,MAAA,IAAI,EAAc,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAClB,MAAA,IAAI,YAAiB;AACrB,QAAM,OAAA;AACN,MAAA,IAAI,cAAiB,GAAA,KAAA,CAAA;AACnB,MAAM,MAAA,IAAA,GAAA,CAAA,CAAA,YAAuB,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,WAAA,KAAA,EAAA,CAAA;AAC7B,MAAM,IAAA,KAAA,CAAA,SAAA,EAAA;AACN,QAAI,MAAA,KAAA,GAAwB,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAc,GAAO,KAAA,CAAA,GAAA,EAAA,CAAA,WAAA,CAAA;AAC/C,QAAiB,MAAA,WAAA,GAAA,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,WAAA,CAAA;AAAA,QACnB,IAAA,KAAA,IAAA,WAAA,IAAA,WAAA,GAAA,KAAA,EAAA;AAAA,UACS,cAAa,GAAA,IAAA,CAAA;AACtB,SAAM;AACN,OAAM,MAAA,IAAA,CAAA,WAAe,gBAAe,CAAA,EAAA;AACpC,QAAI,MAAA,MAAA,GAA0B,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAuB,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA;AACnD,QAAiB,MAAA,YAAA,GAAA,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA;AAAA,QACnB,IAAA,MAAA,IAAA,YAAA,IAAA,YAAA,GAAA,MAAA,EAAA;AAAA,UACF,cAAA,GAAA,IAAA,CAAA;AACA,SAAA;AACE,OAAQ;AAAiC,MAC3C,IAAO,cAAA,EAAA;AACL,QAAQ,OAAA,CAAA,KAAA,CAAO,oBAAuB,EAAA,IAAA,CAAA,CAAA;AAAA,OACxC,MAAA;AAAA,QACF,OAAA,CAAA,KAAA,CAAA,eAAA,CAAA,OAAA,CAAA,CAAA;AAEA,OAAA;AACA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,72 +1,26 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
-
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
-
import { isUndefined } from '../../../utils/types.mjs';
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { componentSizes } from '../../../constants/size.mjs';
|
7
3
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
const inheritTitle = useAttrs().title;
|
27
|
-
const bindTitle = () => {
|
28
|
-
var _a, _b, _c, _d, _e;
|
29
|
-
if (inheritTitle)
|
30
|
-
return;
|
31
|
-
let shouldAddTitle = false;
|
32
|
-
const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || "";
|
33
|
-
if (props.truncated) {
|
34
|
-
const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth;
|
35
|
-
const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth;
|
36
|
-
if (width && scrollWidth && scrollWidth > width) {
|
37
|
-
shouldAddTitle = true;
|
38
|
-
}
|
39
|
-
} else if (!isUndefined(props.lineClamp)) {
|
40
|
-
const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight;
|
41
|
-
const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight;
|
42
|
-
if (height && scrollHeight && scrollHeight > height) {
|
43
|
-
shouldAddTitle = true;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
if (shouldAddTitle) {
|
47
|
-
textRef.value.setAttribute("title", text);
|
48
|
-
} else {
|
49
|
-
textRef.value.removeAttribute("title");
|
50
|
-
}
|
51
|
-
};
|
52
|
-
onMounted(bindTitle);
|
53
|
-
onUpdated(bindTitle);
|
54
|
-
return (_ctx, _cache) => {
|
55
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
56
|
-
ref_key: "textRef",
|
57
|
-
ref: textRef,
|
58
|
-
class: normalizeClass(unref(textKls)),
|
59
|
-
style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
60
|
-
}, {
|
61
|
-
default: withCtx(() => [
|
62
|
-
renderSlot(_ctx.$slots, "default")
|
63
|
-
]),
|
64
|
-
_: 3
|
65
|
-
}, 8, ["class", "style"]);
|
66
|
-
};
|
4
|
+
const textProps = buildProps({
|
5
|
+
type: {
|
6
|
+
type: String,
|
7
|
+
values: ["primary", "success", "info", "warning", "danger", ""],
|
8
|
+
default: ""
|
9
|
+
},
|
10
|
+
size: {
|
11
|
+
type: String,
|
12
|
+
values: componentSizes,
|
13
|
+
default: ""
|
14
|
+
},
|
15
|
+
truncated: Boolean,
|
16
|
+
lineClamp: {
|
17
|
+
type: [String, Number]
|
18
|
+
},
|
19
|
+
tag: {
|
20
|
+
type: String,
|
21
|
+
default: "span"
|
67
22
|
}
|
68
23
|
});
|
69
|
-
var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
|
70
24
|
|
71
|
-
export {
|
25
|
+
export { textProps };
|
72
26
|
//# sourceMappingURL=text2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.
|
1
|
+
{"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const textProps = buildProps({\n /**\n * @description text type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description text size\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description render ellipsis\n */\n truncated: Boolean,\n /**\n * @description maximum lines\n */\n lineClamp: {\n type: [String, Number],\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'span',\n },\n} as const)\n\nexport type TextProps = ExtractPropTypes<typeof textProps>\n"],"names":[],"mappings":";;;AAEY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AACnE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
@@ -3,7 +3,7 @@ export { default as CommonPicker } from './src/common/picker.mjs';
|
|
3
3
|
export { default as TimePickPanel } from './src/time-picker-com/panel-time-pick.mjs';
|
4
4
|
export { buildTimeList, dateEquals, dayOrDaysToDate, extractDateFormat, extractTimeFormat, formatter, makeList, parseDate, rangeArr, valueEquals } from './src/utils.mjs';
|
5
5
|
export { DEFAULT_FORMATS_DATE, DEFAULT_FORMATS_DATEPICKER, DEFAULT_FORMATS_TIME, timeUnits } from './src/constants.mjs';
|
6
|
-
export { timePickerDefaultProps, timePickerRngeTriggerProps } from './src/common/props.mjs';
|
6
|
+
export { timePickerDefaultProps, timePickerRangeTriggerProps, timePickerRngeTriggerProps } from './src/common/props.mjs';
|
7
7
|
import { withInstall } from '../../utils/vue/install.mjs';
|
8
8
|
|
9
9
|
const ElTimePicker = withInstall(TimePicker);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent, ref, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, createElementVNode, mergeProps } from 'vue';
|
2
|
-
import {
|
2
|
+
import { timePickerRangeTriggerProps } from './props.mjs';
|
3
3
|
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
4
4
|
import { useAttrs } from '../../../../hooks/use-attrs/index.mjs';
|
5
5
|
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
|
@@ -11,7 +11,7 @@ const __default__ = defineComponent({
|
|
11
11
|
});
|
12
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
13
13
|
...__default__,
|
14
|
-
props:
|
14
|
+
props: timePickerRangeTriggerProps,
|
15
15
|
emits: [
|
16
16
|
"mouseenter",
|
17
17
|
"mouseleave",
|