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
|
@@ -3,10 +3,10 @@ import "lodash-unified";
|
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import { mutable as b } from "../../../utils/typescript.js";
|
|
5
5
|
import "@element-plus/icons-vue";
|
|
6
|
-
import { buildProp as e, definePropType as t, buildProps as
|
|
6
|
+
import { buildProp as e, definePropType as t, buildProps as i } from "../../../utils/vue/props/runtime.js";
|
|
7
7
|
import "vue";
|
|
8
8
|
import { VERTICAL as f } from "./defaults.js";
|
|
9
|
-
const
|
|
9
|
+
const o = e({
|
|
10
10
|
type: t([Number, Function]),
|
|
11
11
|
required: !0
|
|
12
12
|
}), l = e({
|
|
@@ -28,7 +28,7 @@ const i = e({
|
|
|
28
28
|
type: String,
|
|
29
29
|
values: ["horizontal", "vertical"],
|
|
30
30
|
default: f
|
|
31
|
-
}), d =
|
|
31
|
+
}), d = i({
|
|
32
32
|
className: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: ""
|
|
@@ -75,7 +75,7 @@ const i = e({
|
|
|
75
75
|
default: !0
|
|
76
76
|
},
|
|
77
77
|
scrollbarAlwaysOn: Boolean
|
|
78
|
-
}),
|
|
78
|
+
}), O = i({
|
|
79
79
|
/**
|
|
80
80
|
* @description describes how many items should be pre rendered to the head
|
|
81
81
|
* and the tail of the window
|
|
@@ -91,15 +91,14 @@ const i = e({
|
|
|
91
91
|
* @description describes the total number of the list.
|
|
92
92
|
*/
|
|
93
93
|
total: r,
|
|
94
|
-
itemSize:
|
|
94
|
+
itemSize: o,
|
|
95
95
|
...d
|
|
96
96
|
}), u = {
|
|
97
97
|
type: Number,
|
|
98
98
|
default: 6
|
|
99
|
-
},
|
|
100
|
-
o({
|
|
99
|
+
}, s = { type: Number, default: 0 }, c = { type: Number, default: 2 }, B = i({
|
|
101
100
|
columnCache: a,
|
|
102
|
-
columnWidth:
|
|
101
|
+
columnWidth: o,
|
|
103
102
|
estimatedColumnWidth: l,
|
|
104
103
|
estimatedRowHeight: l,
|
|
105
104
|
initScrollLeft: n,
|
|
@@ -112,17 +111,16 @@ o({
|
|
|
112
111
|
}) => `${y}:${m}`
|
|
113
112
|
},
|
|
114
113
|
rowCache: a,
|
|
115
|
-
rowHeight:
|
|
114
|
+
rowHeight: o,
|
|
116
115
|
totalColumn: r,
|
|
117
116
|
totalRow: r,
|
|
118
117
|
hScrollbarSize: u,
|
|
119
118
|
vScrollbarSize: u,
|
|
120
|
-
scrollbarStartGap:
|
|
121
|
-
scrollbarEndGap:
|
|
119
|
+
scrollbarStartGap: s,
|
|
120
|
+
scrollbarEndGap: c,
|
|
122
121
|
role: String,
|
|
123
122
|
...d
|
|
124
|
-
})
|
|
125
|
-
const B = o({
|
|
123
|
+
}), C = i({
|
|
126
124
|
alwaysOn: Boolean,
|
|
127
125
|
class: String,
|
|
128
126
|
layout: p,
|
|
@@ -140,12 +138,13 @@ const B = o({
|
|
|
140
138
|
required: !0
|
|
141
139
|
},
|
|
142
140
|
scrollbarSize: u,
|
|
143
|
-
startGap:
|
|
144
|
-
endGap:
|
|
141
|
+
startGap: s,
|
|
142
|
+
endGap: c,
|
|
145
143
|
visible: Boolean
|
|
146
144
|
});
|
|
147
145
|
export {
|
|
148
|
-
|
|
146
|
+
B as virtualizedGridProps,
|
|
147
|
+
O as virtualizedListProps,
|
|
149
148
|
d as virtualizedProps,
|
|
150
|
-
|
|
149
|
+
C as virtualizedScrollbarProps
|
|
151
150
|
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { LTR as
|
|
2
|
-
const
|
|
1
|
+
import { LTR as c, RTL as i, HORIZONTAL as d, FORWARD as f, BACKWARD as h, RTL_OFFSET_POS_DESC as u, RTL_OFFSET_NAG as T, RTL_OFFSET_POS_ASC as a } from "./defaults.js";
|
|
2
|
+
const p = (e, t) => e < t ? f : h, L = (e) => e === c || e === i || e === d, m = (e) => e === i;
|
|
3
3
|
let o = null;
|
|
4
|
-
function
|
|
5
|
-
if (o === null ||
|
|
6
|
-
const
|
|
4
|
+
function S(e = !1) {
|
|
5
|
+
if (o === null || e) {
|
|
6
|
+
const t = document.createElement("div"), n = t.style;
|
|
7
7
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
8
8
|
const r = document.createElement("div"), l = r.style;
|
|
9
|
-
return l.width = "100px", l.height = "100px",
|
|
9
|
+
return l.width = "100px", l.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? o = u : (t.scrollLeft = 1, t.scrollLeft === 0 ? o = T : o = a), document.body.removeChild(t), o;
|
|
10
10
|
}
|
|
11
11
|
return o;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const l = {},
|
|
15
|
-
return l[n.size] =
|
|
13
|
+
function y({ move: e, size: t, bar: n }, r) {
|
|
14
|
+
const l = {}, s = `translate${n.axis}(${e}px)`;
|
|
15
|
+
return l[n.size] = t, l.transform = s, r === "horizontal" ? l.height = "100%" : l.width = "100%", l;
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
S as getRTLOffsetType,
|
|
19
|
+
p as getScrollDir,
|
|
20
|
+
L as isHorizontal,
|
|
21
|
+
m as isRTL,
|
|
22
|
+
y as renderThumbStyle
|
|
22
23
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WatermarkProps } from './watermark';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<WatermarkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WatermarkProps> & Readonly<{}>, {
|
|
7
|
+
content: string | string[];
|
|
8
|
+
rotate: number;
|
|
9
|
+
zIndex: number;
|
|
10
|
+
gap: [number, number];
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { defineComponent as q, computed as a, shallowRef as C, ref as J, onMounted as K, watch as Q, onBeforeUnmount as V, openBlock as Z, createElementBlock as tt, normalizeStyle as et, renderSlot as ot } from "vue";
|
|
2
|
+
import { useMutationObserver as nt } from "@vueuse/core";
|
|
3
|
+
import { isUndefined as at } from "../../utils/types.js";
|
|
4
|
+
import "lodash-unified";
|
|
5
|
+
import { isArray as rt } from "@vue/shared";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import { reRendering as lt, getPixelRatio as st, getStyleStr as it } from "./utils.js";
|
|
8
|
+
import ct from "./useClips.js";
|
|
9
|
+
const kt = /* @__PURE__ */ q({
|
|
10
|
+
name: "EpWatermark",
|
|
11
|
+
__name: "EpWatermark",
|
|
12
|
+
props: {
|
|
13
|
+
zIndex: { default: 9 },
|
|
14
|
+
rotate: { default: -22 },
|
|
15
|
+
width: {},
|
|
16
|
+
height: {},
|
|
17
|
+
image: {},
|
|
18
|
+
content: { default: "Element Plus" },
|
|
19
|
+
font: {},
|
|
20
|
+
gap: { default: () => [100, 100] },
|
|
21
|
+
offset: {}
|
|
22
|
+
},
|
|
23
|
+
setup(A) {
|
|
24
|
+
const R = {
|
|
25
|
+
position: "relative"
|
|
26
|
+
}, e = A, k = a(() => {
|
|
27
|
+
var t;
|
|
28
|
+
return ((t = e.font) == null ? void 0 : t.fontGap) ?? 3;
|
|
29
|
+
}), I = a(() => {
|
|
30
|
+
var t;
|
|
31
|
+
return ((t = e.font) == null ? void 0 : t.color) ?? "rgba(0,0,0,.15)";
|
|
32
|
+
}), y = a(() => {
|
|
33
|
+
var t;
|
|
34
|
+
return ((t = e.font) == null ? void 0 : t.fontSize) ?? 16;
|
|
35
|
+
}), _ = a(() => {
|
|
36
|
+
var t;
|
|
37
|
+
return ((t = e.font) == null ? void 0 : t.fontWeight) ?? "normal";
|
|
38
|
+
}), P = a(() => {
|
|
39
|
+
var t;
|
|
40
|
+
return ((t = e.font) == null ? void 0 : t.fontStyle) ?? "normal";
|
|
41
|
+
}), b = a(() => {
|
|
42
|
+
var t;
|
|
43
|
+
return ((t = e.font) == null ? void 0 : t.fontFamily) ?? "sans-serif";
|
|
44
|
+
}), T = a(() => {
|
|
45
|
+
var t;
|
|
46
|
+
return ((t = e.font) == null ? void 0 : t.textAlign) ?? "center";
|
|
47
|
+
}), F = a(() => {
|
|
48
|
+
var t;
|
|
49
|
+
return ((t = e.font) == null ? void 0 : t.textBaseline) ?? "hanging";
|
|
50
|
+
}), B = a(() => e.gap[0]), S = a(() => e.gap[1]), M = a(() => B.value / 2), W = a(() => S.value / 2), G = a(() => {
|
|
51
|
+
var t;
|
|
52
|
+
return ((t = e.offset) == null ? void 0 : t[0]) ?? M.value;
|
|
53
|
+
}), H = a(() => {
|
|
54
|
+
var t;
|
|
55
|
+
return ((t = e.offset) == null ? void 0 : t[1]) ?? W.value;
|
|
56
|
+
}), L = () => {
|
|
57
|
+
const t = {
|
|
58
|
+
zIndex: e.zIndex,
|
|
59
|
+
position: "absolute",
|
|
60
|
+
left: 0,
|
|
61
|
+
top: 0,
|
|
62
|
+
width: "100%",
|
|
63
|
+
height: "100%",
|
|
64
|
+
pointerEvents: "none",
|
|
65
|
+
backgroundRepeat: "repeat"
|
|
66
|
+
};
|
|
67
|
+
let o = G.value - M.value, n = H.value - W.value;
|
|
68
|
+
return o > 0 && (t.left = `${o}px`, t.width = `calc(100% - ${o}px)`, o = 0), n > 0 && (t.top = `${n}px`, t.height = `calc(100% - ${n}px)`, n = 0), t.backgroundPosition = `${o}px ${n}px`, t;
|
|
69
|
+
}, f = C(null), l = C(), p = J(!1), w = () => {
|
|
70
|
+
l.value && (l.value.remove(), l.value = void 0);
|
|
71
|
+
}, O = (t, o) => {
|
|
72
|
+
var n;
|
|
73
|
+
f.value && l.value && (p.value = !0, l.value.setAttribute(
|
|
74
|
+
"style",
|
|
75
|
+
it({
|
|
76
|
+
...L(),
|
|
77
|
+
backgroundImage: `url('${t}')`,
|
|
78
|
+
backgroundSize: `${Math.floor(o)}px`
|
|
79
|
+
})
|
|
80
|
+
), (n = f.value) == null || n.append(l.value), setTimeout(() => {
|
|
81
|
+
p.value = !1;
|
|
82
|
+
}));
|
|
83
|
+
}, D = (t) => {
|
|
84
|
+
let o = 120, n = 64, i = 0;
|
|
85
|
+
const { image: d, content: c, width: g, height: v, rotate: h } = e;
|
|
86
|
+
if (!d && t.measureText) {
|
|
87
|
+
t.font = `${Number(y.value)}px ${b.value}`;
|
|
88
|
+
const s = rt(c) ? c : [c];
|
|
89
|
+
let r = 0, u = 0;
|
|
90
|
+
s.forEach((U) => {
|
|
91
|
+
const {
|
|
92
|
+
width: $,
|
|
93
|
+
fontBoundingBoxAscent: z,
|
|
94
|
+
fontBoundingBoxDescent: X,
|
|
95
|
+
actualBoundingBoxAscent: Y,
|
|
96
|
+
actualBoundingBoxDescent: j
|
|
97
|
+
} = t.measureText(U), E = at(z) ? Y + j : z + X;
|
|
98
|
+
$ > r && (r = Math.ceil($)), E > u && (u = Math.ceil(E));
|
|
99
|
+
}), o = r, n = u * s.length + (s.length - 1) * k.value;
|
|
100
|
+
const x = Math.PI / 180 * Number(h);
|
|
101
|
+
i = Math.ceil(Math.abs(Math.sin(x) * n) / 2), o += i;
|
|
102
|
+
}
|
|
103
|
+
return [g ?? o, v ?? n, i];
|
|
104
|
+
}, N = ct(), m = () => {
|
|
105
|
+
const o = document.createElement("canvas").getContext("2d"), n = e.image, i = e.content, d = e.rotate;
|
|
106
|
+
if (o) {
|
|
107
|
+
l.value || (l.value = document.createElement("div"));
|
|
108
|
+
const c = st(), [g, v, h] = D(o), s = (r) => {
|
|
109
|
+
const [u, x] = N(
|
|
110
|
+
r || "",
|
|
111
|
+
d,
|
|
112
|
+
c,
|
|
113
|
+
g,
|
|
114
|
+
v,
|
|
115
|
+
{
|
|
116
|
+
color: I.value,
|
|
117
|
+
fontSize: y.value,
|
|
118
|
+
fontStyle: P.value,
|
|
119
|
+
fontWeight: _.value,
|
|
120
|
+
fontFamily: b.value,
|
|
121
|
+
fontGap: k.value,
|
|
122
|
+
textAlign: T.value,
|
|
123
|
+
textBaseline: F.value
|
|
124
|
+
},
|
|
125
|
+
B.value,
|
|
126
|
+
S.value,
|
|
127
|
+
h
|
|
128
|
+
);
|
|
129
|
+
O(u, x);
|
|
130
|
+
};
|
|
131
|
+
if (n) {
|
|
132
|
+
const r = new Image();
|
|
133
|
+
r.onload = () => {
|
|
134
|
+
s(r);
|
|
135
|
+
}, r.onerror = () => {
|
|
136
|
+
s(i);
|
|
137
|
+
}, r.crossOrigin = "anonymous", r.referrerPolicy = "no-referrer", r.src = n;
|
|
138
|
+
} else
|
|
139
|
+
s(i);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
return K(() => {
|
|
143
|
+
m();
|
|
144
|
+
}), Q(
|
|
145
|
+
() => e,
|
|
146
|
+
() => {
|
|
147
|
+
m();
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
deep: !0,
|
|
151
|
+
flush: "post"
|
|
152
|
+
}
|
|
153
|
+
), V(() => {
|
|
154
|
+
w();
|
|
155
|
+
}), nt(f, (t) => {
|
|
156
|
+
p.value || t.forEach((o) => {
|
|
157
|
+
lt(o, l.value) && (w(), m());
|
|
158
|
+
});
|
|
159
|
+
}, {
|
|
160
|
+
attributes: !0,
|
|
161
|
+
subtree: !0,
|
|
162
|
+
childList: !0
|
|
163
|
+
}), (t, o) => (Z(), tt("div", {
|
|
164
|
+
ref_key: "containerRef",
|
|
165
|
+
ref: f,
|
|
166
|
+
style: et([R])
|
|
167
|
+
}, [
|
|
168
|
+
ot(t.$slots, "default")
|
|
169
|
+
], 4));
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
export {
|
|
173
|
+
kt as default
|
|
174
|
+
};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { Plugin } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import _EpWatermark from './EpWatermark.vue';
|
|
3
|
+
/**
|
|
4
|
+
* watermark 自持 barrel(vendor-batch-6 产出)。
|
|
5
|
+
*
|
|
6
|
+
* 水印主体直接操作 canvas 与 DOM,无其他组件依赖;`font` 的类型
|
|
7
|
+
* `WatermarkFontType` 一并导出,保证公开面与上游一致。
|
|
8
|
+
*
|
|
9
|
+
* 不导出 `ElWatermark` 别名。
|
|
10
|
+
*/
|
|
11
|
+
export declare const EpWatermark: typeof _EpWatermark & Plugin;
|
|
4
12
|
export default EpWatermark;
|
|
13
|
+
export { watermarkProps } from './watermark';
|
|
14
|
+
export type { WatermarkFontType, WatermarkProps, WatermarkPropsPublic, } from './watermark';
|
|
15
|
+
export type { WatermarkInstance } from './instance';
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { withInstall as r } from "../../utils/with-install.js";
|
|
2
|
+
import t from "./EpWatermark.vue.js";
|
|
3
|
+
import "./watermark.js";
|
|
4
|
+
const p = r(
|
|
5
|
+
t,
|
|
6
|
+
"ep-watermark"
|
|
7
|
+
);
|
|
4
8
|
export {
|
|
5
|
-
|
|
9
|
+
p as EpWatermark
|
|
6
10
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WatermarkProps } from './watermark';
|
|
2
|
+
/**
|
|
3
|
+
* Get the clips of text content.
|
|
4
|
+
* This is a lazy hook function since SSR no need this
|
|
5
|
+
*/
|
|
6
|
+
export default function useClips(): (content: NonNullable<WatermarkProps["content"]> | HTMLImageElement, rotate: number, ratio: number, width: number, height: number, font: Required<NonNullable<WatermarkProps["font"]>>, gapX: number, gapY: number, space: number) => [dataURL: string, finalWidth: number, finalHeight: number];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { isArray as V } from "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import "@element-plus/icons-vue";
|
|
5
|
+
import "vue";
|
|
6
|
+
const Z = {
|
|
7
|
+
left: [0, 0.5],
|
|
8
|
+
start: [0, 0.5],
|
|
9
|
+
center: [0.5, 0],
|
|
10
|
+
right: [1, -0.5],
|
|
11
|
+
end: [1, -0.5]
|
|
12
|
+
};
|
|
13
|
+
function R(T, o, p = 1) {
|
|
14
|
+
const t = document.createElement("canvas"), l = t.getContext("2d"), s = T * p, f = o * p;
|
|
15
|
+
return t.setAttribute("width", `${s}px`), t.setAttribute("height", `${f}px`), l.save(), [l, t, s, f];
|
|
16
|
+
}
|
|
17
|
+
function ct() {
|
|
18
|
+
function T(o, p, t, l, s, f, P, Y, _) {
|
|
19
|
+
const [e, F, m, x] = R(
|
|
20
|
+
l,
|
|
21
|
+
s,
|
|
22
|
+
t
|
|
23
|
+
);
|
|
24
|
+
let w = 0;
|
|
25
|
+
if (o instanceof HTMLImageElement)
|
|
26
|
+
e.drawImage(o, 0, 0, m, x);
|
|
27
|
+
else {
|
|
28
|
+
const {
|
|
29
|
+
color: n,
|
|
30
|
+
fontSize: a,
|
|
31
|
+
fontStyle: c,
|
|
32
|
+
fontWeight: i,
|
|
33
|
+
fontFamily: J,
|
|
34
|
+
textAlign: X,
|
|
35
|
+
textBaseline: y
|
|
36
|
+
} = f, N = Number(a) * t;
|
|
37
|
+
e.font = `${c} normal ${i} ${N}px/${s}px ${J}`, e.fillStyle = n, e.textAlign = X, e.textBaseline = y;
|
|
38
|
+
const r = V(o) ? o : [o];
|
|
39
|
+
if (y !== "top" && r[0]) {
|
|
40
|
+
const W = e.measureText(r[0]);
|
|
41
|
+
e.textBaseline = "top";
|
|
42
|
+
const E = e.measureText(r[0]);
|
|
43
|
+
w = W.actualBoundingBoxAscent - E.actualBoundingBoxAscent;
|
|
44
|
+
}
|
|
45
|
+
r == null || r.forEach((W, E) => {
|
|
46
|
+
const [K, Q] = Z[X];
|
|
47
|
+
e.fillText(
|
|
48
|
+
W ?? "",
|
|
49
|
+
m * K + _ * Q,
|
|
50
|
+
E * (N + f.fontGap * t)
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const g = Math.PI / 180 * Number(p), z = Math.max(l, s), [v, O, d] = R(z, z, t);
|
|
55
|
+
v.translate(d / 2, d / 2), v.rotate(g), m > 0 && x > 0 && v.drawImage(F, -m / 2, -x / 2);
|
|
56
|
+
function D(n, a) {
|
|
57
|
+
const c = n * Math.cos(g) - a * Math.sin(g), i = n * Math.sin(g) + a * Math.cos(g);
|
|
58
|
+
return [c, i];
|
|
59
|
+
}
|
|
60
|
+
let M = 0, B = 0, A = 0, $ = 0;
|
|
61
|
+
const C = m / 2, I = x / 2;
|
|
62
|
+
[
|
|
63
|
+
[0 - C, 0 - I],
|
|
64
|
+
[0 + C, 0 - I],
|
|
65
|
+
[0 + C, 0 + I],
|
|
66
|
+
[0 - C, 0 + I]
|
|
67
|
+
].forEach(([n, a]) => {
|
|
68
|
+
const [c, i] = D(n, a);
|
|
69
|
+
M = Math.min(M, c), B = Math.max(B, c), A = Math.min(A, i), $ = Math.max($, i);
|
|
70
|
+
});
|
|
71
|
+
const U = M + d / 2, j = A + d / 2, u = B - M, h = $ - A, b = P * t, H = Y * t, G = (u + b) * 2, L = h + H, [k, q] = R(G, L);
|
|
72
|
+
function S(n = 0, a = 0) {
|
|
73
|
+
k.drawImage(
|
|
74
|
+
O,
|
|
75
|
+
U,
|
|
76
|
+
j,
|
|
77
|
+
u,
|
|
78
|
+
h,
|
|
79
|
+
n,
|
|
80
|
+
a + w,
|
|
81
|
+
u,
|
|
82
|
+
h
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
return S(), S(u + b, -h / 2 - H / 2), S(u + b, +h / 2 + H / 2), [q.toDataURL(), G / t, L / t];
|
|
86
|
+
}
|
|
87
|
+
return T;
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
ct as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
/** converting camel-cased strings to be lowercase and link it with Separator */
|
|
3
|
+
export declare function toLowercaseSeparator(key: string): string;
|
|
4
|
+
export declare function getStyleStr(style: CSSProperties): string;
|
|
5
|
+
/** Returns the ratio of the device's physical pixel resolution to the css pixel resolution */
|
|
6
|
+
export declare function getPixelRatio(): number;
|
|
7
|
+
/** Whether to re-render the watermark */
|
|
8
|
+
export declare const reRendering: (mutation: MutationRecord, watermarkElement?: HTMLElement) => boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function o(e) {
|
|
2
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
3
|
+
}
|
|
4
|
+
function i(e) {
|
|
5
|
+
return Object.keys(e).map(
|
|
6
|
+
(r) => `${o(r)}: ${e[r]};`
|
|
7
|
+
).join(" ");
|
|
8
|
+
}
|
|
9
|
+
function n() {
|
|
10
|
+
return window.devicePixelRatio || 1;
|
|
11
|
+
}
|
|
12
|
+
const c = (e, r) => {
|
|
13
|
+
let t = !1;
|
|
14
|
+
return e.removedNodes.length && r && (t = Array.from(e.removedNodes).includes(r)), e.type === "attributes" && e.target === r && (t = !0), t;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
n as getPixelRatio,
|
|
18
|
+
i as getStyleStr,
|
|
19
|
+
c as reRendering,
|
|
20
|
+
o as toLowercaseSeparator
|
|
21
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
export interface WatermarkFontType {
|
|
3
|
+
color?: string;
|
|
4
|
+
fontSize?: number | string;
|
|
5
|
+
fontWeight?: 'normal' | 'bold' | 'lighter' | 'bolder' | number;
|
|
6
|
+
fontStyle?: 'none' | 'normal' | 'italic' | 'oblique';
|
|
7
|
+
fontFamily?: string;
|
|
8
|
+
fontGap?: number;
|
|
9
|
+
textAlign?: 'start' | 'end' | 'left' | 'right' | 'center';
|
|
10
|
+
textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
|
|
11
|
+
}
|
|
12
|
+
export interface WatermarkProps {
|
|
13
|
+
/**
|
|
14
|
+
* @description The z-index of the appended watermark element
|
|
15
|
+
*/
|
|
16
|
+
zIndex?: number;
|
|
17
|
+
/**
|
|
18
|
+
* @description The rotation angle of the watermark
|
|
19
|
+
*/
|
|
20
|
+
rotate?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @description The width of the watermark
|
|
23
|
+
*/
|
|
24
|
+
width?: number;
|
|
25
|
+
/**
|
|
26
|
+
* @description The height of the watermark
|
|
27
|
+
*/
|
|
28
|
+
height?: number;
|
|
29
|
+
/**
|
|
30
|
+
* @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format)
|
|
31
|
+
*/
|
|
32
|
+
image?: string;
|
|
33
|
+
/**
|
|
34
|
+
* @description Watermark text content
|
|
35
|
+
*/
|
|
36
|
+
content?: string | string[];
|
|
37
|
+
/**
|
|
38
|
+
* @description Text style
|
|
39
|
+
*/
|
|
40
|
+
font?: WatermarkFontType;
|
|
41
|
+
/**
|
|
42
|
+
* @description The spacing between watermarks
|
|
43
|
+
*/
|
|
44
|
+
gap?: [number, number];
|
|
45
|
+
/**
|
|
46
|
+
* @description The offset of the watermark from the upper left corner of the container. The default is gap/2
|
|
47
|
+
*/
|
|
48
|
+
offset?: [number, number];
|
|
49
|
+
}
|
|
50
|
+
export declare const watermarkProps: {
|
|
51
|
+
readonly zIndex: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 9, boolean>;
|
|
52
|
+
readonly rotate: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, -22, boolean>;
|
|
53
|
+
readonly width: NumberConstructor;
|
|
54
|
+
readonly height: NumberConstructor;
|
|
55
|
+
readonly image: StringConstructor;
|
|
56
|
+
readonly content: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | string[]) | (() => string | string[]) | (((new (...args: any[]) => string | string[]) | (() => string | string[])) | null)[], unknown, unknown, "Element Plus", boolean>;
|
|
57
|
+
readonly font: {
|
|
58
|
+
readonly type: import("vue").PropType<WatermarkFontType>;
|
|
59
|
+
readonly required: false;
|
|
60
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
61
|
+
__epPropKey: true;
|
|
62
|
+
};
|
|
63
|
+
readonly gap: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => [number, number]) | (() => [number, number]) | (((new (...args: any[]) => [number, number]) | (() => [number, number])) | null)[], unknown, unknown, () => number[], boolean>;
|
|
64
|
+
readonly offset: {
|
|
65
|
+
readonly type: import("vue").PropType<[number, number]>;
|
|
66
|
+
readonly required: false;
|
|
67
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
68
|
+
__epPropKey: true;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type WatermarkPropsPublic = ExtractPublicPropTypes<typeof watermarkProps>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "@vue/shared";
|
|
2
|
+
import "lodash-unified";
|
|
3
|
+
import "@vueuse/core";
|
|
4
|
+
import "@element-plus/icons-vue";
|
|
5
|
+
import { buildProps as e, definePropType as t } from "../../utils/vue/props/runtime.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
e({
|
|
8
|
+
/**
|
|
9
|
+
* @description The z-index of the appended watermark element
|
|
10
|
+
*/
|
|
11
|
+
zIndex: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 9
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* @description The rotation angle of the watermark
|
|
17
|
+
*/
|
|
18
|
+
rotate: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: -22
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* @description The width of the watermark
|
|
24
|
+
*/
|
|
25
|
+
width: Number,
|
|
26
|
+
/**
|
|
27
|
+
* @description The height of the watermark
|
|
28
|
+
*/
|
|
29
|
+
height: Number,
|
|
30
|
+
/**
|
|
31
|
+
* @description Image source, it is recommended to export 2x or 3x image, high priority (support base64 format)
|
|
32
|
+
*/
|
|
33
|
+
image: String,
|
|
34
|
+
/**
|
|
35
|
+
* @description Watermark text content
|
|
36
|
+
*/
|
|
37
|
+
content: {
|
|
38
|
+
type: t([String, Array]),
|
|
39
|
+
default: "Element Plus"
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* @description Text style
|
|
43
|
+
*/
|
|
44
|
+
font: {
|
|
45
|
+
type: t(Object)
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* @description The spacing between watermarks
|
|
49
|
+
*/
|
|
50
|
+
gap: {
|
|
51
|
+
type: t(Array),
|
|
52
|
+
default: () => [100, 100]
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* @description The offset of the watermark from the upper left corner of the container. The default is gap/2
|
|
56
|
+
*/
|
|
57
|
+
offset: {
|
|
58
|
+
type: t(Array)
|
|
59
|
+
}
|
|
60
|
+
});
|
package/dist/constants/date.js
CHANGED
|
@@ -2,4 +2,15 @@ import ClickOutside from "./click-outside/index";
|
|
|
2
2
|
import { vRepeatClick } from "./repeat-click/index";
|
|
3
3
|
import TrapFocus from "./trap-focus/index";
|
|
4
4
|
import Mousewheel from "./mousewheel/index";
|
|
5
|
+
import type { App, Directive } from "vue";
|
|
5
6
|
export { ClickOutside, Mousewheel, TrapFocus, vRepeatClick };
|
|
7
|
+
/**
|
|
8
|
+
* 指令注册表(vendor-service-apis 需求 6.2)。
|
|
9
|
+
*
|
|
10
|
+
* 注册名是本规格新增的公开契约:这 4 个指令此前只导出、未参与全量安装。
|
|
11
|
+
* 注册名不得与既有指令重复,总量固定为 4(`loading` 与 `InfiniteScroll`
|
|
12
|
+
* 由各自服务/指令的 `install` 注册)。
|
|
13
|
+
*/
|
|
14
|
+
export declare const epDirectives: ReadonlyArray<readonly [string, Directive]>;
|
|
15
|
+
/** 按注册表逐个注册指令;重复调用为幂等操作。 */
|
|
16
|
+
export declare function installDirectives(app: App): void;
|