element-pe 2.0.4 → 2.0.5
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/es/components/autocomplete/index.d.ts +51 -51
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +325 -67
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +51 -51
- package/es/components/autocomplete/src/autocomplete2.mjs +67 -325
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +68 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -68
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -100
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +100 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +54 -17
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +17 -54
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +57 -11
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -57
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +5 -30
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +30 -5
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +15 -237
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +237 -15
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/date-table.mjs +31 -152
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +152 -31
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +4 -4
- package/es/components/carousel/src/carousel-item.mjs +7 -155
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +155 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.mjs +48 -319
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +319 -48
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +68 -68
- package/es/components/cascader/src/index.mjs +2 -2
- package/es/components/cascader/src/index.vue.d.ts +34 -34
- package/es/components/cascader-panel/src/config.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +209 -120
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +120 -209
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +30 -12
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +12 -30
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse-item.mjs +12 -115
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +115 -12
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +63 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -63
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +21 -126
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +126 -21
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +10 -10
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +3 -3
- package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +2 -2
- package/es/components/dropdown/src/dropdown.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.mjs +247 -100
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +8 -8
- package/es/components/dropdown/src/dropdown2.mjs +100 -247
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +56 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -56
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +272 -43
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +43 -272
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -35
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +35 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +52 -228
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +228 -52
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +399 -30
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +30 -399
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +39 -39
- package/es/components/input/index.d.ts +11 -11
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +433 -92
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input.vue.d.ts +11 -11
- package/es/components/input/src/input2.mjs +92 -433
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/index.d.ts +22 -22
- package/es/components/input-number/src/input-number.vue.d.ts +22 -22
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +22 -49
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +49 -22
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +51 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -51
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message-method.mjs +2 -2
- package/es/components/message/src/message.mjs +151 -67
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +67 -151
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +150 -68
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +68 -150
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +52 -119
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +119 -52
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/index.d.ts +16 -16
- package/es/components/popover/src/index.vue.d.ts +8 -8
- package/es/components/popover/src/popover.d.ts +1 -1
- package/es/components/popover/src/popover.mjs +2 -2
- package/es/components/popper/index.mjs +4 -4
- package/es/components/popper/src/content.mjs +64 -113
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content.vue.d.ts +3 -3
- package/es/components/popper/src/content2.mjs +113 -64
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/popper/src/trigger.mjs +16 -71
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +71 -16
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +230 -57
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +57 -230
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +9 -85
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +85 -9
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.mjs +84 -20
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +20 -84
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +73 -28
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +28 -73
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/es/components/scrollbar/index.mjs +3 -3
- package/es/components/scrollbar/src/bar2.mjs +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +49 -175
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +175 -49
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb.mjs +137 -11
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +11 -137
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/select/index.d.ts +7 -7
- package/es/components/select/src/select.mjs +2 -2
- package/es/components/select/src/select.vue.d.ts +7 -7
- package/es/components/select/src/useSelect.d.ts +5 -5
- package/es/components/select-v2/index.d.ts +14 -14
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +7 -7
- package/es/components/select-v2/src/useSelect.d.ts +5 -5
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +1 -1
- package/es/components/table/index.d.ts +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +5 -5
- package/es/components/table/src/table.vue.d.ts +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +14 -60
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +60 -14
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tag/index.d.ts +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +33 -93
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag.vue.d.ts +1 -1
- package/es/components/tag/src/tag2.mjs +93 -33
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +6 -6
- package/es/components/time-select/index.d.ts +2 -2
- package/es/components/time-select/src/time-select.vue.d.ts +1 -1
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/content.mjs +2 -2
- package/es/components/tooltip/src/content.vue.d.ts +5 -5
- package/es/components/tooltip/src/tooltip.d.ts +1 -1
- package/es/components/tooltip/src/tooltip.mjs +62 -174
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +3 -3
- package/es/components/tooltip/src/tooltip2.mjs +174 -62
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +2 -2
- package/es/components/tooltip/src/trigger.vue.d.ts +3 -3
- package/es/components/upload/index.d.ts +1 -1
- package/es/components/upload/index.mjs +2 -2
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +11 -70
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +70 -11
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +26 -176
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +176 -26
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +39 -39
- package/global.d.ts +98 -98
- package/lib/components/autocomplete/index.d.ts +51 -51
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +324 -67
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +51 -51
- package/lib/components/autocomplete/src/autocomplete2.js +67 -324
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +68 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -68
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -100
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +100 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +54 -17
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +17 -54
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +57 -11
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -57
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +5 -30
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +30 -5
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +16 -241
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +241 -16
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/date-table.js +35 -157
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +157 -35
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/carousel/index.js +4 -4
- package/lib/components/carousel/src/carousel-item.js +7 -155
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +155 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.js +49 -319
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +319 -49
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader/index.d.ts +68 -68
- package/lib/components/cascader/src/index.js +2 -2
- package/lib/components/cascader/src/index.vue.d.ts +34 -34
- package/lib/components/cascader-panel/src/config.js +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +209 -121
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +121 -209
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +30 -13
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +13 -30
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse-item.js +12 -115
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +115 -12
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +63 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -63
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +22 -126
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +126 -22
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +10 -10
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +3 -3
- package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +2 -2
- package/lib/components/dropdown/src/dropdown.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.js +246 -108
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +8 -8
- package/lib/components/dropdown/src/dropdown2.js +108 -246
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +56 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -56
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +276 -44
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +44 -276
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -35
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +35 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +53 -228
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +228 -53
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +399 -31
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +31 -399
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +39 -39
- package/lib/components/input/index.d.ts +11 -11
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +432 -92
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input.vue.d.ts +11 -11
- package/lib/components/input/src/input2.js +92 -432
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/index.d.ts +22 -22
- package/lib/components/input-number/src/input-number.vue.d.ts +22 -22
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +23 -49
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +49 -23
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +51 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -51
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message-method.js +2 -2
- package/lib/components/message/src/message.js +150 -68
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +68 -150
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +150 -70
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +70 -150
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +52 -119
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +119 -52
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/index.d.ts +16 -16
- package/lib/components/popover/src/index.vue.d.ts +8 -8
- package/lib/components/popover/src/popover.d.ts +1 -1
- package/lib/components/popover/src/popover.js +2 -2
- package/lib/components/popper/index.js +4 -4
- package/lib/components/popper/src/content.js +64 -112
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content.vue.d.ts +3 -3
- package/lib/components/popper/src/content2.js +112 -64
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/popper/src/trigger.js +16 -71
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +71 -16
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +230 -57
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +57 -230
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +8 -84
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +84 -8
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group.js +84 -21
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +21 -84
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +73 -30
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +30 -73
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/lib/components/scrollbar/index.js +3 -3
- package/lib/components/scrollbar/src/bar2.js +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +50 -175
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +175 -50
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb.js +137 -11
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +11 -137
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/select/index.d.ts +7 -7
- package/lib/components/select/src/select.js +2 -2
- package/lib/components/select/src/select.vue.d.ts +7 -7
- package/lib/components/select/src/useSelect.d.ts +5 -5
- package/lib/components/select-v2/index.d.ts +14 -14
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +7 -7
- package/lib/components/select-v2/src/useSelect.d.ts +5 -5
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +23 -18
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +18 -23
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +1 -1
- package/lib/components/table/index.d.ts +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +5 -5
- package/lib/components/table/src/table.vue.d.ts +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +14 -60
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +60 -14
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tag/index.d.ts +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +34 -93
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +1 -1
- package/lib/components/tag/src/tag2.js +93 -34
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +6 -6
- package/lib/components/time-select/index.d.ts +2 -2
- package/lib/components/time-select/src/time-select.vue.d.ts +1 -1
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/content.js +2 -2
- package/lib/components/tooltip/src/content.vue.d.ts +5 -5
- package/lib/components/tooltip/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip/src/tooltip.js +64 -174
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -3
- package/lib/components/tooltip/src/tooltip2.js +174 -64
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +2 -2
- package/lib/components/tooltip/src/trigger.vue.d.ts +3 -3
- package/lib/components/upload/index.d.ts +1 -1
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +12 -70
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +70 -12
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +27 -176
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +176 -27
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +39 -39
- package/package.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/el-icon.css +1 -1
- package/theme-chalk/el-message-box.css +1 -1
- package/theme-chalk/el-notification.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/icon.scss +1 -2
- package/theme-chalk/src/message-box.scss +2 -2
- package/theme-chalk/src/mixins/mixins.scss +0 -34
- package/theme-chalk/src/notification.scss +1 -1
- package/web-types.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Breadcrumb from './src/breadcrumb.mjs';
|
|
3
|
-
import BreadcrumbItem from './src/breadcrumb-
|
|
3
|
+
import BreadcrumbItem from './src/breadcrumb-item.mjs';
|
|
4
4
|
export { breadcrumbProps } from './src/breadcrumb2.mjs';
|
|
5
|
-
export { breadcrumbItemProps } from './src/breadcrumb-
|
|
5
|
+
export { breadcrumbItemProps } from './src/breadcrumb-item2.mjs';
|
|
6
6
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
7
7
|
|
|
8
8
|
const ElBreadcrumb = withInstall(Breadcrumb, {
|
|
@@ -1,16 +1,62 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, getCurrentInstance, inject, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, toDisplayString } from 'vue';
|
|
2
|
+
import { ElIcon } from '../../icon/index.mjs';
|
|
3
|
+
import '../../../tokens/index.mjs';
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { breadcrumbItemProps } from './breadcrumb-item2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { breadcrumbKey } from '../../../tokens/breadcrumb.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
9
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const __default__ = {
|
|
11
|
+
name: "ElBreadcrumbItem"
|
|
12
|
+
};
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
...__default__,
|
|
15
|
+
props: breadcrumbItemProps,
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const instance = getCurrentInstance();
|
|
19
|
+
const router = instance.appContext.config.globalProperties.$router;
|
|
20
|
+
const breadcrumbInjection = inject(breadcrumbKey, {});
|
|
21
|
+
const ns = useNamespace("breadcrumb");
|
|
22
|
+
const { separator, separatorIcon } = breadcrumbInjection;
|
|
23
|
+
const link = ref();
|
|
24
|
+
const onClick = () => {
|
|
25
|
+
if (!props.to || !router)
|
|
26
|
+
return;
|
|
27
|
+
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
28
|
+
};
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("span", {
|
|
31
|
+
class: normalizeClass(unref(ns).e("item"))
|
|
32
|
+
}, [
|
|
33
|
+
createElementVNode("span", {
|
|
34
|
+
ref_key: "link",
|
|
35
|
+
ref: link,
|
|
36
|
+
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
|
|
37
|
+
role: "link",
|
|
38
|
+
onClick
|
|
39
|
+
}, [
|
|
40
|
+
renderSlot(_ctx.$slots, "default")
|
|
41
|
+
], 2),
|
|
42
|
+
unref(separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: normalizeClass(unref(ns).e("separator"))
|
|
45
|
+
}, {
|
|
46
|
+
default: withCtx(() => [
|
|
47
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(separatorIcon))))
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: normalizeClass(unref(ns).e("separator")),
|
|
53
|
+
role: "presentation"
|
|
54
|
+
}, toDisplayString(unref(separator)), 3))
|
|
55
|
+
], 2);
|
|
56
|
+
};
|
|
12
57
|
}
|
|
13
58
|
});
|
|
59
|
+
var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);
|
|
14
60
|
|
|
15
|
-
export {
|
|
61
|
+
export { BreadcrumbItem as default };
|
|
16
62
|
//# sourceMappingURL=breadcrumb-item.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n @click=\"onClick\"\n >\n <slot />\n </span>\n <el-icon v-if=\"separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"separatorIcon\" />\n </el-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, ref } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { breadcrumbKey } from '@element-plus/tokens'\nimport { useNamespace } from '@element-plus/hooks'\nimport { breadcrumbItemProps } from './breadcrumb-item'\n\nimport type { Router } from 'vue-router'\nimport type { BreadcrumbProps } from './breadcrumb'\n\ndefineOptions({\n name: 'ElBreadcrumbItem',\n})\n\nconst props = defineProps(breadcrumbItemProps)\n\nconst instance = getCurrentInstance()!\nconst router = instance.appContext.config.globalProperties.$router as Router\nconst breadcrumbInjection = inject(breadcrumbKey, {} as BreadcrumbProps)!\n\nconst ns = useNamespace('breadcrumb')\n\nconst { separator, separatorIcon } = breadcrumbInjection\n\nconst link = ref<HTMLSpanElement>()\n\nconst onClick = () => {\n if (!props.to || !router) return\n props.replace ? router.replace(props.to) : router.push(props.to)\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAmCA,IAAA,MAAA,WAAA,kBAAA,EAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAA,QAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,OAAA,CAAA;AACA,IAAA,MAAA,mBAAA,GAAA,MAAA,CAAA,aAAA,EAAA,EAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,YAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,WAAA,aAAA,EAAA,GAAA,mBAAA,CAAA;AAEA,IAAA,MAAA,OAAA,GAAA,EAAA,CAAA;AAEA,IAAA,MAAA,UAAA,MAAA;AACA,MAAA,IAAA,CAAA,KAAA,CAAA,EAAA,IAAA,CAAA,MAAA;AAAA,QAAA,OAAA;AACA,MAAA,KAAA,CAAA,OAAA,GAAA,OAAA,OAAA,CAAA,KAAA,CAAA,EAAA,CAAA,GAAA,MAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,62 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '../../../tokens/index.mjs';
|
|
4
|
-
import '../../../hooks/index.mjs';
|
|
5
|
-
import { breadcrumbItemProps } from './breadcrumb-item.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { breadcrumbKey } from '../../../tokens/breadcrumb.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
|
|
9
3
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const instance = getCurrentInstance();
|
|
19
|
-
const router = instance.appContext.config.globalProperties.$router;
|
|
20
|
-
const breadcrumbInjection = inject(breadcrumbKey, {});
|
|
21
|
-
const ns = useNamespace("breadcrumb");
|
|
22
|
-
const { separator, separatorIcon } = breadcrumbInjection;
|
|
23
|
-
const link = ref();
|
|
24
|
-
const onClick = () => {
|
|
25
|
-
if (!props.to || !router)
|
|
26
|
-
return;
|
|
27
|
-
props.replace ? router.replace(props.to) : router.push(props.to);
|
|
28
|
-
};
|
|
29
|
-
return (_ctx, _cache) => {
|
|
30
|
-
return openBlock(), createElementBlock("span", {
|
|
31
|
-
class: normalizeClass(unref(ns).e("item"))
|
|
32
|
-
}, [
|
|
33
|
-
createElementVNode("span", {
|
|
34
|
-
ref_key: "link",
|
|
35
|
-
ref: link,
|
|
36
|
-
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
|
|
37
|
-
role: "link",
|
|
38
|
-
onClick
|
|
39
|
-
}, [
|
|
40
|
-
renderSlot(_ctx.$slots, "default")
|
|
41
|
-
], 2),
|
|
42
|
-
unref(separatorIcon) ? (openBlock(), createBlock(unref(ElIcon), {
|
|
43
|
-
key: 0,
|
|
44
|
-
class: normalizeClass(unref(ns).e("separator"))
|
|
45
|
-
}, {
|
|
46
|
-
default: withCtx(() => [
|
|
47
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(separatorIcon))))
|
|
48
|
-
]),
|
|
49
|
-
_: 1
|
|
50
|
-
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
51
|
-
key: 1,
|
|
52
|
-
class: normalizeClass(unref(ns).e("separator")),
|
|
53
|
-
role: "presentation"
|
|
54
|
-
}, toDisplayString(unref(separator)), 3))
|
|
55
|
-
], 2);
|
|
56
|
-
};
|
|
4
|
+
const breadcrumbItemProps = buildProps({
|
|
5
|
+
to: {
|
|
6
|
+
type: definePropType([String, Object]),
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
replace: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
57
12
|
}
|
|
58
13
|
});
|
|
59
|
-
var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);
|
|
60
14
|
|
|
61
|
-
export {
|
|
15
|
+
export { breadcrumbItemProps };
|
|
62
16
|
//# sourceMappingURL=breadcrumb-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type BreadcrumbItem from './breadcrumb-item.vue'\n\nexport const breadcrumbItemProps = buildProps({\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n replace: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n\nexport type BreadcrumbItemInstance = InstanceType<typeof BreadcrumbItem>\n"],"names":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Button from './src/button.mjs';
|
|
3
|
-
import ButtonGroup from './src/button-
|
|
3
|
+
import ButtonGroup from './src/button-group2.mjs';
|
|
4
4
|
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes } from './src/button2.mjs';
|
|
5
5
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
6
6
|
|
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../../../tokens/index.mjs';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
|
-
import { buttonGroupProps } from './button-group2.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { buttonGroupContextKey } from '../../../tokens/button.mjs';
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import { buttonProps } from './button2.mjs';
|
|
8
2
|
|
|
9
|
-
const
|
|
10
|
-
|
|
3
|
+
const buttonGroupProps = {
|
|
4
|
+
size: buttonProps.size,
|
|
5
|
+
type: buttonProps.type
|
|
11
6
|
};
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
-
...__default__,
|
|
14
|
-
props: buttonGroupProps,
|
|
15
|
-
setup(__props) {
|
|
16
|
-
const props = __props;
|
|
17
|
-
provide(buttonGroupContextKey, reactive({
|
|
18
|
-
size: toRef(props, "size"),
|
|
19
|
-
type: toRef(props, "type")
|
|
20
|
-
}));
|
|
21
|
-
const ns = useNamespace("button");
|
|
22
|
-
return (_ctx, _cache) => {
|
|
23
|
-
return openBlock(), createElementBlock("div", {
|
|
24
|
-
class: normalizeClass(`${unref(ns).b("group")}`)
|
|
25
|
-
}, [
|
|
26
|
-
renderSlot(_ctx.$slots, "default")
|
|
27
|
-
], 2);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/button/src/button-group.vue"]]);
|
|
32
7
|
|
|
33
|
-
export {
|
|
8
|
+
export { buttonGroupProps };
|
|
34
9
|
//# sourceMappingURL=button-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.mjs","sources":["../../../../../../packages/components/button/src/button-group.
|
|
1
|
+
{"version":3,"file":"button-group.mjs","sources":["../../../../../../packages/components/button/src/button-group.ts"],"sourcesContent":["import { buttonProps } from './button'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type buttonGroup from './button-group.vue'\n\nexport const buttonGroupProps = {\n size: buttonProps.size,\n type: buttonProps.type,\n} as const\nexport type ButtonGroupProps = ExtractPropTypes<typeof buttonGroupProps>\n\nexport type ButtonGroupInstance = InstanceType<typeof buttonGroup>\n"],"names":[],"mappings":";;AACY,MAAC,gBAAgB,GAAG;AAChC,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI;AACxB,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI;AACxB;;;;"}
|
|
@@ -1,9 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, provide, reactive, toRef, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
2
|
+
import '../../../tokens/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { buttonGroupProps } from './button-group.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { buttonGroupContextKey } from '../../../tokens/button.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
2
8
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
type: buttonProps.type
|
|
9
|
+
const __default__ = {
|
|
10
|
+
name: "ElButtonGroup"
|
|
6
11
|
};
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: buttonGroupProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
provide(buttonGroupContextKey, reactive({
|
|
18
|
+
size: toRef(props, "size"),
|
|
19
|
+
type: toRef(props, "type")
|
|
20
|
+
}));
|
|
21
|
+
const ns = useNamespace("button");
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return openBlock(), createElementBlock("div", {
|
|
24
|
+
class: normalizeClass(`${unref(ns).b("group")}`)
|
|
25
|
+
}, [
|
|
26
|
+
renderSlot(_ctx.$slots, "default")
|
|
27
|
+
], 2);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/button/src/button-group.vue"]]);
|
|
7
32
|
|
|
8
|
-
export {
|
|
33
|
+
export { ButtonGroup as default };
|
|
9
34
|
//# sourceMappingURL=button-group2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group2.mjs","sources":["../../../../../../packages/components/button/src/button-group.
|
|
1
|
+
{"version":3,"file":"button-group2.mjs","sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"`${ns.b('group')}`\">\n <slot />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { provide, reactive, toRef } from 'vue'\nimport { buttonGroupContextKey } from '@element-plus/tokens'\nimport { useNamespace } from '@element-plus/hooks'\nimport { buttonGroupProps } from './button-group'\n\ndefineOptions({\n name: 'ElButtonGroup',\n})\nconst props = defineProps(buttonGroupProps)\nprovide(\n buttonGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n type: toRef(props, 'type'),\n })\n)\nconst ns = useNamespace('button')\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAA,OAAA,CACA,uBACA,QAAA,CAAA;AAAA,MACA,IAAA,EAAA,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA;AAAA,MACA,IAAA,EAAA,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA;AAAA,KACA,CACA,CAAA,CAAA;AACA,IAAA,MAAA,EAAA,GAAA,aAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Calendar from './src/
|
|
3
|
-
export { calendarEmits, calendarProps } from './src/
|
|
2
|
+
import Calendar from './src/calendar2.mjs';
|
|
3
|
+
export { calendarEmits, calendarProps } from './src/calendar.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const ElCalendar = withInstall(Calendar);
|
|
@@ -1,243 +1,21 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, toDisplayString, createVNode, withCtx, createTextVNode, createCommentVNode, createSlots, normalizeProps, guardReactiveProps, Fragment, renderList, createBlock } from 'vue';
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
|
-
import { ElButtonGroup, ElButton } from '../../button/index.mjs';
|
|
4
|
-
import '../../../hooks/index.mjs';
|
|
5
1
|
import '../../../utils/index.mjs';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
11
|
-
import { debugWarn } from '../../../utils/error.mjs';
|
|
2
|
+
import '../../../constants/index.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
|
|
4
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
12
5
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
setup(__props, { expose, emit }) {
|
|
21
|
-
const props = __props;
|
|
22
|
-
const COMPONENT_NAME = "ElCalendar";
|
|
23
|
-
const ns = useNamespace("calendar");
|
|
24
|
-
const { t, lang } = useLocale();
|
|
25
|
-
const selectedDay = ref();
|
|
26
|
-
const now = dayjs().locale(lang.value);
|
|
27
|
-
const prevMonthDayjs = computed(() => {
|
|
28
|
-
return date.value.subtract(1, "month").date(1);
|
|
29
|
-
});
|
|
30
|
-
const nextMonthDayjs = computed(() => {
|
|
31
|
-
return date.value.add(1, "month").date(1);
|
|
32
|
-
});
|
|
33
|
-
const prevYearDayjs = computed(() => {
|
|
34
|
-
return date.value.subtract(1, "year").date(1);
|
|
35
|
-
});
|
|
36
|
-
const nextYearDayjs = computed(() => {
|
|
37
|
-
return date.value.add(1, "year").date(1);
|
|
38
|
-
});
|
|
39
|
-
const i18nDate = computed(() => {
|
|
40
|
-
const pickedMonth = `el.datepicker.month${date.value.format("M")}`;
|
|
41
|
-
return `${date.value.year()} ${t("el.datepicker.year")} ${t(pickedMonth)}`;
|
|
42
|
-
});
|
|
43
|
-
const realSelectedDay = computed({
|
|
44
|
-
get() {
|
|
45
|
-
if (!props.modelValue)
|
|
46
|
-
return selectedDay.value;
|
|
47
|
-
return date.value;
|
|
48
|
-
},
|
|
49
|
-
set(val) {
|
|
50
|
-
if (!val)
|
|
51
|
-
return;
|
|
52
|
-
selectedDay.value = val;
|
|
53
|
-
const result = val.toDate();
|
|
54
|
-
emit("input", result);
|
|
55
|
-
emit("update:modelValue", result);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
const date = computed(() => {
|
|
59
|
-
if (!props.modelValue) {
|
|
60
|
-
if (realSelectedDay.value) {
|
|
61
|
-
return realSelectedDay.value;
|
|
62
|
-
} else if (validatedRange.value.length) {
|
|
63
|
-
return validatedRange.value[0][0];
|
|
64
|
-
}
|
|
65
|
-
return now;
|
|
66
|
-
} else {
|
|
67
|
-
return dayjs(props.modelValue).locale(lang.value);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const calculateValidatedDateRange = (startDayjs, endDayjs) => {
|
|
71
|
-
const firstDay = startDayjs.startOf("week");
|
|
72
|
-
const lastDay = endDayjs.endOf("week");
|
|
73
|
-
const firstMonth = firstDay.get("month");
|
|
74
|
-
const lastMonth = lastDay.get("month");
|
|
75
|
-
if (firstMonth === lastMonth) {
|
|
76
|
-
return [[firstDay, lastDay]];
|
|
77
|
-
} else if (firstMonth + 1 === lastMonth) {
|
|
78
|
-
const firstMonthLastDay = firstDay.endOf("month");
|
|
79
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
80
|
-
const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, "week");
|
|
81
|
-
const lastMonthStartDay = isSameWeek ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
82
|
-
return [
|
|
83
|
-
[firstDay, firstMonthLastDay],
|
|
84
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
85
|
-
];
|
|
86
|
-
} else if (firstMonth + 2 === lastMonth) {
|
|
87
|
-
const firstMonthLastDay = firstDay.endOf("month");
|
|
88
|
-
const secondMonthFirstDay = firstDay.add(1, "month").startOf("month");
|
|
89
|
-
const secondMonthStartDay = firstMonthLastDay.isSame(secondMonthFirstDay, "week") ? secondMonthFirstDay.add(1, "week") : secondMonthFirstDay;
|
|
90
|
-
const secondMonthLastDay = secondMonthStartDay.endOf("month");
|
|
91
|
-
const lastMonthFirstDay = lastDay.startOf("month");
|
|
92
|
-
const lastMonthStartDay = secondMonthLastDay.isSame(lastMonthFirstDay, "week") ? lastMonthFirstDay.add(1, "week") : lastMonthFirstDay;
|
|
93
|
-
return [
|
|
94
|
-
[firstDay, firstMonthLastDay],
|
|
95
|
-
[secondMonthStartDay.startOf("week"), secondMonthLastDay],
|
|
96
|
-
[lastMonthStartDay.startOf("week"), lastDay]
|
|
97
|
-
];
|
|
98
|
-
} else {
|
|
99
|
-
debugWarn(COMPONENT_NAME, "start time and end time interval must not exceed two months");
|
|
100
|
-
return [];
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const validatedRange = computed(() => {
|
|
104
|
-
if (!props.range)
|
|
105
|
-
return [];
|
|
106
|
-
const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value));
|
|
107
|
-
const [startDayjs, endDayjs] = rangeArrDayjs;
|
|
108
|
-
if (startDayjs.isAfter(endDayjs)) {
|
|
109
|
-
debugWarn(COMPONENT_NAME, "end time should be greater than start time");
|
|
110
|
-
return [];
|
|
111
|
-
}
|
|
112
|
-
if (startDayjs.isSame(endDayjs, "month")) {
|
|
113
|
-
return calculateValidatedDateRange(startDayjs, endDayjs);
|
|
114
|
-
} else {
|
|
115
|
-
if (startDayjs.add(1, "month").month() !== endDayjs.month()) {
|
|
116
|
-
debugWarn(COMPONENT_NAME, "start time and end time interval must not exceed two months");
|
|
117
|
-
return [];
|
|
118
|
-
}
|
|
119
|
-
return calculateValidatedDateRange(startDayjs, endDayjs);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
const pickDay = (day) => {
|
|
123
|
-
realSelectedDay.value = day;
|
|
124
|
-
};
|
|
125
|
-
const selectDate = (type) => {
|
|
126
|
-
let day;
|
|
127
|
-
if (type === "prev-month") {
|
|
128
|
-
day = prevMonthDayjs.value;
|
|
129
|
-
} else if (type === "next-month") {
|
|
130
|
-
day = nextMonthDayjs.value;
|
|
131
|
-
} else if (type === "prev-year") {
|
|
132
|
-
day = prevYearDayjs.value;
|
|
133
|
-
} else if (type === "next-year") {
|
|
134
|
-
day = nextYearDayjs.value;
|
|
135
|
-
} else {
|
|
136
|
-
day = now;
|
|
137
|
-
}
|
|
138
|
-
if (day.isSame(date.value, "day"))
|
|
139
|
-
return;
|
|
140
|
-
pickDay(day);
|
|
141
|
-
};
|
|
142
|
-
expose({
|
|
143
|
-
selectedDay: realSelectedDay,
|
|
144
|
-
pickDay,
|
|
145
|
-
selectDate,
|
|
146
|
-
calculateValidatedDateRange
|
|
147
|
-
});
|
|
148
|
-
return (_ctx, _cache) => {
|
|
149
|
-
return openBlock(), createElementBlock("div", {
|
|
150
|
-
class: normalizeClass(unref(ns).b())
|
|
151
|
-
}, [
|
|
152
|
-
createElementVNode("div", {
|
|
153
|
-
class: normalizeClass(unref(ns).e("header"))
|
|
154
|
-
}, [
|
|
155
|
-
renderSlot(_ctx.$slots, "header", { date: unref(i18nDate) }, () => [
|
|
156
|
-
createElementVNode("div", {
|
|
157
|
-
class: normalizeClass(unref(ns).e("title"))
|
|
158
|
-
}, toDisplayString(unref(i18nDate)), 3),
|
|
159
|
-
unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
|
|
160
|
-
key: 0,
|
|
161
|
-
class: normalizeClass(unref(ns).e("button-group"))
|
|
162
|
-
}, [
|
|
163
|
-
createVNode(unref(ElButtonGroup), null, {
|
|
164
|
-
default: withCtx(() => [
|
|
165
|
-
createVNode(unref(ElButton), {
|
|
166
|
-
size: "small",
|
|
167
|
-
onClick: _cache[0] || (_cache[0] = ($event) => selectDate("prev-month"))
|
|
168
|
-
}, {
|
|
169
|
-
default: withCtx(() => [
|
|
170
|
-
createTextVNode(toDisplayString(unref(t)("el.datepicker.prevMonth")), 1)
|
|
171
|
-
]),
|
|
172
|
-
_: 1
|
|
173
|
-
}),
|
|
174
|
-
createVNode(unref(ElButton), {
|
|
175
|
-
size: "small",
|
|
176
|
-
onClick: _cache[1] || (_cache[1] = ($event) => selectDate("today"))
|
|
177
|
-
}, {
|
|
178
|
-
default: withCtx(() => [
|
|
179
|
-
createTextVNode(toDisplayString(unref(t)("el.datepicker.today")), 1)
|
|
180
|
-
]),
|
|
181
|
-
_: 1
|
|
182
|
-
}),
|
|
183
|
-
createVNode(unref(ElButton), {
|
|
184
|
-
size: "small",
|
|
185
|
-
onClick: _cache[2] || (_cache[2] = ($event) => selectDate("next-month"))
|
|
186
|
-
}, {
|
|
187
|
-
default: withCtx(() => [
|
|
188
|
-
createTextVNode(toDisplayString(unref(t)("el.datepicker.nextMonth")), 1)
|
|
189
|
-
]),
|
|
190
|
-
_: 1
|
|
191
|
-
})
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
})
|
|
195
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
196
|
-
])
|
|
197
|
-
], 2),
|
|
198
|
-
unref(validatedRange).length === 0 ? (openBlock(), createElementBlock("div", {
|
|
199
|
-
key: 0,
|
|
200
|
-
class: normalizeClass(unref(ns).e("body"))
|
|
201
|
-
}, [
|
|
202
|
-
createVNode(DateTable, {
|
|
203
|
-
date: unref(date),
|
|
204
|
-
"selected-day": unref(realSelectedDay),
|
|
205
|
-
onPick: pickDay
|
|
206
|
-
}, createSlots({ _: 2 }, [
|
|
207
|
-
_ctx.$slots.dateCell ? {
|
|
208
|
-
name: "dateCell",
|
|
209
|
-
fn: withCtx((data) => [
|
|
210
|
-
renderSlot(_ctx.$slots, "dateCell", normalizeProps(guardReactiveProps(data)))
|
|
211
|
-
])
|
|
212
|
-
} : void 0
|
|
213
|
-
]), 1032, ["date", "selected-day"])
|
|
214
|
-
], 2)) : (openBlock(), createElementBlock("div", {
|
|
215
|
-
key: 1,
|
|
216
|
-
class: normalizeClass(unref(ns).e("body"))
|
|
217
|
-
}, [
|
|
218
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(validatedRange), (range_, index) => {
|
|
219
|
-
return openBlock(), createBlock(DateTable, {
|
|
220
|
-
key: index,
|
|
221
|
-
date: range_[0],
|
|
222
|
-
"selected-day": unref(realSelectedDay),
|
|
223
|
-
range: range_,
|
|
224
|
-
"hide-header": index !== 0,
|
|
225
|
-
onPick: pickDay
|
|
226
|
-
}, createSlots({ _: 2 }, [
|
|
227
|
-
_ctx.$slots.dateCell ? {
|
|
228
|
-
name: "dateCell",
|
|
229
|
-
fn: withCtx((data) => [
|
|
230
|
-
renderSlot(_ctx.$slots, "dateCell", normalizeProps(guardReactiveProps(data)))
|
|
231
|
-
])
|
|
232
|
-
} : void 0
|
|
233
|
-
]), 1032, ["date", "selected-day", "range", "hide-header"]);
|
|
234
|
-
}), 128))
|
|
235
|
-
], 2))
|
|
236
|
-
], 2);
|
|
237
|
-
};
|
|
6
|
+
const calendarProps = buildProps({
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: Date
|
|
9
|
+
},
|
|
10
|
+
range: {
|
|
11
|
+
type: definePropType(Array),
|
|
12
|
+
validator: (range) => Array.isArray(range) && range.length === 2 && range.every((item) => item instanceof Date)
|
|
238
13
|
}
|
|
239
14
|
});
|
|
240
|
-
|
|
15
|
+
const calendarEmits = {
|
|
16
|
+
[UPDATE_MODEL_EVENT]: (value) => value instanceof Date,
|
|
17
|
+
input: (value) => value instanceof Date
|
|
18
|
+
};
|
|
241
19
|
|
|
242
|
-
export {
|
|
20
|
+
export { calendarEmits, calendarProps };
|
|
243
21
|
//# sourceMappingURL=calendar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('header')\">\n <slot name=\"header\" :date=\"i18nDate\">\n <div :class=\"ns.e('title')\">{{ i18nDate }}</div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('button-group')\">\n <el-button-group>\n <el-button size=\"small\" @click=\"selectDate('prev-month')\">\n {{ t('el.datepicker.prevMonth') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('today')\">\n {{ t('el.datepicker.today') }}\n </el-button>\n <el-button size=\"small\" @click=\"selectDate('next-month')\">\n {{ t('el.datepicker.nextMonth') }}\n </el-button>\n </el-button-group>\n </div>\n </slot>\n </div>\n <div v-if=\"validatedRange.length === 0\" :class=\"ns.e('body')\">\n <date-table :date=\"date\" :selected-day=\"realSelectedDay\" @pick=\"pickDay\">\n <template v-if=\"$slots.dateCell\" #dateCell=\"data\">\n <slot name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n <div v-else :class=\"ns.e('body')\">\n <date-table\n v-for=\"(range_, index) in validatedRange\"\n :key=\"index\"\n :date=\"range_[0]\"\n :selected-day=\"realSelectedDay\"\n :range=\"range_\"\n :hide-header=\"index !== 0\"\n @pick=\"pickDay\"\n >\n <template v-if=\"$slots.dateCell\" #dateCell=\"data\">\n <slot name=\"dateCell\" v-bind=\"data\" />\n </template>\n </date-table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport { ElButton, ElButtonGroup } from '@element-plus/components/button'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport DateTable from './date-table.vue'\nimport { calendarEmits, calendarProps } from './calendar'\n\nimport type { CalendarDateType } from './calendar'\nimport type { ComputedRef } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nconst COMPONENT_NAME = 'ElCalendar'\n\ndefineOptions({\n name: 'ElCalendar',\n})\n\nconst props = defineProps(calendarProps)\nconst emit = defineEmits(calendarEmits)\n\nconst ns = useNamespace('calendar')\n\nconst { t, lang } = useLocale()\nconst selectedDay = ref<Dayjs>()\nconst now = dayjs().locale(lang.value)\n\nconst prevMonthDayjs = computed(() => {\n return date.value.subtract(1, 'month').date(1)\n})\n\nconst nextMonthDayjs = computed(() => {\n return date.value.add(1, 'month').date(1)\n})\n\nconst prevYearDayjs = computed(() => {\n return date.value.subtract(1, 'year').date(1)\n})\n\nconst nextYearDayjs = computed(() => {\n return date.value.add(1, 'year').date(1)\n})\n\nconst i18nDate = computed(() => {\n const pickedMonth = `el.datepicker.month${date.value.format('M')}`\n return `${date.value.year()} ${t('el.datepicker.year')} ${t(pickedMonth)}`\n})\n\nconst realSelectedDay = computed<Dayjs | undefined>({\n get() {\n if (!props.modelValue) return selectedDay.value\n return date.value\n },\n set(val) {\n if (!val) return\n selectedDay.value = val\n const result = val.toDate()\n\n emit('input', result)\n emit('update:modelValue', result)\n },\n})\n\nconst date: ComputedRef<Dayjs> = computed(() => {\n if (!props.modelValue) {\n if (realSelectedDay.value) {\n return realSelectedDay.value\n } else if (validatedRange.value.length) {\n return validatedRange.value[0][0]\n }\n return now\n } else {\n return dayjs(props.modelValue).locale(lang.value)\n }\n})\n\n// https://github.com/element-plus/element-plus/issues/3155\n// Calculate the validate date range according to the start and end dates\nconst calculateValidatedDateRange = (\n startDayjs: Dayjs,\n endDayjs: Dayjs\n): [Dayjs, Dayjs][] => {\n const firstDay = startDayjs.startOf('week')\n const lastDay = endDayjs.endOf('week')\n const firstMonth = firstDay.get('month')\n const lastMonth = lastDay.get('month')\n\n // Current mouth\n if (firstMonth === lastMonth) {\n return [[firstDay, lastDay]]\n }\n // Two adjacent months\n else if (firstMonth + 1 === lastMonth) {\n const firstMonthLastDay = firstDay.endOf('month')\n const lastMonthFirstDay = lastDay.startOf('month')\n\n // Whether the last day of the first month and the first day of the last month is in the same week\n const isSameWeek = firstMonthLastDay.isSame(lastMonthFirstDay, 'week')\n const lastMonthStartDay = isSameWeek\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [firstDay, firstMonthLastDay],\n [lastMonthStartDay.startOf('week'), lastDay],\n ]\n }\n // Three consecutive months (compatible: 2021-01-30 to 2021-02-28)\n else if (firstMonth + 2 === lastMonth) {\n const firstMonthLastDay = firstDay.endOf('month')\n const secondMonthFirstDay = firstDay.add(1, 'month').startOf('month')\n\n // Whether the last day of the first month and the second month is in the same week\n const secondMonthStartDay = firstMonthLastDay.isSame(\n secondMonthFirstDay,\n 'week'\n )\n ? secondMonthFirstDay.add(1, 'week')\n : secondMonthFirstDay\n\n const secondMonthLastDay = secondMonthStartDay.endOf('month')\n const lastMonthFirstDay = lastDay.startOf('month')\n\n // Whether the last day of the second month and the last day of the last month is in the same week\n const lastMonthStartDay = secondMonthLastDay.isSame(\n lastMonthFirstDay,\n 'week'\n )\n ? lastMonthFirstDay.add(1, 'week')\n : lastMonthFirstDay\n\n return [\n [firstDay, firstMonthLastDay],\n [secondMonthStartDay.startOf('week'), secondMonthLastDay],\n [lastMonthStartDay.startOf('week'), lastDay],\n ]\n }\n // Other cases\n else {\n debugWarn(\n COMPONENT_NAME,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n}\n\n// if range is valid, we get a two-digit array\nconst validatedRange = computed(() => {\n if (!props.range) return []\n const rangeArrDayjs = props.range.map((_) => dayjs(_).locale(lang.value))\n const [startDayjs, endDayjs] = rangeArrDayjs\n if (startDayjs.isAfter(endDayjs)) {\n debugWarn(COMPONENT_NAME, 'end time should be greater than start time')\n return []\n }\n if (startDayjs.isSame(endDayjs, 'month')) {\n // same month\n return calculateValidatedDateRange(startDayjs, endDayjs)\n } else {\n // two months\n if (startDayjs.add(1, 'month').month() !== endDayjs.month()) {\n debugWarn(\n COMPONENT_NAME,\n 'start time and end time interval must not exceed two months'\n )\n return []\n }\n return calculateValidatedDateRange(startDayjs, endDayjs)\n }\n})\n\nconst pickDay = (day: Dayjs) => {\n realSelectedDay.value = day\n}\n\nconst selectDate = (type: CalendarDateType) => {\n let day: Dayjs\n if (type === 'prev-month') {\n day = prevMonthDayjs.value\n } else if (type === 'next-month') {\n day = nextMonthDayjs.value\n } else if (type === 'prev-year') {\n day = prevYearDayjs.value\n } else if (type === 'next-year') {\n day = nextYearDayjs.value\n } else {\n day = now\n }\n\n if (day.isSame(date.value, 'day')) return\n pickDay(day)\n}\n\ndefineExpose({\n /** @description currently selected date */\n selectedDay: realSelectedDay,\n /** @description select a specific date */\n pickDay,\n /** @description select date */\n selectDate,\n /** @description Calculate the validate date range according to the start and end dates */\n calculateValidatedDateRange,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0DA,IAAA,MAAA,cAAA,GAAA,YAAA,CAAA;AASA,IAAA,MAAA,EAAA,GAAA,aAAA,UAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,GAAA,SAAA,EAAA,CAAA;AACA,IAAA,MAAA,cAAA,GAAA,EAAA,CAAA;AACA,IAAA,MAAA,GAA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AAA,GAAA,GAAA,CAAA;AAAA,KACA,CAAA;AAEA,IAAA,MAAA,UAAA,GAAA,CAAA,IAAA,KAAA;AACA,MAAA,IAAA,GAAA,CAAA;AACA,MAAA,IAAA,SAAA,YAAA,EAAA;AACA,QAAA,GAAA,GAAA,cAAA,CAAA,KAAA,CAAA;AAAA,OACA,MAAA,IAAA,SAAA,YAAA,EAAA;AACA,QAAA,GAAA,GAAA,cAAA,CAAA,KAAA,CAAA;AAAA,OACA,MAAA,IAAA,SAAA,WAAA,EAAA;AACA,QAAA,GAAA,GAAA,aAAA,CAAA,KAAA,CAAA;AAAA,OACA,MAAA,IAAA,SAAA,WAAA,EAAA;AACA,QAAA,GAAA,GAAA,aAAA,CAAA,KAAA,CAAA;AAAA,OACA,MAAA;AACA,QAAA,GAAA,GAAA,GAAA,CAAA;AAAA,OACA;AAEA,MAAA,IAAA,GAAA,CAAA,MAAA,CAAA,IAAA,CAAA,KAAA,EAAA,KAAA,CAAA;AAAA,QAAA,OAAA;AACA,MAAA,OAAA,CAAA,GAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAEA,IAAA,MAAA,CAAA;AAAA,MAEA,WAAA,EAAA,eAAA;AAAA,MAEA,OAAA;AAAA,MAEA,UAAA;AAAA,MAEA,2BAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"calendar.mjs","sources":["../../../../../../packages/components/calendar/src/calendar.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Calendar from './calendar.vue'\n\nexport type CalendarDateType =\n | 'prev-month'\n | 'next-month'\n | 'prev-year'\n | 'next-year'\n | 'today'\n\nexport const calendarProps = buildProps({\n modelValue: {\n type: Date,\n },\n range: {\n type: definePropType<[Date, Date]>(Array),\n validator: (range: unknown): range is [Date, Date] =>\n Array.isArray(range) &&\n range.length === 2 &&\n range.every((item) => item instanceof Date),\n },\n} as const)\nexport type CalendarProps = ExtractPropTypes<typeof calendarProps>\n\nexport const calendarEmits = {\n [UPDATE_MODEL_EVENT]: (value: Date) => value instanceof Date,\n input: (value: Date) => value instanceof Date,\n}\nexport type CalendarEmits = typeof calendarEmits\n\nexport type CalendarInstance = InstanceType<typeof Calendar>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,IAAI;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,IAAI,YAAY,IAAI,CAAC;AACnH,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,KAAK,YAAY,IAAI;AACxD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,KAAK,YAAY,IAAI;AACzC;;;;"}
|