ep-craft 0.1.36 → 0.1.38
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/components/avatar/EpAvatar.vue.d.ts +20 -0
- package/dist/components/avatar/EpAvatar.vue.js +72 -0
- package/dist/components/avatar/EpAvatar2.vue.js +4 -0
- package/dist/components/avatar/avatar.d.ts +68 -0
- package/dist/components/avatar/avatar.js +59 -0
- package/dist/components/avatar/constants.d.ts +7 -0
- package/dist/components/avatar/constants.js +6 -0
- package/dist/components/avatar/index.d.ts +13 -2
- package/dist/components/avatar/index.js +8 -3
- package/dist/components/avatar/instance.d.ts +2 -0
- package/dist/components/badge/EpBadge.vue.d.ts +28 -0
- package/dist/components/badge/EpBadge.vue.js +75 -0
- package/dist/components/badge/EpBadge2.vue.js +4 -0
- package/dist/components/badge/badge.d.ts +67 -0
- package/dist/components/badge/badge.js +69 -0
- package/dist/components/badge/index.d.ts +11 -2
- package/dist/components/badge/index.js +9 -4
- package/dist/components/badge/instance.d.ts +2 -0
- package/dist/components/calendar/EpCalendar.vue.d.ts +50 -0
- package/dist/components/calendar/EpCalendar.vue.js +154 -0
- package/dist/components/calendar/EpCalendar2.vue.js +4 -0
- package/dist/components/calendar/EpDateTable.vue.d.ts +27 -0
- package/dist/components/calendar/EpDateTable.vue.js +89 -0
- package/dist/components/calendar/EpDateTable2.vue.js +4 -0
- package/dist/components/calendar/EpSelectController.vue.d.ts +8 -0
- package/dist/components/calendar/EpSelectController.vue.js +88 -0
- package/dist/components/calendar/EpSelectController2.vue.js +4 -0
- package/dist/components/calendar/calendar.d.ts +54 -0
- package/dist/components/calendar/calendar.js +45 -0
- package/dist/components/calendar/date-table.d.ts +53 -0
- package/dist/components/calendar/date-table.js +41 -0
- package/dist/components/calendar/index.d.ts +13 -2
- package/dist/components/calendar/index.js +9 -4
- package/dist/components/calendar/instance.d.ts +5 -0
- package/dist/components/calendar/select-controller.d.ts +31 -0
- package/dist/components/calendar/select-controller.js +21 -0
- package/dist/components/calendar/use-calendar.d.ts +13 -0
- package/dist/components/calendar/use-calendar.js +84 -0
- package/dist/components/calendar/use-date-table.d.ts +18 -0
- package/dist/components/calendar/use-date-table.js +99 -0
- package/dist/components/card/EpCard.vue.d.ts +22 -0
- package/dist/components/card/EpCard.vue.js +64 -0
- package/dist/components/card/EpCard2.vue.js +4 -0
- package/dist/components/card/card.d.ts +51 -0
- package/dist/components/card/card.js +49 -0
- package/dist/components/card/index.d.ts +11 -2
- package/dist/components/card/index.js +5 -4
- package/dist/components/card/instance.d.ts +2 -0
- package/dist/components/carousel/EpCarousel.vue.d.ts +1 -1
- package/dist/components/cascader/EpCascader.vue.d.ts +4 -4
- package/dist/components/config-provider/index.js +5 -4
- package/dist/components/config-provider/src/config-provider-props.d.ts +3 -6
- package/dist/components/config-provider/src/config-provider-props.js +1 -1
- package/dist/components/config-provider/src/hooks/use-global-config.js +75 -47
- package/dist/components/countdown/EpCountdown.vue.d.ts +28 -0
- package/dist/components/countdown/EpCountdown.vue.js +71 -0
- package/dist/components/countdown/EpCountdown2.vue.js +4 -0
- package/dist/components/countdown/countdown.d.ts +48 -0
- package/dist/components/countdown/countdown.js +50 -0
- package/dist/components/countdown/index.d.ts +11 -2
- package/dist/components/countdown/index.js +9 -4
- package/dist/components/countdown/instance.d.ts +2 -0
- package/dist/components/countdown/utils.d.ts +3 -0
- package/dist/components/countdown/utils.js +40 -0
- package/dist/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/dist/components/date-picker-panel/src/date-picker-panel.d.ts +1 -1
- package/dist/components/dialog/EpDialog.vue.d.ts +61 -0
- package/dist/components/dialog/EpDialog.vue.js +214 -0
- package/dist/components/dialog/EpDialog2.vue.js +4 -0
- package/dist/components/dialog/EpDialogContent.vue.d.ts +31 -0
- package/dist/components/dialog/EpDialogContent.vue.js +108 -0
- package/dist/components/dialog/EpDialogContent2.vue.js +4 -0
- package/dist/components/dialog/constants.d.ts +12 -0
- package/dist/components/dialog/constants.js +5 -0
- package/dist/components/dialog/dialog-content.d.ts +84 -0
- package/dist/components/dialog/dialog-content.js +90 -0
- package/dist/components/dialog/dialog.d.ts +173 -0
- package/dist/components/dialog/dialog.js +156 -0
- package/dist/components/dialog/index.d.ts +20 -2
- package/dist/components/dialog/index.js +24 -4
- package/dist/components/dialog/instance.d.ts +2 -0
- package/dist/components/dialog/use-dialog.d.ts +35 -0
- package/dist/components/dialog/use-dialog.js +176 -0
- package/dist/components/drawer/EpDrawer.vue.d.ts +67 -0
- package/dist/components/drawer/EpDrawer.vue.js +234 -0
- package/dist/components/drawer/EpDrawer2.vue.js +4 -0
- package/dist/components/drawer/drawer.d.ts +105 -0
- package/dist/components/drawer/drawer.js +42 -0
- package/dist/components/drawer/index.d.ts +14 -2
- package/dist/components/drawer/index.js +9 -4
- package/dist/components/drawer/instance.d.ts +2 -0
- package/dist/components/drawer/useResizable.d.ts +7 -0
- package/dist/components/drawer/useResizable.js +50 -0
- package/dist/components/empty/EpEmpty.vue.d.ts +20 -0
- package/dist/components/empty/EpEmpty.vue.js +62 -0
- package/dist/components/empty/EpEmpty2.vue.js +4 -0
- package/dist/components/empty/empty.d.ts +27 -0
- package/dist/components/empty/empty.js +26 -0
- package/dist/components/empty/img-empty.vue.d.ts +2 -0
- package/dist/components/empty/img-empty.vue.js +141 -0
- package/dist/components/empty/img-empty2.vue.js +4 -0
- package/dist/components/empty/index.d.ts +11 -2
- package/dist/components/empty/index.js +9 -4
- package/dist/components/empty/instance.d.ts +2 -0
- package/dist/components/form/index.js +11 -9
- package/dist/components/form/src/form-item.js +5 -5
- package/dist/components/form/src/form.js +5 -6
- package/dist/components/form-item/index.js +6 -5
- package/dist/components/infinite-scroll/index.d.ts +26 -0
- package/dist/components/infinite-scroll/index.js +15 -0
- package/dist/components/infinite-scroll/src/index.d.ts +20 -0
- package/dist/components/infinite-scroll/src/index.js +109 -0
- package/dist/components/link/EpLink.vue.d.ts +24 -0
- package/dist/components/link/EpLink.vue.js +86 -0
- package/dist/components/link/EpLink2.vue.js +4 -0
- package/dist/components/link/index.d.ts +11 -2
- package/dist/components/link/index.js +5 -3
- package/dist/components/link/instance.d.ts +2 -0
- package/dist/components/link/link.d.ts +56 -0
- package/dist/components/link/link.js +51 -0
- package/dist/components/loading/index.d.ts +15 -0
- package/dist/components/loading/index.js +13 -0
- package/dist/components/loading/src/directive.d.ts +13 -0
- package/dist/components/loading/src/directive.js +62 -0
- package/dist/components/loading/src/loading.d.ts +34 -0
- package/dist/components/loading/src/loading.js +121 -0
- package/dist/components/loading/src/service.d.ts +8 -0
- package/dist/components/loading/src/service.js +67 -0
- package/dist/components/loading/src/types.d.ts +47 -0
- package/dist/components/message/index.d.ts +3 -0
- package/dist/components/message/index.js +18 -0
- package/dist/components/message/src/instance.d.ts +18 -0
- package/dist/components/message/src/instance.js +18 -0
- package/dist/components/message/src/message.d.ts +175 -0
- package/dist/components/message/src/message.js +160 -0
- package/dist/components/message/src/message.vue.d.ts +38 -0
- package/dist/components/message/src/message.vue.js +156 -0
- package/dist/components/message/src/message2.vue.js +4 -0
- package/dist/components/message/src/method.d.ts +5 -0
- package/dist/components/message/src/method.js +123 -0
- package/dist/components/message-box/index.d.ts +6 -0
- package/dist/components/message-box/index.js +9 -0
- package/dist/components/message-box/src/index.vue.d.ts +5517 -0
- package/dist/components/message-box/src/index.vue.js +203 -0
- package/dist/components/message-box/src/index2.vue.js +237 -0
- package/dist/components/message-box/src/message-box.type.d.ts +167 -0
- package/dist/components/message-box/src/messageBox.d.ts +3 -0
- package/dist/components/message-box/src/messageBox.js +102 -0
- package/dist/components/notification/index.d.ts +3 -0
- package/dist/components/notification/index.js +15 -0
- package/dist/components/notification/src/notification.d.ts +157 -0
- package/dist/components/notification/src/notification.js +127 -0
- package/dist/components/notification/src/notification.vue.d.ts +34 -0
- package/dist/components/notification/src/notification.vue.js +146 -0
- package/dist/components/notification/src/notification2.vue.js +4 -0
- package/dist/components/notification/src/notify.d.ts +15 -0
- package/dist/components/notification/src/notify.js +100 -0
- package/dist/components/option/index.js +3 -3
- package/dist/components/overlay/index.d.ts +8 -0
- package/dist/components/overlay/overlay.d.ts +73 -0
- package/dist/components/overlay/overlay.js +80 -0
- package/dist/components/page-header/EpPageHeader.vue.d.ts +30 -0
- package/dist/components/page-header/EpPageHeader.vue.js +109 -0
- package/dist/components/page-header/EpPageHeader2.vue.js +4 -0
- package/dist/components/page-header/index.d.ts +13 -2
- package/dist/components/page-header/index.js +9 -4
- package/dist/components/page-header/instance.d.ts +2 -0
- package/dist/components/page-header/page-header.d.ts +26 -0
- package/dist/components/page-header/page-header.js +33 -0
- package/dist/components/popconfirm/EpPopconfirm.vue.d.ts +36 -0
- package/dist/components/popconfirm/EpPopconfirm.vue.js +146 -0
- package/dist/components/popconfirm/EpPopconfirm2.vue.js +4 -0
- package/dist/components/popconfirm/index.d.ts +14 -2
- package/dist/components/popconfirm/index.js +9 -4
- package/dist/components/popconfirm/instance.d.ts +2 -0
- package/dist/components/popconfirm/popconfirm.d.ts +106 -0
- package/dist/components/popconfirm/popconfirm.js +103 -0
- package/dist/components/progress/src/progress.vue.d.ts +1 -1
- package/dist/components/result/EpResult.vue.d.ts +23 -0
- package/dist/components/result/EpResult.vue.js +71 -0
- package/dist/components/result/EpResult2.vue.js +4 -0
- package/dist/components/result/index.d.ts +11 -2
- package/dist/components/result/index.js +10 -4
- package/dist/components/result/instance.d.ts +2 -0
- package/dist/components/result/result.d.ts +35 -0
- package/dist/components/result/result.js +47 -0
- package/dist/components/select/index.d.ts +21 -21
- package/dist/components/select/select.vue.d.ts +7 -7
- package/dist/components/select/select2.vue.js +12 -12
- package/dist/components/select/src/option.vue.js +5 -5
- package/dist/components/select-v2/src/select.vue.d.ts +8 -8
- package/dist/components/space/index.d.ts +15 -2
- package/dist/components/space/index.js +23 -4
- package/dist/components/space/instance.d.ts +2 -0
- package/dist/components/space/item.d.ts +29 -0
- package/dist/components/space/item.js +30 -0
- package/dist/components/space/space.d.ts +92 -0
- package/dist/components/space/space.js +182 -0
- package/dist/components/space/use-space.d.ts +7 -0
- package/dist/components/space/use-space.js +47 -0
- package/dist/components/statistic/EpStatistic.vue.d.ts +28 -0
- package/dist/components/statistic/EpStatistic.vue.js +82 -0
- package/dist/components/statistic/EpStatistic2.vue.js +4 -0
- package/dist/components/statistic/index.d.ts +11 -2
- package/dist/components/statistic/index.js +8 -4
- package/dist/components/statistic/instance.d.ts +2 -0
- package/dist/components/statistic/statistic.d.ts +58 -0
- package/dist/components/statistic/statistic.js +59 -0
- package/dist/components/table-v2/index.d.ts +21 -2
- package/dist/components/table-v2/index.js +11 -4
- package/dist/components/table-v2/src/EpTableV2.d.ts +359 -0
- package/dist/components/table-v2/src/EpTableV2.js +287 -0
- package/dist/components/table-v2/src/cell.d.ts +27 -0
- package/dist/components/table-v2/src/common.d.ts +42 -0
- package/dist/components/table-v2/src/common.js +38 -0
- package/dist/components/table-v2/src/components/cell.d.ts +4 -0
- package/dist/components/table-v2/src/components/cell.js +20 -0
- package/dist/components/table-v2/src/components/expand-icon.d.ts +15 -0
- package/dist/components/table-v2/src/components/expand-icon.js +30 -0
- package/dist/components/table-v2/src/components/header-cell.d.ts +4 -0
- package/dist/components/table-v2/src/components/header-cell.js +15 -0
- package/dist/components/table-v2/src/components/header-row.d.ts +59 -0
- package/dist/components/table-v2/src/components/header-row.js +41 -0
- package/dist/components/table-v2/src/components/header.d.ts +105 -0
- package/dist/components/table-v2/src/components/header.js +98 -0
- package/dist/components/table-v2/src/components/index.d.ts +11 -0
- package/dist/components/table-v2/src/components/row.d.ts +166 -0
- package/dist/components/table-v2/src/components/row.js +176 -0
- package/dist/components/table-v2/src/components/sort-icon.d.ts +9 -0
- package/dist/components/table-v2/src/components/sort-icon.js +21 -0
- package/dist/components/table-v2/src/composables/index.d.ts +11 -0
- package/dist/components/table-v2/src/composables/use-columns.d.ts +128 -0
- package/dist/components/table-v2/src/composables/use-columns.js +73 -0
- package/dist/components/table-v2/src/composables/use-data.d.ts +14 -0
- package/dist/components/table-v2/src/composables/use-data.js +33 -0
- package/dist/components/table-v2/src/composables/use-row.d.ts +31 -0
- package/dist/components/table-v2/src/composables/use-row.js +83 -0
- package/dist/components/table-v2/src/composables/use-scrollbar.d.ts +31 -0
- package/dist/components/table-v2/src/composables/use-scrollbar.js +53 -0
- package/dist/components/table-v2/src/composables/use-styles.d.ts +23 -0
- package/dist/components/table-v2/src/composables/use-styles.js +66 -0
- package/dist/components/table-v2/src/composables/utils.d.ts +3 -0
- package/dist/components/table-v2/src/composables/utils.js +19 -0
- package/dist/components/table-v2/src/constants.d.ts +18 -0
- package/dist/components/table-v2/src/constants.js +12 -0
- package/dist/components/table-v2/src/grid.d.ts +105 -0
- package/dist/components/table-v2/src/grid.js +56 -0
- package/dist/components/table-v2/src/header-cell.d.ts +13 -0
- package/dist/components/table-v2/src/header-row.d.ts +26 -0
- package/dist/components/table-v2/src/header-row.js +20 -0
- package/dist/components/table-v2/src/header.d.ts +44 -0
- package/dist/components/table-v2/src/header.js +35 -0
- package/dist/components/table-v2/src/private.d.ts +1 -0
- package/dist/components/table-v2/src/private.js +4 -0
- package/dist/components/table-v2/src/renderers/cell.d.ts +11 -0
- package/dist/components/table-v2/src/renderers/cell.js +101 -0
- package/dist/components/table-v2/src/renderers/empty.d.ts +7 -0
- package/dist/components/table-v2/src/renderers/empty.js +15 -0
- package/dist/components/table-v2/src/renderers/footer.d.ts +7 -0
- package/dist/components/table-v2/src/renderers/footer.js +14 -0
- package/dist/components/table-v2/src/renderers/header-cell.d.ts +14 -0
- package/dist/components/table-v2/src/renderers/header-cell.js +77 -0
- package/dist/components/table-v2/src/renderers/header.d.ts +9 -0
- package/dist/components/table-v2/src/renderers/header.js +53 -0
- package/dist/components/table-v2/src/renderers/left-table.d.ts +8 -0
- package/dist/components/table-v2/src/renderers/left-table.js +22 -0
- package/dist/components/table-v2/src/renderers/main-table.d.ts +8 -0
- package/dist/components/table-v2/src/renderers/main-table.js +21 -0
- package/dist/components/table-v2/src/renderers/overlay.d.ts +3 -0
- package/dist/components/table-v2/src/renderers/overlay.js +14 -0
- package/dist/components/table-v2/src/renderers/right-table.d.ts +8 -0
- package/dist/components/table-v2/src/renderers/right-table.js +22 -0
- package/dist/components/table-v2/src/renderers/row.d.ts +11 -0
- package/dist/components/table-v2/src/renderers/row.js +98 -0
- package/dist/components/table-v2/src/row.d.ts +101 -0
- package/dist/components/table-v2/src/row.js +53 -0
- package/dist/components/table-v2/src/table-grid.d.ts +236 -0
- package/dist/components/table-v2/src/table-grid.js +240 -0
- package/dist/components/table-v2/src/table.d.ts +194 -0
- package/dist/components/table-v2/src/table.js +134 -0
- package/dist/components/table-v2/src/tokens.d.ts +9 -0
- package/dist/components/table-v2/src/tokens.js +5 -0
- package/dist/components/table-v2/src/types.d.ts +99 -0
- package/dist/components/table-v2/src/use-table.d.ts +98 -0
- package/dist/components/table-v2/src/use-table.js +162 -0
- package/dist/components/table-v2/src/utils.d.ts +8 -0
- package/dist/components/table-v2/src/utils.js +15 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
- package/dist/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
- package/dist/components/tour/EpTour.vue.d.ts +1 -1
- package/dist/components/tree-select/src/tree-select.vue.d.ts +10 -10
- package/dist/components/tree-v2/EpTreeNode.vue.d.ts +17 -0
- package/dist/components/tree-v2/EpTreeNode.vue.js +127 -0
- package/dist/components/tree-v2/EpTreeNode2.vue.js +4 -0
- package/dist/components/tree-v2/EpTreeV2.vue.d.ts +61 -0
- package/dist/components/tree-v2/EpTreeV2.vue.js +168 -0
- package/dist/components/tree-v2/EpTreeV22.vue.js +4 -0
- package/dist/components/tree-v2/composables/useCheck.d.ts +15 -0
- package/dist/components/tree-v2/composables/useCheck.js +142 -0
- package/dist/components/tree-v2/composables/useFilter.d.ts +8 -0
- package/dist/components/tree-v2/composables/useFilter.js +50 -0
- package/dist/components/tree-v2/composables/useTree.d.ts +404 -0
- package/dist/components/tree-v2/composables/useTree.js +228 -0
- package/dist/components/tree-v2/index.d.ts +11 -2
- package/dist/components/tree-v2/index.js +5 -2
- package/dist/components/tree-v2/instance.d.ts +2 -0
- package/dist/components/tree-v2/tree-node-content.d.ts +20 -0
- package/dist/components/tree-v2/tree-node-content.js +33 -0
- package/dist/components/tree-v2/types.d.ts +97 -0
- package/dist/components/tree-v2/virtual-tree.d.ts +122 -0
- package/dist/components/tree-v2/virtual-tree.js +140 -0
- package/dist/components/virtual-list/src/builders/build-grid.d.ts +211 -0
- package/dist/components/virtual-list/src/builders/build-grid.js +449 -0
- package/dist/components/virtual-list/src/components/dynamic-size-grid.d.ts +212 -0
- package/dist/components/virtual-list/src/components/dynamic-size-grid.js +200 -0
- package/dist/components/virtual-list/src/components/fixed-size-grid.d.ts +199 -0
- package/dist/components/virtual-list/src/components/fixed-size-grid.js +126 -0
- package/dist/components/virtual-list/src/hooks/use-grid-touch.d.ts +8 -0
- package/dist/components/virtual-list/src/hooks/use-grid-touch.js +40 -0
- package/dist/components/virtual-list/src/hooks/use-grid-wheel.d.ts +13 -0
- package/dist/components/virtual-list/src/hooks/use-grid-wheel.js +30 -0
- package/dist/components/virtual-list/src/props.js +16 -17
- package/dist/components/virtual-list/src/utils.js +14 -13
- package/dist/components/watermark/EpWatermark.vue.d.ts +18 -0
- package/dist/components/watermark/EpWatermark.vue.js +174 -0
- package/dist/components/watermark/EpWatermark2.vue.js +4 -0
- package/dist/components/watermark/index.d.ts +13 -2
- package/dist/components/watermark/index.js +8 -4
- package/dist/components/watermark/instance.d.ts +2 -0
- package/dist/components/watermark/useClips.d.ts +6 -0
- package/dist/components/watermark/useClips.js +91 -0
- package/dist/components/watermark/utils.d.ts +8 -0
- package/dist/components/watermark/utils.js +21 -0
- package/dist/components/watermark/watermark.d.ts +71 -0
- package/dist/components/watermark/watermark.js +60 -0
- package/dist/constants/date.js +9 -0
- package/dist/directives/index.d.ts +11 -0
- package/dist/directives/index.js +25 -0
- package/dist/directives/trap-focus/index.js +40 -0
- package/dist/ep-craft.js +410 -373
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/use-draggable/index.d.ts +6 -0
- package/dist/hooks/use-draggable/index.js +51 -0
- package/dist/hooks/use-locale/index.js +12 -12
- package/dist/hooks/use-namespace/index.js +23 -23
- package/dist/hooks/use-same-target/index.d.ts +5 -0
- package/dist/hooks/use-same-target/index.js +20 -0
- package/dist/hooks/use-z-index/index.js +15 -15
- package/dist/index.d.ts +32 -2
- package/dist/utils/dom/aria.js +16 -12
- package/dist/utils/vue/icon.js +10 -6
- package/dist/utils/vue/install.js +23 -20
- package/dist/utils/vue/vnode.js +32 -22
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +34 -1
- package/package.json +1 -1
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { defineComponent as U, useSlots as j, computed as k, ref as v, openBlock as r, createBlock as G, Teleport as J, createVNode as s, Transition as K, unref as e, withCtx as p, withDirectives as Q, createElementVNode as h, mergeProps as W, withModifiers as X, normalizeClass as a, createElementBlock as i, renderSlot as f, toDisplayString as Y, createCommentVNode as n, normalizeStyle as Z, vShow as _, mergeDefaults as ee } from "vue";
|
|
2
|
+
import { Close as oe } from "@element-plus/icons-vue";
|
|
3
|
+
import { EpOverlay as te } from "../overlay/overlay.js";
|
|
4
|
+
import { EpFocusTrap as ae } from "../focus-trap/index.js";
|
|
5
|
+
import "../dialog/index.js";
|
|
6
|
+
import { EpIcon as le } from "../icon/index.js";
|
|
7
|
+
import { useNamespace as re } from "../../hooks/use-namespace/index.js";
|
|
8
|
+
import "@vue/shared";
|
|
9
|
+
import "lodash-unified";
|
|
10
|
+
import "@vueuse/core";
|
|
11
|
+
import { useLocale as se } from "../../hooks/use-locale/index.js";
|
|
12
|
+
import "../../hooks/use-size/index.js";
|
|
13
|
+
import { useDeprecated as ie } from "../../hooks/use-deprecated/index.js";
|
|
14
|
+
import "@popperjs/core";
|
|
15
|
+
import "../../hooks/use-z-index/index.js";
|
|
16
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
17
|
+
import "../../hooks/use-aria/index.js";
|
|
18
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
19
|
+
import "../../hooks/use-empty-values/index.js";
|
|
20
|
+
import { drawerEmits as ne } from "./drawer.js";
|
|
21
|
+
import { useResizable as de } from "./useResizable.js";
|
|
22
|
+
import { useDialog as ce } from "../dialog/use-dialog.js";
|
|
23
|
+
import { dialogPropsDefaults as me } from "../dialog/dialog.js";
|
|
24
|
+
const pe = ["aria-label", "aria-labelledby", "aria-describedby"], fe = ["id", "aria-level"], ue = ["aria-label"], ye = ["id"], Ve = /* @__PURE__ */ U({
|
|
25
|
+
name: "EpDrawer",
|
|
26
|
+
inheritAttrs: !1,
|
|
27
|
+
__name: "EpDrawer",
|
|
28
|
+
props: /* @__PURE__ */ ee({
|
|
29
|
+
direction: {},
|
|
30
|
+
resizable: { type: Boolean },
|
|
31
|
+
size: {},
|
|
32
|
+
withHeader: { type: Boolean },
|
|
33
|
+
modalFade: { type: Boolean },
|
|
34
|
+
headerAriaLevel: {},
|
|
35
|
+
appendToBody: { type: Boolean },
|
|
36
|
+
appendTo: {},
|
|
37
|
+
beforeClose: { type: Function },
|
|
38
|
+
destroyOnClose: { type: Boolean },
|
|
39
|
+
closeOnClickModal: { type: Boolean },
|
|
40
|
+
closeOnPressEscape: { type: Boolean },
|
|
41
|
+
lockScroll: { type: Boolean },
|
|
42
|
+
modal: { type: Boolean },
|
|
43
|
+
modalPenetrable: { type: Boolean },
|
|
44
|
+
openDelay: {},
|
|
45
|
+
closeDelay: {},
|
|
46
|
+
top: {},
|
|
47
|
+
modelValue: { type: Boolean },
|
|
48
|
+
modalClass: {},
|
|
49
|
+
width: {},
|
|
50
|
+
zIndex: {},
|
|
51
|
+
trapFocus: { type: Boolean },
|
|
52
|
+
transition: {},
|
|
53
|
+
center: { type: Boolean },
|
|
54
|
+
alignCenter: { type: Boolean },
|
|
55
|
+
closeIcon: {},
|
|
56
|
+
draggable: { type: Boolean },
|
|
57
|
+
overflow: { type: Boolean },
|
|
58
|
+
fullscreen: { type: Boolean },
|
|
59
|
+
headerClass: {},
|
|
60
|
+
bodyClass: {},
|
|
61
|
+
footerClass: {},
|
|
62
|
+
showClose: { type: Boolean },
|
|
63
|
+
title: {},
|
|
64
|
+
ariaLevel: {}
|
|
65
|
+
}, {
|
|
66
|
+
...me,
|
|
67
|
+
direction: "rtl",
|
|
68
|
+
size: "30%",
|
|
69
|
+
withHeader: !0,
|
|
70
|
+
modalFade: !0,
|
|
71
|
+
headerAriaLevel: "2"
|
|
72
|
+
}),
|
|
73
|
+
emits: ne,
|
|
74
|
+
setup(o, { expose: z, emit: R }) {
|
|
75
|
+
const d = o, A = R, F = j();
|
|
76
|
+
ie(
|
|
77
|
+
{
|
|
78
|
+
scope: "el-drawer",
|
|
79
|
+
from: "the title slot",
|
|
80
|
+
replacement: "the header slot",
|
|
81
|
+
version: "3.0.0",
|
|
82
|
+
ref: "https://element-plus.org/en-US/component/drawer.html#slots"
|
|
83
|
+
},
|
|
84
|
+
k(() => !!F.title)
|
|
85
|
+
);
|
|
86
|
+
const u = v(), C = v(), B = v(), t = re("drawer"), { t: E } = se(), {
|
|
87
|
+
afterEnter: L,
|
|
88
|
+
afterLeave: D,
|
|
89
|
+
beforeLeave: T,
|
|
90
|
+
visible: y,
|
|
91
|
+
rendered: S,
|
|
92
|
+
titleId: b,
|
|
93
|
+
bodyId: w,
|
|
94
|
+
zIndex: g,
|
|
95
|
+
onModalClick: I,
|
|
96
|
+
onOpenAutoFocus: P,
|
|
97
|
+
onCloseAutoFocus: $,
|
|
98
|
+
onFocusoutPrevented: O,
|
|
99
|
+
onCloseRequested: H,
|
|
100
|
+
handleClose: c
|
|
101
|
+
} = ce(d, u), { isHorizontal: N, size: V, isResizing: q } = de(d, B, A), x = k(() => d.modalPenetrable && !d.modal);
|
|
102
|
+
return z({
|
|
103
|
+
handleClose: c
|
|
104
|
+
}), (l, m) => (r(), G(J, {
|
|
105
|
+
to: o.appendTo,
|
|
106
|
+
disabled: o.appendTo !== "body" ? !1 : !o.appendToBody
|
|
107
|
+
}, [
|
|
108
|
+
s(K, {
|
|
109
|
+
name: e(t).b("fade"),
|
|
110
|
+
onAfterEnter: e(L),
|
|
111
|
+
onAfterLeave: e(D),
|
|
112
|
+
onBeforeLeave: e(T)
|
|
113
|
+
}, {
|
|
114
|
+
default: p(() => [
|
|
115
|
+
Q(s(e(te), {
|
|
116
|
+
mask: o.modal,
|
|
117
|
+
"overlay-class": [
|
|
118
|
+
e(t).is("drawer"),
|
|
119
|
+
o.modalClass ?? "",
|
|
120
|
+
`${e(t).namespace.value}-modal-drawer`,
|
|
121
|
+
e(t).is("penetrable", x.value)
|
|
122
|
+
],
|
|
123
|
+
"z-index": e(g),
|
|
124
|
+
onClick: e(I)
|
|
125
|
+
}, {
|
|
126
|
+
default: p(() => [
|
|
127
|
+
s(e(ae), {
|
|
128
|
+
loop: "",
|
|
129
|
+
trapped: e(y),
|
|
130
|
+
"focus-trap-el": u.value,
|
|
131
|
+
"focus-start-el": C.value,
|
|
132
|
+
onFocusAfterTrapped: e(P),
|
|
133
|
+
onFocusAfterReleased: e($),
|
|
134
|
+
onFocusoutPrevented: e(O),
|
|
135
|
+
onReleaseRequested: e(H)
|
|
136
|
+
}, {
|
|
137
|
+
default: p(() => [
|
|
138
|
+
h("div", W({
|
|
139
|
+
ref_key: "drawerRef",
|
|
140
|
+
ref: u,
|
|
141
|
+
"aria-modal": "true",
|
|
142
|
+
"aria-label": o.title || void 0,
|
|
143
|
+
"aria-labelledby": o.title ? void 0 : e(b),
|
|
144
|
+
"aria-describedby": e(w)
|
|
145
|
+
}, l.$attrs, {
|
|
146
|
+
class: [
|
|
147
|
+
e(t).b(),
|
|
148
|
+
o.direction,
|
|
149
|
+
e(y) && "open",
|
|
150
|
+
e(t).is("dragging", e(q))
|
|
151
|
+
],
|
|
152
|
+
style: { [e(N) ? "width" : "height"]: e(V) },
|
|
153
|
+
role: "dialog",
|
|
154
|
+
onClick: m[1] || (m[1] = X(() => {
|
|
155
|
+
}, ["stop"]))
|
|
156
|
+
}), [
|
|
157
|
+
h("span", {
|
|
158
|
+
ref_key: "focusStartRef",
|
|
159
|
+
ref: C,
|
|
160
|
+
class: a(e(t).e("sr-focus")),
|
|
161
|
+
tabindex: "-1"
|
|
162
|
+
}, null, 2),
|
|
163
|
+
o.withHeader ? (r(), i("header", {
|
|
164
|
+
key: 0,
|
|
165
|
+
class: a([e(t).e("header"), o.headerClass])
|
|
166
|
+
}, [
|
|
167
|
+
l.$slots.title ? f(l.$slots, "title", {}, void 0, void 0, 1) : f(l.$slots, "header", {
|
|
168
|
+
close: e(c),
|
|
169
|
+
titleId: e(b),
|
|
170
|
+
titleClass: e(t).e("title")
|
|
171
|
+
}, () => [
|
|
172
|
+
h("span", {
|
|
173
|
+
id: e(b),
|
|
174
|
+
role: "heading",
|
|
175
|
+
"aria-level": o.headerAriaLevel,
|
|
176
|
+
class: a(e(t).e("title"))
|
|
177
|
+
}, Y(o.title), 11, fe)
|
|
178
|
+
], void 0, 0),
|
|
179
|
+
o.showClose ? (r(), i("button", {
|
|
180
|
+
key: 2,
|
|
181
|
+
"aria-label": e(E)("el.drawer.close"),
|
|
182
|
+
class: a(e(t).e("close-btn")),
|
|
183
|
+
type: "button",
|
|
184
|
+
onClick: m[0] || (m[0] = //@ts-ignore
|
|
185
|
+
(...M) => e(c) && e(c)(...M))
|
|
186
|
+
}, [
|
|
187
|
+
s(e(le), {
|
|
188
|
+
class: a(e(t).e("close"))
|
|
189
|
+
}, {
|
|
190
|
+
default: p(() => [
|
|
191
|
+
s(e(oe))
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["class"])
|
|
195
|
+
], 10, ue)) : n("", !0)
|
|
196
|
+
], 2)) : n("", !0),
|
|
197
|
+
e(S) ? (r(), i("div", {
|
|
198
|
+
key: 1,
|
|
199
|
+
id: e(w),
|
|
200
|
+
class: a([e(t).e("body"), o.bodyClass])
|
|
201
|
+
}, [
|
|
202
|
+
f(l.$slots, "default")
|
|
203
|
+
], 10, ye)) : n("", !0),
|
|
204
|
+
l.$slots.footer ? (r(), i("div", {
|
|
205
|
+
key: 2,
|
|
206
|
+
class: a([e(t).e("footer"), o.footerClass])
|
|
207
|
+
}, [
|
|
208
|
+
f(l.$slots, "footer")
|
|
209
|
+
], 2)) : n("", !0),
|
|
210
|
+
o.resizable ? (r(), i("div", {
|
|
211
|
+
key: 3,
|
|
212
|
+
ref_key: "draggerRef",
|
|
213
|
+
ref: B,
|
|
214
|
+
style: Z({ zIndex: e(g) }),
|
|
215
|
+
class: a(e(t).e("dragger"))
|
|
216
|
+
}, null, 6)) : n("", !0)
|
|
217
|
+
], 16, pe)
|
|
218
|
+
]),
|
|
219
|
+
_: 3
|
|
220
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
221
|
+
]),
|
|
222
|
+
_: 3
|
|
223
|
+
}, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
|
|
224
|
+
[_, e(y)]
|
|
225
|
+
])
|
|
226
|
+
]),
|
|
227
|
+
_: 3
|
|
228
|
+
}, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
|
|
229
|
+
], 8, ["to", "disabled"]));
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
export {
|
|
233
|
+
Ve as default
|
|
234
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type { DialogProps } from '@element-plus/components/dialog';
|
|
3
|
+
export interface DrawerProps extends DialogProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description Set the direction in which the Drawer opens
|
|
6
|
+
*/
|
|
7
|
+
direction?: 'ltr' | 'rtl' | 'ttb' | 'btt';
|
|
8
|
+
/**
|
|
9
|
+
* @description Whether to enable the resizable function for the drawer
|
|
10
|
+
*/
|
|
11
|
+
resizable?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @description The size of the Drawer form, when using the number type, is measured in pixels. When using the string type, please pass in 'x%'; otherwise, it will be interpreted as the number type
|
|
14
|
+
*/
|
|
15
|
+
size?: string | number;
|
|
16
|
+
/**
|
|
17
|
+
* @description You can remove the title from the drawer, so that your drawer will have more space on the screen. If you want to be visited, you must set the title attribute.
|
|
18
|
+
*/
|
|
19
|
+
withHeader?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @description The fade-in and fade-out animation switch of the mask layer
|
|
22
|
+
*/
|
|
23
|
+
modalFade?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @description Help assistive technologies such as screen readers identify content hierarchies
|
|
26
|
+
*/
|
|
27
|
+
headerAriaLevel?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const drawerProps: {
|
|
30
|
+
readonly direction: import("@element-plus/utils").EpPropFinalized<StringConstructor, "ltr" | "rtl" | "ttb" | "btt", unknown, "rtl", boolean>;
|
|
31
|
+
readonly resizable: BooleanConstructor;
|
|
32
|
+
readonly size: import("@element-plus/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "30%", boolean>;
|
|
33
|
+
readonly withHeader: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
34
|
+
readonly modalFade: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
35
|
+
readonly headerAriaLevel: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "2", boolean>;
|
|
36
|
+
readonly appendToBody: BooleanConstructor;
|
|
37
|
+
readonly appendTo: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown, "body", boolean>;
|
|
38
|
+
readonly beforeClose: {
|
|
39
|
+
readonly type: import("vue").PropType<import("../dialog/dialog").DialogBeforeCloseFn>;
|
|
40
|
+
readonly required: false;
|
|
41
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
42
|
+
__epPropKey: true;
|
|
43
|
+
};
|
|
44
|
+
readonly destroyOnClose: BooleanConstructor;
|
|
45
|
+
readonly closeOnClickModal: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
46
|
+
readonly closeOnPressEscape: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
47
|
+
readonly lockScroll: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
48
|
+
readonly modal: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
49
|
+
readonly modalPenetrable: BooleanConstructor;
|
|
50
|
+
readonly openDelay: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
51
|
+
readonly closeDelay: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
52
|
+
readonly top: {
|
|
53
|
+
readonly type: import("vue").PropType<string>;
|
|
54
|
+
readonly required: false;
|
|
55
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
56
|
+
__epPropKey: true;
|
|
57
|
+
};
|
|
58
|
+
readonly modelValue: BooleanConstructor;
|
|
59
|
+
readonly modalClass: StringConstructor;
|
|
60
|
+
readonly headerClass: StringConstructor;
|
|
61
|
+
readonly bodyClass: StringConstructor;
|
|
62
|
+
readonly footerClass: StringConstructor;
|
|
63
|
+
readonly width: {
|
|
64
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
65
|
+
readonly required: false;
|
|
66
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
67
|
+
__epPropKey: true;
|
|
68
|
+
};
|
|
69
|
+
readonly zIndex: {
|
|
70
|
+
readonly type: import("vue").PropType<number>;
|
|
71
|
+
readonly required: false;
|
|
72
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
73
|
+
__epPropKey: true;
|
|
74
|
+
};
|
|
75
|
+
readonly trapFocus: BooleanConstructor;
|
|
76
|
+
readonly transition: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | import("vue").TransitionProps) | (() => import("../dialog/dialog").DialogTransition) | (((new (...args: any[]) => string | import("vue").TransitionProps) | (() => import("../dialog/dialog").DialogTransition)) | null)[], unknown, unknown, undefined, boolean>;
|
|
77
|
+
readonly center: BooleanConstructor;
|
|
78
|
+
readonly alignCenter: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
79
|
+
readonly closeIcon: {
|
|
80
|
+
readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
|
|
81
|
+
readonly required: false;
|
|
82
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
83
|
+
__epPropKey: true;
|
|
84
|
+
};
|
|
85
|
+
readonly draggable: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
86
|
+
readonly overflow: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
87
|
+
readonly fullscreen: BooleanConstructor;
|
|
88
|
+
readonly showClose: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
89
|
+
readonly title: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
90
|
+
readonly ariaLevel: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "2", boolean>;
|
|
91
|
+
};
|
|
92
|
+
export type DrawerPropsPublic = ExtractPublicPropTypes<typeof drawerProps>;
|
|
93
|
+
export declare const drawerEmits: {
|
|
94
|
+
'resize-start': (evt: MouseEvent, size: number) => boolean;
|
|
95
|
+
resize: (evt: MouseEvent, size: number) => boolean;
|
|
96
|
+
'resize-end': (evt: MouseEvent, size: number) => boolean;
|
|
97
|
+
open: () => boolean;
|
|
98
|
+
opened: () => boolean;
|
|
99
|
+
close: () => boolean;
|
|
100
|
+
closed: () => boolean;
|
|
101
|
+
"update:modelValue": (value: boolean) => boolean;
|
|
102
|
+
openAutoFocus: () => boolean;
|
|
103
|
+
closeAutoFocus: () => boolean;
|
|
104
|
+
};
|
|
105
|
+
export type DrawerEmits = typeof drawerEmits;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import "@element-plus/icons-vue";
|
|
5
|
+
import { buildProps as r } from "../../utils/vue/props/runtime.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
import "../dialog/index.js";
|
|
8
|
+
import { dialogProps as o, dialogEmits as i } from "../dialog/dialog.js";
|
|
9
|
+
r({
|
|
10
|
+
...o,
|
|
11
|
+
direction: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "rtl",
|
|
14
|
+
values: ["ltr", "rtl", "ttb", "btt"]
|
|
15
|
+
},
|
|
16
|
+
resizable: Boolean,
|
|
17
|
+
size: {
|
|
18
|
+
type: [String, Number],
|
|
19
|
+
default: "30%"
|
|
20
|
+
},
|
|
21
|
+
withHeader: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
modalFade: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !0
|
|
28
|
+
},
|
|
29
|
+
headerAriaLevel: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "2"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const f = {
|
|
35
|
+
...i,
|
|
36
|
+
"resize-start": (e, t) => e instanceof MouseEvent && typeof t == "number",
|
|
37
|
+
resize: (e, t) => e instanceof MouseEvent && typeof t == "number",
|
|
38
|
+
"resize-end": (e, t) => e instanceof MouseEvent && typeof t == "number"
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
f as drawerEmits
|
|
42
|
+
};
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpDrawer from './EpDrawer.vue';
|
|
3
|
+
/**
|
|
4
|
+
* drawer 自持 barrel(vendor-batch-6 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 抽屉复用本地 dialog barrel 的 `useDialog` / `dialogProps` /
|
|
7
|
+
* `dialogEmits` / `dialogPropsDefaults`,**不**引用上游 Dialog;遮罩与焦点约束
|
|
8
|
+
* 分别消费内部件 `../overlay` 与本地 `ElFocusTrap`。
|
|
9
|
+
*
|
|
10
|
+
* 不导出 `ElDrawer` 别名。三个尺寸调整事件由 `drawerEmits` 声明。
|
|
11
|
+
*/
|
|
12
|
+
export declare const EpDrawer: typeof _EpDrawer & Plugin;
|
|
4
13
|
export default EpDrawer;
|
|
14
|
+
export { drawerEmits, drawerProps } from './drawer';
|
|
15
|
+
export type { DrawerEmits, DrawerProps, DrawerPropsPublic } from './drawer';
|
|
16
|
+
export type { DrawerInstance } from './instance';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as r } from "../../utils/with-install.js";
|
|
2
|
+
import o from "./EpDrawer.vue.js";
|
|
3
|
+
import { drawerEmits as i } from "./drawer.js";
|
|
4
|
+
const e = r(
|
|
5
|
+
o,
|
|
6
|
+
"ep-drawer"
|
|
7
|
+
);
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
e as EpDrawer,
|
|
10
|
+
i as drawerEmits
|
|
6
11
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Ref, SetupContext } from 'vue';
|
|
2
|
+
import type { DrawerEmits, DrawerProps } from './drawer';
|
|
3
|
+
export declare function useResizable(props: DrawerProps & Required<Pick<DrawerProps, 'direction'>>, target: Ref<HTMLElement | undefined>, emit: SetupContext<DrawerEmits>['emit']): {
|
|
4
|
+
size: import("vue").ComputedRef<string | undefined>;
|
|
5
|
+
isResizing: Ref<boolean, boolean>;
|
|
6
|
+
isHorizontal: import("vue").ComputedRef<boolean>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { computed as u, ref as v, watch as H, onBeforeUnmount as R } from "vue";
|
|
2
|
+
import "@vue/shared";
|
|
3
|
+
import "lodash-unified";
|
|
4
|
+
import { useWindowSize as W, clamp as A, useEventListener as m } from "@vueuse/core";
|
|
5
|
+
import { addUnit as B } from "../../utils/dom/style.js";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
function q(o, g, c) {
|
|
8
|
+
const { width: w, height: h } = W(), a = u(() => ["ltr", "rtl"].includes(o.direction)), S = u(
|
|
9
|
+
() => ["ltr", "ttb"].includes(o.direction) ? 1 : -1
|
|
10
|
+
), p = u(
|
|
11
|
+
() => a.value ? w.value : h.value
|
|
12
|
+
), f = u(() => A(
|
|
13
|
+
s.value + S.value * n.value,
|
|
14
|
+
4,
|
|
15
|
+
p.value
|
|
16
|
+
)), s = v(0), n = v(0), i = v(!1), l = v(!1);
|
|
17
|
+
let r = [], d = [];
|
|
18
|
+
const b = () => {
|
|
19
|
+
var t;
|
|
20
|
+
const e = (t = g.value) == null ? void 0 : t.closest('[aria-modal="true"]');
|
|
21
|
+
return e ? a.value ? e.offsetWidth : e.offsetHeight : 100;
|
|
22
|
+
};
|
|
23
|
+
H(
|
|
24
|
+
() => [o.size, o.resizable],
|
|
25
|
+
() => {
|
|
26
|
+
l.value = !1, s.value = 0, n.value = 0, z();
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
const M = (e) => {
|
|
30
|
+
o.resizable && (l.value || (s.value = b(), l.value = !0), r = [e.pageX, e.pageY], i.value = !0, c("resize-start", e, s.value), d.push(
|
|
31
|
+
m(window, "mouseup", z),
|
|
32
|
+
m(window, "mousemove", E)
|
|
33
|
+
));
|
|
34
|
+
}, E = (e) => {
|
|
35
|
+
const { pageX: t, pageY: X } = e, Y = t - r[0], x = X - r[1];
|
|
36
|
+
n.value = a.value ? Y : x, c("resize", e, f.value);
|
|
37
|
+
}, z = (e) => {
|
|
38
|
+
i.value && (r = [], s.value = f.value, n.value = 0, i.value = !1, d.forEach((t) => t == null ? void 0 : t()), d = [], e && c("resize-end", e, s.value));
|
|
39
|
+
}, U = m(g, "mousedown", M);
|
|
40
|
+
return R(() => {
|
|
41
|
+
U(), z();
|
|
42
|
+
}), {
|
|
43
|
+
size: u(() => l.value ? `${f.value}px` : B(o.size)),
|
|
44
|
+
isResizing: i,
|
|
45
|
+
isHorizontal: a
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
q as useResizable
|
|
50
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EmptyProps } from './empty';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_6: {}, __VLS_8: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
image?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
description?: (props: typeof __VLS_6) => any;
|
|
7
|
+
} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<EmptyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EmptyProps> & Readonly<{}>, {
|
|
11
|
+
description: string;
|
|
12
|
+
image: string;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent as f, computed as p, openBlock as o, createElementBlock as i, normalizeClass as s, unref as m, createElementVNode as l, normalizeStyle as y, renderSlot as a, createVNode as g, toDisplayString as v, createCommentVNode as E } from "vue";
|
|
2
|
+
import { useNamespace as S } from "../../hooks/use-namespace/index.js";
|
|
3
|
+
import "@vue/shared";
|
|
4
|
+
import "lodash-unified";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import { addUnit as $ } from "../../utils/dom/style.js";
|
|
7
|
+
import "@element-plus/icons-vue";
|
|
8
|
+
import { useLocale as k } from "../../hooks/use-locale/index.js";
|
|
9
|
+
import "../../hooks/use-size/index.js";
|
|
10
|
+
import "@popperjs/core";
|
|
11
|
+
import "../../hooks/use-z-index/index.js";
|
|
12
|
+
import "../../hooks/use-delayed-toggle/index.js";
|
|
13
|
+
import "../../hooks/use-aria/index.js";
|
|
14
|
+
import "../../hooks/use-model-toggle/index.js";
|
|
15
|
+
import "../../hooks/use-empty-values/index.js";
|
|
16
|
+
import h from "./img-empty.vue.js";
|
|
17
|
+
const z = ["src"], N = { key: 1 }, J = /* @__PURE__ */ f({
|
|
18
|
+
name: "EpEmpty",
|
|
19
|
+
__name: "EpEmpty",
|
|
20
|
+
props: {
|
|
21
|
+
image: { default: "" },
|
|
22
|
+
imageSize: {},
|
|
23
|
+
description: { default: "" }
|
|
24
|
+
},
|
|
25
|
+
setup(r) {
|
|
26
|
+
const n = r, { t: c } = k(), t = S("empty"), d = p(
|
|
27
|
+
() => n.description || c("el.table.emptyText")
|
|
28
|
+
), u = p(() => ({
|
|
29
|
+
width: $(n.imageSize)
|
|
30
|
+
}));
|
|
31
|
+
return (e, b) => (o(), i("div", {
|
|
32
|
+
class: s(m(t).b())
|
|
33
|
+
}, [
|
|
34
|
+
l("div", {
|
|
35
|
+
class: s(m(t).e("image")),
|
|
36
|
+
style: y(u.value)
|
|
37
|
+
}, [
|
|
38
|
+
r.image ? (o(), i("img", {
|
|
39
|
+
key: 0,
|
|
40
|
+
src: r.image,
|
|
41
|
+
ondragstart: "return false"
|
|
42
|
+
}, null, 8, z)) : a(e.$slots, "image", {}, () => [
|
|
43
|
+
g(h)
|
|
44
|
+
], void 0, 1)
|
|
45
|
+
], 6),
|
|
46
|
+
l("div", {
|
|
47
|
+
class: s(m(t).e("description"))
|
|
48
|
+
}, [
|
|
49
|
+
e.$slots.description ? a(e.$slots, "description", {}, void 0, void 0, 0) : (o(), i("p", N, v(d.value), 1))
|
|
50
|
+
], 2),
|
|
51
|
+
e.$slots.default ? (o(), i("div", {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: s(m(t).e("bottom"))
|
|
54
|
+
}, [
|
|
55
|
+
a(e.$slots, "default")
|
|
56
|
+
], 2)) : E("", !0)
|
|
57
|
+
], 2));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
J as default
|
|
62
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
export interface EmptyProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description image URL of empty
|
|
5
|
+
*/
|
|
6
|
+
image?: string;
|
|
7
|
+
/**
|
|
8
|
+
* @description image size (width) of empty
|
|
9
|
+
*/
|
|
10
|
+
imageSize?: number;
|
|
11
|
+
/**
|
|
12
|
+
* @description description of empty
|
|
13
|
+
*/
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Removed after 3.0.0, Use `EmptyProps` instead.
|
|
18
|
+
*/
|
|
19
|
+
export declare const emptyProps: {
|
|
20
|
+
readonly image: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
21
|
+
readonly imageSize: NumberConstructor;
|
|
22
|
+
readonly description: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Removed after 3.0.0, Use `EmptyProps` instead.
|
|
26
|
+
*/
|
|
27
|
+
export type EmptyPropsPublic = ExtractPublicPropTypes<typeof emptyProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import "@element-plus/icons-vue";
|
|
5
|
+
import { buildProps as i } from "../../utils/vue/props/runtime.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
i({
|
|
8
|
+
/**
|
|
9
|
+
* @description image URL of empty
|
|
10
|
+
*/
|
|
11
|
+
image: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* @description image size (width) of empty
|
|
17
|
+
*/
|
|
18
|
+
imageSize: Number,
|
|
19
|
+
/**
|
|
20
|
+
* @description description of empty
|
|
21
|
+
*/
|
|
22
|
+
description: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
}
|
|
26
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|