@element-plus/nightly 0.0.20250513 → 0.0.20250514
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +53 -26
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +53 -26
- 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/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/button/src/button.d.ts +5 -2
- package/es/components/button/src/button.mjs +8 -2
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +8 -8
- package/es/components/button/src/button2.mjs +13 -3
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/button/src/use-button.d.ts +3 -1
- package/es/components/button/src/use-button.mjs +14 -1
- package/es/components/button/src/use-button.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +22 -42
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +42 -22
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +639 -80
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +80 -637
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/src/dialog-content.mjs +88 -29
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +29 -88
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +68 -172
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +172 -68
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +34 -16
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +16 -34
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/drawer/src/drawer.mjs +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form.mjs +153 -53
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +53 -153
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/index.mjs +13 -13
- package/es/components/message/src/message.d.ts +1 -0
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/method.mjs +3 -0
- package/es/components/message/src/method.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +72 -140
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +140 -72
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +97 -16
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +16 -97
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +210 -16
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +16 -210
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +112 -66
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +66 -112
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/table-v2/src/composables/use-styles.d.ts +0 -1
- package/es/components/table-v2/src/composables/use-styles.mjs +0 -2
- package/es/components/table-v2/src/composables/use-styles.mjs.map +1 -1
- package/es/components/table-v2/src/table-v2.mjs +5 -7
- package/es/components/table-v2/src/table-v2.mjs.map +1 -1
- package/es/components/table-v2/src/use-table.d.ts +0 -1
- package/es/components/table-v2/src/use-table.mjs +0 -2
- package/es/components/table-v2/src/use-table.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +54 -132
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +132 -54
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/arrow.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +79 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -79
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +3 -3
- package/es/components/tooltip-v2/src/tooltip2.mjs +6 -6
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +69 -154
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +154 -69
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +130 -19
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +19 -130
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/virtual-list/src/components/scrollbar.mjs +5 -6
- package/es/components/virtual-list/src/components/scrollbar.mjs.map +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +35 -6
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +6 -35
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +220 -27
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +27 -220
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.d.ts +14 -11
- package/es/index.mjs +13 -13
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/button/src/button.d.ts +5 -2
- package/lib/components/button/src/button.js +8 -2
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +8 -8
- package/lib/components/button/src/button2.js +13 -3
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/button/src/use-button.d.ts +3 -1
- package/lib/components/button/src/use-button.js +14 -1
- package/lib/components/button/src/use-button.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +22 -42
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +42 -22
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +639 -81
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +81 -637
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dialog/src/dialog-content.js +87 -29
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +29 -87
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +68 -171
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +171 -68
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +34 -16
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +16 -34
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/drawer/src/drawer.js +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form.js +152 -54
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +54 -152
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/index.js +13 -13
- package/lib/components/message/src/message.d.ts +1 -0
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/method.js +3 -0
- package/lib/components/message/src/method.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +73 -139
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +139 -73
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +97 -17
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +17 -97
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +210 -16
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +16 -210
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +112 -67
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +67 -112
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +56 -170
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +170 -56
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/table-v2/src/composables/use-styles.d.ts +0 -1
- package/lib/components/table-v2/src/composables/use-styles.js +0 -2
- package/lib/components/table-v2/src/composables/use-styles.js.map +1 -1
- package/lib/components/table-v2/src/table-v2.js +5 -7
- package/lib/components/table-v2/src/table-v2.js.map +1 -1
- package/lib/components/table-v2/src/use-table.d.ts +0 -1
- package/lib/components/table-v2/src/use-table.js +0 -2
- package/lib/components/table-v2/src/use-table.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +54 -137
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +137 -54
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/arrow.js +22 -37
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +37 -22
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +79 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -79
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +3 -3
- package/lib/components/tooltip-v2/src/tooltip2.js +6 -6
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +69 -153
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +153 -69
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +130 -21
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +21 -130
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/virtual-list/src/components/scrollbar.js +5 -6
- package/lib/components/virtual-list/src/components/scrollbar.js.map +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +35 -6
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +6 -35
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +220 -27
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +27 -220
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.d.ts +14 -11
- package/lib/index.js +13 -13
- 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
@@ -48,7 +48,6 @@ const TableV2 = defineComponent({
|
|
48
48
|
bodyWidth,
|
49
49
|
emptyStyle,
|
50
50
|
rootStyle,
|
51
|
-
headerWidth,
|
52
51
|
footerHeight,
|
53
52
|
showEmpty,
|
54
53
|
scrollTo,
|
@@ -108,9 +107,9 @@ const TableV2 = defineComponent({
|
|
108
107
|
data: _data,
|
109
108
|
fixedData,
|
110
109
|
estimatedRowHeight,
|
111
|
-
bodyWidth: unref(bodyWidth)
|
110
|
+
bodyWidth: unref(bodyWidth),
|
112
111
|
headerHeight,
|
113
|
-
headerWidth: unref(
|
112
|
+
headerWidth: unref(bodyWidth),
|
114
113
|
height: unref(mainTableHeight),
|
115
114
|
mainTableRef,
|
116
115
|
rowKey,
|
@@ -149,7 +148,6 @@ const TableV2 = defineComponent({
|
|
149
148
|
onScroll: onVerticalScroll
|
150
149
|
};
|
151
150
|
const rightColumnsWidth = unref(rightTableWidth);
|
152
|
-
const rightColumnsWidthWithScrollbar = rightColumnsWidth + vScrollbarSize;
|
153
151
|
const rightTableProps = {
|
154
152
|
cache,
|
155
153
|
class: ns.e("right"),
|
@@ -159,15 +157,15 @@ const TableV2 = defineComponent({
|
|
159
157
|
estimatedRowHeight,
|
160
158
|
rightTableRef,
|
161
159
|
rowHeight,
|
162
|
-
bodyWidth:
|
163
|
-
headerWidth:
|
160
|
+
bodyWidth: rightColumnsWidth,
|
161
|
+
headerWidth: rightColumnsWidth,
|
164
162
|
headerHeight,
|
165
163
|
height: _fixedTableHeight,
|
166
164
|
rowKey,
|
167
165
|
scrollbarAlwaysOn,
|
168
166
|
scrollbarStartGap: 2,
|
169
167
|
scrollbarEndGap: vScrollbarSize,
|
170
|
-
width:
|
168
|
+
width: rightColumnsWidth,
|
171
169
|
style: `--${unref(ns.namespace)}-table-scrollbar-size: ${vScrollbarSize}px`,
|
172
170
|
useIsScrolling,
|
173
171
|
getRowHeight,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"table-v2.mjs","sources":["../../../../../../packages/components/table-v2/src/table-v2.tsx"],"sourcesContent":["// @ts-nocheck\nimport { defineComponent, provide, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useTable } from './use-table'\nimport { TableV2InjectionKey } from './tokens'\nimport { tableV2Props } from './table'\n// renderers\nimport MainTable from './renderers/main-table'\nimport LeftTable from './renderers/left-table'\nimport RightTable from './renderers/right-table'\nimport Row from './renderers/row'\nimport Cell from './renderers/cell'\nimport Header from './renderers/header'\nimport HeaderCell from './renderers/header-cell'\nimport Footer from './renderers/footer'\nimport Empty from './renderers/empty'\nimport Overlay from './renderers/overlay'\n\nimport type { TableGridRowSlotParams } from './table-grid'\nimport type { ScrollStrategy } from './composables/use-scrollbar'\nimport type {\n TableV2HeaderRendererParams,\n TableV2HeaderRowCellRendererParams,\n TableV2RowCellRenderParam,\n} from './components'\n\nconst COMPONENT_NAME = 'ElTableV2'\n\nconst TableV2 = defineComponent({\n name: COMPONENT_NAME,\n props: tableV2Props,\n setup(props, { slots, expose }) {\n const ns = useNamespace('table-v2')\n\n const {\n columnsStyles,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n mainColumns,\n mainTableHeight,\n fixedTableHeight,\n leftTableWidth,\n rightTableWidth,\n data,\n depthMap,\n expandedRowKeys,\n hasFixedColumns,\n mainTableRef,\n leftTableRef,\n rightTableRef,\n isDynamic,\n isResetting,\n isScrolling,\n\n bodyWidth,\n emptyStyle,\n rootStyle,\n headerWidth,\n footerHeight,\n\n showEmpty,\n\n // exposes\n scrollTo,\n scrollToLeft,\n scrollToTop,\n scrollToRow,\n\n getRowHeight,\n onColumnSorted,\n onRowHeightChange,\n onRowHovered,\n onRowExpanded,\n onRowsRendered,\n onScroll,\n onVerticalScroll,\n } = useTable(props)\n\n expose({\n /**\n * @description scroll to a given position\n * @params params {{ scrollLeft?: number, scrollTop?: number }} where to scroll to.\n */\n scrollTo,\n /**\n * @description scroll to a given position horizontally\n * @params scrollLeft {Number} where to scroll to.\n */\n scrollToLeft,\n /**\n * @description scroll to a given position vertically\n * @params scrollTop { Number } where to scroll to.\n */\n scrollToTop,\n /**\n * @description scroll to a given row\n * @params row {Number} which row to scroll to\n * @params @optional strategy {ScrollStrategy} use what strategy to scroll to\n */\n scrollToRow,\n })\n\n provide(TableV2InjectionKey, {\n ns,\n isResetting,\n isScrolling,\n })\n\n return () => {\n const {\n cache,\n cellProps,\n estimatedRowHeight,\n expandColumnKey,\n fixedData,\n headerHeight,\n headerClass,\n headerProps,\n headerCellProps,\n sortBy,\n sortState,\n rowHeight,\n rowClass,\n rowEventHandlers,\n rowKey,\n rowProps,\n scrollbarAlwaysOn,\n indentSize,\n iconSize,\n useIsScrolling,\n vScrollbarSize,\n width,\n } = props\n\n const _data = unref(data)\n\n const mainTableProps = {\n cache,\n class: ns.e('main'),\n columns: unref(mainColumns),\n data: _data,\n fixedData,\n estimatedRowHeight,\n bodyWidth: unref(bodyWidth) + vScrollbarSize,\n headerHeight,\n headerWidth: unref(headerWidth),\n height: unref(mainTableHeight),\n mainTableRef,\n rowKey,\n rowHeight,\n scrollbarAlwaysOn,\n scrollbarStartGap: 2,\n scrollbarEndGap: vScrollbarSize,\n useIsScrolling,\n width,\n getRowHeight,\n onRowsRendered,\n onScroll,\n }\n\n const leftColumnsWidth = unref(leftTableWidth)\n const _fixedTableHeight = unref(fixedTableHeight)\n\n const leftTableProps = {\n cache,\n class: ns.e('left'),\n columns: unref(fixedColumnsOnLeft),\n data: _data,\n fixedData,\n estimatedRowHeight,\n leftTableRef,\n rowHeight,\n bodyWidth: leftColumnsWidth,\n headerWidth: leftColumnsWidth,\n headerHeight,\n height: _fixedTableHeight,\n rowKey,\n scrollbarAlwaysOn,\n scrollbarStartGap: 2,\n scrollbarEndGap: vScrollbarSize,\n useIsScrolling,\n width: leftColumnsWidth,\n getRowHeight,\n onScroll: onVerticalScroll,\n }\n\n const rightColumnsWidth = unref(rightTableWidth)\n const rightColumnsWidthWithScrollbar = rightColumnsWidth + vScrollbarSize\n\n const rightTableProps = {\n cache,\n class: ns.e('right'),\n columns: unref(fixedColumnsOnRight),\n data: _data,\n fixedData,\n estimatedRowHeight,\n rightTableRef,\n rowHeight,\n bodyWidth: rightColumnsWidthWithScrollbar,\n headerWidth: rightColumnsWidthWithScrollbar,\n headerHeight,\n height: _fixedTableHeight,\n rowKey,\n scrollbarAlwaysOn,\n scrollbarStartGap: 2,\n scrollbarEndGap: vScrollbarSize,\n width: rightColumnsWidthWithScrollbar,\n style: `--${unref(\n ns.namespace\n )}-table-scrollbar-size: ${vScrollbarSize}px`,\n useIsScrolling,\n getRowHeight,\n onScroll: onVerticalScroll,\n }\n const _columnsStyles = unref(columnsStyles)\n\n const tableRowProps = {\n ns,\n depthMap: unref(depthMap),\n columnsStyles: _columnsStyles,\n expandColumnKey,\n expandedRowKeys: unref(expandedRowKeys),\n estimatedRowHeight,\n hasFixedColumns: unref(hasFixedColumns),\n rowProps,\n rowClass,\n rowKey,\n rowEventHandlers,\n onRowHovered,\n onRowExpanded,\n onRowHeightChange,\n }\n\n const tableCellProps = {\n cellProps,\n expandColumnKey,\n indentSize,\n iconSize,\n rowKey,\n expandedRowKeys: unref(expandedRowKeys),\n ns,\n }\n\n const tableHeaderProps = {\n ns,\n headerClass,\n headerProps,\n columnsStyles: _columnsStyles,\n }\n\n const tableHeaderCellProps = {\n ns,\n\n sortBy,\n sortState,\n headerCellProps,\n onColumnSorted,\n }\n\n const tableSlots = {\n row: (props: TableGridRowSlotParams) => (\n <Row {...props} {...tableRowProps}>\n {{\n row: slots.row,\n cell: (props: TableV2RowCellRenderParam) =>\n slots.cell ? (\n <Cell\n {...props}\n {...tableCellProps}\n style={_columnsStyles[props.column.key]}\n >\n {slots.cell(props)}\n </Cell>\n ) : (\n <Cell\n {...props}\n {...tableCellProps}\n style={_columnsStyles[props.column.key]}\n />\n ),\n }}\n </Row>\n ),\n header: (props: TableV2HeaderRendererParams) => (\n <Header {...props} {...tableHeaderProps}>\n {{\n header: slots.header,\n cell: (props: TableV2HeaderRowCellRendererParams) =>\n slots['header-cell'] ? (\n <HeaderCell\n {...props}\n {...tableHeaderCellProps}\n style={_columnsStyles[props.column.key]}\n >\n {slots['header-cell'](props)}\n </HeaderCell>\n ) : (\n <HeaderCell\n {...props}\n {...tableHeaderCellProps}\n style={_columnsStyles[props.column.key]}\n />\n ),\n }}\n </Header>\n ),\n }\n\n const rootKls = [\n props.class,\n ns.b(),\n ns.e('root'),\n {\n [ns.is('dynamic')]: unref(isDynamic),\n },\n ]\n\n const footerProps = {\n class: ns.e('footer'),\n style: unref(footerHeight),\n }\n\n return (\n <div class={rootKls} style={unref(rootStyle)}>\n <MainTable {...mainTableProps}>{tableSlots}</MainTable>\n <LeftTable {...leftTableProps}>{tableSlots}</LeftTable>\n <RightTable {...rightTableProps}>{tableSlots}</RightTable>\n {slots.footer && (\n <Footer {...footerProps}>{{ default: slots.footer }}</Footer>\n )}\n {unref(showEmpty) && (\n <Empty class={ns.e('empty')} style={unref(emptyStyle)}>\n {{ default: slots.empty }}\n </Empty>\n )}\n {slots.overlay && (\n <Overlay class={ns.e('overlay')}>\n {{ default: slots.overlay }}\n </Overlay>\n )}\n </div>\n )\n }\n },\n})\n\nexport default TableV2\n\nexport type TableV2Instance = InstanceType<typeof TableV2> & {\n /**\n * @description scroll to a given position\n * @params params {{ scrollLeft?: number, scrollTop?: number }} where to scroll to.\n */\n scrollTo: (param: { scrollLeft?: number; scrollTop?: number }) => void\n /**\n * @description scroll to a given position horizontally\n * @params scrollLeft {Number} where to scroll to.\n */\n scrollToLeft: (scrollLeft: number) => void\n /**\n * @description scroll to a given position vertically\n * @params scrollTop { Number } where to scroll to.\n */\n scrollToTop: (scrollTop: number) => void\n /**\n * @description scroll to a given row\n * @params row {Number} which row to scroll to\n * @params strategy {ScrollStrategy} use what strategy to scroll to\n */\n scrollToRow(row: number, strategy?: ScrollStrategy): void\n}\n"],"names":["Empty","Overlay","_isVNode","COMPONENT_NAME","TableV2","name","props","expose","columnsStyles","fixedColumnsOnLeft","fixedColumnsOnRight","mainColumns","mainTableHeight","fixedTableHeight","leftTableWidth","rightTableWidth","data","depthMap","expandedRowKeys","hasFixedColumns","mainTableRef","leftTableRef","rightTableRef","isDynamic","isResetting","isScrolling","bodyWidth","emptyStyle","rootStyle","headerWidth","footerHeight","showEmpty","scrollTo","scrollToLeft","scrollToTop","scrollToRow","getRowHeight","onColumnSorted","onRowExpanded","onRowsRendered","onScroll","onVerticalScroll","useTable","cache","cellProps","estimatedRowHeight","expandColumnKey","fixedData","headerHeight","headerClass","headerProps","headerCellProps","sortBy","sortState","rowHeight","rowClass","rowEventHandlers","rowKey","rowProps","scrollbarAlwaysOn","indentSize","iconSize","useIsScrolling","vScrollbarSize","width","class","columns","unref","height","scrollbarStartGap","scrollbarEndGap","_fixedTableHeight","_data","style","ns","_columnsStyles","_createVNode","_mergeProps","onRowHeightChange","row","cell","slots","header"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAOA,SAAW,EAAlB;AACA,EAAOC,OAAAA,aAAP,UAAA,IAAA,MAAA,CAAA,SAAA,CAAA,QAAA,CAAA,IAAA,CAAA,CAAA,CAAA,KAAA,iBAAA,IAAA,CAAAC,OAAA,CAAA,CAAA,CAAA,CAAA;;;;;;AAUA,EAAMC,KAAAA,CAAAA,KAAAA,EAAAA;AAEN,IAAMC,KAAAA;AACJC,IAAAA,MAD8B;AAE9BC,GAAAA,EAAAA;;IACK;MAAQ,aAAA;AAASC,MAAAA,kBAAAA;AAAT,MAAmB,mBAAA;AAC9B,MAAA,WAAuB;MAEjB,eAAA;MACJC,gBADI;MAEJC,cAFI;MAGJC,eAHI;MAIJC,IAJI;MAKJC,QALI;MAMJC,eANI;MAOJC,eAPI;MAQJC,YARI;MASJC,YATI;MAUJC,aAVI;MAWJC,SAXI;MAYJC,WAZI;MAaJC,WAbI;MAcJC,SAdI;MAeJC,UAfI;MAgBJC,SAhBI;MAiBJC,WAjBI;MAkBJC,YAlBI;MAoBJC,SApBI;MAqBJC,QArBI;MAsBJC,YAtBI;MAuBJC,WAvBI;MAwBJC,WAxBI;MA0BJC,YA1BI;AA4BJ,MAAA,cAAA;MACAC,iBA7BI;MA8BJC,YA9BI;MA+BJC,aA/BI;MAgCJC,cAhCI;MAkCJC,QAlCI;MAmCJC,gBAnCI;QAAA,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AAA;AAAM,QAAA,OAAA,EAAA,KAAA,CAAA,KAAA;;AAAA,QAAA,OAAA,EAAA,EACJC,YAAM,CAAA;AAAN,OAAA,EAAA;AAAA,QAAA,OAAA,EAAA,KAAA,CAAA,OAAA;AAAA,OAAA,CAAA,CAAA,CAAA,CAAA;;AAAA,GAAA;;AADI,gBAAA,OAAA;;;;"}
|
1
|
+
{"version":3,"file":"table-v2.mjs","sources":["../../../../../../packages/components/table-v2/src/table-v2.tsx"],"sourcesContent":["// @ts-nocheck\nimport { defineComponent, provide, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useTable } from './use-table'\nimport { TableV2InjectionKey } from './tokens'\nimport { tableV2Props } from './table'\n// renderers\nimport MainTable from './renderers/main-table'\nimport LeftTable from './renderers/left-table'\nimport RightTable from './renderers/right-table'\nimport Row from './renderers/row'\nimport Cell from './renderers/cell'\nimport Header from './renderers/header'\nimport HeaderCell from './renderers/header-cell'\nimport Footer from './renderers/footer'\nimport Empty from './renderers/empty'\nimport Overlay from './renderers/overlay'\n\nimport type { TableGridRowSlotParams } from './table-grid'\nimport type { ScrollStrategy } from './composables/use-scrollbar'\nimport type {\n TableV2HeaderRendererParams,\n TableV2HeaderRowCellRendererParams,\n TableV2RowCellRenderParam,\n} from './components'\n\nconst COMPONENT_NAME = 'ElTableV2'\n\nconst TableV2 = defineComponent({\n name: COMPONENT_NAME,\n props: tableV2Props,\n setup(props, { slots, expose }) {\n const ns = useNamespace('table-v2')\n\n const {\n columnsStyles,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n mainColumns,\n mainTableHeight,\n fixedTableHeight,\n leftTableWidth,\n rightTableWidth,\n data,\n depthMap,\n expandedRowKeys,\n hasFixedColumns,\n mainTableRef,\n leftTableRef,\n rightTableRef,\n isDynamic,\n isResetting,\n isScrolling,\n\n bodyWidth,\n emptyStyle,\n rootStyle,\n footerHeight,\n\n showEmpty,\n\n // exposes\n scrollTo,\n scrollToLeft,\n scrollToTop,\n scrollToRow,\n\n getRowHeight,\n onColumnSorted,\n onRowHeightChange,\n onRowHovered,\n onRowExpanded,\n onRowsRendered,\n onScroll,\n onVerticalScroll,\n } = useTable(props)\n\n expose({\n /**\n * @description scroll to a given position\n * @params params {{ scrollLeft?: number, scrollTop?: number }} where to scroll to.\n */\n scrollTo,\n /**\n * @description scroll to a given position horizontally\n * @params scrollLeft {Number} where to scroll to.\n */\n scrollToLeft,\n /**\n * @description scroll to a given position vertically\n * @params scrollTop { Number } where to scroll to.\n */\n scrollToTop,\n /**\n * @description scroll to a given row\n * @params row {Number} which row to scroll to\n * @params @optional strategy {ScrollStrategy} use what strategy to scroll to\n */\n scrollToRow,\n })\n\n provide(TableV2InjectionKey, {\n ns,\n isResetting,\n isScrolling,\n })\n\n return () => {\n const {\n cache,\n cellProps,\n estimatedRowHeight,\n expandColumnKey,\n fixedData,\n headerHeight,\n headerClass,\n headerProps,\n headerCellProps,\n sortBy,\n sortState,\n rowHeight,\n rowClass,\n rowEventHandlers,\n rowKey,\n rowProps,\n scrollbarAlwaysOn,\n indentSize,\n iconSize,\n useIsScrolling,\n vScrollbarSize,\n width,\n } = props\n\n const _data = unref(data)\n\n const mainTableProps = {\n cache,\n class: ns.e('main'),\n columns: unref(mainColumns),\n data: _data,\n fixedData,\n estimatedRowHeight,\n bodyWidth: unref(bodyWidth),\n headerHeight,\n headerWidth: unref(bodyWidth),\n height: unref(mainTableHeight),\n mainTableRef,\n rowKey,\n rowHeight,\n scrollbarAlwaysOn,\n scrollbarStartGap: 2,\n scrollbarEndGap: vScrollbarSize,\n useIsScrolling,\n width,\n getRowHeight,\n onRowsRendered,\n onScroll,\n }\n\n const leftColumnsWidth = unref(leftTableWidth)\n const _fixedTableHeight = unref(fixedTableHeight)\n\n const leftTableProps = {\n cache,\n class: ns.e('left'),\n columns: unref(fixedColumnsOnLeft),\n data: _data,\n fixedData,\n estimatedRowHeight,\n leftTableRef,\n rowHeight,\n bodyWidth: leftColumnsWidth,\n headerWidth: leftColumnsWidth,\n headerHeight,\n height: _fixedTableHeight,\n rowKey,\n scrollbarAlwaysOn,\n scrollbarStartGap: 2,\n scrollbarEndGap: vScrollbarSize,\n useIsScrolling,\n width: leftColumnsWidth,\n getRowHeight,\n onScroll: onVerticalScroll,\n }\n\n const rightColumnsWidth = unref(rightTableWidth)\n\n const rightTableProps = {\n cache,\n class: ns.e('right'),\n columns: unref(fixedColumnsOnRight),\n data: _data,\n fixedData,\n estimatedRowHeight,\n rightTableRef,\n rowHeight,\n bodyWidth: rightColumnsWidth,\n headerWidth: rightColumnsWidth,\n headerHeight,\n height: _fixedTableHeight,\n rowKey,\n scrollbarAlwaysOn,\n scrollbarStartGap: 2,\n scrollbarEndGap: vScrollbarSize,\n width: rightColumnsWidth,\n style: `--${unref(\n ns.namespace\n )}-table-scrollbar-size: ${vScrollbarSize}px`,\n useIsScrolling,\n getRowHeight,\n onScroll: onVerticalScroll,\n }\n const _columnsStyles = unref(columnsStyles)\n\n const tableRowProps = {\n ns,\n depthMap: unref(depthMap),\n columnsStyles: _columnsStyles,\n expandColumnKey,\n expandedRowKeys: unref(expandedRowKeys),\n estimatedRowHeight,\n hasFixedColumns: unref(hasFixedColumns),\n rowProps,\n rowClass,\n rowKey,\n rowEventHandlers,\n onRowHovered,\n onRowExpanded,\n onRowHeightChange,\n }\n\n const tableCellProps = {\n cellProps,\n expandColumnKey,\n indentSize,\n iconSize,\n rowKey,\n expandedRowKeys: unref(expandedRowKeys),\n ns,\n }\n\n const tableHeaderProps = {\n ns,\n headerClass,\n headerProps,\n columnsStyles: _columnsStyles,\n }\n\n const tableHeaderCellProps = {\n ns,\n\n sortBy,\n sortState,\n headerCellProps,\n onColumnSorted,\n }\n\n const tableSlots = {\n row: (props: TableGridRowSlotParams) => (\n <Row {...props} {...tableRowProps}>\n {{\n row: slots.row,\n cell: (props: TableV2RowCellRenderParam) =>\n slots.cell ? (\n <Cell\n {...props}\n {...tableCellProps}\n style={_columnsStyles[props.column.key]}\n >\n {slots.cell(props)}\n </Cell>\n ) : (\n <Cell\n {...props}\n {...tableCellProps}\n style={_columnsStyles[props.column.key]}\n />\n ),\n }}\n </Row>\n ),\n header: (props: TableV2HeaderRendererParams) => (\n <Header {...props} {...tableHeaderProps}>\n {{\n header: slots.header,\n cell: (props: TableV2HeaderRowCellRendererParams) =>\n slots['header-cell'] ? (\n <HeaderCell\n {...props}\n {...tableHeaderCellProps}\n style={_columnsStyles[props.column.key]}\n >\n {slots['header-cell'](props)}\n </HeaderCell>\n ) : (\n <HeaderCell\n {...props}\n {...tableHeaderCellProps}\n style={_columnsStyles[props.column.key]}\n />\n ),\n }}\n </Header>\n ),\n }\n\n const rootKls = [\n props.class,\n ns.b(),\n ns.e('root'),\n {\n [ns.is('dynamic')]: unref(isDynamic),\n },\n ]\n\n const footerProps = {\n class: ns.e('footer'),\n style: unref(footerHeight),\n }\n\n return (\n <div class={rootKls} style={unref(rootStyle)}>\n <MainTable {...mainTableProps}>{tableSlots}</MainTable>\n <LeftTable {...leftTableProps}>{tableSlots}</LeftTable>\n <RightTable {...rightTableProps}>{tableSlots}</RightTable>\n {slots.footer && (\n <Footer {...footerProps}>{{ default: slots.footer }}</Footer>\n )}\n {unref(showEmpty) && (\n <Empty class={ns.e('empty')} style={unref(emptyStyle)}>\n {{ default: slots.empty }}\n </Empty>\n )}\n {slots.overlay && (\n <Overlay class={ns.e('overlay')}>\n {{ default: slots.overlay }}\n </Overlay>\n )}\n </div>\n )\n }\n },\n})\n\nexport default TableV2\n\nexport type TableV2Instance = InstanceType<typeof TableV2> & {\n /**\n * @description scroll to a given position\n * @params params {{ scrollLeft?: number, scrollTop?: number }} where to scroll to.\n */\n scrollTo: (param: { scrollLeft?: number; scrollTop?: number }) => void\n /**\n * @description scroll to a given position horizontally\n * @params scrollLeft {Number} where to scroll to.\n */\n scrollToLeft: (scrollLeft: number) => void\n /**\n * @description scroll to a given position vertically\n * @params scrollTop { Number } where to scroll to.\n */\n scrollToTop: (scrollTop: number) => void\n /**\n * @description scroll to a given row\n * @params row {Number} which row to scroll to\n * @params strategy {ScrollStrategy} use what strategy to scroll to\n */\n scrollToRow(row: number, strategy?: ScrollStrategy): void\n}\n"],"names":["Empty","Overlay","_isVNode","COMPONENT_NAME","TableV2","name","props","expose","columnsStyles","fixedColumnsOnLeft","fixedColumnsOnRight","mainColumns","mainTableHeight","fixedTableHeight","leftTableWidth","rightTableWidth","data","depthMap","expandedRowKeys","hasFixedColumns","mainTableRef","leftTableRef","rightTableRef","isDynamic","isResetting","isScrolling","bodyWidth","emptyStyle","rootStyle","footerHeight","showEmpty","scrollTo","scrollToLeft","scrollToTop","scrollToRow","getRowHeight","onColumnSorted","onRowExpanded","onRowsRendered","onScroll","onVerticalScroll","useTable","cache","cellProps","estimatedRowHeight","expandColumnKey","fixedData","headerHeight","headerClass","headerProps","headerCellProps","sortBy","sortState","rowHeight","rowClass","rowEventHandlers","rowKey","rowProps","scrollbarAlwaysOn","indentSize","iconSize","useIsScrolling","vScrollbarSize","width","class","columns","unref","headerWidth","height","scrollbarStartGap","scrollbarEndGap","_data","style","ns","_columnsStyles","_createVNode","_mergeProps","onRowHeightChange","row","cell","slots","header"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAOA,SAAW,EAAlB;AACA,EAAOC,OAAAA,aAAP,UAAA,IAAA,MAAA,CAAA,SAAA,CAAA,QAAA,CAAA,IAAA,CAAA,CAAA,CAAA,KAAA,iBAAA,IAAA,CAAAC,OAAA,CAAA,CAAA,CAAA,CAAA;;;;;;AAUA,EAAMC,KAAAA,CAAAA,KAAAA,EAAAA;AAEN,IAAMC,KAAAA;AACJC,IAAAA,MAD8B;AAE9BC,GAAAA,EAAAA;;IACK;MAAQ,aAAA;AAASC,MAAAA,kBAAAA;AAAT,MAAmB,mBAAA;AAC9B,MAAA,WAAuB;MAEjB,eAAA;MACJC,gBADI;MAEJC,cAFI;MAGJC,eAHI;MAIJC,IAJI;MAKJC,QALI;MAMJC,eANI;MAOJC,eAPI;MAQJC,YARI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,WAAA,EAAA;AAAA,QAAA,OAAA,EAAA,KAAA,CAAA,MAAA;QAJP,EADY,KAAA,CAAA,SAAA,CAAA,IAAAA,WAAA,CAAA,KAAA,EAAA;AAwBjBM,QAAAA,OAAS3E,EAAAA,EAAAA,CAAAA,CAAD,CACMA,OAAAA,CAAAA;eAEF,EAAA,KAAO,CAAA,UAHX,CAAA;AAIFyE,OAAAA,EAAAA;AAAM,QAAA,OAAA,EAAA,KAAA,CAAA,KAAA;;AAAA,QAAA,OAAA,EAAA,EACJC,YAAM,CAAA;AAAN,OAAA,EAAA;AAAA,QAAA,OAAA,EAAA,KAAA,CAAA,OAAA;AAAA,OAAA,CAAA,CAAA,CAAA,CAAA;;AAAA,GAAA;;AADI,gBAAA,OAAA;;;;"}
|
@@ -75,7 +75,6 @@ declare function useTable(props: TableV2Props): {
|
|
75
75
|
bodyWidth: import("vue").ComputedRef<number>;
|
76
76
|
emptyStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
77
77
|
rootStyle: import("vue").ComputedRef<import("vue").CSSProperties>;
|
78
|
-
headerWidth: import("vue").ComputedRef<number>;
|
79
78
|
footerHeight: import("vue").ComputedRef<import("vue").CSSProperties>;
|
80
79
|
mainTableHeight: import("vue").ComputedRef<number>;
|
81
80
|
fixedTableHeight: import("vue").ComputedRef<number>;
|
@@ -77,7 +77,6 @@ function useTable(props) {
|
|
77
77
|
mainTableHeight,
|
78
78
|
leftTableWidth,
|
79
79
|
rightTableWidth,
|
80
|
-
headerWidth,
|
81
80
|
windowHeight,
|
82
81
|
footerHeight,
|
83
82
|
emptyStyle,
|
@@ -141,7 +140,6 @@ function useTable(props) {
|
|
141
140
|
bodyWidth,
|
142
141
|
emptyStyle,
|
143
142
|
rootStyle,
|
144
|
-
headerWidth,
|
145
143
|
footerHeight,
|
146
144
|
mainTableHeight,
|
147
145
|
fixedTableHeight,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-table.mjs","sources":["../../../../../../packages/components/table-v2/src/use-table.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n ref,\n shallowRef,\n toRef,\n unref,\n watch,\n} from 'vue'\nimport { isArray, isNumber } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport {\n useColumns,\n useData,\n useRow,\n useScrollbar,\n useStyles,\n} from './composables'\n\nimport type { TableV2Props } from './table'\nimport type { TableGridInstance } from './table-grid'\n\nfunction useTable(props: TableV2Props) {\n const mainTableRef = ref<TableGridInstance>()\n const leftTableRef = ref<TableGridInstance>()\n const rightTableRef = ref<TableGridInstance>()\n const {\n columns,\n columnsStyles,\n columnsTotalWidth,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n hasFixedColumns,\n mainColumns,\n\n onColumnSorted,\n } = useColumns(props, toRef(props, 'columns'), toRef(props, 'fixed'))\n\n const {\n scrollTo,\n scrollToLeft,\n scrollToTop,\n scrollToRow,\n onScroll,\n onVerticalScroll,\n scrollPos,\n } = useScrollbar(props, {\n mainTableRef,\n leftTableRef,\n rightTableRef,\n\n onMaybeEndReached,\n })\n\n const ns = useNamespace('table-v2')\n const instance = getCurrentInstance()!\n\n // state\n const isScrolling = shallowRef(false)\n\n const {\n expandedRowKeys,\n lastRenderedRowIndex,\n isDynamic,\n isResetting,\n rowHeights,\n resetAfterIndex,\n onRowExpanded,\n onRowHeightChange,\n onRowHovered,\n onRowsRendered,\n } = useRow(props, {\n mainTableRef,\n leftTableRef,\n rightTableRef,\n tableInstance: instance,\n ns,\n isScrolling,\n })\n\n const { data, depthMap } = useData(props, {\n expandedRowKeys,\n lastRenderedRowIndex,\n resetAfterIndex,\n })\n\n const rowsHeight = computed(() => {\n const { estimatedRowHeight, rowHeight } = props\n const _data = unref(data)\n if (isNumber(estimatedRowHeight)) {\n // calculate the actual height\n return Object.values(unref(rowHeights)).reduce(\n (acc, curr) => acc + curr,\n 0\n )\n }\n\n return _data.length * rowHeight\n })\n\n const {\n bodyWidth,\n fixedTableHeight,\n mainTableHeight,\n leftTableWidth,\n rightTableWidth,\n
|
1
|
+
{"version":3,"file":"use-table.mjs","sources":["../../../../../../packages/components/table-v2/src/use-table.ts"],"sourcesContent":["import {\n computed,\n getCurrentInstance,\n ref,\n shallowRef,\n toRef,\n unref,\n watch,\n} from 'vue'\nimport { isArray, isNumber } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport {\n useColumns,\n useData,\n useRow,\n useScrollbar,\n useStyles,\n} from './composables'\n\nimport type { TableV2Props } from './table'\nimport type { TableGridInstance } from './table-grid'\n\nfunction useTable(props: TableV2Props) {\n const mainTableRef = ref<TableGridInstance>()\n const leftTableRef = ref<TableGridInstance>()\n const rightTableRef = ref<TableGridInstance>()\n const {\n columns,\n columnsStyles,\n columnsTotalWidth,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n hasFixedColumns,\n mainColumns,\n\n onColumnSorted,\n } = useColumns(props, toRef(props, 'columns'), toRef(props, 'fixed'))\n\n const {\n scrollTo,\n scrollToLeft,\n scrollToTop,\n scrollToRow,\n onScroll,\n onVerticalScroll,\n scrollPos,\n } = useScrollbar(props, {\n mainTableRef,\n leftTableRef,\n rightTableRef,\n\n onMaybeEndReached,\n })\n\n const ns = useNamespace('table-v2')\n const instance = getCurrentInstance()!\n\n // state\n const isScrolling = shallowRef(false)\n\n const {\n expandedRowKeys,\n lastRenderedRowIndex,\n isDynamic,\n isResetting,\n rowHeights,\n resetAfterIndex,\n onRowExpanded,\n onRowHeightChange,\n onRowHovered,\n onRowsRendered,\n } = useRow(props, {\n mainTableRef,\n leftTableRef,\n rightTableRef,\n tableInstance: instance,\n ns,\n isScrolling,\n })\n\n const { data, depthMap } = useData(props, {\n expandedRowKeys,\n lastRenderedRowIndex,\n resetAfterIndex,\n })\n\n const rowsHeight = computed(() => {\n const { estimatedRowHeight, rowHeight } = props\n const _data = unref(data)\n if (isNumber(estimatedRowHeight)) {\n // calculate the actual height\n return Object.values(unref(rowHeights)).reduce(\n (acc, curr) => acc + curr,\n 0\n )\n }\n\n return _data.length * rowHeight\n })\n\n const {\n bodyWidth,\n fixedTableHeight,\n mainTableHeight,\n leftTableWidth,\n rightTableWidth,\n windowHeight,\n footerHeight,\n emptyStyle,\n rootStyle,\n headerHeight,\n } = useStyles(props, {\n columnsTotalWidth,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n rowsHeight,\n })\n\n // DOM/Component refs\n const containerRef = ref()\n\n const showEmpty = computed(() => {\n const noData = unref(data).length === 0\n\n return isArray(props.fixedData)\n ? props.fixedData.length === 0 && noData\n : noData\n })\n\n function getRowHeight(rowIndex: number) {\n const { estimatedRowHeight, rowHeight, rowKey } = props\n\n if (!estimatedRowHeight) return rowHeight\n\n return (\n unref(rowHeights)[unref(data)[rowIndex][rowKey]] || estimatedRowHeight\n )\n }\n\n const isEndReached = ref(false)\n function onMaybeEndReached() {\n const { onEndReached } = props\n if (!onEndReached) return\n\n const { scrollTop } = unref(scrollPos)\n\n const _totalHeight = unref(rowsHeight)\n const clientHeight = unref(windowHeight)\n\n const remainDistance =\n _totalHeight - (scrollTop + clientHeight) + props.hScrollbarSize\n\n if (\n !isEndReached.value &&\n unref(lastRenderedRowIndex) >= 0 &&\n _totalHeight <= scrollTop + unref(mainTableHeight) - unref(headerHeight)\n ) {\n isEndReached.value = true\n onEndReached(remainDistance)\n } else {\n isEndReached.value = false\n }\n }\n\n // events\n\n watch(\n () => unref(rowsHeight),\n () => (isEndReached.value = false)\n )\n\n watch(\n () => props.expandedRowKeys,\n (val) => (expandedRowKeys.value = val),\n {\n deep: true,\n }\n )\n\n return {\n // models\n columns,\n containerRef,\n mainTableRef,\n leftTableRef,\n rightTableRef,\n // states\n isDynamic,\n isResetting,\n isScrolling,\n hasFixedColumns,\n // records\n columnsStyles,\n columnsTotalWidth,\n data,\n expandedRowKeys,\n depthMap,\n fixedColumnsOnLeft,\n fixedColumnsOnRight,\n mainColumns,\n // metadata\n bodyWidth,\n emptyStyle,\n rootStyle,\n footerHeight,\n mainTableHeight,\n fixedTableHeight,\n leftTableWidth,\n rightTableWidth,\n // flags\n showEmpty,\n\n // methods\n getRowHeight,\n\n // event handlers\n onColumnSorted,\n onRowHovered,\n onRowExpanded,\n onRowsRendered,\n onRowHeightChange,\n // use scrollbars\n scrollTo,\n scrollToLeft,\n scrollToTop,\n scrollToRow,\n onScroll,\n onVerticalScroll,\n }\n}\n\nexport { useTable }\n\nexport type UseTableReturn = ReturnType<typeof useTable>\n"],"names":[],"mappings":";;;;;;;;;;AAkBA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC;AAC7B,EAAE,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC;AAC7B,EAAE,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC;AAC9B,EAAE,MAAM;AACR,IAAI,OAAO;AACX,IAAI,aAAa;AACjB,IAAI,iBAAiB;AACrB,IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,cAAc;AAClB,GAAG,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AACxE,EAAE,MAAM;AACR,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,gBAAgB;AACpB,IAAI,SAAS;AACb,GAAG,GAAG,YAAY,CAAC,KAAK,EAAE;AAC1B,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,aAAa;AACjB,IAAI,iBAAiB;AACrB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AACtC,EAAE,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,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,YAAY;AAChB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,gBAAgB;AACpB,GAAG,CAAC;AACJ;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import TimeSelect from './src/time-
|
2
|
-
export { timeSelectProps } from './src/time-
|
1
|
+
import TimeSelect from './src/time-select2.mjs';
|
2
|
+
export { timeSelectProps } from './src/time-select.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElTimeSelect = withInstall(TimeSelect);
|
@@ -1,136 +1,58 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import {
|
5
|
-
import { ElIcon } from '../../icon/index.mjs';
|
6
|
-
import { timeSelectProps } from './time-select2.mjs';
|
7
|
-
import { parseTime, formatTime, compareTime, nextTime } from './utils.mjs';
|
8
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
9
|
-
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
10
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
11
|
-
import { useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
12
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
1
|
+
import { Clock, CircleClose } from '@element-plus/icons-vue';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
4
|
+
import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
|
13
5
|
|
14
|
-
const
|
15
|
-
|
6
|
+
const timeSelectProps = buildProps({
|
7
|
+
format: {
|
8
|
+
type: String,
|
9
|
+
default: "HH:mm"
|
10
|
+
},
|
11
|
+
modelValue: String,
|
12
|
+
disabled: Boolean,
|
13
|
+
editable: {
|
14
|
+
type: Boolean,
|
15
|
+
default: true
|
16
|
+
},
|
17
|
+
effect: {
|
18
|
+
type: definePropType(String),
|
19
|
+
default: "light"
|
20
|
+
},
|
21
|
+
clearable: {
|
22
|
+
type: Boolean,
|
23
|
+
default: true
|
24
|
+
},
|
25
|
+
size: useSizeProp,
|
26
|
+
placeholder: String,
|
27
|
+
start: {
|
28
|
+
type: String,
|
29
|
+
default: "09:00"
|
30
|
+
},
|
31
|
+
end: {
|
32
|
+
type: String,
|
33
|
+
default: "18:00"
|
34
|
+
},
|
35
|
+
step: {
|
36
|
+
type: String,
|
37
|
+
default: "00:30"
|
38
|
+
},
|
39
|
+
minTime: String,
|
40
|
+
maxTime: String,
|
41
|
+
includeEndTime: {
|
42
|
+
type: Boolean,
|
43
|
+
default: false
|
44
|
+
},
|
45
|
+
name: String,
|
46
|
+
prefixIcon: {
|
47
|
+
type: definePropType([String, Object]),
|
48
|
+
default: () => Clock
|
49
|
+
},
|
50
|
+
clearIcon: {
|
51
|
+
type: definePropType([String, Object]),
|
52
|
+
default: () => CircleClose
|
53
|
+
},
|
54
|
+
...useEmptyValuesProps
|
16
55
|
});
|
17
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
18
|
-
...__default__,
|
19
|
-
props: timeSelectProps,
|
20
|
-
emits: [CHANGE_EVENT, "blur", "focus", "clear", UPDATE_MODEL_EVENT],
|
21
|
-
setup(__props, { expose }) {
|
22
|
-
const props = __props;
|
23
|
-
dayjs.extend(customParseFormat);
|
24
|
-
const { Option: ElOption } = ElSelect;
|
25
|
-
const nsInput = useNamespace("input");
|
26
|
-
const select = ref();
|
27
|
-
const _disabled = useFormDisabled();
|
28
|
-
const { lang } = useLocale();
|
29
|
-
const value = computed(() => props.modelValue);
|
30
|
-
const start = computed(() => {
|
31
|
-
const time = parseTime(props.start);
|
32
|
-
return time ? formatTime(time) : null;
|
33
|
-
});
|
34
|
-
const end = computed(() => {
|
35
|
-
const time = parseTime(props.end);
|
36
|
-
return time ? formatTime(time) : null;
|
37
|
-
});
|
38
|
-
const step = computed(() => {
|
39
|
-
const time = parseTime(props.step);
|
40
|
-
return time ? formatTime(time) : null;
|
41
|
-
});
|
42
|
-
const minTime = computed(() => {
|
43
|
-
const time = parseTime(props.minTime || "");
|
44
|
-
return time ? formatTime(time) : null;
|
45
|
-
});
|
46
|
-
const maxTime = computed(() => {
|
47
|
-
const time = parseTime(props.maxTime || "");
|
48
|
-
return time ? formatTime(time) : null;
|
49
|
-
});
|
50
|
-
const items = computed(() => {
|
51
|
-
var _a;
|
52
|
-
const result = [];
|
53
|
-
const push = (formattedValue, rawValue) => {
|
54
|
-
result.push({
|
55
|
-
value: formattedValue,
|
56
|
-
disabled: compareTime(rawValue, minTime.value || "-1:-1") <= 0 || compareTime(rawValue, maxTime.value || "100:100") >= 0
|
57
|
-
});
|
58
|
-
};
|
59
|
-
if (props.start && props.end && props.step) {
|
60
|
-
let current = start.value;
|
61
|
-
let currentTime;
|
62
|
-
while (current && end.value && compareTime(current, end.value) <= 0) {
|
63
|
-
currentTime = dayjs(current, "HH:mm").locale(lang.value).format(props.format);
|
64
|
-
push(currentTime, current);
|
65
|
-
current = nextTime(current, step.value);
|
66
|
-
}
|
67
|
-
if (props.includeEndTime && end.value && ((_a = result[result.length - 1]) == null ? void 0 : _a.value) !== end.value) {
|
68
|
-
const formattedValue = dayjs(end.value, "HH:mm").locale(lang.value).format(props.format);
|
69
|
-
push(formattedValue, end.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 openBlock(), createBlock(unref(ElSelect), {
|
88
|
-
ref_key: "select",
|
89
|
-
ref: select,
|
90
|
-
"model-value": unref(value),
|
91
|
-
disabled: 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(unref(UPDATE_MODEL_EVENT), event),
|
102
|
-
onChange: (event) => _ctx.$emit(unref(CHANGE_EVENT), event),
|
103
|
-
onBlur: (event) => _ctx.$emit("blur", event),
|
104
|
-
onFocus: (event) => _ctx.$emit("focus", event),
|
105
|
-
onClear: () => _ctx.$emit("clear")
|
106
|
-
}, {
|
107
|
-
prefix: withCtx(() => [
|
108
|
-
_ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
|
109
|
-
key: 0,
|
110
|
-
class: normalizeClass(unref(nsInput).e("prefix-icon"))
|
111
|
-
}, {
|
112
|
-
default: withCtx(() => [
|
113
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))
|
114
|
-
]),
|
115
|
-
_: 1
|
116
|
-
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
117
|
-
]),
|
118
|
-
default: withCtx(() => [
|
119
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (item) => {
|
120
|
-
return openBlock(), createBlock(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
|
-
}
|
132
|
-
});
|
133
|
-
var TimeSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "time-select.vue"]]);
|
134
56
|
|
135
|
-
export {
|
57
|
+
export { timeSelectProps };
|
136
58
|
//# sourceMappingURL=time-select.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"time-select.mjs","sources":["../../../../../../packages/components/time-select/src/time-select.
|
1
|
+
{"version":3,"file":"time-select.mjs","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 whether `end` is included in options\n */\n includeEndTime: {\n type: Boolean,\n default: false,\n },\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> & unknown\n"],"names":[],"mappings":";;;;;AAGY,MAAC,eAAe,GAAG,UAAU,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,EAAE,cAAc,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,EAAE,WAAW;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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