@element-plus/nightly 0.0.20250512 → 0.0.20250513
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.full.js +223 -41
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +223 -41
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +80 -370
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +370 -80
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +16 -134
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +134 -16
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +42 -22
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +22 -42
- 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 -208
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +208 -61
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +115 -206
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +206 -115
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +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/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +19 -28
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +28 -19
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/date-picker/src/composables/use-panel-date-range.d.ts +29 -0
- package/es/components/date-picker/src/composables/use-panel-date-range.mjs +94 -0
- package/es/components/date-picker/src/composables/use-panel-date-range.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +136 -40
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/src/dialog.mjs +172 -68
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +68 -172
- 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 +108 -299
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +299 -108
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/index.mjs +17 -17
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -33
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +33 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/popover/src/popover.mjs +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/slider/src/button.mjs +19 -91
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +91 -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/store/tree.mjs +1 -0
- package/es/components/table/src/store/tree.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +7 -95
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +95 -7
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +21 -67
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +67 -21
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +132 -54
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +54 -132
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.mjs +30 -169
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +169 -30
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/arrow.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.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/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +10 -56
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +56 -10
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +28 -173
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +173 -28
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +17 -17
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +79 -368
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +368 -79
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +17 -134
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +134 -17
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +42 -22
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +22 -42
- 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 -208
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +208 -62
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +115 -206
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +206 -115
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +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/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +21 -28
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +28 -21
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/date-picker/src/composables/use-panel-date-range.d.ts +29 -0
- package/lib/components/date-picker/src/composables/use-panel-date-range.js +98 -0
- package/lib/components/date-picker/src/composables/use-panel-date-range.js.map +1 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +135 -39
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dialog/src/dialog.js +172 -69
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +69 -172
- 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 +117 -299
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +299 -117
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/index.js +17 -17
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -33
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +33 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/popover/src/popover.js +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/slider/src/button.js +20 -91
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +91 -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/store/tree.js +1 -0
- package/lib/components/table/src/store/tree.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +7 -95
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +95 -7
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +21 -67
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +67 -21
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +137 -54
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +54 -137
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/tooltip.js +34 -169
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +169 -34
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/arrow.js +37 -22
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +22 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.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/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +11 -56
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +56 -11
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +29 -173
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +173 -29
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +17 -17
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/date-picker/date-range-picker.scss +22 -0
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scrollbar2.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.
|
1
|
+
{"version":3,"file":"scrollbar2.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport const scrollbarProps = buildProps({\n /**\n * @description height of scrollbar\n */\n height: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description max height of scrollbar\n */\n maxHeight: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether to use the native scrollbar\n */\n native: {\n type: Boolean,\n default: false,\n },\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: [String, Array, Object],\n default: '',\n },\n /**\n * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance\n */\n noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能\n /**\n * @description element tag of the view\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description always show\n */\n always: Boolean,\n /**\n * @description minimum size of scrollbar\n */\n minSize: {\n type: Number,\n default: 20,\n },\n /**\n * @description Wrap tabindex\n */\n tabindex: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description id of view\n */\n id: String,\n /**\n * @description role of view\n */\n role: String,\n ...useAriaProps(['ariaLabel', 'ariaOrientation']),\n} as const)\nexport type ScrollbarProps = ExtractPropTypes<typeof scrollbarProps>\n\nexport const scrollbarEmits = {\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\n\nexport type ScrollbarInstance = InstanceType<typeof Scrollbar> & unknown\n"],"names":["buildProps","definePropType","useAriaProps","isNumber"],"mappings":";;;;;;;;AAEY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,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C,CAAC,KAAK,CAACC,cAAQ,CAAC;AAC/C;;;;;"}
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var core = require('@popperjs/core');
|
6
6
|
var iconsVue = require('@element-plus/icons-vue');
|
7
|
-
var scrollbar = require('../../scrollbar/src/
|
7
|
+
var scrollbar = require('../../scrollbar/src/scrollbar2.js');
|
8
8
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
9
9
|
var index = require('../../../hooks/use-size/index.js');
|
10
10
|
var content = require('../../tooltip/src/content.js');
|
@@ -2,99 +2,28 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var useSliderButton = require('./composables/use-slider-button.js');
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
5
|
+
var core = require('@popperjs/core');
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
7
|
+
var event = require('../../../constants/event.js');
|
8
|
+
var types = require('../../../utils/types.js');
|
11
9
|
|
12
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
hovering: false,
|
24
|
-
dragging: false,
|
25
|
-
isClick: false,
|
26
|
-
startX: 0,
|
27
|
-
currentX: 0,
|
28
|
-
startY: 0,
|
29
|
-
currentY: 0,
|
30
|
-
startPosition: 0,
|
31
|
-
newPosition: 0,
|
32
|
-
oldValue: props.modelValue
|
33
|
-
});
|
34
|
-
const tooltipPersistent = vue.computed(() => !showTooltip.value ? false : persistent.value);
|
35
|
-
const {
|
36
|
-
disabled,
|
37
|
-
button,
|
38
|
-
tooltip,
|
39
|
-
showTooltip,
|
40
|
-
persistent,
|
41
|
-
tooltipVisible,
|
42
|
-
wrapperStyle,
|
43
|
-
formatValue,
|
44
|
-
handleMouseEnter,
|
45
|
-
handleMouseLeave,
|
46
|
-
onButtonDown,
|
47
|
-
onKeyDown,
|
48
|
-
setPosition
|
49
|
-
} = useSliderButton.useSliderButton(props, initData, emit);
|
50
|
-
const { hovering, dragging } = vue.toRefs(initData);
|
51
|
-
expose({
|
52
|
-
onButtonDown,
|
53
|
-
onKeyDown,
|
54
|
-
setPosition,
|
55
|
-
hovering,
|
56
|
-
dragging
|
57
|
-
});
|
58
|
-
return (_ctx, _cache) => {
|
59
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
60
|
-
ref_key: "button",
|
61
|
-
ref: button,
|
62
|
-
class: vue.normalizeClass([vue.unref(ns).e("button-wrapper"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }]),
|
63
|
-
style: vue.normalizeStyle(vue.unref(wrapperStyle)),
|
64
|
-
tabindex: vue.unref(disabled) ? -1 : 0,
|
65
|
-
onMouseenter: vue.unref(handleMouseEnter),
|
66
|
-
onMouseleave: vue.unref(handleMouseLeave),
|
67
|
-
onMousedown: vue.unref(onButtonDown),
|
68
|
-
onFocus: vue.unref(handleMouseEnter),
|
69
|
-
onBlur: vue.unref(handleMouseLeave),
|
70
|
-
onKeydown: vue.unref(onKeyDown)
|
71
|
-
}, [
|
72
|
-
vue.createVNode(vue.unref(index$1.ElTooltip), {
|
73
|
-
ref_key: "tooltip",
|
74
|
-
ref: tooltip,
|
75
|
-
visible: vue.unref(tooltipVisible),
|
76
|
-
placement: _ctx.placement,
|
77
|
-
"fallback-placements": ["top", "bottom", "right", "left"],
|
78
|
-
"stop-popper-mouse-event": false,
|
79
|
-
"popper-class": _ctx.tooltipClass,
|
80
|
-
disabled: !vue.unref(showTooltip),
|
81
|
-
persistent: vue.unref(tooltipPersistent)
|
82
|
-
}, {
|
83
|
-
content: vue.withCtx(() => [
|
84
|
-
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(formatValue)), 1)
|
85
|
-
]),
|
86
|
-
default: vue.withCtx(() => [
|
87
|
-
vue.createElementVNode("div", {
|
88
|
-
class: vue.normalizeClass([vue.unref(ns).e("button"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }])
|
89
|
-
}, null, 2)
|
90
|
-
]),
|
91
|
-
_: 1
|
92
|
-
}, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
|
93
|
-
], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]);
|
94
|
-
};
|
10
|
+
const sliderButtonProps = runtime.buildProps({
|
11
|
+
modelValue: {
|
12
|
+
type: Number,
|
13
|
+
default: 0
|
14
|
+
},
|
15
|
+
vertical: Boolean,
|
16
|
+
tooltipClass: String,
|
17
|
+
placement: {
|
18
|
+
type: String,
|
19
|
+
values: core.placements,
|
20
|
+
default: "top"
|
95
21
|
}
|
96
22
|
});
|
97
|
-
|
23
|
+
const sliderButtonEmits = {
|
24
|
+
[event.UPDATE_MODEL_EVENT]: (value) => types.isNumber(value)
|
25
|
+
};
|
98
26
|
|
99
|
-
exports
|
27
|
+
exports.sliderButtonEmits = sliderButtonEmits;
|
28
|
+
exports.sliderButtonProps = sliderButtonProps;
|
100
29
|
//# sourceMappingURL=button.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../../../../packages/components/slider/src/button.
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../../../../packages/components/slider/src/button.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ComponentPublicInstance, ExtractPropTypes, Ref } from 'vue'\nimport type Button from './button.vue'\n\nexport const sliderButtonProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: Boolean,\n tooltipClass: String,\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n} as const)\nexport type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>\n\nexport const sliderButtonEmits = {\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type SliderButtonEmits = typeof sliderButtonEmits\n\nexport type SliderButtonInstance = ComponentPublicInstance<typeof Button>\n\nexport type ButtonRefs = Record<\n 'firstButton' | 'secondButton',\n Ref<SliderButtonInstance | undefined>\n>\n\nexport interface SliderButtonInitData {\n hovering: boolean\n dragging: boolean\n isClick: boolean\n startX: number\n currentX: number\n startY: number\n currentY: number\n startPosition: number\n newPosition: number\n oldValue: number\n}\n"],"names":["buildProps","placements","UPDATE_MODEL_EVENT","isNumber"],"mappings":";;;;;;;;;AAGY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,eAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,CAACC,wBAAkB,GAAG,CAAC,KAAK,KAAKC,cAAQ,CAAC,KAAK,CAAC;AAClD;;;;;"}
|
@@ -2,28 +2,99 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var
|
8
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var index$1 = require('../../tooltip/index.js');
|
7
|
+
var button = require('./button.js');
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
9
|
+
var useSliderButton = require('./composables/use-slider-button.js');
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
9
11
|
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
const __default__ = vue.defineComponent({
|
13
|
+
name: "ElSliderButton"
|
14
|
+
});
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
16
|
+
...__default__,
|
17
|
+
props: button.sliderButtonProps,
|
18
|
+
emits: button.sliderButtonEmits,
|
19
|
+
setup(__props, { expose, emit }) {
|
20
|
+
const props = __props;
|
21
|
+
const ns = index.useNamespace("slider");
|
22
|
+
const initData = vue.reactive({
|
23
|
+
hovering: false,
|
24
|
+
dragging: false,
|
25
|
+
isClick: false,
|
26
|
+
startX: 0,
|
27
|
+
currentX: 0,
|
28
|
+
startY: 0,
|
29
|
+
currentY: 0,
|
30
|
+
startPosition: 0,
|
31
|
+
newPosition: 0,
|
32
|
+
oldValue: props.modelValue
|
33
|
+
});
|
34
|
+
const tooltipPersistent = vue.computed(() => !showTooltip.value ? false : persistent.value);
|
35
|
+
const {
|
36
|
+
disabled,
|
37
|
+
button,
|
38
|
+
tooltip,
|
39
|
+
showTooltip,
|
40
|
+
persistent,
|
41
|
+
tooltipVisible,
|
42
|
+
wrapperStyle,
|
43
|
+
formatValue,
|
44
|
+
handleMouseEnter,
|
45
|
+
handleMouseLeave,
|
46
|
+
onButtonDown,
|
47
|
+
onKeyDown,
|
48
|
+
setPosition
|
49
|
+
} = useSliderButton.useSliderButton(props, initData, emit);
|
50
|
+
const { hovering, dragging } = vue.toRefs(initData);
|
51
|
+
expose({
|
52
|
+
onButtonDown,
|
53
|
+
onKeyDown,
|
54
|
+
setPosition,
|
55
|
+
hovering,
|
56
|
+
dragging
|
57
|
+
});
|
58
|
+
return (_ctx, _cache) => {
|
59
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
60
|
+
ref_key: "button",
|
61
|
+
ref: button,
|
62
|
+
class: vue.normalizeClass([vue.unref(ns).e("button-wrapper"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }]),
|
63
|
+
style: vue.normalizeStyle(vue.unref(wrapperStyle)),
|
64
|
+
tabindex: vue.unref(disabled) ? -1 : 0,
|
65
|
+
onMouseenter: vue.unref(handleMouseEnter),
|
66
|
+
onMouseleave: vue.unref(handleMouseLeave),
|
67
|
+
onMousedown: vue.unref(onButtonDown),
|
68
|
+
onFocus: vue.unref(handleMouseEnter),
|
69
|
+
onBlur: vue.unref(handleMouseLeave),
|
70
|
+
onKeydown: vue.unref(onKeyDown)
|
71
|
+
}, [
|
72
|
+
vue.createVNode(vue.unref(index$1.ElTooltip), {
|
73
|
+
ref_key: "tooltip",
|
74
|
+
ref: tooltip,
|
75
|
+
visible: vue.unref(tooltipVisible),
|
76
|
+
placement: _ctx.placement,
|
77
|
+
"fallback-placements": ["top", "bottom", "right", "left"],
|
78
|
+
"stop-popper-mouse-event": false,
|
79
|
+
"popper-class": _ctx.tooltipClass,
|
80
|
+
disabled: !vue.unref(showTooltip),
|
81
|
+
persistent: vue.unref(tooltipPersistent)
|
82
|
+
}, {
|
83
|
+
content: vue.withCtx(() => [
|
84
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(formatValue)), 1)
|
85
|
+
]),
|
86
|
+
default: vue.withCtx(() => [
|
87
|
+
vue.createElementVNode("div", {
|
88
|
+
class: vue.normalizeClass([vue.unref(ns).e("button"), { hover: vue.unref(hovering), dragging: vue.unref(dragging) }])
|
89
|
+
}, null, 2)
|
90
|
+
]),
|
91
|
+
_: 1
|
92
|
+
}, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
|
93
|
+
], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]);
|
94
|
+
};
|
21
95
|
}
|
22
96
|
});
|
23
|
-
|
24
|
-
[event.UPDATE_MODEL_EVENT]: (value) => types.isNumber(value)
|
25
|
-
};
|
97
|
+
var SliderButton = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "button.vue"]]);
|
26
98
|
|
27
|
-
exports
|
28
|
-
exports.sliderButtonProps = sliderButtonProps;
|
99
|
+
exports["default"] = SliderButton;
|
29
100
|
//# sourceMappingURL=button2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/slider/src/button.
|
1
|
+
{"version":3,"file":"button2.js","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n :class=\"[ns.e('button-wrapper'), { hover: hovering, dragging }]\"\n :style=\"wrapperStyle\"\n :tabindex=\"disabled ? -1 : 0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown=\"onKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :placement=\"placement\"\n :fallback-placements=\"['top', 'bottom', 'right', 'left']\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n :persistent=\"tooltipPersistent\"\n >\n <template #content>\n <span>{{ formatValue }}</span>\n </template>\n <div :class=\"[ns.e('button'), { hover: hovering, dragging }]\" />\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, toRefs } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useSliderButton } from './composables'\nimport { sliderButtonEmits, sliderButtonProps } from './button'\nimport type { SliderButtonInitData } from './button'\n\ndefineOptions({\n name: 'ElSliderButton',\n})\n\nconst props = defineProps(sliderButtonProps)\nconst emit = defineEmits(sliderButtonEmits)\n\nconst ns = useNamespace('slider')\n\nconst initData = reactive<SliderButtonInitData>({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue,\n})\n\nconst tooltipPersistent = computed(() =>\n !showTooltip.value ? false : persistent.value\n)\n\nconst {\n disabled,\n button,\n tooltip,\n showTooltip,\n persistent,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n} = useSliderButton(props, initData, emit)\n\nconst { hovering, dragging } = toRefs(initData)\n\ndefineExpose({\n onButtonDown,\n onKeyDown,\n setPosition,\n hovering,\n dragging,\n})\n</script>\n"],"names":["useNamespace","reactive","computed","useSliderButton","toRefs","_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;;uCAuCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,WAAWC,YAA+B,CAAA;AAAA,MAC9C,QAAU,EAAA,KAAA;AAAA,MACV,QAAU,EAAA,KAAA;AAAA,MACV,OAAS,EAAA,KAAA;AAAA,MACT,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,aAAe,EAAA,CAAA;AAAA,MACf,WAAa,EAAA,CAAA;AAAA,MACb,UAAU,KAAM,CAAA,UAAA;AAAA,KACjB,CAAA,CAAA;AAED,IAAA,MAAM,iBAAoB,GAAAC,YAAA,CAAA,MAAA,CAAA,WAAA,CAAA,KAAA,GAAA,KAAA,GAAA,UAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MACxB;AAAwC,MAC1C,QAAA;AAEA,MAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,KACA,GAAAC,+BAAA,CAAA,KAAA,EAAA,QAAA,EAAA,IAAA,CAAA,CAAA;AAAA,IACA,MAAA,EAAA,QAAA,EAAA,QAAA,EAAA,GAAAC,UAAA,CAAA,QAAA,CAAA,CAAA;AAAA,IACF,MAAI,CAAA;AAEJ,MAAA,YAAQ;AAER,MAAa,SAAA;AAAA,MACX,WAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -7,7 +7,7 @@ var core = require('@vueuse/core');
|
|
7
7
|
var index$2 = require('../../input-number/index.js');
|
8
8
|
var constants = require('./constants.js');
|
9
9
|
var slider = require('./slider.js');
|
10
|
-
var button = require('./
|
10
|
+
var button = require('./button2.js');
|
11
11
|
var marker = require('./marker.js');
|
12
12
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
13
13
|
var useSlide = require('./composables/use-slide.js');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tree.js","sources":["../../../../../../../packages/components/table/src/store/tree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, getCurrentInstance, ref, unref, watch } from 'vue'\nimport { isArray, isUndefined } from '@element-plus/utils'\nimport { getRowIdentity, walkTreeNode } from '../util'\n\nimport type { WatcherPropsData } from '.'\nimport type { Table, TableProps } from '../table/defaults'\n\nfunction useTree<T>(watcherData: WatcherPropsData<T>) {\n const expandRowKeys = ref<string[]>([])\n const treeData = ref<unknown>({})\n const indent = ref(16)\n const lazy = ref(false)\n const lazyTreeNodeMap = ref({})\n const lazyColumnIdentifier = ref('hasChildren')\n const childrenColumnName = ref('children')\n const checkStrictly = ref(false)\n const instance = getCurrentInstance() as Table<T>\n const normalizedData = computed(() => {\n if (!watcherData.rowKey.value) return {}\n const data = watcherData.data.value || []\n return normalize(data)\n })\n const normalizedLazyNode = computed(() => {\n const rowKey = watcherData.rowKey.value\n const keys = Object.keys(lazyTreeNodeMap.value)\n const res = {}\n if (!keys.length) return res\n keys.forEach((key) => {\n if (lazyTreeNodeMap.value[key].length) {\n const item = { children: [] }\n lazyTreeNodeMap.value[key].forEach((row) => {\n const currentRowKey = getRowIdentity(row, rowKey)\n item.children.push(currentRowKey)\n if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) {\n res[currentRowKey] = { children: [] }\n }\n })\n res[key] = item\n }\n })\n return res\n })\n\n const normalize = (data) => {\n const rowKey = watcherData.rowKey.value\n const res = {}\n walkTreeNode(\n data,\n (parent, children, level) => {\n const parentId = getRowIdentity(parent, rowKey)\n if (isArray(children)) {\n res[parentId] = {\n children: children.map((row) => getRowIdentity(row, rowKey)),\n level,\n }\n } else if (lazy.value) {\n // 当 children 不存在且 lazy 为 true,该节点即为懒加载的节点\n res[parentId] = {\n children: [],\n lazy: true,\n level,\n }\n }\n },\n childrenColumnName.value,\n lazyColumnIdentifier.value\n )\n return res\n }\n\n let isInitTree = true\n const updateTreeData = (ifChangeExpandRowKeys = false) => {\n const nested = normalizedData.value\n const normalizedLazyNode_ = normalizedLazyNode.value\n const keys = Object.keys(nested)\n const newTreeData = {}\n const ifExpandAll =\n instance.store?.states.defaultExpandAll.value && isInitTree\n isInitTree = false\n if (keys.length) {\n const oldTreeData = unref(treeData)\n const rootLazyRowKeys = []\n const getExpanded = (oldValue, key) => {\n if (ifChangeExpandRowKeys) {\n if (expandRowKeys.value.length) {\n return ifExpandAll || expandRowKeys.value.includes(key)\n } else {\n return !!(ifExpandAll || oldValue?.expanded)\n }\n } else {\n const included =\n ifExpandAll ||\n (expandRowKeys.value && expandRowKeys.value.includes(key))\n return !!(oldValue?.expanded || included)\n }\n }\n // 合并 expanded 与 display,确保数据刷新后,状态不变\n keys.forEach((key) => {\n const oldValue = oldTreeData[key]\n const newValue = { ...nested[key] }\n newValue.expanded = getExpanded(oldValue, key)\n if (newValue.lazy) {\n const { loaded = false, loading = false } = oldValue || {}\n newValue.loaded = !!loaded\n newValue.loading = !!loading\n rootLazyRowKeys.push(key)\n }\n newTreeData[key] = newValue\n })\n // 根据懒加载数据更新 treeData\n const lazyKeys = Object.keys(normalizedLazyNode_)\n if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) {\n lazyKeys.forEach((key) => {\n const oldValue = oldTreeData[key]\n const lazyNodeChildren = normalizedLazyNode_[key].children\n if (rootLazyRowKeys.includes(key)) {\n // 懒加载的 root 节点,更新一下原有的数据,原来的 children 一定是空数组\n if (newTreeData[key].children.length !== 0) {\n throw new Error('[ElTable]children must be an empty array.')\n }\n newTreeData[key].children = lazyNodeChildren\n } else {\n const { loaded = false, loading = false } = oldValue || {}\n newTreeData[key] = {\n lazy: true,\n loaded: !!loaded,\n loading: !!loading,\n expanded: getExpanded(oldValue, key),\n children: lazyNodeChildren,\n level: '',\n }\n }\n })\n }\n }\n treeData.value = newTreeData\n instance.store?.updateTableScrollY()\n }\n\n watch(\n () => expandRowKeys.value,\n () => {\n updateTreeData(true)\n }\n )\n\n watch(\n () => normalizedData.value,\n () => {\n updateTreeData()\n }\n )\n watch(\n () => normalizedLazyNode.value,\n () => {\n updateTreeData()\n }\n )\n\n const updateTreeExpandKeys = (value: string[]) => {\n expandRowKeys.value = value\n updateTreeData()\n }\n const isUseLazy = (data): boolean => {\n return lazy.value && data && 'loaded' in data && !data.loaded\n }\n const toggleTreeExpansion = (row: T, expanded?: boolean) => {\n instance.store.assertRowKey()\n\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = id && treeData.value[id]\n if (id && data && 'expanded' in data) {\n const oldExpanded = data.expanded\n expanded = isUndefined(expanded) ? !data.expanded : expanded\n treeData.value[id].expanded = expanded\n if (oldExpanded !== expanded) {\n instance.emit('expand-change', row, expanded)\n }\n isUseLazy(data) && loadData(row, id, data)\n instance.store.updateTableScrollY()\n }\n }\n\n const loadOrToggle = (row) => {\n instance.store.assertRowKey()\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = treeData.value[id]\n if (isUseLazy(data)) {\n loadData(row, id, data)\n } else {\n toggleTreeExpansion(row, undefined)\n }\n }\n\n const loadData = (row: T, key: string, treeNode) => {\n const { load } = instance.props as unknown as TableProps<T>\n if (load && !treeData.value[key].loaded) {\n treeData.value[key].loading = true\n load(row, treeNode, (data) => {\n if (!isArray(data)) {\n throw new TypeError('[ElTable] data must be an array')\n }\n treeData.value[key].loading = false\n treeData.value[key].loaded = true\n treeData.value[key].expanded = true\n if (data.length) {\n lazyTreeNodeMap.value[key] = data\n }\n instance.emit('expand-change', row, true)\n })\n }\n }\n\n const updateKeyChildren = (key: string, data: T[]) => {\n const { lazy, rowKey } = instance.props as unknown as TableProps<T>\n if (!lazy) return\n if (!rowKey) throw new Error('[Table] rowKey is required in updateKeyChild')\n\n if (lazyTreeNodeMap.value[key]) {\n lazyTreeNodeMap.value[key] = data\n }\n }\n\n return {\n loadData,\n loadOrToggle,\n toggleTreeExpansion,\n updateTreeExpandKeys,\n updateTreeData,\n updateKeyChildren,\n normalize,\n states: {\n expandRowKeys,\n treeData,\n indent,\n lazy,\n lazyTreeNodeMap,\n lazyColumnIdentifier,\n childrenColumnName,\n checkStrictly,\n },\n }\n}\n\nexport default useTree\n"],"names":["ref","getCurrentInstance","computed","getRowIdentity","walkTreeNode","isArray","unref","watch","isUndefined"],"mappings":";;;;;;;;;AAGA,SAAS,OAAO,CAAC,WAAW,EAAE;AAC9B,EAAE,MAAM,aAAa,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAChC,EAAE,MAAM,QAAQ,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAC3B,EAAE,MAAM,MAAM,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AACzB,EAAE,MAAM,IAAI,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC1B,EAAE,M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AQ;AACd,MAAM,MAAM;AACZ,MAAM,IAAI;AACV,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"tree.js","sources":["../../../../../../../packages/components/table/src/store/tree.ts"],"sourcesContent":["// @ts-nocheck\nimport { computed, getCurrentInstance, ref, unref, watch } from 'vue'\nimport { isArray, isUndefined } from '@element-plus/utils'\nimport { getRowIdentity, walkTreeNode } from '../util'\n\nimport type { WatcherPropsData } from '.'\nimport type { Table, TableProps } from '../table/defaults'\n\nfunction useTree<T>(watcherData: WatcherPropsData<T>) {\n const expandRowKeys = ref<string[]>([])\n const treeData = ref<unknown>({})\n const indent = ref(16)\n const lazy = ref(false)\n const lazyTreeNodeMap = ref({})\n const lazyColumnIdentifier = ref('hasChildren')\n const childrenColumnName = ref('children')\n const checkStrictly = ref(false)\n const instance = getCurrentInstance() as Table<T>\n const normalizedData = computed(() => {\n if (!watcherData.rowKey.value) return {}\n const data = watcherData.data.value || []\n return normalize(data)\n })\n const normalizedLazyNode = computed(() => {\n const rowKey = watcherData.rowKey.value\n const keys = Object.keys(lazyTreeNodeMap.value)\n const res = {}\n if (!keys.length) return res\n keys.forEach((key) => {\n if (lazyTreeNodeMap.value[key].length) {\n const item = { children: [] }\n lazyTreeNodeMap.value[key].forEach((row) => {\n const currentRowKey = getRowIdentity(row, rowKey)\n item.children.push(currentRowKey)\n if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) {\n res[currentRowKey] = { children: [] }\n }\n })\n res[key] = item\n }\n })\n return res\n })\n\n const normalize = (data) => {\n const rowKey = watcherData.rowKey.value\n const res = {}\n walkTreeNode(\n data,\n (parent, children, level) => {\n const parentId = getRowIdentity(parent, rowKey)\n if (isArray(children)) {\n res[parentId] = {\n children: children.map((row) => getRowIdentity(row, rowKey)),\n level,\n }\n } else if (lazy.value) {\n // 当 children 不存在且 lazy 为 true,该节点即为懒加载的节点\n res[parentId] = {\n children: [],\n lazy: true,\n level,\n }\n }\n },\n childrenColumnName.value,\n lazyColumnIdentifier.value\n )\n return res\n }\n\n let isInitTree = true\n const updateTreeData = (ifChangeExpandRowKeys = false) => {\n const nested = normalizedData.value\n const normalizedLazyNode_ = normalizedLazyNode.value\n const keys = Object.keys(nested)\n const newTreeData = {}\n const ifExpandAll =\n instance.store?.states.defaultExpandAll.value && isInitTree\n isInitTree = false\n if (keys.length) {\n const oldTreeData = unref(treeData)\n const rootLazyRowKeys = []\n const getExpanded = (oldValue, key) => {\n if (ifChangeExpandRowKeys) {\n if (expandRowKeys.value.length) {\n return ifExpandAll || expandRowKeys.value.includes(key)\n } else {\n return !!(ifExpandAll || oldValue?.expanded)\n }\n } else {\n const included =\n ifExpandAll ||\n (expandRowKeys.value && expandRowKeys.value.includes(key))\n return !!(oldValue?.expanded || included)\n }\n }\n // 合并 expanded 与 display,确保数据刷新后,状态不变\n keys.forEach((key) => {\n const oldValue = oldTreeData[key]\n const newValue = { ...nested[key] }\n newValue.expanded = getExpanded(oldValue, key)\n if (newValue.lazy) {\n const { loaded = false, loading = false } = oldValue || {}\n newValue.loaded = !!loaded\n newValue.loading = !!loading\n rootLazyRowKeys.push(key)\n }\n newTreeData[key] = newValue\n })\n // 根据懒加载数据更新 treeData\n const lazyKeys = Object.keys(normalizedLazyNode_)\n if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) {\n lazyKeys.forEach((key) => {\n const oldValue = oldTreeData[key]\n const lazyNodeChildren = normalizedLazyNode_[key].children\n if (rootLazyRowKeys.includes(key)) {\n // 懒加载的 root 节点,更新一下原有的数据,原来的 children 一定是空数组\n if (newTreeData[key].children.length !== 0) {\n throw new Error('[ElTable]children must be an empty array.')\n }\n newTreeData[key].children = lazyNodeChildren\n } else {\n const { loaded = false, loading = false } = oldValue || {}\n newTreeData[key] = {\n lazy: true,\n loaded: !!loaded,\n loading: !!loading,\n expanded: getExpanded(oldValue, key),\n children: lazyNodeChildren,\n level: '',\n }\n }\n })\n }\n }\n treeData.value = newTreeData\n instance.store?.updateTableScrollY()\n }\n\n watch(\n () => expandRowKeys.value,\n () => {\n updateTreeData(true)\n }\n )\n\n watch(\n () => normalizedData.value,\n () => {\n isInitTree = true\n updateTreeData()\n }\n )\n watch(\n () => normalizedLazyNode.value,\n () => {\n updateTreeData()\n }\n )\n\n const updateTreeExpandKeys = (value: string[]) => {\n expandRowKeys.value = value\n updateTreeData()\n }\n const isUseLazy = (data): boolean => {\n return lazy.value && data && 'loaded' in data && !data.loaded\n }\n const toggleTreeExpansion = (row: T, expanded?: boolean) => {\n instance.store.assertRowKey()\n\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = id && treeData.value[id]\n if (id && data && 'expanded' in data) {\n const oldExpanded = data.expanded\n expanded = isUndefined(expanded) ? !data.expanded : expanded\n treeData.value[id].expanded = expanded\n if (oldExpanded !== expanded) {\n instance.emit('expand-change', row, expanded)\n }\n isUseLazy(data) && loadData(row, id, data)\n instance.store.updateTableScrollY()\n }\n }\n\n const loadOrToggle = (row) => {\n instance.store.assertRowKey()\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = treeData.value[id]\n if (isUseLazy(data)) {\n loadData(row, id, data)\n } else {\n toggleTreeExpansion(row, undefined)\n }\n }\n\n const loadData = (row: T, key: string, treeNode) => {\n const { load } = instance.props as unknown as TableProps<T>\n if (load && !treeData.value[key].loaded) {\n treeData.value[key].loading = true\n load(row, treeNode, (data) => {\n if (!isArray(data)) {\n throw new TypeError('[ElTable] data must be an array')\n }\n treeData.value[key].loading = false\n treeData.value[key].loaded = true\n treeData.value[key].expanded = true\n if (data.length) {\n lazyTreeNodeMap.value[key] = data\n }\n instance.emit('expand-change', row, true)\n })\n }\n }\n\n const updateKeyChildren = (key: string, data: T[]) => {\n const { lazy, rowKey } = instance.props as unknown as TableProps<T>\n if (!lazy) return\n if (!rowKey) throw new Error('[Table] rowKey is required in updateKeyChild')\n\n if (lazyTreeNodeMap.value[key]) {\n lazyTreeNodeMap.value[key] = data\n }\n }\n\n return {\n loadData,\n loadOrToggle,\n toggleTreeExpansion,\n updateTreeExpandKeys,\n updateTreeData,\n updateKeyChildren,\n normalize,\n states: {\n expandRowKeys,\n treeData,\n indent,\n lazy,\n lazyTreeNodeMap,\n lazyColumnIdentifier,\n childrenColumnName,\n checkStrictly,\n },\n }\n}\n\nexport default useTree\n"],"names":["ref","getCurrentInstance","computed","getRowIdentity","walkTreeNode","isArray","unref","watch","isUndefined"],"mappings":";;;;;;;;;AAGA,SAAS,OAAO,CAAC,WAAW,EAAE;AAC9B,EAAE,MAAM,aAAa,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAChC,EAAE,MAAM,QAAQ,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAC3B,EAAE,MAAM,MAAM,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AACzB,EAAE,MAAM,IAAI,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC1B,EAAE,MAAM,eAAe,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAClC,EAAE,MAAM,oBAAoB,GAAGA,OAAG,CAAC,aAAa,CAAC,CAAC;AAClD,EAAE,MAAM,kBAAkB,GAAGA,OAAG,CAAC,UAAU,CAAC,CAAC;AAC7C,EAAE,MAAM,aAAa,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AACnC,EAAE,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,cAAc,GAAGC,YAAQ,CAAC,MAAM;AACxC,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK;AACjC,MAAM,OAAO,EAAE,CAAC;AAChB,IAAI,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC9C,IAAI,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3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AC,CAAC;AAClD,OAAO,CAAC,CAAC;AACT,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK;AAC3C,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AACnD,IAAI,IAAI,CAAC,KAAK;AACd,MAAM,OAAO;AACb,IAAI,IAAI,CAAC,MAAM;AACf,MAAM,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;AACtE,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AACpC,MAAM,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AACxC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,oBAAoB;AACxB,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,IAAI,SAAS;AACb,IAAI,MAAM,EAAE;AACZ,MAAM,aAAa;AACnB,MAAM,QAAQ;AACd,MAAM,MAAM;AACZ,MAAM,IAAI;AACV,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var tabs = require('./src/tabs.js');
|
6
6
|
var tabPane$1 = require('./src/tab-pane2.js');
|
7
|
-
var tabBar = require('./src/tab-
|
7
|
+
var tabBar = require('./src/tab-bar.js');
|
8
8
|
var tabNav = require('./src/tab-nav.js');
|
9
9
|
var tabPane = require('./src/tab-pane.js');
|
10
10
|
var constants = require('./src/constants.js');
|
@@ -2,103 +2,15 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var constants = require('./constants.js');
|
8
|
-
var tabBar = require('./tab-bar2.js');
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
-
var error = require('../../../utils/error.js');
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
12
|
-
var strings = require('../../../utils/strings.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var typescript = require('../../../utils/typescript.js');
|
13
7
|
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
19
|
-
...__default__,
|
20
|
-
props: tabBar.tabBarProps,
|
21
|
-
setup(__props, { expose }) {
|
22
|
-
const props = __props;
|
23
|
-
const instance = vue.getCurrentInstance();
|
24
|
-
const rootTabs = vue.inject(constants.tabsRootContextKey);
|
25
|
-
if (!rootTabs)
|
26
|
-
error.throwError(COMPONENT_NAME, "<el-tabs><el-tab-bar /></el-tabs>");
|
27
|
-
const ns = index.useNamespace("tabs");
|
28
|
-
const barRef = vue.ref();
|
29
|
-
const barStyle = vue.ref();
|
30
|
-
const getBarStyle = () => {
|
31
|
-
let offset = 0;
|
32
|
-
let tabSize = 0;
|
33
|
-
const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
|
34
|
-
const sizeDir = sizeName === "width" ? "x" : "y";
|
35
|
-
const position = sizeDir === "x" ? "left" : "top";
|
36
|
-
props.tabs.every((tab) => {
|
37
|
-
var _a, _b;
|
38
|
-
const $el = (_b = (_a = instance.parent) == null ? void 0 : _a.refs) == null ? void 0 : _b[`tab-${tab.uid}`];
|
39
|
-
if (!$el)
|
40
|
-
return false;
|
41
|
-
if (!tab.active) {
|
42
|
-
return true;
|
43
|
-
}
|
44
|
-
offset = $el[`offset${strings.capitalize(position)}`];
|
45
|
-
tabSize = $el[`client${strings.capitalize(sizeName)}`];
|
46
|
-
const tabStyles = window.getComputedStyle($el);
|
47
|
-
if (sizeName === "width") {
|
48
|
-
tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
|
49
|
-
offset += Number.parseFloat(tabStyles.paddingLeft);
|
50
|
-
}
|
51
|
-
return false;
|
52
|
-
});
|
53
|
-
return {
|
54
|
-
[sizeName]: `${tabSize}px`,
|
55
|
-
transform: `translate${strings.capitalize(sizeDir)}(${offset}px)`
|
56
|
-
};
|
57
|
-
};
|
58
|
-
const update = () => barStyle.value = getBarStyle();
|
59
|
-
const saveObserver = [];
|
60
|
-
const observerTabs = () => {
|
61
|
-
var _a;
|
62
|
-
saveObserver.forEach((observer) => observer.stop());
|
63
|
-
saveObserver.length = 0;
|
64
|
-
const list = (_a = instance.parent) == null ? void 0 : _a.refs;
|
65
|
-
if (!list)
|
66
|
-
return;
|
67
|
-
for (const key in list) {
|
68
|
-
if (key.startsWith("tab-")) {
|
69
|
-
const _el = list[key];
|
70
|
-
if (_el) {
|
71
|
-
saveObserver.push(core.useResizeObserver(_el, update));
|
72
|
-
}
|
73
|
-
}
|
74
|
-
}
|
75
|
-
};
|
76
|
-
vue.watch(() => props.tabs, async () => {
|
77
|
-
await vue.nextTick();
|
78
|
-
update();
|
79
|
-
observerTabs();
|
80
|
-
}, { immediate: true });
|
81
|
-
const barObserever = core.useResizeObserver(barRef, () => update());
|
82
|
-
vue.onBeforeUnmount(() => {
|
83
|
-
saveObserver.forEach((observer) => observer.stop());
|
84
|
-
saveObserver.length = 0;
|
85
|
-
barObserever.stop();
|
86
|
-
});
|
87
|
-
expose({
|
88
|
-
ref: barRef,
|
89
|
-
update
|
90
|
-
});
|
91
|
-
return (_ctx, _cache) => {
|
92
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
93
|
-
ref_key: "barRef",
|
94
|
-
ref: barRef,
|
95
|
-
class: vue.normalizeClass([vue.unref(ns).e("active-bar"), vue.unref(ns).is(vue.unref(rootTabs).props.tabPosition)]),
|
96
|
-
style: vue.normalizeStyle(barStyle.value)
|
97
|
-
}, null, 6);
|
98
|
-
};
|
8
|
+
const tabBarProps = runtime.buildProps({
|
9
|
+
tabs: {
|
10
|
+
type: runtime.definePropType(Array),
|
11
|
+
default: () => typescript.mutable([])
|
99
12
|
}
|
100
13
|
});
|
101
|
-
var TabBar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tab-bar.vue"]]);
|
102
14
|
|
103
|
-
exports
|
15
|
+
exports.tabBarProps = tabBarProps;
|
104
16
|
//# sourceMappingURL=tab-bar.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab-bar.js","sources":["../../../../../../packages/components/tabs/src/tab-bar.
|
1
|
+
{"version":3,"file":"tab-bar.js","sources":["../../../../../../packages/components/tabs/src/tab-bar.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { TabsPaneContext } from './constants'\nimport type TabBar from './tab-bar.vue'\n\nexport const tabBarProps = buildProps({\n tabs: {\n type: definePropType<TabsPaneContext[]>(Array),\n default: () => mutable([] as const),\n },\n} as const)\n\nexport type TabBarProps = ExtractPropTypes<typeof tabBarProps>\nexport type TabBarInstance = InstanceType<typeof TabBar> & unknown\n"],"names":["buildProps","definePropType","mutable"],"mappings":";;;;;;;AACY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAMC,kBAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC;;;;"}
|