@element-plus/nightly 0.0.20221018 → 0.0.20221020
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 +318 -295
- package/dist/index.full.min.js +13 -13
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +14 -14
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +318 -295
- 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.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/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/backtop/index.d.ts +2 -6
- package/es/components/backtop/index.mjs.map +1 -1
- package/es/components/backtop/src/backtop.d.ts +0 -2
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop.vue.d.ts +5 -10
- package/es/components/backtop/src/backtop2.mjs +6 -52
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/backtop/src/instance.d.ts +2 -0
- package/es/components/backtop/src/instance.mjs +2 -0
- package/es/components/backtop/src/instance.mjs.map +1 -0
- package/es/components/backtop/src/use-backtop.d.ts +6 -0
- package/es/components/backtop/src/use-backtop.mjs +58 -0
- package/es/components/backtop/src/use-backtop.mjs.map +1 -0
- package/es/components/button/index.d.ts +4 -10
- package/es/components/button/index.mjs.map +1 -1
- package/es/components/button/src/button-group.d.ts +0 -2
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button.d.ts +0 -2
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +3 -10
- package/es/components/button/src/button2.mjs +5 -46
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/button/src/instance.d.ts +4 -0
- package/es/components/button/src/instance.mjs +2 -0
- package/es/components/button/src/instance.mjs.map +1 -0
- package/es/components/button/src/use-button.d.ts +10 -0
- package/es/components/button/src/use-button.mjs +59 -0
- package/es/components/button/src/use-button.mjs.map +1 -0
- package/es/components/calendar/index.d.ts +16 -25
- package/es/components/calendar/index.mjs.map +1 -1
- package/es/components/calendar/src/calendar.vue.d.ts +15 -25
- package/es/components/calendar/src/date-table.d.ts +0 -2
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table.vue.d.ts +26 -31
- package/es/components/calendar/src/date-table2.mjs +14 -82
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/instance.d.ts +3 -0
- package/es/components/calendar/src/instance.mjs +2 -0
- package/es/components/calendar/src/instance.mjs.map +1 -0
- package/es/components/calendar/src/use-date-table.d.ts +18 -0
- package/es/components/calendar/src/use-date-table.mjs +96 -0
- package/es/components/calendar/src/use-date-table.mjs.map +1 -0
- package/es/components/cascader/src/index.mjs +2 -2
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +5 -3
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +3 -10
- package/es/components/color-picker/src/color-picker.vue.d.ts +3 -10
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +3 -10
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +3 -10
- package/es/components/date-picker/src/panel-utils.d.ts +6 -20
- package/es/components/index.mjs +7 -7
- package/es/components/menu/src/menu-item2.mjs +1 -1
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message.mjs +146 -86
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +86 -146
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/popconfirm/index.d.ts +3 -10
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +3 -10
- package/es/components/popper/index.mjs +4 -4
- package/es/components/popper/src/arrow.mjs +37 -8
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +8 -37
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/popper/src/popper.mjs +33 -25
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +25 -33
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +36 -68
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +68 -36
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/radio/src/radio.mjs +30 -71
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +71 -30
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +98 -256
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +256 -98
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/skeleton/index.d.ts +1 -1
- package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/es/components/switch/src/switch2.mjs +15 -34
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/table-body/render-helper.mjs +1 -1
- package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/styles-helper.d.ts +1 -1
- package/es/components/table/src/table-body/styles-helper.mjs +2 -2
- package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
- package/es/components/table/src/util.d.ts +1 -1
- package/es/components/table/src/util.mjs +3 -3
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/transfer/index.d.ts +3 -10
- package/es/components/transfer/src/transfer.vue.d.ts +3 -10
- package/es/index.mjs +7 -7
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/backtop/index.d.ts +2 -6
- package/lib/components/backtop/index.js.map +1 -1
- package/lib/components/backtop/src/backtop.d.ts +0 -2
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop.vue.d.ts +5 -10
- package/lib/components/backtop/src/backtop2.js +5 -51
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/backtop/src/instance.d.ts +2 -0
- package/lib/components/backtop/src/instance.js +3 -0
- package/lib/components/backtop/src/instance.js.map +1 -0
- package/lib/components/backtop/src/use-backtop.d.ts +6 -0
- package/lib/components/backtop/src/use-backtop.js +62 -0
- package/lib/components/backtop/src/use-backtop.js.map +1 -0
- package/lib/components/button/index.d.ts +4 -10
- package/lib/components/button/index.js.map +1 -1
- package/lib/components/button/src/button-group.d.ts +0 -2
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button.d.ts +0 -2
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +3 -10
- package/lib/components/button/src/button2.js +8 -49
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/button/src/instance.d.ts +4 -0
- package/lib/components/button/src/instance.js +3 -0
- package/lib/components/button/src/instance.js.map +1 -0
- package/lib/components/button/src/use-button.d.ts +10 -0
- package/lib/components/button/src/use-button.js +63 -0
- package/lib/components/button/src/use-button.js.map +1 -0
- package/lib/components/calendar/index.d.ts +16 -25
- package/lib/components/calendar/index.js.map +1 -1
- package/lib/components/calendar/src/calendar.vue.d.ts +15 -25
- package/lib/components/calendar/src/date-table.d.ts +0 -2
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table.vue.d.ts +26 -31
- package/lib/components/calendar/src/date-table2.js +15 -88
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/instance.d.ts +3 -0
- package/lib/components/calendar/src/instance.js +3 -0
- package/lib/components/calendar/src/instance.js.map +1 -0
- package/lib/components/calendar/src/use-date-table.d.ts +18 -0
- package/lib/components/calendar/src/use-date-table.js +105 -0
- package/lib/components/calendar/src/use-date-table.js.map +1 -0
- package/lib/components/cascader/src/index.js +1 -1
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +4 -2
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +3 -10
- package/lib/components/color-picker/src/color-picker.vue.d.ts +3 -10
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +3 -10
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +3 -10
- package/lib/components/date-picker/src/panel-utils.d.ts +6 -20
- package/lib/components/index.js +7 -7
- package/lib/components/menu/src/menu-item2.js +1 -1
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message.js +144 -87
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +87 -144
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/popconfirm/index.d.ts +3 -10
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +3 -10
- package/lib/components/popper/index.js +4 -4
- package/lib/components/popper/src/arrow.js +37 -9
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +9 -37
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/popper/src/popper.js +33 -28
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +28 -33
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +37 -68
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +68 -37
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/radio/src/radio.js +32 -71
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +71 -32
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +98 -255
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +255 -98
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/skeleton/index.d.ts +1 -1
- package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/lib/components/switch/src/switch2.js +14 -33
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/table-body/render-helper.js +1 -1
- package/lib/components/table/src/table-body/render-helper.js.map +1 -1
- package/lib/components/table/src/table-body/styles-helper.d.ts +1 -1
- package/lib/components/table/src/table-body/styles-helper.js +2 -2
- package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
- package/lib/components/table/src/util.d.ts +1 -1
- package/lib/components/table/src/util.js +3 -3
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/transfer/index.d.ts +3 -10
- package/lib/components/transfer/src/transfer.vue.d.ts +3 -10
- package/lib/index.js +7 -7
- 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-switch.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/switch.scss +37 -41
- package/web-types.json +1 -1
|
@@ -128,11 +128,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
128
128
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
129
129
|
}>>;
|
|
130
130
|
emit: (event: "click", evt: MouseEvent) => void;
|
|
131
|
-
|
|
132
|
-
[name: string]: import("vue").Slot | undefined;
|
|
133
|
-
}>;
|
|
134
|
-
buttonGroupContext: import("../..").ButtonGroupContext | undefined;
|
|
135
|
-
globalConfig: import("vue").Ref<import("..").ButtonConfigContext | undefined>;
|
|
131
|
+
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
136
132
|
ns: {
|
|
137
133
|
namespace: import("vue").Ref<string>;
|
|
138
134
|
b: (blockSuffix?: string) => string;
|
|
@@ -151,14 +147,11 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
151
147
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
152
148
|
cssVarBlockName: (name: string) => string;
|
|
153
149
|
};
|
|
154
|
-
form: import("../..").FormContext | undefined;
|
|
155
|
-
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
156
|
-
_disabled: import("vue").ComputedRef<boolean>;
|
|
157
150
|
_ref: import("vue").Ref<HTMLButtonElement | undefined>;
|
|
151
|
+
_size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
158
152
|
_type: import("vue").ComputedRef<"" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text">;
|
|
159
|
-
|
|
153
|
+
_disabled: import("vue").ComputedRef<boolean>;
|
|
160
154
|
shouldAddSpace: import("vue").ComputedRef<boolean>;
|
|
161
|
-
buttonStyle: import("vue").ComputedRef<Record<string, string>>;
|
|
162
155
|
handleClick: (evt: MouseEvent) => void;
|
|
163
156
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
164
157
|
readonly size: {
|
|
@@ -425,8 +418,18 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
425
418
|
onPick?: ((value: import("dayjs").Dayjs) => any) | undefined;
|
|
426
419
|
}>>;
|
|
427
420
|
emit: (event: "pick", value: import("dayjs").Dayjs) => void;
|
|
428
|
-
|
|
429
|
-
|
|
421
|
+
isInRange: import("vue").ComputedRef<boolean>;
|
|
422
|
+
now: import("dayjs").Dayjs;
|
|
423
|
+
rows: import("vue").ComputedRef<import("./src/date-table").CalendarDateCell[][]>;
|
|
424
|
+
weekDays: import("vue").ComputedRef<string[]>;
|
|
425
|
+
getFormattedDate: (day: number, type: import("./src/date-table").CalendarDateCellType) => import("dayjs").Dayjs;
|
|
426
|
+
handlePickDay: ({ text, type }: import("./src/date-table").CalendarDateCell) => void;
|
|
427
|
+
getSlotData: ({ text, type }: import("./src/date-table").CalendarDateCell) => {
|
|
428
|
+
isSelected: boolean;
|
|
429
|
+
type: string;
|
|
430
|
+
day: string;
|
|
431
|
+
date: Date;
|
|
432
|
+
};
|
|
430
433
|
nsTable: {
|
|
431
434
|
namespace: import("vue").Ref<string>;
|
|
432
435
|
b: (blockSuffix?: string) => string;
|
|
@@ -463,20 +466,7 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
463
466
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
464
467
|
cssVarBlockName: (name: string) => string;
|
|
465
468
|
};
|
|
466
|
-
now: import("dayjs").Dayjs;
|
|
467
|
-
firstDayOfWeek: number;
|
|
468
|
-
isInRange: import("vue").ComputedRef<boolean>;
|
|
469
|
-
rows: import("vue").ComputedRef<import("./src/date-table").CalendarDateCell[][]>;
|
|
470
|
-
weekDays: import("vue").ComputedRef<string[]>;
|
|
471
|
-
getFormattedDate: (day: number, type: import("./src/date-table").CalendarDateCellType) => import("dayjs").Dayjs;
|
|
472
469
|
getCellClass: ({ text, type }: import("./src/date-table").CalendarDateCell) => string[];
|
|
473
|
-
handlePickDay: ({ text, type }: import("./src/date-table").CalendarDateCell) => void;
|
|
474
|
-
getSlotData: ({ text, type }: import("./src/date-table").CalendarDateCell) => {
|
|
475
|
-
isSelected: boolean;
|
|
476
|
-
type: string;
|
|
477
|
-
day: string;
|
|
478
|
-
date: Date;
|
|
479
|
-
};
|
|
480
470
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
481
471
|
pick: (value: import("dayjs").Dayjs) => boolean;
|
|
482
472
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -529,3 +519,4 @@ export declare const ElCalendar: import("element-plus/es/utils").SFCWithInstall<
|
|
|
529
519
|
}, {}>> & Record<string, any>;
|
|
530
520
|
export default ElCalendar;
|
|
531
521
|
export * from './src/calendar';
|
|
522
|
+
export type { CalendarDateTableInstance, DateTableInstance, } from './src/instance';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/calendar/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Calendar from './src/calendar.vue'\n\nexport const ElCalendar = withInstall(Calendar)\nexport default ElCalendar\n\nexport * from './src/calendar'\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,WAAW,CAAC,QAAQ;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/calendar/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Calendar from './src/calendar.vue'\n\nexport const ElCalendar = withInstall(Calendar)\nexport default ElCalendar\n\nexport * from './src/calendar'\nexport type {\n CalendarDateTableInstance,\n DateTableInstance,\n} from './src/instance'\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,WAAW,CAAC,QAAQ;;;;"}
|
|
@@ -132,11 +132,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
132
|
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
133
133
|
}>>;
|
|
134
134
|
emit: (event: "click", evt: MouseEvent) => void;
|
|
135
|
-
|
|
136
|
-
[name: string]: import("vue").Slot | undefined;
|
|
137
|
-
}>;
|
|
138
|
-
buttonGroupContext: import("../../..").ButtonGroupContext | undefined;
|
|
139
|
-
globalConfig: import("vue").Ref<import("element-plus/es/components/button").ButtonConfigContext | undefined>;
|
|
135
|
+
buttonStyle: ComputedRef<Record<string, string>>;
|
|
140
136
|
ns: {
|
|
141
137
|
namespace: import("vue").Ref<string>;
|
|
142
138
|
b: (blockSuffix?: string) => string;
|
|
@@ -155,14 +151,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
155
151
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
156
152
|
cssVarBlockName: (name: string) => string;
|
|
157
153
|
};
|
|
158
|
-
form: import("../../..").FormContext | undefined;
|
|
159
|
-
_size: ComputedRef<"" | "default" | "small" | "large">;
|
|
160
|
-
_disabled: ComputedRef<boolean>;
|
|
161
154
|
_ref: import("vue").Ref<HTMLButtonElement | undefined>;
|
|
155
|
+
_size: ComputedRef<"" | "default" | "small" | "large">;
|
|
162
156
|
_type: ComputedRef<"" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text">;
|
|
163
|
-
|
|
157
|
+
_disabled: ComputedRef<boolean>;
|
|
164
158
|
shouldAddSpace: ComputedRef<boolean>;
|
|
165
|
-
buttonStyle: ComputedRef<Record<string, string>>;
|
|
166
159
|
handleClick: (evt: MouseEvent) => void;
|
|
167
160
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
168
161
|
readonly size: {
|
|
@@ -429,8 +422,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
429
422
|
onPick?: ((value: dayjs.Dayjs) => any) | undefined;
|
|
430
423
|
}>>;
|
|
431
424
|
emit: (event: "pick", value: dayjs.Dayjs) => void;
|
|
432
|
-
|
|
433
|
-
|
|
425
|
+
isInRange: ComputedRef<boolean>;
|
|
426
|
+
now: dayjs.Dayjs;
|
|
427
|
+
rows: ComputedRef<import("./date-table").CalendarDateCell[][]>;
|
|
428
|
+
weekDays: ComputedRef<string[]>;
|
|
429
|
+
getFormattedDate: (day: number, type: import("./date-table").CalendarDateCellType) => dayjs.Dayjs;
|
|
430
|
+
handlePickDay: ({ text, type }: import("./date-table").CalendarDateCell) => void;
|
|
431
|
+
getSlotData: ({ text, type }: import("./date-table").CalendarDateCell) => {
|
|
432
|
+
isSelected: boolean;
|
|
433
|
+
type: string;
|
|
434
|
+
day: string;
|
|
435
|
+
date: Date;
|
|
436
|
+
};
|
|
434
437
|
nsTable: {
|
|
435
438
|
namespace: import("vue").Ref<string>;
|
|
436
439
|
b: (blockSuffix?: string) => string;
|
|
@@ -467,20 +470,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
467
470
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
468
471
|
cssVarBlockName: (name: string) => string;
|
|
469
472
|
};
|
|
470
|
-
now: dayjs.Dayjs;
|
|
471
|
-
firstDayOfWeek: number;
|
|
472
|
-
isInRange: ComputedRef<boolean>;
|
|
473
|
-
rows: ComputedRef<import("./date-table").CalendarDateCell[][]>;
|
|
474
|
-
weekDays: ComputedRef<string[]>;
|
|
475
|
-
getFormattedDate: (day: number, type: import("./date-table").CalendarDateCellType) => dayjs.Dayjs;
|
|
476
473
|
getCellClass: ({ text, type }: import("./date-table").CalendarDateCell) => string[];
|
|
477
|
-
handlePickDay: ({ text, type }: import("./date-table").CalendarDateCell) => void;
|
|
478
|
-
getSlotData: ({ text, type }: import("./date-table").CalendarDateCell) => {
|
|
479
|
-
isSelected: boolean;
|
|
480
|
-
type: string;
|
|
481
|
-
day: string;
|
|
482
|
-
date: Date;
|
|
483
|
-
};
|
|
484
474
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
485
475
|
pick: (value: dayjs.Dayjs) => boolean;
|
|
486
476
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { Dayjs } from 'dayjs';
|
|
3
|
-
import type DateTable from './date-table.vue';
|
|
4
3
|
export declare type CalendarDateCellType = 'next' | 'prev' | 'current';
|
|
5
4
|
export declare type CalendarDateCell = {
|
|
6
5
|
text: number;
|
|
@@ -40,4 +39,3 @@ export declare const dateTableEmits: {
|
|
|
40
39
|
pick: (value: Dayjs) => boolean;
|
|
41
40
|
};
|
|
42
41
|
export declare type DateTableEmits = typeof dateTableEmits;
|
|
43
|
-
export declare type DateTableInstance = InstanceType<typeof DateTable>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-table.mjs","sources":["../../../../../../packages/components/calendar/src/date-table.ts"],"sourcesContent":["import { buildProps, definePropType, isObject } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\
|
|
1
|
+
{"version":3,"file":"date-table.mjs","sources":["../../../../../../packages/components/calendar/src/date-table.ts"],"sourcesContent":["import { buildProps, definePropType, isObject } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type CalendarDateCellType = 'next' | 'prev' | 'current'\nexport type CalendarDateCell = {\n text: number\n type: CalendarDateCellType\n}\n\nexport const getPrevMonthLastDays = (date: Dayjs, count: number) => {\n const lastDay = date.subtract(1, 'month').endOf('month').date()\n return rangeArr(count).map((_, index) => lastDay - (count - index - 1))\n}\n\nexport const getMonthDays = (date: Dayjs) => {\n const days = date.daysInMonth()\n return rangeArr(days).map((_, index) => index + 1)\n}\n\nexport const toNestedArr = (days: CalendarDateCell[]) =>\n rangeArr(days.length / 7).map((index) => {\n const start = index * 7\n return days.slice(start, start + 7)\n })\n\nexport const dateTableProps = buildProps({\n selectedDay: {\n type: definePropType<Dayjs>(Object),\n },\n range: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n date: {\n type: definePropType<Dayjs>(Object),\n required: true,\n },\n hideHeader: {\n type: Boolean,\n },\n} as const)\nexport type DateTableProps = ExtractPropTypes<typeof dateTableProps>\n\nexport const dateTableEmits = {\n pick: (value: Dayjs) => isObject(value),\n}\nexport type DateTableEmits = typeof dateTableEmits\n"],"names":[],"mappings":";;;;;;AAEY,MAAC,oBAAoB,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK;AACrD,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAClE,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,IAAI,KAAK;AACtC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClC,EAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC;AACrD,EAAE;AACU,MAAC,WAAW,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK;AAC9E,EAAE,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;AAC1B,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AACtC,CAAC,EAAE;AACS,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClC;;;;"}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { CalendarDateCell, CalendarDateCellType } from './date-table';
|
|
3
|
-
import type { Dayjs } from 'dayjs';
|
|
1
|
+
import type { CalendarDateCell } from './date-table';
|
|
4
2
|
declare const _default: import("vue").DefineComponent<{
|
|
5
3
|
readonly selectedDay: {
|
|
6
|
-
readonly type: import("vue").PropType<dayjs.Dayjs>;
|
|
4
|
+
readonly type: import("vue").PropType<import("dayjs").Dayjs>;
|
|
7
5
|
readonly required: false;
|
|
8
6
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
9
7
|
__epPropKey: true;
|
|
10
8
|
};
|
|
11
9
|
readonly range: {
|
|
12
|
-
readonly type: import("vue").PropType<[dayjs.Dayjs, dayjs.Dayjs]>;
|
|
10
|
+
readonly type: import("vue").PropType<[import("dayjs").Dayjs, import("dayjs").Dayjs]>;
|
|
13
11
|
readonly required: false;
|
|
14
12
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
15
13
|
__epPropKey: true;
|
|
16
14
|
};
|
|
17
15
|
readonly date: {
|
|
18
|
-
readonly type: import("vue").PropType<dayjs.Dayjs>;
|
|
16
|
+
readonly type: import("vue").PropType<import("dayjs").Dayjs>;
|
|
19
17
|
readonly required: true;
|
|
20
18
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
21
19
|
__epPropKey: true;
|
|
@@ -29,19 +27,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
27
|
}, {
|
|
30
28
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
31
29
|
readonly selectedDay: {
|
|
32
|
-
readonly type: import("vue").PropType<dayjs.Dayjs>;
|
|
30
|
+
readonly type: import("vue").PropType<import("dayjs").Dayjs>;
|
|
33
31
|
readonly required: false;
|
|
34
32
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
33
|
__epPropKey: true;
|
|
36
34
|
};
|
|
37
35
|
readonly range: {
|
|
38
|
-
readonly type: import("vue").PropType<[dayjs.Dayjs, dayjs.Dayjs]>;
|
|
36
|
+
readonly type: import("vue").PropType<[import("dayjs").Dayjs, import("dayjs").Dayjs]>;
|
|
39
37
|
readonly required: false;
|
|
40
38
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
41
39
|
__epPropKey: true;
|
|
42
40
|
};
|
|
43
41
|
readonly date: {
|
|
44
|
-
readonly type: import("vue").PropType<dayjs.Dayjs>;
|
|
42
|
+
readonly type: import("vue").PropType<import("dayjs").Dayjs>;
|
|
45
43
|
readonly required: true;
|
|
46
44
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
47
45
|
__epPropKey: true;
|
|
@@ -53,11 +51,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
51
|
__epPropKey: true;
|
|
54
52
|
};
|
|
55
53
|
}>> & {
|
|
56
|
-
onPick?: ((value: dayjs.Dayjs) => any) | undefined;
|
|
54
|
+
onPick?: ((value: import("dayjs").Dayjs) => any) | undefined;
|
|
57
55
|
}>>;
|
|
58
|
-
emit: (event: "pick", value: dayjs.Dayjs) => void;
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
emit: (event: "pick", value: import("dayjs").Dayjs) => void;
|
|
57
|
+
isInRange: import("vue").ComputedRef<boolean>;
|
|
58
|
+
now: import("dayjs").Dayjs;
|
|
59
|
+
rows: import("vue").ComputedRef<CalendarDateCell[][]>;
|
|
60
|
+
weekDays: import("vue").ComputedRef<string[]>;
|
|
61
|
+
getFormattedDate: (day: number, type: import("./date-table").CalendarDateCellType) => import("dayjs").Dayjs;
|
|
62
|
+
handlePickDay: ({ text, type }: CalendarDateCell) => void;
|
|
63
|
+
getSlotData: ({ text, type }: CalendarDateCell) => {
|
|
64
|
+
isSelected: boolean;
|
|
65
|
+
type: string;
|
|
66
|
+
day: string;
|
|
67
|
+
date: Date;
|
|
68
|
+
};
|
|
61
69
|
nsTable: {
|
|
62
70
|
namespace: import("vue").Ref<string>;
|
|
63
71
|
b: (blockSuffix?: string) => string;
|
|
@@ -94,37 +102,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
94
102
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
95
103
|
cssVarBlockName: (name: string) => string;
|
|
96
104
|
};
|
|
97
|
-
now: dayjs.Dayjs;
|
|
98
|
-
firstDayOfWeek: number;
|
|
99
|
-
isInRange: import("vue").ComputedRef<boolean>;
|
|
100
|
-
rows: import("vue").ComputedRef<CalendarDateCell[][]>;
|
|
101
|
-
weekDays: import("vue").ComputedRef<string[]>;
|
|
102
|
-
getFormattedDate: (day: number, type: CalendarDateCellType) => Dayjs;
|
|
103
105
|
getCellClass: ({ text, type }: CalendarDateCell) => string[];
|
|
104
|
-
handlePickDay: ({ text, type }: CalendarDateCell) => void;
|
|
105
|
-
getSlotData: ({ text, type }: CalendarDateCell) => {
|
|
106
|
-
isSelected: boolean;
|
|
107
|
-
type: string;
|
|
108
|
-
day: string;
|
|
109
|
-
date: Date;
|
|
110
|
-
};
|
|
111
106
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
112
|
-
pick: (value: dayjs.Dayjs) => boolean;
|
|
107
|
+
pick: (value: import("dayjs").Dayjs) => boolean;
|
|
113
108
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
114
109
|
readonly selectedDay: {
|
|
115
|
-
readonly type: import("vue").PropType<dayjs.Dayjs>;
|
|
110
|
+
readonly type: import("vue").PropType<import("dayjs").Dayjs>;
|
|
116
111
|
readonly required: false;
|
|
117
112
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
118
113
|
__epPropKey: true;
|
|
119
114
|
};
|
|
120
115
|
readonly range: {
|
|
121
|
-
readonly type: import("vue").PropType<[dayjs.Dayjs, dayjs.Dayjs]>;
|
|
116
|
+
readonly type: import("vue").PropType<[import("dayjs").Dayjs, import("dayjs").Dayjs]>;
|
|
122
117
|
readonly required: false;
|
|
123
118
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
124
119
|
__epPropKey: true;
|
|
125
120
|
};
|
|
126
121
|
readonly date: {
|
|
127
|
-
readonly type: import("vue").PropType<dayjs.Dayjs>;
|
|
122
|
+
readonly type: import("vue").PropType<import("dayjs").Dayjs>;
|
|
128
123
|
readonly required: true;
|
|
129
124
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
130
125
|
__epPropKey: true;
|
|
@@ -136,6 +131,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
136
131
|
__epPropKey: true;
|
|
137
132
|
};
|
|
138
133
|
}>> & {
|
|
139
|
-
onPick?: ((value: dayjs.Dayjs) => any) | undefined;
|
|
134
|
+
onPick?: ((value: import("dayjs").Dayjs) => any) | undefined;
|
|
140
135
|
}, {}>;
|
|
141
136
|
export default _default;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
|
-
import localeData from 'dayjs/plugin/localeData.js';
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, Fragment, renderList, toDisplayString, createCommentVNode, createElementVNode, renderSlot } from 'vue';
|
|
4
2
|
import '../../../hooks/index.mjs';
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
7
|
-
import { dateTableProps, dateTableEmits, getPrevMonthLastDays, getMonthDays, toNestedArr } from './date-table.mjs';
|
|
3
|
+
import { dateTableProps, dateTableEmits } from './date-table.mjs';
|
|
4
|
+
import { useDateTable } from './use-date-table.mjs';
|
|
8
5
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
10
6
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
11
|
-
import { rangeArr } from '../../time-picker/src/utils.mjs';
|
|
12
|
-
import { WEEK_DAYS } from '../../../constants/date.mjs';
|
|
13
7
|
|
|
14
8
|
const _hoisted_1 = { key: 0 };
|
|
15
9
|
const _hoisted_2 = ["onClick"];
|
|
@@ -22,66 +16,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
16
|
emits: dateTableEmits,
|
|
23
17
|
setup(__props, { expose, emit }) {
|
|
24
18
|
const props = __props;
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const {
|
|
20
|
+
isInRange,
|
|
21
|
+
now,
|
|
22
|
+
rows,
|
|
23
|
+
weekDays,
|
|
24
|
+
getFormattedDate,
|
|
25
|
+
handlePickDay,
|
|
26
|
+
getSlotData
|
|
27
|
+
} = useDateTable(props, emit);
|
|
27
28
|
const nsTable = useNamespace("calendar-table");
|
|
28
29
|
const nsDay = useNamespace("calendar-day");
|
|
29
|
-
const now = dayjs().locale(lang.value);
|
|
30
|
-
const firstDayOfWeek = dayjs.localeData().firstDayOfWeek();
|
|
31
|
-
const isInRange = computed(() => !!props.range && !!props.range.length);
|
|
32
|
-
const rows = computed(() => {
|
|
33
|
-
let days = [];
|
|
34
|
-
if (isInRange.value) {
|
|
35
|
-
const [start, end] = props.range;
|
|
36
|
-
const currentMonthRange = rangeArr(end.date() - start.date() + 1).map((index) => ({
|
|
37
|
-
text: start.date() + index,
|
|
38
|
-
type: "current"
|
|
39
|
-
}));
|
|
40
|
-
let remaining = currentMonthRange.length % 7;
|
|
41
|
-
remaining = remaining === 0 ? 0 : 7 - remaining;
|
|
42
|
-
const nextMonthRange = rangeArr(remaining).map((_, index) => ({
|
|
43
|
-
text: index + 1,
|
|
44
|
-
type: "next"
|
|
45
|
-
}));
|
|
46
|
-
days = currentMonthRange.concat(nextMonthRange);
|
|
47
|
-
} else {
|
|
48
|
-
const firstDay = props.date.startOf("month").day();
|
|
49
|
-
const prevMonthDays = getPrevMonthLastDays(props.date, (firstDay - firstDayOfWeek + 7) % 7).map((day) => ({
|
|
50
|
-
text: day,
|
|
51
|
-
type: "prev"
|
|
52
|
-
}));
|
|
53
|
-
const currentMonthDays = getMonthDays(props.date).map((day) => ({
|
|
54
|
-
text: day,
|
|
55
|
-
type: "current"
|
|
56
|
-
}));
|
|
57
|
-
days = [...prevMonthDays, ...currentMonthDays];
|
|
58
|
-
const remaining = 7 - (days.length % 7 || 7);
|
|
59
|
-
const nextMonthDays = rangeArr(remaining).map((_, index) => ({
|
|
60
|
-
text: index + 1,
|
|
61
|
-
type: "next"
|
|
62
|
-
}));
|
|
63
|
-
days = days.concat(nextMonthDays);
|
|
64
|
-
}
|
|
65
|
-
return toNestedArr(days);
|
|
66
|
-
});
|
|
67
|
-
const weekDays = computed(() => {
|
|
68
|
-
const start = firstDayOfWeek;
|
|
69
|
-
if (start === 0) {
|
|
70
|
-
return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`));
|
|
71
|
-
} else {
|
|
72
|
-
return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_) => t(`el.datepicker.weeks.${_}`));
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
const getFormattedDate = (day, type) => {
|
|
76
|
-
switch (type) {
|
|
77
|
-
case "prev":
|
|
78
|
-
return props.date.startOf("month").subtract(1, "month").date(day);
|
|
79
|
-
case "next":
|
|
80
|
-
return props.date.startOf("month").add(1, "month").date(day);
|
|
81
|
-
case "current":
|
|
82
|
-
return props.date.date(day);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
30
|
const getCellClass = ({ text, type }) => {
|
|
86
31
|
const classes = [type];
|
|
87
32
|
if (type === "current") {
|
|
@@ -95,19 +40,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
40
|
}
|
|
96
41
|
return classes;
|
|
97
42
|
};
|
|
98
|
-
const handlePickDay = ({ text, type }) => {
|
|
99
|
-
const date = getFormattedDate(text, type);
|
|
100
|
-
emit("pick", date);
|
|
101
|
-
};
|
|
102
|
-
const getSlotData = ({ text, type }) => {
|
|
103
|
-
const day = getFormattedDate(text, type);
|
|
104
|
-
return {
|
|
105
|
-
isSelected: day.isSame(props.selectedDay),
|
|
106
|
-
type: `${type}-month`,
|
|
107
|
-
day: day.format("YYYY-MM-DD"),
|
|
108
|
-
date: day.toDate()
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
43
|
expose({
|
|
112
44
|
getFormattedDate
|
|
113
45
|
});
|
|
@@ -135,13 +67,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
135
67
|
return openBlock(), createElementBlock("td", {
|
|
136
68
|
key,
|
|
137
69
|
class: normalizeClass(getCellClass(cell)),
|
|
138
|
-
onClick: ($event) => handlePickDay(cell)
|
|
70
|
+
onClick: ($event) => unref(handlePickDay)(cell)
|
|
139
71
|
}, [
|
|
140
72
|
createElementVNode("div", {
|
|
141
73
|
class: normalizeClass(unref(nsDay).b())
|
|
142
74
|
}, [
|
|
143
75
|
renderSlot(_ctx.$slots, "date-cell", {
|
|
144
|
-
data: getSlotData(cell)
|
|
76
|
+
data: unref(getSlotData)(cell)
|
|
145
77
|
}, () => [
|
|
146
78
|
createElementVNode("span", null, toDisplayString(cell.text), 1)
|
|
147
79
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-table2.mjs","sources":["../../../../../../packages/components/calendar/src/date-table.vue"],"sourcesContent":["<template>\n <table\n :class=\"[nsTable.b(), nsTable.is('range', isInRange)]\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n >\n <thead v-if=\"!hideHeader\">\n <th v-for=\"day in weekDays\" :key=\"day\">{{ day }}</th>\n </thead>\n\n <tbody>\n <tr\n v-for=\"(row, index) in rows\"\n :key=\"index\"\n :class=\"{\n [nsTable.e('row')]: true,\n [nsTable.em('row', 'hide-border')]: index === 0 && hideHeader,\n }\"\n >\n <td\n v-for=\"(cell, key) in row\"\n :key=\"key\"\n :class=\"getCellClass(cell)\"\n @click=\"handlePickDay(cell)\"\n >\n <div :class=\"nsDay.b()\">\n <slot name=\"date-cell\" :data=\"getSlotData(cell)\">\n <span>{{ cell.text }}</span>\n </slot>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n\n<script lang=\"ts\" setup>\nimport {
|
|
1
|
+
{"version":3,"file":"date-table2.mjs","sources":["../../../../../../packages/components/calendar/src/date-table.vue"],"sourcesContent":["<template>\n <table\n :class=\"[nsTable.b(), nsTable.is('range', isInRange)]\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n >\n <thead v-if=\"!hideHeader\">\n <th v-for=\"day in weekDays\" :key=\"day\">{{ day }}</th>\n </thead>\n\n <tbody>\n <tr\n v-for=\"(row, index) in rows\"\n :key=\"index\"\n :class=\"{\n [nsTable.e('row')]: true,\n [nsTable.em('row', 'hide-border')]: index === 0 && hideHeader,\n }\"\n >\n <td\n v-for=\"(cell, key) in row\"\n :key=\"key\"\n :class=\"getCellClass(cell)\"\n @click=\"handlePickDay(cell)\"\n >\n <div :class=\"nsDay.b()\">\n <slot name=\"date-cell\" :data=\"getSlotData(cell)\">\n <span>{{ cell.text }}</span>\n </slot>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { dateTableEmits, dateTableProps } from './date-table'\nimport { useDateTable } from './use-date-table'\n\nimport type { CalendarDateCell } from './date-table'\n\ndefineOptions({\n name: 'DateTable',\n})\n\nconst props = defineProps(dateTableProps)\nconst emit = defineEmits(dateTableEmits)\n\nconst {\n isInRange,\n now,\n rows,\n weekDays,\n getFormattedDate,\n handlePickDay,\n getSlotData,\n} = useDateTable(props, emit)\n\nconst nsTable = useNamespace('calendar-table')\nconst nsDay = useNamespace('calendar-day')\n\nconst getCellClass = ({ text, type }: CalendarDateCell) => {\n const classes: string[] = [type]\n if (type === 'current') {\n const date = getFormattedDate(text, type)\n if (date.isSame(props.selectedDay, 'day')) {\n classes.push(nsDay.is('selected'))\n }\n if (date.isSame(now, 'day')) {\n classes.push(nsDay.is('today'))\n }\n }\n return classes\n}\n\ndefineExpose({\n /** @description toggle date panel */\n getFormattedDate,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;mCA2Cc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,GAAA;AAAA,MACA,IAAA;AAAA,MACA,QAAA;AAAA,MACA,gBAAA;AAAA,MACA,aAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAA,YAAA,CAAa,OAAO,IAAI,CAAA,CAAA;AAE5B,IAAM,MAAA,OAAA,GAAU,aAAa,gBAAgB,CAAA,CAAA;AAC7C,IAAM,MAAA,KAAA,GAAQ,aAAa,cAAc,CAAA,CAAA;AAEzC,IAAA,MAAM,YAAe,GAAA,CAAC,EAAE,IAAA,EAAM,IAA6B,EAAA,KAAA;AACzD,MAAM,MAAA,OAAA,GAAoB,CAAC,IAAI,CAAA,CAAA;AAC/B,MAAA,IAAI,SAAS,SAAW,EAAA;AACtB,QAAM,MAAA,IAAA,GAAO,gBAAiB,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AACxC,QAAA,IAAI,IAAK,CAAA,MAAA,CAAO,KAAM,CAAA,WAAA,EAAa,KAAK,CAAG,EAAA;AACzC,UAAA,OAAA,CAAQ,IAAK,CAAA,KAAA,CAAM,EAAG,CAAA,UAAU,CAAC,CAAA,CAAA;AAAA,SACnC;AACA,QAAA,IAAI,IAAK,CAAA,MAAA,CAAO,GAAK,EAAA,KAAK,CAAG,EAAA;AAC3B,UAAA,OAAA,CAAQ,IAAK,CAAA,KAAA,CAAM,EAAG,CAAA,OAAO,CAAC,CAAA,CAAA;AAAA,SAChC;AAAA,OACF;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACT,CAAA;AAEA,IAAa,MAAA,CAAA;AAAA,MAEX,gBAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import type { SetupContext } from 'vue';
|
|
3
|
+
import type { Dayjs } from 'dayjs';
|
|
4
|
+
import type { CalendarDateCell, CalendarDateCellType, DateTableEmits, DateTableProps } from './date-table';
|
|
5
|
+
export declare const useDateTable: (props: DateTableProps, emit: SetupContext<DateTableEmits>['emit']) => {
|
|
6
|
+
now: dayjs.Dayjs;
|
|
7
|
+
isInRange: import("vue").ComputedRef<boolean>;
|
|
8
|
+
rows: import("vue").ComputedRef<CalendarDateCell[][]>;
|
|
9
|
+
weekDays: import("vue").ComputedRef<string[]>;
|
|
10
|
+
getFormattedDate: (day: number, type: CalendarDateCellType) => Dayjs;
|
|
11
|
+
handlePickDay: ({ text, type }: CalendarDateCell) => void;
|
|
12
|
+
getSlotData: ({ text, type }: CalendarDateCell) => {
|
|
13
|
+
isSelected: boolean;
|
|
14
|
+
type: string;
|
|
15
|
+
day: string;
|
|
16
|
+
date: Date;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import localeData from 'dayjs/plugin/localeData.js';
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import '../../time-picker/index.mjs';
|
|
6
|
+
import '../../../constants/index.mjs';
|
|
7
|
+
import { getPrevMonthLastDays, getMonthDays, toNestedArr } from './date-table.mjs';
|
|
8
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
9
|
+
import { rangeArr } from '../../time-picker/src/utils.mjs';
|
|
10
|
+
import { WEEK_DAYS } from '../../../constants/date.mjs';
|
|
11
|
+
|
|
12
|
+
const useDateTable = (props, emit) => {
|
|
13
|
+
dayjs.extend(localeData);
|
|
14
|
+
const firstDayOfWeek = dayjs.localeData().firstDayOfWeek();
|
|
15
|
+
const { t, lang } = useLocale();
|
|
16
|
+
const now = dayjs().locale(lang.value);
|
|
17
|
+
const isInRange = computed(() => !!props.range && !!props.range.length);
|
|
18
|
+
const rows = computed(() => {
|
|
19
|
+
let days = [];
|
|
20
|
+
if (isInRange.value) {
|
|
21
|
+
const [start, end] = props.range;
|
|
22
|
+
const currentMonthRange = rangeArr(end.date() - start.date() + 1).map((index) => ({
|
|
23
|
+
text: start.date() + index,
|
|
24
|
+
type: "current"
|
|
25
|
+
}));
|
|
26
|
+
let remaining = currentMonthRange.length % 7;
|
|
27
|
+
remaining = remaining === 0 ? 0 : 7 - remaining;
|
|
28
|
+
const nextMonthRange = rangeArr(remaining).map((_, index) => ({
|
|
29
|
+
text: index + 1,
|
|
30
|
+
type: "next"
|
|
31
|
+
}));
|
|
32
|
+
days = currentMonthRange.concat(nextMonthRange);
|
|
33
|
+
} else {
|
|
34
|
+
const firstDay = props.date.startOf("month").day();
|
|
35
|
+
const prevMonthDays = getPrevMonthLastDays(props.date, (firstDay - firstDayOfWeek + 7) % 7).map((day) => ({
|
|
36
|
+
text: day,
|
|
37
|
+
type: "prev"
|
|
38
|
+
}));
|
|
39
|
+
const currentMonthDays = getMonthDays(props.date).map((day) => ({
|
|
40
|
+
text: day,
|
|
41
|
+
type: "current"
|
|
42
|
+
}));
|
|
43
|
+
days = [...prevMonthDays, ...currentMonthDays];
|
|
44
|
+
const remaining = 7 - (days.length % 7 || 7);
|
|
45
|
+
const nextMonthDays = rangeArr(remaining).map((_, index) => ({
|
|
46
|
+
text: index + 1,
|
|
47
|
+
type: "next"
|
|
48
|
+
}));
|
|
49
|
+
days = days.concat(nextMonthDays);
|
|
50
|
+
}
|
|
51
|
+
return toNestedArr(days);
|
|
52
|
+
});
|
|
53
|
+
const weekDays = computed(() => {
|
|
54
|
+
const start = firstDayOfWeek;
|
|
55
|
+
if (start === 0) {
|
|
56
|
+
return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`));
|
|
57
|
+
} else {
|
|
58
|
+
return WEEK_DAYS.slice(start).concat(WEEK_DAYS.slice(0, start)).map((_) => t(`el.datepicker.weeks.${_}`));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const getFormattedDate = (day, type) => {
|
|
62
|
+
switch (type) {
|
|
63
|
+
case "prev":
|
|
64
|
+
return props.date.startOf("month").subtract(1, "month").date(day);
|
|
65
|
+
case "next":
|
|
66
|
+
return props.date.startOf("month").add(1, "month").date(day);
|
|
67
|
+
case "current":
|
|
68
|
+
return props.date.date(day);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const handlePickDay = ({ text, type }) => {
|
|
72
|
+
const date = getFormattedDate(text, type);
|
|
73
|
+
emit("pick", date);
|
|
74
|
+
};
|
|
75
|
+
const getSlotData = ({ text, type }) => {
|
|
76
|
+
const day = getFormattedDate(text, type);
|
|
77
|
+
return {
|
|
78
|
+
isSelected: day.isSame(props.selectedDay),
|
|
79
|
+
type: `${type}-month`,
|
|
80
|
+
day: day.format("YYYY-MM-DD"),
|
|
81
|
+
date: day.toDate()
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
now,
|
|
86
|
+
isInRange,
|
|
87
|
+
rows,
|
|
88
|
+
weekDays,
|
|
89
|
+
getFormattedDate,
|
|
90
|
+
handlePickDay,
|
|
91
|
+
getSlotData
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export { useDateTable };
|
|
96
|
+
//# sourceMappingURL=use-date-table.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-date-table.mjs","sources":["../../../../../../packages/components/calendar/src/use-date-table.ts"],"sourcesContent":["import { computed } from 'vue'\nimport dayjs from 'dayjs'\nimport localeData from 'dayjs/plugin/localeData.js'\nimport { useLocale } from '@element-plus/hooks'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport { WEEK_DAYS } from '@element-plus/constants'\nimport { getMonthDays, getPrevMonthLastDays, toNestedArr } from './date-table'\n\nimport type { SetupContext } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type {\n CalendarDateCell,\n CalendarDateCellType,\n DateTableEmits,\n DateTableProps,\n} from './date-table'\n\nexport const useDateTable = (\n props: DateTableProps,\n emit: SetupContext<DateTableEmits>['emit']\n) => {\n dayjs.extend(localeData)\n // https://day.js.org/docs/en/i18n/locale-data\n const firstDayOfWeek: number = dayjs.localeData().firstDayOfWeek()\n\n const { t, lang } = useLocale()\n const now = dayjs().locale(lang.value)\n\n const isInRange = computed(() => !!props.range && !!props.range.length)\n\n const rows = computed(() => {\n let days: CalendarDateCell[] = []\n if (isInRange.value) {\n const [start, end] = props.range!\n const currentMonthRange: CalendarDateCell[] = rangeArr(\n end.date() - start.date() + 1\n ).map((index) => ({\n text: start.date() + index,\n type: 'current',\n }))\n\n let remaining = currentMonthRange.length % 7\n remaining = remaining === 0 ? 0 : 7 - remaining\n const nextMonthRange: CalendarDateCell[] = rangeArr(remaining).map(\n (_, index) => ({\n text: index + 1,\n type: 'next',\n })\n )\n days = currentMonthRange.concat(nextMonthRange)\n } else {\n const firstDay = props.date.startOf('month').day()\n const prevMonthDays: CalendarDateCell[] = getPrevMonthLastDays(\n props.date,\n (firstDay - firstDayOfWeek + 7) % 7\n ).map((day) => ({\n text: day,\n type: 'prev',\n }))\n const currentMonthDays: CalendarDateCell[] = getMonthDays(props.date).map(\n (day) => ({\n text: day,\n type: 'current',\n })\n )\n days = [...prevMonthDays, ...currentMonthDays]\n const remaining = 7 - (days.length % 7 || 7)\n const nextMonthDays: CalendarDateCell[] = rangeArr(remaining).map(\n (_, index) => ({\n text: index + 1,\n type: 'next',\n })\n )\n days = days.concat(nextMonthDays)\n }\n return toNestedArr(days)\n })\n\n const weekDays = computed(() => {\n const start = firstDayOfWeek\n if (start === 0) {\n return WEEK_DAYS.map((_) => t(`el.datepicker.weeks.${_}`))\n } else {\n return WEEK_DAYS.slice(start)\n .concat(WEEK_DAYS.slice(0, start))\n .map((_) => t(`el.datepicker.weeks.${_}`))\n }\n })\n\n const getFormattedDate = (day: number, type: CalendarDateCellType): Dayjs => {\n switch (type) {\n case 'prev':\n return props.date.startOf('month').subtract(1, 'month').date(day)\n case 'next':\n return props.date.startOf('month').add(1, 'month').date(day)\n case 'current':\n return props.date.date(day)\n }\n }\n\n const handlePickDay = ({ text, type }: CalendarDateCell) => {\n const date = getFormattedDate(text, type)\n emit('pick', date)\n }\n\n const getSlotData = ({ text, type }: CalendarDateCell) => {\n const day = getFormattedDate(text, type)\n return {\n isSelected: day.isSame(props.selectedDay),\n type: `${type}-month`,\n day: day.format('YYYY-MM-DD'),\n date: day.toDate(),\n }\n }\n\n return {\n now,\n isInRange,\n rows,\n weekDays,\n getFormattedDate,\n handlePickDay,\n getSlotData,\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, nextTick, watch, onMounted, resolveComponent, resolveDirective, openBlock, createBlock, withCtx, withDirectives, createElementBlock, normalizeClass, normalizeStyle, createVNode, withModifiers, Fragment, renderList, toDisplayString, createElementVNode, withKeys, vModelText, createCommentVNode, vShow, renderSlot } from 'vue';
|
|
2
2
|
import { isPromise } from '@vue/shared';
|
|
3
|
-
import { debounce } from 'lodash-unified';
|
|
3
|
+
import { cloneDeep, debounce } from 'lodash-unified';
|
|
4
4
|
import { isClient, useResizeObserver } from '@vueuse/core';
|
|
5
5
|
import _CascaderPanel from '../../cascader-panel/index.mjs';
|
|
6
6
|
import { ElInput } from '../../input/index.mjs';
|
|
@@ -169,7 +169,7 @@ const _sfc_main = defineComponent({
|
|
|
169
169
|
});
|
|
170
170
|
const checkedValue = computed({
|
|
171
171
|
get() {
|
|
172
|
-
return props.modelValue;
|
|
172
|
+
return cloneDeep(props.modelValue);
|
|
173
173
|
},
|
|
174
174
|
set(val) {
|
|
175
175
|
emit(UPDATE_MODEL_EVENT, val);
|