@element-plus/nightly 0.0.20241220 → 0.0.20241222
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +20 -19
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +13 -13
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +20 -19
- 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/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/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/anchor/index.mjs +1 -1
- 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/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/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +32 -71
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +71 -32
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +4 -4
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +7 -69
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +69 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +16 -28
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +28 -16
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.mjs +1 -1
- package/es/components/descriptions/src/description2.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +63 -6
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +6 -63
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/src/dialog.mjs +64 -168
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +168 -64
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/drawer/src/drawer.mjs +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +102 -298
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +298 -102
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form.mjs +53 -151
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +151 -53
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +64 -232
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +232 -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 +412 -45
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +45 -412
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +27 -27
- 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/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +65 -215
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +215 -65
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/mention/index.mjs +2 -2
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +63 -283
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +283 -63
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -34
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +34 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message.mjs +91 -145
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +145 -91
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/pagination/src/components/jumper.mjs +58 -7
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +7 -58
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +71 -23
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +23 -71
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +6 -26
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +26 -6
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +110 -64
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +64 -110
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +127 -31
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +31 -127
- package/es/components/popper/src/trigger2.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/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- 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/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/slider/src/button.mjs +19 -89
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +89 -19
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/table/src/filter-panel.mjs +5 -3
- package/es/components/table/src/filter-panel.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +1 -0
- package/es/components/table/src/h-helper.mjs +2 -1
- package/es/components/table/src/h-helper.mjs.map +1 -1
- package/es/components/table/src/store/current.mjs +2 -1
- package/es/components/table/src/store/current.mjs.map +1 -1
- package/es/components/table/src/store/helper.mjs +2 -1
- package/es/components/table/src/store/helper.mjs.map +1 -1
- package/es/components/table/src/store/index.mjs +2 -1
- package/es/components/table/src/store/index.mjs.map +1 -1
- package/es/components/table/src/table-body/render-helper.mjs +2 -2
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/styles-helper.mjs +2 -2
- package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/render-helper.mjs +3 -2
- package/es/components/table/src/table-column/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/event-helper.mjs +2 -1
- package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
- package/es/components/table/src/table-layout.mjs +2 -1
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/util.mjs +6 -6
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +50 -123
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +123 -50
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +28 -183
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +183 -28
- package/es/components/tooltip/src/content2.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/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +47 -10
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +10 -47
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/index.mjs +27 -27
- 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 +1 -1
- 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/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/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +32 -71
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +71 -32
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +4 -4
- package/lib/components/breadcrumb/src/breadcrumb-item.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +7 -69
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +69 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +18 -28
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +28 -18
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.js +1 -1
- package/lib/components/descriptions/src/description2.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +63 -6
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +6 -63
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dialog/src/dialog.js +65 -168
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +168 -65
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/drawer/src/drawer.js +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +111 -298
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +298 -111
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form.js +54 -150
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +150 -54
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +64 -231
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +231 -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 +412 -46
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +46 -412
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +27 -27
- 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/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +65 -214
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +214 -65
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/mention/index.js +2 -2
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention.js +62 -281
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention2.js +281 -62
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -34
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +34 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message.js +93 -144
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +144 -93
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/pagination/src/components/jumper.js +58 -7
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +7 -58
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +71 -23
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +23 -71
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +6 -26
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +26 -6
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +110 -65
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +65 -110
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +127 -32
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +32 -127
- package/lib/components/popper/src/trigger2.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/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- 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/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +170 -56
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +56 -170
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/slider/src/button.js +20 -89
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +89 -20
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/table/src/filter-panel.js +5 -3
- package/lib/components/table/src/filter-panel.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +1 -0
- package/lib/components/table/src/h-helper.js +2 -1
- package/lib/components/table/src/h-helper.js.map +1 -1
- package/lib/components/table/src/store/current.js +2 -1
- package/lib/components/table/src/store/current.js.map +1 -1
- package/lib/components/table/src/store/helper.js +2 -1
- package/lib/components/table/src/store/helper.js.map +1 -1
- package/lib/components/table/src/store/index.js +2 -1
- package/lib/components/table/src/store/index.js.map +1 -1
- package/lib/components/table/src/table-body/render-helper.js +1 -1
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/table-body/styles-helper.js +1 -1
- package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
- package/lib/components/table/src/table-column/render-helper.js +3 -2
- package/lib/components/table/src/table-column/render-helper.js.map +1 -1
- package/lib/components/table/src/table-header/event-helper.js +2 -1
- package/lib/components/table/src/table-header/event-helper.js.map +1 -1
- package/lib/components/table/src/table-layout.js +2 -1
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/util.js +4 -4
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +50 -128
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +128 -50
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +28 -183
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +183 -28
- package/lib/components/tooltip/src/content2.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/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +47 -11
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +11 -47
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/index.js +27 -27
- 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/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"table-layout.js","sources":["../../../../../../packages/components/table/src/table-layout.ts"],"sourcesContent":["// @ts-nocheck\nimport { isRef, nextTick, ref } from 'vue'\nimport { hasOwn, isClient, isNumber, isString } from '@element-plus/utils'\nimport { parseHeight } from './util'\nimport type { Ref } from 'vue'\n\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Table } from './table/defaults'\nimport type { Store } from './store'\nclass TableLayout<T> {\n observers: TableHeader[]\n table: Table<T>\n store: Store<T>\n columns: TableColumnCtx<T>[]\n fit: boolean\n showHeader: boolean\n\n height: Ref<null | number>\n scrollX: Ref<boolean>\n scrollY: Ref<boolean>\n bodyWidth: Ref<null | number>\n fixedWidth: Ref<null | number>\n rightFixedWidth: Ref<null | number>\n tableHeight: Ref<null | number>\n headerHeight: Ref<null | number> // Table Header Height\n appendHeight: Ref<null | number> // Append Slot Height\n footerHeight: Ref<null | number> // Table Footer Height\n gutterWidth: number\n constructor(options: Record<string, any>) {\n this.observers = []\n this.table = null\n this.store = null\n this.columns = []\n this.fit = true\n this.showHeader = true\n this.height = ref(null)\n this.scrollX = ref(false)\n this.scrollY = ref(false)\n this.bodyWidth = ref(null)\n this.fixedWidth = ref(null)\n this.rightFixedWidth = ref(null)\n this.gutterWidth = 0\n for (const name in options) {\n if (hasOwn(options, name)) {\n if (isRef(this[name])) {\n this[name as string].value = options[name]\n } else {\n this[name as string] = options[name]\n }\n }\n }\n if (!this.table) {\n throw new Error('Table is required for Table Layout')\n }\n if (!this.store) {\n throw new Error('Store is required for Table Layout')\n }\n }\n\n updateScrollY() {\n const height = this.height.value\n /**\n * When the height is not initialized, it is null.\n * After the table is initialized, when the height is not configured, the height is 0.\n */\n if (height === null) return false\n const scrollBarRef = this.table.refs.scrollBarRef\n if (this.table.vnode.el && scrollBarRef?.wrapRef) {\n let scrollY = true\n const prevScrollY = this.scrollY.value\n scrollY =\n scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight\n this.scrollY.value = scrollY\n return prevScrollY !== scrollY\n }\n return false\n }\n\n setHeight(value: string | number, prop = 'height') {\n if (!isClient) return\n const el = this.table.vnode.el\n value = parseHeight(value)\n this.height.value = Number(value)\n\n if (!el && (value || value === 0))\n return nextTick(() => this.setHeight(value, prop))\n\n if (isNumber(value)) {\n el.style[prop] = `${value}px`\n this.updateElsHeight()\n } else if (isString(value)) {\n el.style[prop] = value\n this.updateElsHeight()\n }\n }\n\n setMaxHeight(value: string | number) {\n this.setHeight(value, 'max-height')\n }\n\n getFlattenColumns(): TableColumnCtx<T>[] {\n const flattenColumns = []\n const columns = this.table.store.states.columns.value\n columns.forEach((column) => {\n if (column.isColumnGroup) {\n // eslint-disable-next-line prefer-spread\n flattenColumns.push.apply(flattenColumns, column.columns)\n } else {\n flattenColumns.push(column)\n }\n })\n\n return flattenColumns\n }\n\n updateElsHeight() {\n this.updateScrollY()\n this.notifyObservers('scrollable')\n }\n\n headerDisplayNone(elm: HTMLElement) {\n if (!elm) return true\n let headerChild = elm\n while (headerChild.tagName !== 'DIV') {\n if (getComputedStyle(headerChild).display === 'none') {\n return true\n }\n headerChild = headerChild.parentElement\n }\n return false\n }\n\n updateColumnsWidth() {\n if (!isClient) return\n const fit = this.fit\n const bodyWidth = this.table.vnode.el.clientWidth\n let bodyMinWidth = 0\n\n const flattenColumns = this.getFlattenColumns()\n const flexColumns = flattenColumns.filter(\n (column) => !isNumber(column.width)\n )\n flattenColumns.forEach((column) => {\n // Clean those columns whose width changed from flex to unflex\n if (isNumber(column.width) && column.realWidth) column.realWidth = null\n })\n if (flexColumns.length > 0 && fit) {\n flattenColumns.forEach((column) => {\n bodyMinWidth += Number(column.width || column.minWidth || 80)\n })\n if (bodyMinWidth <= bodyWidth) {\n // DON'T HAVE SCROLL BAR\n this.scrollX.value = false\n\n const totalFlexWidth = bodyWidth - bodyMinWidth\n\n if (flexColumns.length === 1) {\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) + totalFlexWidth\n } else {\n const allColumnsWidth = flexColumns.reduce(\n (prev, column) => prev + Number(column.minWidth || 80),\n 0\n )\n const flexWidthPerPixel = totalFlexWidth / allColumnsWidth\n let noneFirstWidth = 0\n\n flexColumns.forEach((column, index) => {\n if (index === 0) return\n const flexWidth = Math.floor(\n Number(column.minWidth || 80) * flexWidthPerPixel\n )\n noneFirstWidth += flexWidth\n column.realWidth = Number(column.minWidth || 80) + flexWidth\n })\n\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) +\n totalFlexWidth -\n noneFirstWidth\n }\n } else {\n // HAVE HORIZONTAL SCROLL BAR\n this.scrollX.value = true\n flexColumns.forEach((column) => {\n column.realWidth = Number(column.minWidth)\n })\n }\n\n this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth)\n this.table.state.resizeState.value.width = this.bodyWidth.value\n } else {\n flattenColumns.forEach((column) => {\n if (!column.width && !column.minWidth) {\n column.realWidth = 80\n } else {\n column.realWidth = Number(column.width || column.minWidth)\n }\n bodyMinWidth += column.realWidth\n })\n this.scrollX.value = bodyMinWidth > bodyWidth\n\n this.bodyWidth.value = bodyMinWidth\n }\n\n const fixedColumns = this.store.states.fixedColumns.value\n\n if (fixedColumns.length > 0) {\n let fixedWidth = 0\n fixedColumns.forEach((column) => {\n fixedWidth += Number(column.realWidth || column.width)\n })\n\n this.fixedWidth.value = fixedWidth\n }\n\n const rightFixedColumns = this.store.states.rightFixedColumns.value\n if (rightFixedColumns.length > 0) {\n let rightFixedWidth = 0\n rightFixedColumns.forEach((column) => {\n rightFixedWidth += Number(column.realWidth || column.width)\n })\n\n this.rightFixedWidth.value = rightFixedWidth\n }\n this.notifyObservers('columns')\n }\n\n addObserver(observer: TableHeader) {\n this.observers.push(observer)\n }\n\n removeObserver(observer: TableHeader) {\n const index = this.observers.indexOf(observer)\n if (index !== -1) {\n this.observers.splice(index, 1)\n }\n }\n\n notifyObservers(event: string) {\n const observers = this.observers\n observers.forEach((observer) => {\n switch (event) {\n case 'columns':\n observer.state?.onColumnsChange(this)\n break\n case 'scrollable':\n observer.state?.onScrollableChange(this)\n break\n default:\n throw new Error(`Table Layout don't have event ${event}.`)\n }\n })\n }\n}\n\nexport default TableLayout\n"],"names":["ref","hasOwn","isRef","isClient","parseHeight","nextTick","isNumber","isString"],"mappings":";;;;;;;;;;AAG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AK,EAAE,CAAC,CAAC,CAAC;AACtC,KAAK;AACL,GAAG;AACH,EAAE,eAAe,CAAC,KAAK,EAAE;AACzB,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK;AACpC,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;AACjB,MAAM,QAAQ,KAAK;AACnB,QAAQ,KAAK,SAAS;AACtB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC5E,UAAU,MAAM;AAChB,QAAQ,KAAK,YAAY;AACzB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC/E,UAAU,MAAM;AAChB,QAAQ;AACR,UAAU,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
|
1
|
+
{"version":3,"file":"table-layout.js","sources":["../../../../../../packages/components/table/src/table-layout.ts"],"sourcesContent":["// @ts-nocheck\nimport { isRef, nextTick, ref } from 'vue'\nimport { isNull } from 'lodash-unified'\nimport { hasOwn, isClient, isNumber, isString } from '@element-plus/utils'\nimport { parseHeight } from './util'\n\nimport type { Ref } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Table } from './table/defaults'\nimport type { Store } from './store'\nclass TableLayout<T> {\n observers: TableHeader[]\n table: Table<T>\n store: Store<T>\n columns: TableColumnCtx<T>[]\n fit: boolean\n showHeader: boolean\n\n height: Ref<null | number>\n scrollX: Ref<boolean>\n scrollY: Ref<boolean>\n bodyWidth: Ref<null | number>\n fixedWidth: Ref<null | number>\n rightFixedWidth: Ref<null | number>\n tableHeight: Ref<null | number>\n headerHeight: Ref<null | number> // Table Header Height\n appendHeight: Ref<null | number> // Append Slot Height\n footerHeight: Ref<null | number> // Table Footer Height\n gutterWidth: number\n constructor(options: Record<string, any>) {\n this.observers = []\n this.table = null\n this.store = null\n this.columns = []\n this.fit = true\n this.showHeader = true\n this.height = ref(null)\n this.scrollX = ref(false)\n this.scrollY = ref(false)\n this.bodyWidth = ref(null)\n this.fixedWidth = ref(null)\n this.rightFixedWidth = ref(null)\n this.gutterWidth = 0\n for (const name in options) {\n if (hasOwn(options, name)) {\n if (isRef(this[name])) {\n this[name as string].value = options[name]\n } else {\n this[name as string] = options[name]\n }\n }\n }\n if (!this.table) {\n throw new Error('Table is required for Table Layout')\n }\n if (!this.store) {\n throw new Error('Store is required for Table Layout')\n }\n }\n\n updateScrollY() {\n const height = this.height.value\n /**\n * When the height is not initialized, it is null.\n * After the table is initialized, when the height is not configured, the height is 0.\n */\n if (isNull(height)) return false\n const scrollBarRef = this.table.refs.scrollBarRef\n if (this.table.vnode.el && scrollBarRef?.wrapRef) {\n let scrollY = true\n const prevScrollY = this.scrollY.value\n scrollY =\n scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight\n this.scrollY.value = scrollY\n return prevScrollY !== scrollY\n }\n return false\n }\n\n setHeight(value: string | number, prop = 'height') {\n if (!isClient) return\n const el = this.table.vnode.el\n value = parseHeight(value)\n this.height.value = Number(value)\n\n if (!el && (value || value === 0))\n return nextTick(() => this.setHeight(value, prop))\n\n if (isNumber(value)) {\n el.style[prop] = `${value}px`\n this.updateElsHeight()\n } else if (isString(value)) {\n el.style[prop] = value\n this.updateElsHeight()\n }\n }\n\n setMaxHeight(value: string | number) {\n this.setHeight(value, 'max-height')\n }\n\n getFlattenColumns(): TableColumnCtx<T>[] {\n const flattenColumns = []\n const columns = this.table.store.states.columns.value\n columns.forEach((column) => {\n if (column.isColumnGroup) {\n // eslint-disable-next-line prefer-spread\n flattenColumns.push.apply(flattenColumns, column.columns)\n } else {\n flattenColumns.push(column)\n }\n })\n\n return flattenColumns\n }\n\n updateElsHeight() {\n this.updateScrollY()\n this.notifyObservers('scrollable')\n }\n\n headerDisplayNone(elm: HTMLElement) {\n if (!elm) return true\n let headerChild = elm\n while (headerChild.tagName !== 'DIV') {\n if (getComputedStyle(headerChild).display === 'none') {\n return true\n }\n headerChild = headerChild.parentElement\n }\n return false\n }\n\n updateColumnsWidth() {\n if (!isClient) return\n const fit = this.fit\n const bodyWidth = this.table.vnode.el.clientWidth\n let bodyMinWidth = 0\n\n const flattenColumns = this.getFlattenColumns()\n const flexColumns = flattenColumns.filter(\n (column) => !isNumber(column.width)\n )\n flattenColumns.forEach((column) => {\n // Clean those columns whose width changed from flex to unflex\n if (isNumber(column.width) && column.realWidth) column.realWidth = null\n })\n if (flexColumns.length > 0 && fit) {\n flattenColumns.forEach((column) => {\n bodyMinWidth += Number(column.width || column.minWidth || 80)\n })\n if (bodyMinWidth <= bodyWidth) {\n // DON'T HAVE SCROLL BAR\n this.scrollX.value = false\n\n const totalFlexWidth = bodyWidth - bodyMinWidth\n\n if (flexColumns.length === 1) {\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) + totalFlexWidth\n } else {\n const allColumnsWidth = flexColumns.reduce(\n (prev, column) => prev + Number(column.minWidth || 80),\n 0\n )\n const flexWidthPerPixel = totalFlexWidth / allColumnsWidth\n let noneFirstWidth = 0\n\n flexColumns.forEach((column, index) => {\n if (index === 0) return\n const flexWidth = Math.floor(\n Number(column.minWidth || 80) * flexWidthPerPixel\n )\n noneFirstWidth += flexWidth\n column.realWidth = Number(column.minWidth || 80) + flexWidth\n })\n\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) +\n totalFlexWidth -\n noneFirstWidth\n }\n } else {\n // HAVE HORIZONTAL SCROLL BAR\n this.scrollX.value = true\n flexColumns.forEach((column) => {\n column.realWidth = Number(column.minWidth)\n })\n }\n\n this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth)\n this.table.state.resizeState.value.width = this.bodyWidth.value\n } else {\n flattenColumns.forEach((column) => {\n if (!column.width && !column.minWidth) {\n column.realWidth = 80\n } else {\n column.realWidth = Number(column.width || column.minWidth)\n }\n bodyMinWidth += column.realWidth\n })\n this.scrollX.value = bodyMinWidth > bodyWidth\n\n this.bodyWidth.value = bodyMinWidth\n }\n\n const fixedColumns = this.store.states.fixedColumns.value\n\n if (fixedColumns.length > 0) {\n let fixedWidth = 0\n fixedColumns.forEach((column) => {\n fixedWidth += Number(column.realWidth || column.width)\n })\n\n this.fixedWidth.value = fixedWidth\n }\n\n const rightFixedColumns = this.store.states.rightFixedColumns.value\n if (rightFixedColumns.length > 0) {\n let rightFixedWidth = 0\n rightFixedColumns.forEach((column) => {\n rightFixedWidth += Number(column.realWidth || column.width)\n })\n\n this.rightFixedWidth.value = rightFixedWidth\n }\n this.notifyObservers('columns')\n }\n\n addObserver(observer: TableHeader) {\n this.observers.push(observer)\n }\n\n removeObserver(observer: TableHeader) {\n const index = this.observers.indexOf(observer)\n if (index !== -1) {\n this.observers.splice(index, 1)\n }\n }\n\n notifyObservers(event: string) {\n const observers = this.observers\n observers.forEach((observer) => {\n switch (event) {\n case 'columns':\n observer.state?.onColumnsChange(this)\n break\n case 'scrollable':\n observer.state?.onScrollableChange(this)\n break\n default:\n throw new Error(`Table Layout don't have event ${event}.`)\n }\n })\n }\n}\n\nexport default TableLayout\n"],"names":["ref","hasOwn","isRef","isNull","isClient","parseHeight","nextTick","isNumber","isString"],"mappings":";;;;;;;;;;;AAIA,MAAM,WAAW,CAAC;AAClB,EAAE,WAAW,CAAC,OAAO,EAAE;AACvB,IAAI,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;AACxB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AACtB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AACtB,IAAI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AM,IAAI,EAAE,EAAE,EAAE,CAAC;AACjB,MAAM,QAAQ,KAAK;AACnB,QAAQ,KAAK,SAAS;AACtB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC5E,UAAU,MAAM;AAChB,QAAQ,KAAK,YAAY;AACzB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC/E,UAAU,MAAM;AAChB,QAAQ;AACR,UAAU,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
|
@@ -131,7 +131,7 @@ function mergeOptions(defaults, config) {
|
|
131
131
|
for (key in config) {
|
132
132
|
if (shared.hasOwn(config, key)) {
|
133
133
|
const value = config[key];
|
134
|
-
if (
|
134
|
+
if (!types.isUndefined(value)) {
|
135
135
|
options[key] = value;
|
136
136
|
}
|
137
137
|
}
|
@@ -141,7 +141,7 @@ function mergeOptions(defaults, config) {
|
|
141
141
|
function parseWidth(width) {
|
142
142
|
if (width === "")
|
143
143
|
return width;
|
144
|
-
if (width
|
144
|
+
if (!types.isUndefined(width)) {
|
145
145
|
width = Number.parseInt(width, 10);
|
146
146
|
if (Number.isNaN(width)) {
|
147
147
|
width = "";
|
@@ -152,7 +152,7 @@ function parseWidth(width) {
|
|
152
152
|
function parseMinWidth(minWidth) {
|
153
153
|
if (minWidth === "")
|
154
154
|
return minWidth;
|
155
|
-
if (minWidth
|
155
|
+
if (!types.isUndefined(minWidth)) {
|
156
156
|
minWidth = parseWidth(minWidth);
|
157
157
|
if (Number.isNaN(minWidth)) {
|
158
158
|
minWidth = 80;
|
@@ -357,7 +357,7 @@ const getFixedColumnsClass = (namespace, index, fixed, store, realColumns, offse
|
|
357
357
|
return classes;
|
358
358
|
};
|
359
359
|
function getOffset(offset, column) {
|
360
|
-
return offset + (column.realWidth
|
360
|
+
return offset + (lodashUnified.isNull(column.realWidth) || Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth);
|
361
361
|
}
|
362
362
|
const getFixedColumnOffset = (index, fixed, store, realColumns) => {
|
363
363
|
const {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"util.js","sources":["../../../../../../packages/components/table/src/util.ts"],"sourcesContent":["// @ts-nocheck\nimport { createVNode, render } from 'vue'\nimport { flatMap, get, merge } from 'lodash-unified'\nimport {\n hasOwn,\n isArray,\n isBoolean,\n isFunction,\n isNumber,\n isObject,\n isString,\n throwError,\n} from '@element-plus/utils'\nimport ElTooltip, {\n type ElTooltipProps,\n} from '@element-plus/components/tooltip'\nimport type { Table, TreeProps } from './table/defaults'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { VNode } from 'vue'\n\nexport type TableOverflowTooltipOptions = Partial<\n Pick<\n ElTooltipProps,\n | 'appendTo'\n | 'effect'\n | 'enterable'\n | 'hideAfter'\n | 'offset'\n | 'placement'\n | 'popperClass'\n | 'popperOptions'\n | 'showAfter'\n | 'showArrow'\n | 'transition'\n >\n>\n\ntype RemovePopperFn = (() => void) & {\n trigger?: HTMLElement\n vm?: VNode\n}\n\nexport const getCell = function (event: Event) {\n return (event.target as HTMLElement)?.closest('td')\n}\n\nexport const orderBy = function <T>(\n array: T[],\n sortKey: string,\n reverse: string | number,\n sortMethod,\n sortBy: string | (string | ((a: T, b: T, array?: T[]) => number))[]\n) {\n if (\n !sortKey &&\n !sortMethod &&\n (!sortBy || (isArray(sortBy) && !sortBy.length))\n ) {\n return array\n }\n if (isString(reverse)) {\n reverse = reverse === 'descending' ? -1 : 1\n } else {\n reverse = reverse && reverse < 0 ? -1 : 1\n }\n const getKey = sortMethod\n ? null\n : function (value, index) {\n if (sortBy) {\n if (!isArray(sortBy)) {\n sortBy = [sortBy]\n }\n return sortBy.map((by) => {\n if (isString(by)) {\n return get(value, by)\n } else {\n return by(value, index, array)\n }\n })\n }\n if (sortKey !== '$key') {\n if (isObject(value) && '$value' in value) value = value.$value\n }\n return [isObject(value) ? get(value, sortKey) : value]\n }\n const compare = function (a, b) {\n if (sortMethod) {\n return sortMethod(a.value, b.value)\n }\n for (let i = 0, len = a.key.length; i < len; i++) {\n if (a.key[i] < b.key[i]) {\n return -1\n }\n if (a.key[i] > b.key[i]) {\n return 1\n }\n }\n return 0\n }\n return array\n .map((value, index) => {\n return {\n value,\n index,\n key: getKey ? getKey(value, index) : null,\n }\n })\n .sort((a, b) => {\n let order = compare(a, b)\n if (!order) {\n // make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability\n order = a.index - b.index\n }\n return order * +reverse\n })\n .map((item) => item.value)\n}\n\nexport const getColumnById = function <T>(\n table: {\n columns: TableColumnCtx<T>[]\n },\n columnId: string\n): null | TableColumnCtx<T> {\n let column = null\n table.columns.forEach((item) => {\n if (item.id === columnId) {\n column = item\n }\n })\n return column\n}\n\nexport const getColumnByKey = function <T>(\n table: {\n columns: TableColumnCtx<T>[]\n },\n columnKey: string\n): TableColumnCtx<T> {\n let column = null\n for (let i = 0; i < table.columns.length; i++) {\n const item = table.columns[i]\n if (item.columnKey === columnKey) {\n column = item\n break\n }\n }\n if (!column)\n throwError('ElTable', `No column matching with column-key: ${columnKey}`)\n return column\n}\n\nexport const getColumnByCell = function <T>(\n table: {\n columns: TableColumnCtx<T>[]\n },\n cell: HTMLElement,\n namespace: string\n): null | TableColumnCtx<T> {\n const matches = (cell.className || '').match(\n new RegExp(`${namespace}-table_[^\\\\s]+`, 'gm')\n )\n if (matches) {\n return getColumnById(table, matches[0])\n }\n return null\n}\n\nexport const getRowIdentity = <T>(\n row: T,\n rowKey: string | ((row: T) => any)\n): string => {\n if (!row) throw new Error('Row is required when get row identity')\n if (isString(rowKey)) {\n if (!rowKey.includes('.')) {\n return `${row[rowKey]}`\n }\n const key = rowKey.split('.')\n let current = row\n for (const element of key) {\n current = current[element]\n }\n return `${current}`\n } else if (isFunction(rowKey)) {\n return rowKey.call(null, row)\n }\n}\n\nexport const getKeysMap = function <T>(\n array: T[],\n rowKey: string\n): Record<string, { row: T; index: number }> {\n const arrayMap = {}\n ;(array || []).forEach((row, index) => {\n arrayMap[getRowIdentity(row, rowKey)] = { row, index }\n })\n return arrayMap\n}\n\nexport function mergeOptions<T, K>(defaults: T, config: K): T & K {\n const options = {} as T & K\n let key\n for (key in defaults) {\n options[key] = defaults[key]\n }\n for (key in config) {\n if (hasOwn(config as unknown as Record<string, any>, key)) {\n const value = config[key]\n if (typeof value !== 'undefined') {\n options[key] = value\n }\n }\n }\n return options\n}\n\nexport function parseWidth(width: number | string): number | string {\n if (width === '') return width\n if (width !== undefined) {\n width = Number.parseInt(width as string, 10)\n if (Number.isNaN(width)) {\n width = ''\n }\n }\n return width\n}\n\nexport function parseMinWidth(minWidth: number | string): number | string {\n if (minWidth === '') return minWidth\n if (minWidth !== undefined) {\n minWidth = parseWidth(minWidth)\n if (Number.isNaN(minWidth)) {\n minWidth = 80\n }\n }\n return minWidth\n}\n\nexport function parseHeight(height: number | string) {\n if (isNumber(height)) {\n return height\n }\n if (isString(height)) {\n if (/^\\d+(?:px)?$/.test(height)) {\n return Number.parseInt(height, 10)\n } else {\n return height\n }\n }\n return null\n}\n\n// https://github.com/reduxjs/redux/blob/master/src/compose.js\nexport function compose(...funcs) {\n if (funcs.length === 0) {\n return (arg) => arg\n }\n if (funcs.length === 1) {\n return funcs[0]\n }\n return funcs.reduce(\n (a, b) =>\n (...args) =>\n a(b(...args))\n )\n}\n\nexport function toggleRowStatus<T>(\n statusArr: T[],\n row: T,\n newVal?: boolean,\n tableTreeProps?: TreeProps,\n selectable?: (row: T, index?: number) => boolean,\n rowIndex?: number\n): boolean {\n let _rowIndex = rowIndex ?? 0\n let changed = false\n const index = statusArr.indexOf(row)\n const included = index !== -1\n const isRowSelectable = selectable?.call(null, row, rowIndex)\n\n const toggleStatus = (type: 'add' | 'remove') => {\n if (type === 'add') {\n statusArr.push(row)\n } else {\n statusArr.splice(index, 1)\n }\n changed = true\n }\n const getChildrenCount = (row: T) => {\n let count = 0\n const children = tableTreeProps?.children && row[tableTreeProps.children]\n if (children && isArray(children)) {\n count += children.length\n children.forEach((item) => {\n count += getChildrenCount(item)\n })\n }\n return count\n }\n\n if (!selectable || isRowSelectable) {\n if (isBoolean(newVal)) {\n if (newVal && !included) {\n toggleStatus('add')\n } else if (!newVal && included) {\n toggleStatus('remove')\n }\n } else {\n included ? toggleStatus('remove') : toggleStatus('add')\n }\n }\n\n if (\n !tableTreeProps?.checkStrictly &&\n tableTreeProps?.children &&\n isArray(row[tableTreeProps.children])\n ) {\n row[tableTreeProps.children].forEach((item) => {\n toggleRowStatus(\n statusArr,\n item,\n newVal ?? !included,\n tableTreeProps,\n selectable,\n _rowIndex + 1\n )\n _rowIndex += getChildrenCount(item) + 1\n })\n }\n return changed\n}\n\nexport function walkTreeNode(\n root,\n cb,\n childrenKey = 'children',\n lazyKey = 'hasChildren'\n) {\n const isNil = (array) => !(isArray(array) && array.length)\n\n function _walker(parent, children, level) {\n cb(parent, children, level)\n children.forEach((item) => {\n if (item[lazyKey]) {\n cb(item, null, level + 1)\n return\n }\n const children = item[childrenKey]\n if (!isNil(children)) {\n _walker(item, children, level + 1)\n }\n })\n }\n\n root.forEach((item) => {\n if (item[lazyKey]) {\n cb(item, null, 0)\n return\n }\n const children = item[childrenKey]\n if (!isNil(children)) {\n _walker(item, children, 0)\n }\n })\n}\n\nconst getTableOverflowTooltipProps = (\n props: TableOverflowTooltipOptions,\n content: string\n) => {\n return {\n content,\n ...props,\n popperOptions: {\n strategy: 'fixed',\n ...props.popperOptions,\n },\n }\n}\n\nexport let removePopper: RemovePopperFn | null = null\n\nexport function createTablePopper(\n props: TableOverflowTooltipOptions,\n popperContent: string,\n trigger: HTMLElement,\n table: Table<[]>\n) {\n if (removePopper?.trigger === trigger) {\n merge(\n removePopper!.vm.component.props,\n getTableOverflowTooltipProps(props, popperContent)\n )\n return\n }\n removePopper?.()\n const parentNode = table?.refs.tableWrapper\n const ns = parentNode?.dataset.prefix\n const vm = createVNode(ElTooltip, {\n virtualTriggering: true,\n virtualRef: trigger,\n appendTo: parentNode,\n placement: 'top',\n transition: 'none', // Default does not require transition\n offset: 0,\n hideAfter: 0,\n ...getTableOverflowTooltipProps(props, popperContent),\n })\n vm.appContext = { ...table.appContext, ...table }\n const container = document.createElement('div')\n render(vm, container)\n vm.component!.exposed!.onOpen()\n const scrollContainer = parentNode?.querySelector(`.${ns}-scrollbar__wrap`)\n removePopper = () => {\n render(null, container)\n scrollContainer?.removeEventListener('scroll', removePopper!)\n removePopper = null\n }\n removePopper.trigger = trigger\n removePopper.vm = vm\n scrollContainer?.addEventListener('scroll', removePopper)\n}\n\nfunction getCurrentColumns<T>(column: TableColumnCtx<T>): TableColumnCtx<T>[] {\n if (column.children) {\n return flatMap(column.children, getCurrentColumns)\n } else {\n return [column]\n }\n}\n\nfunction getColSpan<T>(colSpan: number, column: TableColumnCtx<T>) {\n return colSpan + column.colSpan\n}\n\nexport const isFixedColumn = <T>(\n index: number,\n fixed: string | boolean,\n store: any,\n realColumns?: TableColumnCtx<T>[]\n) => {\n let start = 0\n let after = index\n const columns = store.states.columns.value\n if (realColumns) {\n // fixed column supported in grouped header\n const curColumns = getCurrentColumns(realColumns[index])\n const preColumns = columns.slice(0, columns.indexOf(curColumns[0]))\n\n start = preColumns.reduce(getColSpan, 0)\n after = start + curColumns.reduce(getColSpan, 0) - 1\n } else {\n start = index\n }\n let fixedLayout\n switch (fixed) {\n case 'left':\n if (after < store.states.fixedLeafColumnsLength.value) {\n fixedLayout = 'left'\n }\n break\n case 'right':\n if (\n start >=\n columns.length - store.states.rightFixedLeafColumnsLength.value\n ) {\n fixedLayout = 'right'\n }\n break\n default:\n if (after < store.states.fixedLeafColumnsLength.value) {\n fixedLayout = 'left'\n } else if (\n start >=\n columns.length - store.states.rightFixedLeafColumnsLength.value\n ) {\n fixedLayout = 'right'\n }\n }\n return fixedLayout\n ? {\n direction: fixedLayout,\n start,\n after,\n }\n : {}\n}\n\nexport const getFixedColumnsClass = <T>(\n namespace: string,\n index: number,\n fixed: string | boolean,\n store: any,\n realColumns?: TableColumnCtx<T>[],\n offset = 0\n) => {\n const classes: string[] = []\n const { direction, start, after } = isFixedColumn(\n index,\n fixed,\n store,\n realColumns\n )\n if (direction) {\n const isLeft = direction === 'left'\n classes.push(`${namespace}-fixed-column--${direction}`)\n if (\n isLeft &&\n after + offset === store.states.fixedLeafColumnsLength.value - 1\n ) {\n classes.push('is-last-column')\n } else if (\n !isLeft &&\n start - offset ===\n store.states.columns.value.length -\n store.states.rightFixedLeafColumnsLength.value\n ) {\n classes.push('is-first-column')\n }\n }\n return classes\n}\n\nfunction getOffset<T>(offset: number, column: TableColumnCtx<T>) {\n return (\n offset +\n (column.realWidth === null || Number.isNaN(column.realWidth)\n ? Number(column.width)\n : column.realWidth)\n )\n}\n\nexport const getFixedColumnOffset = <T>(\n index: number,\n fixed: string | boolean,\n store: any,\n realColumns?: TableColumnCtx<T>[]\n) => {\n const {\n direction,\n start = 0,\n after = 0,\n } = isFixedColumn(index, fixed, store, realColumns)\n if (!direction) {\n return\n }\n const styles: any = {}\n const isLeft = direction === 'left'\n const columns = store.states.columns.value\n if (isLeft) {\n styles.left = columns.slice(0, start).reduce(getOffset, 0)\n } else {\n styles.right = columns\n .slice(after + 1)\n .reverse()\n .reduce(getOffset, 0)\n }\n return styles\n}\n\nexport const ensurePosition = (style, key: string) => {\n if (!style) return\n if (!Number.isNaN(style[key])) {\n style[key] = `${style[key]}px`\n }\n}\n"],"names":["isArray","isString","get","isObject","throwError","isFunction","hasOwn","isNumber","isBoolean","removePopper","merge","createVNode","ElTooltip","render","flatMap"],"mappings":";;;;;;;;;;;AAaY,MAAC,OAAO,GAAG,SAAS,K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AAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AAC3E,GAAG;AACH,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACU,MAAC,cAAc,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK;AAC9C,EAAE,IAAI,CAAC,KAAK;AACZ,IAAI,OAAO;AACX,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;AACjC,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACnC,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"util.js","sources":["../../../../../../packages/components/table/src/util.ts"],"sourcesContent":["// @ts-nocheck\nimport { createVNode, render } from 'vue'\nimport { flatMap, get, isNull, merge } from 'lodash-unified'\nimport {\n hasOwn,\n isArray,\n isBoolean,\n isFunction,\n isNumber,\n isObject,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport ElTooltip, {\n type ElTooltipProps,\n} from '@element-plus/components/tooltip'\nimport type { Table, TreeProps } from './table/defaults'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { VNode } from 'vue'\n\nexport type TableOverflowTooltipOptions = Partial<\n Pick<\n ElTooltipProps,\n | 'appendTo'\n | 'effect'\n | 'enterable'\n | 'hideAfter'\n | 'offset'\n | 'placement'\n | 'popperClass'\n | 'popperOptions'\n | 'showAfter'\n | 'showArrow'\n | 'transition'\n >\n>\n\ntype RemovePopperFn = (() => void) & {\n trigger?: HTMLElement\n vm?: VNode\n}\n\nexport const getCell = function (event: Event) {\n return (event.target as HTMLElement)?.closest('td')\n}\n\nexport const orderBy = function <T>(\n array: T[],\n sortKey: string,\n reverse: string | number,\n sortMethod,\n sortBy: string | (string | ((a: T, b: T, array?: T[]) => number))[]\n) {\n if (\n !sortKey &&\n !sortMethod &&\n (!sortBy || (isArray(sortBy) && !sortBy.length))\n ) {\n return array\n }\n if (isString(reverse)) {\n reverse = reverse === 'descending' ? -1 : 1\n } else {\n reverse = reverse && reverse < 0 ? -1 : 1\n }\n const getKey = sortMethod\n ? null\n : function (value, index) {\n if (sortBy) {\n if (!isArray(sortBy)) {\n sortBy = [sortBy]\n }\n return sortBy.map((by) => {\n if (isString(by)) {\n return get(value, by)\n } else {\n return by(value, index, array)\n }\n })\n }\n if (sortKey !== '$key') {\n if (isObject(value) && '$value' in value) value = value.$value\n }\n return [isObject(value) ? get(value, sortKey) : value]\n }\n const compare = function (a, b) {\n if (sortMethod) {\n return sortMethod(a.value, b.value)\n }\n for (let i = 0, len = a.key.length; i < len; i++) {\n if (a.key[i] < b.key[i]) {\n return -1\n }\n if (a.key[i] > b.key[i]) {\n return 1\n }\n }\n return 0\n }\n return array\n .map((value, index) => {\n return {\n value,\n index,\n key: getKey ? getKey(value, index) : null,\n }\n })\n .sort((a, b) => {\n let order = compare(a, b)\n if (!order) {\n // make stable https://en.wikipedia.org/wiki/Sorting_algorithm#Stability\n order = a.index - b.index\n }\n return order * +reverse\n })\n .map((item) => item.value)\n}\n\nexport const getColumnById = function <T>(\n table: {\n columns: TableColumnCtx<T>[]\n },\n columnId: string\n): null | TableColumnCtx<T> {\n let column = null\n table.columns.forEach((item) => {\n if (item.id === columnId) {\n column = item\n }\n })\n return column\n}\n\nexport const getColumnByKey = function <T>(\n table: {\n columns: TableColumnCtx<T>[]\n },\n columnKey: string\n): TableColumnCtx<T> {\n let column = null\n for (let i = 0; i < table.columns.length; i++) {\n const item = table.columns[i]\n if (item.columnKey === columnKey) {\n column = item\n break\n }\n }\n if (!column)\n throwError('ElTable', `No column matching with column-key: ${columnKey}`)\n return column\n}\n\nexport const getColumnByCell = function <T>(\n table: {\n columns: TableColumnCtx<T>[]\n },\n cell: HTMLElement,\n namespace: string\n): null | TableColumnCtx<T> {\n const matches = (cell.className || '').match(\n new RegExp(`${namespace}-table_[^\\\\s]+`, 'gm')\n )\n if (matches) {\n return getColumnById(table, matches[0])\n }\n return null\n}\n\nexport const getRowIdentity = <T>(\n row: T,\n rowKey: string | ((row: T) => any)\n): string => {\n if (!row) throw new Error('Row is required when get row identity')\n if (isString(rowKey)) {\n if (!rowKey.includes('.')) {\n return `${row[rowKey]}`\n }\n const key = rowKey.split('.')\n let current = row\n for (const element of key) {\n current = current[element]\n }\n return `${current}`\n } else if (isFunction(rowKey)) {\n return rowKey.call(null, row)\n }\n}\n\nexport const getKeysMap = function <T>(\n array: T[],\n rowKey: string\n): Record<string, { row: T; index: number }> {\n const arrayMap = {}\n ;(array || []).forEach((row, index) => {\n arrayMap[getRowIdentity(row, rowKey)] = { row, index }\n })\n return arrayMap\n}\n\nexport function mergeOptions<T, K>(defaults: T, config: K): T & K {\n const options = {} as T & K\n let key\n for (key in defaults) {\n options[key] = defaults[key]\n }\n for (key in config) {\n if (hasOwn(config as unknown as Record<string, any>, key)) {\n const value = config[key]\n if (!isUndefined(value)) {\n options[key] = value\n }\n }\n }\n return options\n}\n\nexport function parseWidth(width: number | string): number | string {\n if (width === '') return width\n if (!isUndefined(width)) {\n width = Number.parseInt(width as string, 10)\n if (Number.isNaN(width)) {\n width = ''\n }\n }\n return width\n}\n\nexport function parseMinWidth(minWidth: number | string): number | string {\n if (minWidth === '') return minWidth\n if (!isUndefined(minWidth)) {\n minWidth = parseWidth(minWidth)\n if (Number.isNaN(minWidth)) {\n minWidth = 80\n }\n }\n return minWidth\n}\n\nexport function parseHeight(height: number | string) {\n if (isNumber(height)) {\n return height\n }\n if (isString(height)) {\n if (/^\\d+(?:px)?$/.test(height)) {\n return Number.parseInt(height, 10)\n } else {\n return height\n }\n }\n return null\n}\n\n// https://github.com/reduxjs/redux/blob/master/src/compose.js\nexport function compose(...funcs) {\n if (funcs.length === 0) {\n return (arg) => arg\n }\n if (funcs.length === 1) {\n return funcs[0]\n }\n return funcs.reduce(\n (a, b) =>\n (...args) =>\n a(b(...args))\n )\n}\n\nexport function toggleRowStatus<T>(\n statusArr: T[],\n row: T,\n newVal?: boolean,\n tableTreeProps?: TreeProps,\n selectable?: (row: T, index?: number) => boolean,\n rowIndex?: number\n): boolean {\n let _rowIndex = rowIndex ?? 0\n let changed = false\n const index = statusArr.indexOf(row)\n const included = index !== -1\n const isRowSelectable = selectable?.call(null, row, rowIndex)\n\n const toggleStatus = (type: 'add' | 'remove') => {\n if (type === 'add') {\n statusArr.push(row)\n } else {\n statusArr.splice(index, 1)\n }\n changed = true\n }\n const getChildrenCount = (row: T) => {\n let count = 0\n const children = tableTreeProps?.children && row[tableTreeProps.children]\n if (children && isArray(children)) {\n count += children.length\n children.forEach((item) => {\n count += getChildrenCount(item)\n })\n }\n return count\n }\n\n if (!selectable || isRowSelectable) {\n if (isBoolean(newVal)) {\n if (newVal && !included) {\n toggleStatus('add')\n } else if (!newVal && included) {\n toggleStatus('remove')\n }\n } else {\n included ? toggleStatus('remove') : toggleStatus('add')\n }\n }\n\n if (\n !tableTreeProps?.checkStrictly &&\n tableTreeProps?.children &&\n isArray(row[tableTreeProps.children])\n ) {\n row[tableTreeProps.children].forEach((item) => {\n toggleRowStatus(\n statusArr,\n item,\n newVal ?? !included,\n tableTreeProps,\n selectable,\n _rowIndex + 1\n )\n _rowIndex += getChildrenCount(item) + 1\n })\n }\n return changed\n}\n\nexport function walkTreeNode(\n root,\n cb,\n childrenKey = 'children',\n lazyKey = 'hasChildren'\n) {\n const isNil = (array) => !(isArray(array) && array.length)\n\n function _walker(parent, children, level) {\n cb(parent, children, level)\n children.forEach((item) => {\n if (item[lazyKey]) {\n cb(item, null, level + 1)\n return\n }\n const children = item[childrenKey]\n if (!isNil(children)) {\n _walker(item, children, level + 1)\n }\n })\n }\n\n root.forEach((item) => {\n if (item[lazyKey]) {\n cb(item, null, 0)\n return\n }\n const children = item[childrenKey]\n if (!isNil(children)) {\n _walker(item, children, 0)\n }\n })\n}\n\nconst getTableOverflowTooltipProps = (\n props: TableOverflowTooltipOptions,\n content: string\n) => {\n return {\n content,\n ...props,\n popperOptions: {\n strategy: 'fixed',\n ...props.popperOptions,\n },\n }\n}\n\nexport let removePopper: RemovePopperFn | null = null\n\nexport function createTablePopper(\n props: TableOverflowTooltipOptions,\n popperContent: string,\n trigger: HTMLElement,\n table: Table<[]>\n) {\n if (removePopper?.trigger === trigger) {\n merge(\n removePopper!.vm.component.props,\n getTableOverflowTooltipProps(props, popperContent)\n )\n return\n }\n removePopper?.()\n const parentNode = table?.refs.tableWrapper\n const ns = parentNode?.dataset.prefix\n const vm = createVNode(ElTooltip, {\n virtualTriggering: true,\n virtualRef: trigger,\n appendTo: parentNode,\n placement: 'top',\n transition: 'none', // Default does not require transition\n offset: 0,\n hideAfter: 0,\n ...getTableOverflowTooltipProps(props, popperContent),\n })\n vm.appContext = { ...table.appContext, ...table }\n const container = document.createElement('div')\n render(vm, container)\n vm.component!.exposed!.onOpen()\n const scrollContainer = parentNode?.querySelector(`.${ns}-scrollbar__wrap`)\n removePopper = () => {\n render(null, container)\n scrollContainer?.removeEventListener('scroll', removePopper!)\n removePopper = null\n }\n removePopper.trigger = trigger\n removePopper.vm = vm\n scrollContainer?.addEventListener('scroll', removePopper)\n}\n\nfunction getCurrentColumns<T>(column: TableColumnCtx<T>): TableColumnCtx<T>[] {\n if (column.children) {\n return flatMap(column.children, getCurrentColumns)\n } else {\n return [column]\n }\n}\n\nfunction getColSpan<T>(colSpan: number, column: TableColumnCtx<T>) {\n return colSpan + column.colSpan\n}\n\nexport const isFixedColumn = <T>(\n index: number,\n fixed: string | boolean,\n store: any,\n realColumns?: TableColumnCtx<T>[]\n) => {\n let start = 0\n let after = index\n const columns = store.states.columns.value\n if (realColumns) {\n // fixed column supported in grouped header\n const curColumns = getCurrentColumns(realColumns[index])\n const preColumns = columns.slice(0, columns.indexOf(curColumns[0]))\n\n start = preColumns.reduce(getColSpan, 0)\n after = start + curColumns.reduce(getColSpan, 0) - 1\n } else {\n start = index\n }\n let fixedLayout\n switch (fixed) {\n case 'left':\n if (after < store.states.fixedLeafColumnsLength.value) {\n fixedLayout = 'left'\n }\n break\n case 'right':\n if (\n start >=\n columns.length - store.states.rightFixedLeafColumnsLength.value\n ) {\n fixedLayout = 'right'\n }\n break\n default:\n if (after < store.states.fixedLeafColumnsLength.value) {\n fixedLayout = 'left'\n } else if (\n start >=\n columns.length - store.states.rightFixedLeafColumnsLength.value\n ) {\n fixedLayout = 'right'\n }\n }\n return fixedLayout\n ? {\n direction: fixedLayout,\n start,\n after,\n }\n : {}\n}\n\nexport const getFixedColumnsClass = <T>(\n namespace: string,\n index: number,\n fixed: string | boolean,\n store: any,\n realColumns?: TableColumnCtx<T>[],\n offset = 0\n) => {\n const classes: string[] = []\n const { direction, start, after } = isFixedColumn(\n index,\n fixed,\n store,\n realColumns\n )\n if (direction) {\n const isLeft = direction === 'left'\n classes.push(`${namespace}-fixed-column--${direction}`)\n if (\n isLeft &&\n after + offset === store.states.fixedLeafColumnsLength.value - 1\n ) {\n classes.push('is-last-column')\n } else if (\n !isLeft &&\n start - offset ===\n store.states.columns.value.length -\n store.states.rightFixedLeafColumnsLength.value\n ) {\n classes.push('is-first-column')\n }\n }\n return classes\n}\n\nfunction getOffset<T>(offset: number, column: TableColumnCtx<T>) {\n return (\n offset +\n (isNull(column.realWidth) || Number.isNaN(column.realWidth)\n ? Number(column.width)\n : column.realWidth)\n )\n}\n\nexport const getFixedColumnOffset = <T>(\n index: number,\n fixed: string | boolean,\n store: any,\n realColumns?: TableColumnCtx<T>[]\n) => {\n const {\n direction,\n start = 0,\n after = 0,\n } = isFixedColumn(index, fixed, store, realColumns)\n if (!direction) {\n return\n }\n const styles: any = {}\n const isLeft = direction === 'left'\n const columns = store.states.columns.value\n if (isLeft) {\n styles.left = columns.slice(0, start).reduce(getOffset, 0)\n } else {\n styles.right = columns\n .slice(after + 1)\n .reverse()\n .reduce(getOffset, 0)\n }\n return styles\n}\n\nexport const ensurePosition = (style, key: string) => {\n if (!style) return\n if (!Number.isNaN(style[key])) {\n style[key] = `${style[key]}px`\n }\n}\n"],"names":["isArray","isString","get","isObject","throwError","isFunction","hasOwn","isUndefined","isNumber","isBoolean","removePopper","merge","createVNode","ElTooltip","render","flatMap","isNull"],"mappings":";;;;;;;;;;;AAcY,MAAC,OAAO,GAAG,SAAS,KAAK,EAAE;AACvC,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACjE,EAAE;AACU,MAAC,OAAO,GAAG,SAAS,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE;AAC7E,EAAE,IAAI,CAAC,OAAO,IAAI,CAAC,UAAU,KAAK,CAAC,MAAM,IAAIA,cAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;AACjF,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,IAAIC,eAAQ,CAAC,OAAO,CAAC,EAAE;AACzB,IAAI,OAAO,GAAG,OAAO,KAAK,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAChD,GAAG,MAAM;AACT,IAAI,OAAO,GAAG,OAAO,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC9C,GAAG;AACH,EAAE,MAAM,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,KAAK,EAAE,KAAK,EAAE;AAC5D,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,IAAI,CAACD,cAAO,CAAC,MAAM,CAAC,EAAE;AAC5B,QAAQ,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC;AAC1B,OAAO;AACP,MAAM,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK;AAChC,QAAQ,IAAIC,eAAQ,CAAC,EAAE,CAAC,EAAE;AAC1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AAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AAC/D,GAAG,MAAM;AACT,IAAI,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AAC3E,GAAG;AACH,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACU,MAAC,cAAc,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK;AAC9C,EAAE,IAAI,CAAC,KAAK;AACZ,IAAI,OAAO;AACX,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;AACjC,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACnC,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var timeSelect$1 = require('./src/time-
|
6
|
-
var timeSelect = require('./src/time-
|
5
|
+
var timeSelect$1 = require('./src/time-select2.js');
|
6
|
+
var timeSelect = require('./src/time-select.js');
|
7
7
|
var install = require('../../utils/vue/install.js');
|
8
8
|
|
9
9
|
const ElTimeSelect = install.withInstall(timeSelect$1["default"]);
|
@@ -2,135 +2,57 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var index$
|
9
|
-
var index$3 = require('../../icon/index.js');
|
10
|
-
var timeSelect = require('./time-select2.js');
|
11
|
-
var utils = require('./utils.js');
|
12
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
13
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
14
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
15
|
-
var index$1 = require('../../../hooks/use-locale/index.js');
|
5
|
+
var iconsVue = require('@element-plus/icons-vue');
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
7
|
+
var index = require('../../../hooks/use-size/index.js');
|
8
|
+
var index$1 = require('../../../hooks/use-empty-values/index.js');
|
16
9
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
let currentTime;
|
63
|
-
while (current && end.value && utils.compareTime(current, end.value) <= 0) {
|
64
|
-
currentTime = dayjs__default["default"](current, "HH:mm").locale(lang.value).format(props.format);
|
65
|
-
result.push({
|
66
|
-
value: currentTime,
|
67
|
-
disabled: utils.compareTime(current, minTime.value || "-1:-1") <= 0 || utils.compareTime(current, maxTime.value || "100:100") >= 0
|
68
|
-
});
|
69
|
-
current = utils.nextTime(current, step.value);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
return result;
|
73
|
-
});
|
74
|
-
const blur = () => {
|
75
|
-
var _a, _b;
|
76
|
-
(_b = (_a = select.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);
|
77
|
-
};
|
78
|
-
const focus = () => {
|
79
|
-
var _a, _b;
|
80
|
-
(_b = (_a = select.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
81
|
-
};
|
82
|
-
expose({
|
83
|
-
blur,
|
84
|
-
focus
|
85
|
-
});
|
86
|
-
return (_ctx, _cache) => {
|
87
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElSelect), {
|
88
|
-
ref_key: "select",
|
89
|
-
ref: select,
|
90
|
-
"model-value": vue.unref(value),
|
91
|
-
disabled: vue.unref(_disabled),
|
92
|
-
clearable: _ctx.clearable,
|
93
|
-
"clear-icon": _ctx.clearIcon,
|
94
|
-
size: _ctx.size,
|
95
|
-
effect: _ctx.effect,
|
96
|
-
placeholder: _ctx.placeholder,
|
97
|
-
"default-first-option": "",
|
98
|
-
filterable: _ctx.editable,
|
99
|
-
"empty-values": _ctx.emptyValues,
|
100
|
-
"value-on-clear": _ctx.valueOnClear,
|
101
|
-
"onUpdate:modelValue": (event) => _ctx.$emit("update:modelValue", event),
|
102
|
-
onChange: (event) => _ctx.$emit("change", event),
|
103
|
-
onBlur: (event) => _ctx.$emit("blur", event),
|
104
|
-
onFocus: (event) => _ctx.$emit("focus", event),
|
105
|
-
onClear: () => _ctx.$emit("clear")
|
106
|
-
}, {
|
107
|
-
prefix: vue.withCtx(() => [
|
108
|
-
_ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
|
109
|
-
key: 0,
|
110
|
-
class: vue.normalizeClass(vue.unref(nsInput).e("prefix-icon"))
|
111
|
-
}, {
|
112
|
-
default: vue.withCtx(() => [
|
113
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
|
114
|
-
]),
|
115
|
-
_: 1
|
116
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true)
|
117
|
-
]),
|
118
|
-
default: vue.withCtx(() => [
|
119
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(items), (item) => {
|
120
|
-
return vue.openBlock(), vue.createBlock(vue.unref(ElOption), {
|
121
|
-
key: item.value,
|
122
|
-
label: item.value,
|
123
|
-
value: item.value,
|
124
|
-
disabled: item.disabled
|
125
|
-
}, null, 8, ["label", "value", "disabled"]);
|
126
|
-
}), 128))
|
127
|
-
]),
|
128
|
-
_: 1
|
129
|
-
}, 8, ["model-value", "disabled", "clearable", "clear-icon", "size", "effect", "placeholder", "filterable", "empty-values", "value-on-clear", "onUpdate:modelValue", "onChange", "onBlur", "onFocus", "onClear"]);
|
130
|
-
};
|
131
|
-
}
|
10
|
+
const timeSelectProps = runtime.buildProps({
|
11
|
+
format: {
|
12
|
+
type: String,
|
13
|
+
default: "HH:mm"
|
14
|
+
},
|
15
|
+
modelValue: String,
|
16
|
+
disabled: Boolean,
|
17
|
+
editable: {
|
18
|
+
type: Boolean,
|
19
|
+
default: true
|
20
|
+
},
|
21
|
+
effect: {
|
22
|
+
type: runtime.definePropType(String),
|
23
|
+
default: "light"
|
24
|
+
},
|
25
|
+
clearable: {
|
26
|
+
type: Boolean,
|
27
|
+
default: true
|
28
|
+
},
|
29
|
+
size: index.useSizeProp,
|
30
|
+
placeholder: String,
|
31
|
+
start: {
|
32
|
+
type: String,
|
33
|
+
default: "09:00"
|
34
|
+
},
|
35
|
+
end: {
|
36
|
+
type: String,
|
37
|
+
default: "18:00"
|
38
|
+
},
|
39
|
+
step: {
|
40
|
+
type: String,
|
41
|
+
default: "00:30"
|
42
|
+
},
|
43
|
+
minTime: String,
|
44
|
+
maxTime: String,
|
45
|
+
name: String,
|
46
|
+
prefixIcon: {
|
47
|
+
type: runtime.definePropType([String, Object]),
|
48
|
+
default: () => iconsVue.Clock
|
49
|
+
},
|
50
|
+
clearIcon: {
|
51
|
+
type: runtime.definePropType([String, Object]),
|
52
|
+
default: () => iconsVue.CircleClose
|
53
|
+
},
|
54
|
+
...index$1.useEmptyValuesProps
|
132
55
|
});
|
133
|
-
var TimeSelect = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "time-select.vue"]]);
|
134
56
|
|
135
|
-
exports
|
57
|
+
exports.timeSelectProps = timeSelectProps;
|
136
58
|
//# sourceMappingURL=time-select.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"time-select.js","sources":["../../../../../../packages/components/time-select/src/time-select.
|
1
|
+
{"version":3,"file":"time-select.js","sources":["../../../../../../packages/components/time-select/src/time-select.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { CircleClose, Clock } from '@element-plus/icons-vue'\nimport { useEmptyValuesProps, useSizeProp } from '@element-plus/hooks'\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type TimeSelect from './time-select.vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const timeSelectProps = buildProps({\n /**\n * @description set format of time\n */\n format: {\n type: String,\n default: 'HH:mm',\n },\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description whether TimeSelect is disabled\n */\n disabled: Boolean,\n /**\n * @description whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: definePropType<PopperEffect>(String),\n default: 'light',\n },\n /**\n * @description whether to show clear button\n */\n clearable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description placeholder in non-range mode\n */\n placeholder: String,\n /**\n * @description start time\n */\n start: {\n type: String,\n default: '09:00',\n },\n /**\n * @description end time\n */\n end: {\n type: String,\n default: '18:00',\n },\n /**\n * @description time step\n */\n step: {\n type: String,\n default: '00:30',\n },\n /**\n * @description minimum time, any time before this time will be disabled\n */\n minTime: String,\n /**\n * @description maximum time, any time after this time will be disabled\n */\n maxTime: String,\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description custom prefix icon component\n */\n prefixIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => Clock,\n },\n /**\n * @description custom clear icon component\n */\n clearIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => CircleClose,\n },\n ...useEmptyValuesProps,\n} as const)\n\nexport type TimeSelectProps = ExtractPropTypes<typeof timeSelectProps>\n\nexport type TimeSelectInstance = InstanceType<typeof TimeSelect>\n"],"names":["buildProps","definePropType","useSizeProp","Clock","CircleClose","useEmptyValuesProps"],"mappings":";;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAED,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,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