@melt-js/comps-vben 0.0.0-stage → 2026.11.8-2
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/LICENSE +10 -0
- package/README.md +91 -2
- package/hel_dist/assets/index-DaBGAjzb.js +478 -0
- package/hel_dist/assets/style-CcRbEt6_.css +2 -0
- package/hel_dist/entry.js +20 -0
- package/hel_dist/hel-meta.json +116 -0
- package/hel_dist/index.html +37 -0
- package/hel_proxy/entry.js +20 -0
- package/hel_proxy/entry.js.map +1 -0
- package/hel_proxy_es/entry.js +11 -0
- package/hel_proxy_es/entry.js.map +1 -0
- package/package.json +101 -3
- package/scripts/check-tdz.mjs +20 -0
- package/scripts/check.mjs +18 -0
- package/scripts/meta.mjs +28 -0
- package/scripts/prepublishOnly.mjs +42 -0
- package/scripts/publish-stage.mjs +25 -0
- package/src/common-ui/components/api-component/api-component.vue +273 -0
- package/src/common-ui/components/api-component/index.ts +7 -0
- package/src/common-ui/components/api-component/types.ts +72 -0
- package/src/common-ui/components/captcha/hooks/useCaptchaPoints.ts +19 -0
- package/src/common-ui/components/captcha/index.ts +7 -0
- package/src/common-ui/components/captcha/point-selection-captcha/index.vue +176 -0
- package/src/common-ui/components/captcha/point-selection-captcha/point-selection-captcha-card.vue +86 -0
- package/src/common-ui/components/captcha/slider-captcha/index.vue +254 -0
- package/src/common-ui/components/captcha/slider-captcha/slider-captcha-action.vue +65 -0
- package/src/common-ui/components/captcha/slider-captcha/slider-captcha-bar.vue +40 -0
- package/src/common-ui/components/captcha/slider-captcha/slider-captcha-content.vue +53 -0
- package/src/common-ui/components/captcha/slider-rotate-captcha/index.vue +213 -0
- package/src/common-ui/components/captcha/slider-translate-captcha/index.vue +311 -0
- package/src/common-ui/components/captcha/types.ts +210 -0
- package/src/common-ui/components/col-page/col-page.vue +111 -0
- package/src/common-ui/components/col-page/index.ts +2 -0
- package/src/common-ui/components/col-page/types.ts +26 -0
- package/src/common-ui/components/count-to/count-to.vue +123 -0
- package/src/common-ui/components/count-to/index.ts +2 -0
- package/src/common-ui/components/count-to/types.ts +53 -0
- package/src/common-ui/components/cropper/cropper.vue +981 -0
- package/src/common-ui/components/cropper/index.ts +1 -0
- package/src/common-ui/components/ellipsis-text/ellipsis-text.vue +232 -0
- package/src/common-ui/components/ellipsis-text/index.ts +1 -0
- package/src/common-ui/components/icon-picker/icon-picker.vue +322 -0
- package/src/common-ui/components/icon-picker/icons.ts +56 -0
- package/src/common-ui/components/icon-picker/index.ts +2 -0
- package/src/common-ui/components/icon-picker/types.ts +26 -0
- package/src/common-ui/components/index.ts +51 -0
- package/src/common-ui/components/json-viewer/index.ts +3 -0
- package/src/common-ui/components/json-viewer/index.vue +128 -0
- package/src/common-ui/components/json-viewer/style.scss +91 -0
- package/src/common-ui/components/json-viewer/types.ts +44 -0
- package/src/common-ui/components/loading/directive.ts +132 -0
- package/src/common-ui/components/loading/index.ts +3 -0
- package/src/common-ui/components/loading/loading.vue +39 -0
- package/src/common-ui/components/loading/spinner.vue +28 -0
- package/src/common-ui/components/page/index.ts +2 -0
- package/src/common-ui/components/page/page.vue +107 -0
- package/src/common-ui/components/page/types.ts +23 -0
- package/src/common-ui/components/resize/index.ts +1 -0
- package/src/common-ui/components/resize/resize.vue +1269 -0
- package/src/common-ui/components/tippy/directive.ts +100 -0
- package/src/common-ui/components/tippy/index.ts +67 -0
- package/src/common-ui/components/tree/index.ts +1 -0
- package/src/common-ui/components/tree/tree.vue +25 -0
- package/src/common-ui/index.ts +2 -0
- package/src/common-ui/ui/about/about.ts +14 -0
- package/src/common-ui/ui/about/about.vue +183 -0
- package/src/common-ui/ui/about/index.ts +1 -0
- package/src/common-ui/ui/authentication/auth-title.vue +13 -0
- package/src/common-ui/ui/authentication/code-login.vue +127 -0
- package/src/common-ui/ui/authentication/dingding-login.vue +113 -0
- package/src/common-ui/ui/authentication/forget-password.vue +116 -0
- package/src/common-ui/ui/authentication/index.ts +7 -0
- package/src/common-ui/ui/authentication/login-expired-modal.vue +95 -0
- package/src/common-ui/ui/authentication/login.vue +186 -0
- package/src/common-ui/ui/authentication/qrcode-login.vue +105 -0
- package/src/common-ui/ui/authentication/register.vue +121 -0
- package/src/common-ui/ui/authentication/third-party-login.vue +71 -0
- package/src/common-ui/ui/authentication/types.ts +70 -0
- package/src/common-ui/ui/dashboard/analysis/analysis-chart-card.vue +24 -0
- package/src/common-ui/ui/dashboard/analysis/analysis-charts-tabs.vue +40 -0
- package/src/common-ui/ui/dashboard/analysis/analysis-overview.vue +55 -0
- package/src/common-ui/ui/dashboard/analysis/index.ts +3 -0
- package/src/common-ui/ui/dashboard/index.ts +3 -0
- package/src/common-ui/ui/dashboard/typing.ts +50 -0
- package/src/common-ui/ui/dashboard/workbench/index.ts +5 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-header.vue +48 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-project.vue +73 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-quick-nav.vue +56 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-todo.vue +63 -0
- package/src/common-ui/ui/dashboard/workbench/workbench-trends.vue +64 -0
- package/src/common-ui/ui/fallback/fallback.ts +25 -0
- package/src/common-ui/ui/fallback/fallback.vue +164 -0
- package/src/common-ui/ui/fallback/icons/icon-403.vue +151 -0
- package/src/common-ui/ui/fallback/icons/icon-404.vue +154 -0
- package/src/common-ui/ui/fallback/icons/icon-500.vue +215 -0
- package/src/common-ui/ui/fallback/icons/icon-coming-soon.vue +262 -0
- package/src/common-ui/ui/fallback/icons/icon-offline.vue +112 -0
- package/src/common-ui/ui/fallback/icons/warning.svg +1 -0
- package/src/common-ui/ui/fallback/index.ts +2 -0
- package/src/common-ui/ui/index.ts +5 -0
- package/src/common-ui/ui/profile/base-setting.vue +58 -0
- package/src/common-ui/ui/profile/index.ts +6 -0
- package/src/common-ui/ui/profile/notification-setting.vue +52 -0
- package/src/common-ui/ui/profile/password-setting.vue +59 -0
- package/src/common-ui/ui/profile/profile.vue +64 -0
- package/src/common-ui/ui/profile/security-setting.vue +52 -0
- package/src/common-ui/ui/profile/types.ts +21 -0
- package/src/configs/subApp.ts +1 -0
- package/src/entrance/libProperties.ts +34 -0
- package/src/entrance/libTypes.js +9 -0
- package/src/form-ui/components/form-actions.vue +178 -0
- package/src/form-ui/components/form-field-array.vue +234 -0
- package/src/form-ui/config.ts +117 -0
- package/src/form-ui/deprecation.ts +18 -0
- package/src/form-ui/field-name.ts +106 -0
- package/src/form-ui/form-api.ts +766 -0
- package/src/form-ui/form-codec.ts +40 -0
- package/src/form-ui/form-render/context.ts +25 -0
- package/src/form-ui/form-render/dependencies.ts +305 -0
- package/src/form-ui/form-render/expandable.ts +105 -0
- package/src/form-ui/form-render/form-field.vue +644 -0
- package/src/form-ui/form-render/form-group.vue +126 -0
- package/src/form-ui/form-render/form-label.vue +35 -0
- package/src/form-ui/form-render/form.vue +205 -0
- package/src/form-ui/form-render/helper.ts +65 -0
- package/src/form-ui/form-render/index.ts +3 -0
- package/src/form-ui/form-render/schema.ts +534 -0
- package/src/form-ui/form-render/utils.ts +170 -0
- package/src/form-ui/form-runtime-field.ts +82 -0
- package/src/form-ui/form-runtime.ts +325 -0
- package/src/form-ui/form-value-transform.ts +235 -0
- package/src/form-ui/index.ts +39 -0
- package/src/form-ui/rule-registry.ts +17 -0
- package/src/form-ui/types.ts +1054 -0
- package/src/form-ui/use-custom-field-value.ts +124 -0
- package/src/form-ui/use-form-context.ts +148 -0
- package/src/form-ui/use-vben-form.ts +81 -0
- package/src/form-ui/vben-form.vue +79 -0
- package/src/form-ui/vben-use-form.vue +187 -0
- package/src/layout-ui/components/index.ts +5 -0
- package/src/layout-ui/components/layout-content.vue +75 -0
- package/src/layout-ui/components/layout-footer.vue +46 -0
- package/src/layout-ui/components/layout-header.vue +89 -0
- package/src/layout-ui/components/layout-sidebar.vue +484 -0
- package/src/layout-ui/components/layout-tabbar.vue +30 -0
- package/src/layout-ui/components/widgets/index.ts +2 -0
- package/src/layout-ui/components/widgets/sidebar-collapse-button.vue +25 -0
- package/src/layout-ui/components/widgets/sidebar-fixed-button.vue +27 -0
- package/src/layout-ui/header-scroll-state.ts +28 -0
- package/src/layout-ui/hooks/use-layout.ts +53 -0
- package/src/layout-ui/hooks/use-sidebar-drag.ts +152 -0
- package/src/layout-ui/index.ts +2 -0
- package/src/layout-ui/vben-layout.ts +188 -0
- package/src/layout-ui/vben-layout.vue +768 -0
- package/src/layouts/authentication/authentication.vue +196 -0
- package/src/layouts/authentication/form.vue +38 -0
- package/src/layouts/authentication/icons/slogan.vue +4568 -0
- package/src/layouts/authentication/index.ts +2 -0
- package/src/layouts/authentication/toolbar.vue +49 -0
- package/src/layouts/authentication/types.ts +1 -0
- package/src/layouts/basic/README.md +7 -0
- package/src/layouts/basic/content/content-spinner.vue +12 -0
- package/src/layouts/basic/content/content.vue +112 -0
- package/src/layouts/basic/content/index.ts +2 -0
- package/src/layouts/basic/content/use-content-spinner.ts +98 -0
- package/src/layouts/basic/copyright/copyright.vue +49 -0
- package/src/layouts/basic/copyright/index.ts +1 -0
- package/src/layouts/basic/footer/footer.vue +11 -0
- package/src/layouts/basic/footer/index.ts +1 -0
- package/src/layouts/basic/header/header.vue +408 -0
- package/src/layouts/basic/header/index.ts +1 -0
- package/src/layouts/basic/index.ts +1 -0
- package/src/layouts/basic/layout.vue +478 -0
- package/src/layouts/basic/menu/extra-menu.vue +41 -0
- package/src/layouts/basic/menu/index.ts +5 -0
- package/src/layouts/basic/menu/menu.vue +45 -0
- package/src/layouts/basic/menu/mixed-menu.vue +46 -0
- package/src/layouts/basic/menu/use-extra-menu.ts +179 -0
- package/src/layouts/basic/menu/use-mixed-menu.ts +181 -0
- package/src/layouts/basic/menu/use-navigation.ts +74 -0
- package/src/layouts/basic/tabbar/index.ts +2 -0
- package/src/layouts/basic/tabbar/tabbar.vue +84 -0
- package/src/layouts/basic/tabbar/use-tabbar.ts +229 -0
- package/src/layouts/basic/use-layout-scroll.ts +85 -0
- package/src/layouts/hooks/index.ts +98 -0
- package/src/layouts/iframe/iframe-router-view.vue +86 -0
- package/src/layouts/iframe/iframe-view.vue +3 -0
- package/src/layouts/iframe/index.ts +2 -0
- package/src/layouts/index.ts +4 -0
- package/src/layouts/route-cached/cached-tab-keys.ts +13 -0
- package/src/layouts/route-cached/index.ts +2 -0
- package/src/layouts/route-cached/route-cached-page.vue +36 -0
- package/src/layouts/route-cached/route-cached-view.vue +97 -0
- package/src/layouts/widgets/breadcrumb-routes.ts +41 -0
- package/src/layouts/widgets/breadcrumb.vue +78 -0
- package/src/layouts/widgets/check-updates/check-updates.vue +136 -0
- package/src/layouts/widgets/check-updates/index.ts +1 -0
- package/src/layouts/widgets/color-toggle.vue +64 -0
- package/src/layouts/widgets/global-search/global-search.vue +173 -0
- package/src/layouts/widgets/global-search/index.ts +1 -0
- package/src/layouts/widgets/global-search/search-panel.vue +299 -0
- package/src/layouts/widgets/index.ts +12 -0
- package/src/layouts/widgets/language-toggle.vue +48 -0
- package/src/layouts/widgets/layout-toggle.vue +64 -0
- package/src/layouts/widgets/lock-screen/index.ts +2 -0
- package/src/layouts/widgets/lock-screen/lock-screen-modal.vue +110 -0
- package/src/layouts/widgets/lock-screen/lock-screen.vue +167 -0
- package/src/layouts/widgets/notification/index.ts +3 -0
- package/src/layouts/widgets/notification/notification.vue +210 -0
- package/src/layouts/widgets/notification/types.ts +19 -0
- package/src/layouts/widgets/preferences/blocks/block.vue +22 -0
- package/src/layouts/widgets/preferences/blocks/checkbox-item.vue +63 -0
- package/src/layouts/widgets/preferences/blocks/custom/custom.vue +121 -0
- package/src/layouts/widgets/preferences/blocks/draggable-list.vue +138 -0
- package/src/layouts/widgets/preferences/blocks/general/animation.vue +56 -0
- package/src/layouts/widgets/preferences/blocks/general/general.vue +94 -0
- package/src/layouts/widgets/preferences/blocks/index.ts +21 -0
- package/src/layouts/widgets/preferences/blocks/input-item.vue +71 -0
- package/src/layouts/widgets/preferences/blocks/layout/breadcrumb.vue +61 -0
- package/src/layouts/widgets/preferences/blocks/layout/content.vue +53 -0
- package/src/layouts/widgets/preferences/blocks/layout/copyright.vue +56 -0
- package/src/layouts/widgets/preferences/blocks/layout/footer.vue +17 -0
- package/src/layouts/widgets/preferences/blocks/layout/header.vue +78 -0
- package/src/layouts/widgets/preferences/blocks/layout/layout.vue +112 -0
- package/src/layouts/widgets/preferences/blocks/layout/navigation.vue +50 -0
- package/src/layouts/widgets/preferences/blocks/layout/sidebar.vue +108 -0
- package/src/layouts/widgets/preferences/blocks/layout/tabbar.vue +106 -0
- package/src/layouts/widgets/preferences/blocks/layout/widget.vue +188 -0
- package/src/layouts/widgets/preferences/blocks/number-field-item.vue +74 -0
- package/src/layouts/widgets/preferences/blocks/select-item.vue +76 -0
- package/src/layouts/widgets/preferences/blocks/shortcut-keys/global.vue +55 -0
- package/src/layouts/widgets/preferences/blocks/switch-item.vue +55 -0
- package/src/layouts/widgets/preferences/blocks/theme/builtin.vue +162 -0
- package/src/layouts/widgets/preferences/blocks/theme/color-mode.vue +26 -0
- package/src/layouts/widgets/preferences/blocks/theme/font-size.vue +62 -0
- package/src/layouts/widgets/preferences/blocks/theme/radius.vue +38 -0
- package/src/layouts/widgets/preferences/blocks/theme/theme.vue +114 -0
- package/src/layouts/widgets/preferences/blocks/toggle-item.vue +46 -0
- package/src/layouts/widgets/preferences/icons/content-compact.vue +119 -0
- package/src/layouts/widgets/preferences/icons/full-content.vue +50 -0
- package/src/layouts/widgets/preferences/icons/header-mixed-nav.vue +202 -0
- package/src/layouts/widgets/preferences/icons/header-nav.vue +119 -0
- package/src/layouts/widgets/preferences/icons/header-sidebar-nav.vue +177 -0
- package/src/layouts/widgets/preferences/icons/index.ts +12 -0
- package/src/layouts/widgets/preferences/icons/mixed-nav.vue +161 -0
- package/src/layouts/widgets/preferences/icons/setting.vue +12 -0
- package/src/layouts/widgets/preferences/icons/sidebar-mixed-nav.vue +173 -0
- package/src/layouts/widgets/preferences/icons/sidebar-nav.vue +153 -0
- package/src/layouts/widgets/preferences/index.ts +3 -0
- package/src/layouts/widgets/preferences/preferences-button.vue +31 -0
- package/src/layouts/widgets/preferences/preferences-drawer.vue +674 -0
- package/src/layouts/widgets/preferences/preferences.vue +93 -0
- package/src/layouts/widgets/preferences/use-open-preferences.ts +16 -0
- package/src/layouts/widgets/theme-toggle/index.ts +1 -0
- package/src/layouts/widgets/theme-toggle/theme-button.vue +164 -0
- package/src/layouts/widgets/theme-toggle/theme-toggle.vue +83 -0
- package/src/layouts/widgets/timezone/index.ts +1 -0
- package/src/layouts/widgets/timezone/timezone-button.vue +92 -0
- package/src/layouts/widgets/user-dropdown/index.ts +1 -0
- package/src/layouts/widgets/user-dropdown/user-dropdown.vue +578 -0
- package/src/main.ts +17 -0
- package/src/menu-ui/components/collapse-transition.vue +96 -0
- package/src/menu-ui/components/index.ts +4 -0
- package/src/menu-ui/components/menu-badge-dot.vue +28 -0
- package/src/menu-ui/components/menu-badge.vue +57 -0
- package/src/menu-ui/components/menu-item.vue +140 -0
- package/src/menu-ui/components/menu.vue +880 -0
- package/src/menu-ui/components/normal-menu/index.ts +2 -0
- package/src/menu-ui/components/normal-menu/normal-menu.ts +27 -0
- package/src/menu-ui/components/normal-menu/normal-menu.vue +162 -0
- package/src/menu-ui/components/sub-menu-content.vue +105 -0
- package/src/menu-ui/components/sub-menu.vue +276 -0
- package/src/menu-ui/hooks/index.ts +2 -0
- package/src/menu-ui/hooks/use-menu-context.ts +55 -0
- package/src/menu-ui/hooks/use-menu-scroll.ts +46 -0
- package/src/menu-ui/hooks/use-menu.ts +48 -0
- package/src/menu-ui/index.ts +4 -0
- package/src/menu-ui/menu.vue +32 -0
- package/src/menu-ui/sub-menu.vue +71 -0
- package/src/menu-ui/types.ts +154 -0
- package/src/menu-ui/utils/index.ts +52 -0
- package/src/plugins/echarts/README.md +41 -0
- package/src/plugins/echarts/echarts-ui.vue +15 -0
- package/src/plugins/echarts/echarts.ts +40 -0
- package/src/plugins/echarts/index.ts +4 -0
- package/src/plugins/echarts/types.ts +28 -0
- package/src/plugins/echarts/use-echarts.ts +213 -0
- package/src/plugins/index.ts +2 -0
- package/src/plugins/motion/README.md +26 -0
- package/src/plugins/motion/index.ts +8 -0
- package/src/plugins/motion/types.ts +26 -0
- package/src/plugins/plugins-context.ts +39 -0
- package/src/plugins/tiptap/extensions.ts +452 -0
- package/src/plugins/tiptap/index.ts +4 -0
- package/src/plugins/tiptap/preview.vue +34 -0
- package/src/plugins/tiptap/style.css +112 -0
- package/src/plugins/tiptap/tiptap.vue +324 -0
- package/src/plugins/tiptap/toolbar.ts +374 -0
- package/src/plugins/tiptap/types.ts +87 -0
- package/src/plugins/tiptap/use-tiptap-toolbar.ts +176 -0
- package/src/plugins/types.ts +24 -0
- package/src/plugins/vxe-table/README.md +50 -0
- package/src/plugins/vxe-table/api.ts +202 -0
- package/src/plugins/vxe-table/extends.ts +150 -0
- package/src/plugins/vxe-table/index.ts +10 -0
- package/src/plugins/vxe-table/init.ts +151 -0
- package/src/plugins/vxe-table/style.css +128 -0
- package/src/plugins/vxe-table/types.ts +116 -0
- package/src/plugins/vxe-table/use-vxe-grid.ts +86 -0
- package/src/plugins/vxe-table/use-vxe-grid.vue +564 -0
- package/src/plugins/vxe-table/viewed-row/index.ts +8 -0
- package/src/plugins/vxe-table/viewed-row/types.ts +84 -0
- package/src/plugins/vxe-table/viewed-row/use-viewed-row.ts +590 -0
- package/src/popup-ui/alert/AlertBuilder.ts +244 -0
- package/src/popup-ui/alert/alert.ts +101 -0
- package/src/popup-ui/alert/alert.vue +220 -0
- package/src/popup-ui/alert/index.ts +14 -0
- package/src/popup-ui/drawer/drawer-api.ts +178 -0
- package/src/popup-ui/drawer/drawer.ts +192 -0
- package/src/popup-ui/drawer/drawer.vue +359 -0
- package/src/popup-ui/drawer/index.ts +7 -0
- package/src/popup-ui/drawer/use-drawer.ts +210 -0
- package/src/popup-ui/index.ts +3 -0
- package/src/popup-ui/modal/index.ts +7 -0
- package/src/popup-ui/modal/modal-api.ts +191 -0
- package/src/popup-ui/modal/modal.ts +212 -0
- package/src/popup-ui/modal/modal.vue +395 -0
- package/src/popup-ui/modal/use-modal-draggable.ts +141 -0
- package/src/popup-ui/modal/use-modal.ts +222 -0
- package/src/shadcn-ui/assets/index.css +1 -0
- package/src/shadcn-ui/components/avatar/avatar.vue +76 -0
- package/src/shadcn-ui/components/avatar/index.ts +1 -0
- package/src/shadcn-ui/components/back-top/back-top.vue +43 -0
- package/src/shadcn-ui/components/back-top/backtop.ts +38 -0
- package/src/shadcn-ui/components/back-top/index.ts +1 -0
- package/src/shadcn-ui/components/back-top/use-backtop.ts +45 -0
- package/src/shadcn-ui/components/breadcrumb/breadcrumb-background.vue +111 -0
- package/src/shadcn-ui/components/breadcrumb/breadcrumb-view.vue +39 -0
- package/src/shadcn-ui/components/breadcrumb/breadcrumb.vue +98 -0
- package/src/shadcn-ui/components/breadcrumb/index.ts +3 -0
- package/src/shadcn-ui/components/breadcrumb/types.ts +17 -0
- package/src/shadcn-ui/components/button/button-group.vue +98 -0
- package/src/shadcn-ui/components/button/button.ts +55 -0
- package/src/shadcn-ui/components/button/button.vue +42 -0
- package/src/shadcn-ui/components/button/check-button-group.vue +196 -0
- package/src/shadcn-ui/components/button/icon-button.vue +78 -0
- package/src/shadcn-ui/components/button/index.ts +5 -0
- package/src/shadcn-ui/components/checkbox/checkbox.vue +26 -0
- package/src/shadcn-ui/components/checkbox/index.ts +1 -0
- package/src/shadcn-ui/components/collapsible/collapsible-params-item.vue +123 -0
- package/src/shadcn-ui/components/collapsible/collapsible-params.vue +268 -0
- package/src/shadcn-ui/components/collapsible/collapsible.vue +79 -0
- package/src/shadcn-ui/components/collapsible/index.ts +4 -0
- package/src/shadcn-ui/components/collapsible/type.ts +22 -0
- package/src/shadcn-ui/components/context-menu/context-menu.vue +128 -0
- package/src/shadcn-ui/components/context-menu/index.ts +3 -0
- package/src/shadcn-ui/components/context-menu/interface.ts +42 -0
- package/src/shadcn-ui/components/count-to-animator/count-to-animator.vue +128 -0
- package/src/shadcn-ui/components/count-to-animator/index.ts +1 -0
- package/src/shadcn-ui/components/descriptions/descriptions-cell.vue +129 -0
- package/src/shadcn-ui/components/descriptions/descriptions-item.vue +57 -0
- package/src/shadcn-ui/components/descriptions/descriptions-row.vue +112 -0
- package/src/shadcn-ui/components/descriptions/descriptions.vue +91 -0
- package/src/shadcn-ui/components/descriptions/index.ts +4 -0
- package/src/shadcn-ui/components/descriptions/types.ts +93 -0
- package/src/shadcn-ui/components/descriptions/use-descriptions.ts +216 -0
- package/src/shadcn-ui/components/dropdown-menu/dropdown-menu.vue +49 -0
- package/src/shadcn-ui/components/dropdown-menu/dropdown-radio-menu.vue +52 -0
- package/src/shadcn-ui/components/dropdown-menu/index.ts +4 -0
- package/src/shadcn-ui/components/dropdown-menu/interface.ts +32 -0
- package/src/shadcn-ui/components/expandable-arrow/expandable-arrow.vue +31 -0
- package/src/shadcn-ui/components/expandable-arrow/index.ts +1 -0
- package/src/shadcn-ui/components/full-screen/full-screen.vue +41 -0
- package/src/shadcn-ui/components/full-screen/index.ts +1 -0
- package/src/shadcn-ui/components/hover-card/hover-card.vue +55 -0
- package/src/shadcn-ui/components/hover-card/index.ts +2 -0
- package/src/shadcn-ui/components/icon/icon.vue +35 -0
- package/src/shadcn-ui/components/icon/index.ts +1 -0
- package/src/shadcn-ui/components/index.ts +26 -0
- package/src/shadcn-ui/components/input-password/index.ts +1 -0
- package/src/shadcn-ui/components/input-password/input-password.vue +57 -0
- package/src/shadcn-ui/components/input-password/password-strength.vue +66 -0
- package/src/shadcn-ui/components/logo/index.ts +1 -0
- package/src/shadcn-ui/components/logo/logo.vue +152 -0
- package/src/shadcn-ui/components/pin-input/index.ts +3 -0
- package/src/shadcn-ui/components/pin-input/input.vue +122 -0
- package/src/shadcn-ui/components/pin-input/types.ts +30 -0
- package/src/shadcn-ui/components/popover/index.ts +1 -0
- package/src/shadcn-ui/components/popover/popover.vue +60 -0
- package/src/shadcn-ui/components/render-content/index.ts +1 -0
- package/src/shadcn-ui/components/render-content/render-content.vue +59 -0
- package/src/shadcn-ui/components/scrollbar/index.ts +1 -0
- package/src/shadcn-ui/components/scrollbar/scrollbar.vue +165 -0
- package/src/shadcn-ui/components/segmented/index.ts +3 -0
- package/src/shadcn-ui/components/segmented/segmented.vue +75 -0
- package/src/shadcn-ui/components/segmented/tabs-indicator.vue +37 -0
- package/src/shadcn-ui/components/segmented/types.ts +6 -0
- package/src/shadcn-ui/components/select/index.ts +1 -0
- package/src/shadcn-ui/components/select/select.vue +57 -0
- package/src/shadcn-ui/components/spine-text/index.ts +1 -0
- package/src/shadcn-ui/components/spine-text/spine-text.vue +49 -0
- package/src/shadcn-ui/components/spinner/index.ts +2 -0
- package/src/shadcn-ui/components/spinner/loading.vue +140 -0
- package/src/shadcn-ui/components/spinner/spinner.vue +138 -0
- package/src/shadcn-ui/components/table-action/action-dropdown-item.vue +116 -0
- package/src/shadcn-ui/components/table-action/action-item.vue +98 -0
- package/src/shadcn-ui/components/table-action/index.ts +3 -0
- package/src/shadcn-ui/components/table-action/table-action.vue +218 -0
- package/src/shadcn-ui/components/table-action/types.ts +75 -0
- package/src/shadcn-ui/components/tooltip/help-tooltip.vue +31 -0
- package/src/shadcn-ui/components/tooltip/index.ts +2 -0
- package/src/shadcn-ui/components/tooltip/tooltip.vue +44 -0
- package/src/shadcn-ui/components.json +15 -0
- package/src/shadcn-ui/index.ts +39 -0
- package/src/shadcn-ui/ui/accordion/Accordion.vue +16 -0
- package/src/shadcn-ui/ui/accordion/AccordionContent.vue +28 -0
- package/src/shadcn-ui/ui/accordion/AccordionItem.vue +29 -0
- package/src/shadcn-ui/ui/accordion/AccordionTrigger.vue +39 -0
- package/src/shadcn-ui/ui/accordion/index.ts +4 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialog.vue +20 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogAction.vue +13 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogCancel.vue +13 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogContent.vue +101 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogDescription.vue +28 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogFooter.vue +20 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogHeader.vue +18 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogOverlay.vue +31 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogTitle.vue +26 -0
- package/src/shadcn-ui/ui/alert-dialog/AlertDialogTrigger.vue +13 -0
- package/src/shadcn-ui/ui/alert-dialog/index.ts +9 -0
- package/src/shadcn-ui/ui/avatar/Avatar.vue +25 -0
- package/src/shadcn-ui/ui/avatar/AvatarFallback.vue +31 -0
- package/src/shadcn-ui/ui/avatar/AvatarImage.vue +17 -0
- package/src/shadcn-ui/ui/avatar/index.ts +3 -0
- package/src/shadcn-ui/ui/badge/Badge.vue +33 -0
- package/src/shadcn-ui/ui/badge/badge.ts +25 -0
- package/src/shadcn-ui/ui/badge/index.ts +3 -0
- package/src/shadcn-ui/ui/breadcrumb/Breadcrumb.vue +13 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbEllipsis.vue +25 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbItem.vue +18 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbLink.vue +27 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbList.vue +23 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbPage.vue +21 -0
- package/src/shadcn-ui/ui/breadcrumb/BreadcrumbSeparator.vue +24 -0
- package/src/shadcn-ui/ui/breadcrumb/index.ts +7 -0
- package/src/shadcn-ui/ui/button/Button.vue +36 -0
- package/src/shadcn-ui/ui/button/button.ts +35 -0
- package/src/shadcn-ui/ui/button/index.ts +3 -0
- package/src/shadcn-ui/ui/card/Card.vue +23 -0
- package/src/shadcn-ui/ui/card/CardAction.vue +23 -0
- package/src/shadcn-ui/ui/card/CardContent.vue +15 -0
- package/src/shadcn-ui/ui/card/CardDescription.vue +18 -0
- package/src/shadcn-ui/ui/card/CardFooter.vue +18 -0
- package/src/shadcn-ui/ui/card/CardHeader.vue +23 -0
- package/src/shadcn-ui/ui/card/CardTitle.vue +18 -0
- package/src/shadcn-ui/ui/card/index.ts +7 -0
- package/src/shadcn-ui/ui/checkbox/Checkbox.vue +49 -0
- package/src/shadcn-ui/ui/checkbox/index.ts +1 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenu.vue +18 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuCheckboxItem.vue +51 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuContent.vue +44 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuGroup.vue +13 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuItem.vue +45 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuLabel.vue +32 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuPortal.vue +13 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuRadioGroup.vue +22 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuRadioItem.vue +51 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSeparator.vue +24 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuShortcut.vue +20 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSub.vue +16 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSubContent.vue +37 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuSubTrigger.vue +39 -0
- package/src/shadcn-ui/ui/context-menu/ContextMenuTrigger.vue +15 -0
- package/src/shadcn-ui/ui/context-menu/index.ts +14 -0
- package/src/shadcn-ui/ui/dialog/Dialog.vue +16 -0
- package/src/shadcn-ui/ui/dialog/DialogClose.vue +13 -0
- package/src/shadcn-ui/ui/dialog/DialogContent.vue +149 -0
- package/src/shadcn-ui/ui/dialog/DialogDescription.vue +28 -0
- package/src/shadcn-ui/ui/dialog/DialogFooter.vue +33 -0
- package/src/shadcn-ui/ui/dialog/DialogHeader.vue +18 -0
- package/src/shadcn-ui/ui/dialog/DialogOverlay.vue +34 -0
- package/src/shadcn-ui/ui/dialog/DialogScrollContent.vue +69 -0
- package/src/shadcn-ui/ui/dialog/DialogTitle.vue +28 -0
- package/src/shadcn-ui/ui/dialog/DialogTrigger.vue +13 -0
- package/src/shadcn-ui/ui/dialog/index.ts +10 -0
- package/src/shadcn-ui/ui/dialog/use-dialog-state-events.ts +84 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenu.vue +20 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +51 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuContent.vue +50 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuGroup.vue +13 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuItem.vue +44 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuLabel.vue +30 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuRadioGroup.vue +22 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuRadioItem.vue +52 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSeparator.vue +26 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuShortcut.vue +20 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSub.vue +20 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSubContent.vue +37 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuSubTrigger.vue +38 -0
- package/src/shadcn-ui/ui/dropdown-menu/DropdownMenuTrigger.vue +18 -0
- package/src/shadcn-ui/ui/dropdown-menu/index.ts +16 -0
- package/src/shadcn-ui/ui/form/FormControl.vue +20 -0
- package/src/shadcn-ui/ui/form/FormDescription.vue +23 -0
- package/src/shadcn-ui/ui/form/FormField.vue +35 -0
- package/src/shadcn-ui/ui/form/FormItem.vue +24 -0
- package/src/shadcn-ui/ui/form/FormLabel.vue +25 -0
- package/src/shadcn-ui/ui/form/FormMessage.vue +24 -0
- package/src/shadcn-ui/ui/form/index.ts +10 -0
- package/src/shadcn-ui/ui/form/injectionKeys.ts +16 -0
- package/src/shadcn-ui/ui/form/useFormField.ts +35 -0
- package/src/shadcn-ui/ui/hover-card/HoverCard.vue +16 -0
- package/src/shadcn-ui/ui/hover-card/HoverCardContent.vue +42 -0
- package/src/shadcn-ui/ui/hover-card/HoverCardTrigger.vue +13 -0
- package/src/shadcn-ui/ui/hover-card/index.ts +3 -0
- package/src/shadcn-ui/ui/index.ts +32 -0
- package/src/shadcn-ui/ui/input/Input.vue +54 -0
- package/src/shadcn-ui/ui/input/index.ts +1 -0
- package/src/shadcn-ui/ui/label/Label.vue +29 -0
- package/src/shadcn-ui/ui/label/index.ts +1 -0
- package/src/shadcn-ui/ui/number-field/NumberField.vue +29 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldContent.vue +22 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldDecrement.vue +36 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldIncrement.vue +36 -0
- package/src/shadcn-ui/ui/number-field/NumberFieldInput.vue +23 -0
- package/src/shadcn-ui/ui/number-field/index.ts +5 -0
- package/src/shadcn-ui/ui/pagination/Pagination.vue +31 -0
- package/src/shadcn-ui/ui/pagination/PaginationContent.vue +27 -0
- package/src/shadcn-ui/ui/pagination/PaginationEllipsis.vue +29 -0
- package/src/shadcn-ui/ui/pagination/PaginationFirst.vue +50 -0
- package/src/shadcn-ui/ui/pagination/PaginationItem.vue +47 -0
- package/src/shadcn-ui/ui/pagination/PaginationLast.vue +50 -0
- package/src/shadcn-ui/ui/pagination/PaginationNext.vue +50 -0
- package/src/shadcn-ui/ui/pagination/PaginationPrevious.vue +50 -0
- package/src/shadcn-ui/ui/pagination/index.ts +8 -0
- package/src/shadcn-ui/ui/pin-input/PinInput.vue +38 -0
- package/src/shadcn-ui/ui/pin-input/PinInputGroup.vue +26 -0
- package/src/shadcn-ui/ui/pin-input/PinInputSeparator.vue +17 -0
- package/src/shadcn-ui/ui/pin-input/PinInputSlot.vue +31 -0
- package/src/shadcn-ui/ui/pin-input/index.ts +4 -0
- package/src/shadcn-ui/ui/popover/Popover.vue +16 -0
- package/src/shadcn-ui/ui/popover/PopoverAnchor.vue +13 -0
- package/src/shadcn-ui/ui/popover/PopoverContent.vue +44 -0
- package/src/shadcn-ui/ui/popover/PopoverTrigger.vue +13 -0
- package/src/shadcn-ui/ui/popover/index.ts +4 -0
- package/src/shadcn-ui/ui/progress/Progress.vue +58 -0
- package/src/shadcn-ui/ui/progress/index.ts +1 -0
- package/src/shadcn-ui/ui/radio-group/RadioGroup.vue +30 -0
- package/src/shadcn-ui/ui/radio-group/RadioGroupItem.vue +43 -0
- package/src/shadcn-ui/ui/radio-group/index.ts +2 -0
- package/src/shadcn-ui/ui/resizable/ResizableHandle.vue +48 -0
- package/src/shadcn-ui/ui/resizable/ResizablePanel.vue +32 -0
- package/src/shadcn-ui/ui/resizable/ResizablePanelGroup.vue +32 -0
- package/src/shadcn-ui/ui/resizable/index.ts +3 -0
- package/src/shadcn-ui/ui/scroll-area/ScrollArea.vue +40 -0
- package/src/shadcn-ui/ui/scroll-area/ScrollBar.vue +41 -0
- package/src/shadcn-ui/ui/scroll-area/index.ts +2 -0
- package/src/shadcn-ui/ui/select/Select.vue +16 -0
- package/src/shadcn-ui/ui/select/SelectContent.vue +65 -0
- package/src/shadcn-ui/ui/select/SelectGroup.vue +13 -0
- package/src/shadcn-ui/ui/select/SelectItem.vue +49 -0
- package/src/shadcn-ui/ui/select/SelectItemText.vue +13 -0
- package/src/shadcn-ui/ui/select/SelectLabel.vue +22 -0
- package/src/shadcn-ui/ui/select/SelectScrollDownButton.vue +33 -0
- package/src/shadcn-ui/ui/select/SelectScrollUpButton.vue +33 -0
- package/src/shadcn-ui/ui/select/SelectSeparator.vue +24 -0
- package/src/shadcn-ui/ui/select/SelectTrigger.vue +43 -0
- package/src/shadcn-ui/ui/select/SelectValue.vue +13 -0
- package/src/shadcn-ui/ui/select/index.ts +11 -0
- package/src/shadcn-ui/ui/separator/Separator.vue +33 -0
- package/src/shadcn-ui/ui/separator/index.ts +1 -0
- package/src/shadcn-ui/ui/sheet/Sheet.vue +16 -0
- package/src/shadcn-ui/ui/sheet/SheetClose.vue +13 -0
- package/src/shadcn-ui/ui/sheet/SheetContent.vue +110 -0
- package/src/shadcn-ui/ui/sheet/SheetDescription.vue +26 -0
- package/src/shadcn-ui/ui/sheet/SheetFooter.vue +16 -0
- package/src/shadcn-ui/ui/sheet/SheetHeader.vue +16 -0
- package/src/shadcn-ui/ui/sheet/SheetOverlay.vue +11 -0
- package/src/shadcn-ui/ui/sheet/SheetTitle.vue +26 -0
- package/src/shadcn-ui/ui/sheet/SheetTrigger.vue +13 -0
- package/src/shadcn-ui/ui/sheet/index.ts +10 -0
- package/src/shadcn-ui/ui/sheet/sheet.ts +24 -0
- package/src/shadcn-ui/ui/switch/Switch.vue +45 -0
- package/src/shadcn-ui/ui/switch/index.ts +1 -0
- package/src/shadcn-ui/ui/tabs/Tabs.vue +29 -0
- package/src/shadcn-ui/ui/tabs/TabsContent.vue +26 -0
- package/src/shadcn-ui/ui/tabs/TabsList.vue +31 -0
- package/src/shadcn-ui/ui/tabs/TabsTrigger.vue +33 -0
- package/src/shadcn-ui/ui/tabs/index.ts +5 -0
- package/src/shadcn-ui/ui/textarea/Textarea.vue +35 -0
- package/src/shadcn-ui/ui/textarea/index.ts +1 -0
- package/src/shadcn-ui/ui/toggle/Toggle.vue +45 -0
- package/src/shadcn-ui/ui/toggle/index.ts +2 -0
- package/src/shadcn-ui/ui/toggle/toggle.ts +27 -0
- package/src/shadcn-ui/ui/toggle-group/ToggleGroup.vue +64 -0
- package/src/shadcn-ui/ui/toggle-group/ToggleGroupItem.vue +56 -0
- package/src/shadcn-ui/ui/toggle-group/index.ts +2 -0
- package/src/shadcn-ui/ui/tooltip/Tooltip.vue +16 -0
- package/src/shadcn-ui/ui/tooltip/TooltipContent.vue +55 -0
- package/src/shadcn-ui/ui/tooltip/TooltipProvider.vue +13 -0
- package/src/shadcn-ui/ui/tooltip/TooltipTrigger.vue +13 -0
- package/src/shadcn-ui/ui/tooltip/index.ts +4 -0
- package/src/shadcn-ui/ui/tree/index.ts +4 -0
- package/src/shadcn-ui/ui/tree/tree.vue +689 -0
- package/src/shadcn-ui/ui/tree/types.ts +70 -0
- package/src/styles/index.css +9 -0
- package/src/tabs-ui/components/index.ts +2 -0
- package/src/tabs-ui/components/tabs/tabs.vue +150 -0
- package/src/tabs-ui/components/tabs-chrome/tabs.vue +211 -0
- package/src/tabs-ui/components/widgets/index.ts +3 -0
- package/src/tabs-ui/components/widgets/tool-more.vue +18 -0
- package/src/tabs-ui/components/widgets/tool-refresh.vue +18 -0
- package/src/tabs-ui/components/widgets/tool-screen.vue +19 -0
- package/src/tabs-ui/index.ts +3 -0
- package/src/tabs-ui/tabs-view.vue +106 -0
- package/src/tabs-ui/types.ts +73 -0
- package/src/tabs-ui/use-tabs-drag.ts +129 -0
- package/src/tabs-ui/use-tabs-view-scroll.ts +202 -0
- package/src/types/shims.d.ts +2 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
DrawerApiOptions,
|
|
5
|
+
DrawerProps,
|
|
6
|
+
ExtendedDrawerApi,
|
|
7
|
+
InferDrawerData,
|
|
8
|
+
} from './drawer';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
defineComponent,
|
|
12
|
+
h,
|
|
13
|
+
inject,
|
|
14
|
+
markRaw,
|
|
15
|
+
nextTick,
|
|
16
|
+
onBeforeUnmount,
|
|
17
|
+
provide,
|
|
18
|
+
ref,
|
|
19
|
+
shallowReactive,
|
|
20
|
+
} from 'vue';
|
|
21
|
+
|
|
22
|
+
import { usePreferences } from '@melt-js/libs-vben/core-preferences';
|
|
23
|
+
import { useSelector } from '@melt-js/libs-vben/shared/store';
|
|
24
|
+
|
|
25
|
+
import { DrawerApi } from './drawer-api';
|
|
26
|
+
import VbenDrawer from './drawer.vue';
|
|
27
|
+
|
|
28
|
+
const USER_DRAWER_INJECT_KEY = Symbol('VBEN_DRAWER_INJECT');
|
|
29
|
+
|
|
30
|
+
declare const DRAWER_DATA_NOT_PROVIDED: unique symbol;
|
|
31
|
+
|
|
32
|
+
type DrawerDataNotProvided = {
|
|
33
|
+
readonly [DRAWER_DATA_NOT_PROVIDED]: true;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type ResolvedDrawerData<
|
|
37
|
+
TData,
|
|
38
|
+
TConnectedComponent extends Component,
|
|
39
|
+
> = TData extends DrawerDataNotProvided
|
|
40
|
+
? InferDrawerData<TConnectedComponent>
|
|
41
|
+
: TData;
|
|
42
|
+
|
|
43
|
+
interface DrawerInjectData<TData> {
|
|
44
|
+
consumed?: boolean;
|
|
45
|
+
extendApi?: (api: ExtendedDrawerApi<TData>) => void;
|
|
46
|
+
options?: DrawerApiOptions;
|
|
47
|
+
reCreateDrawer?: () => Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const { globalEscapeShortcutKey } = usePreferences();
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 默认配置
|
|
54
|
+
*/
|
|
55
|
+
const DEFAULT_DRAWER_PROPS: Partial<DrawerProps> = {};
|
|
56
|
+
|
|
57
|
+
export function setDefaultDrawerProps(props: Partial<DrawerProps>) {
|
|
58
|
+
Object.assign(DEFAULT_DRAWER_PROPS, props);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function useVbenDrawer<
|
|
62
|
+
TData = DrawerDataNotProvided,
|
|
63
|
+
TConnectedComponent extends Component = Component,
|
|
64
|
+
>(options: DrawerApiOptions<TConnectedComponent> = {}) {
|
|
65
|
+
type TResolvedData = ResolvedDrawerData<TData, TConnectedComponent>;
|
|
66
|
+
|
|
67
|
+
// Drawer一般会抽离出来,所以如果有传入 connectedComponent,则表示为外部调用,与内部组件进行连接
|
|
68
|
+
// 外部的Drawer通过provide/inject传递api
|
|
69
|
+
|
|
70
|
+
const defaultOptions = {
|
|
71
|
+
closeOnPressEscape: globalEscapeShortcutKey.value, // 全局Esc快捷键配置
|
|
72
|
+
...options,
|
|
73
|
+
};
|
|
74
|
+
const { connectedComponent } = options;
|
|
75
|
+
if (connectedComponent) {
|
|
76
|
+
const extendedApi = shallowReactive({}) as ExtendedDrawerApi<TResolvedData>;
|
|
77
|
+
const isDrawerReady = ref(true);
|
|
78
|
+
const Drawer = defineComponent(
|
|
79
|
+
(props: DrawerProps, { attrs, slots }) => {
|
|
80
|
+
function rebindApi(api: ExtendedDrawerApi<TResolvedData>) {
|
|
81
|
+
Object.setPrototypeOf(extendedApi, markRaw(api));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
provide(USER_DRAWER_INJECT_KEY, {
|
|
85
|
+
extendApi: rebindApi,
|
|
86
|
+
consumed: false,
|
|
87
|
+
options: defaultOptions,
|
|
88
|
+
async reCreateDrawer() {
|
|
89
|
+
isDrawerReady.value = false;
|
|
90
|
+
await nextTick();
|
|
91
|
+
isDrawerReady.value = true;
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
void checkProps(extendedApi, {
|
|
95
|
+
...props,
|
|
96
|
+
...attrs,
|
|
97
|
+
...slots,
|
|
98
|
+
});
|
|
99
|
+
return () =>
|
|
100
|
+
h(
|
|
101
|
+
isDrawerReady.value ? connectedComponent : 'div',
|
|
102
|
+
{ ...props, ...attrs },
|
|
103
|
+
slots,
|
|
104
|
+
);
|
|
105
|
+
},
|
|
106
|
+
// eslint-disable-next-line vue/one-component-per-file
|
|
107
|
+
{
|
|
108
|
+
name: 'VbenParentDrawer',
|
|
109
|
+
inheritAttrs: false,
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
return [Drawer, extendedApi] as const;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const injectData = inject<DrawerInjectData<TResolvedData>>(
|
|
117
|
+
USER_DRAWER_INJECT_KEY,
|
|
118
|
+
{},
|
|
119
|
+
);
|
|
120
|
+
const isConsumed = injectData.consumed;
|
|
121
|
+
const effectiveOptions = isConsumed ? {} : injectData.options;
|
|
122
|
+
if (!isConsumed && injectData.consumed !== undefined) {
|
|
123
|
+
injectData.consumed = true;
|
|
124
|
+
}
|
|
125
|
+
onBeforeUnmount(() => {
|
|
126
|
+
if (!isConsumed && injectData.consumed !== undefined) {
|
|
127
|
+
injectData.consumed = false;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const mergedOptions = {
|
|
132
|
+
...DEFAULT_DRAWER_PROPS,
|
|
133
|
+
...effectiveOptions,
|
|
134
|
+
...defaultOptions,
|
|
135
|
+
} as DrawerApiOptions;
|
|
136
|
+
|
|
137
|
+
mergedOptions.onOpenChange = (isOpen: boolean) => {
|
|
138
|
+
options.onOpenChange?.(isOpen);
|
|
139
|
+
if (!isConsumed) {
|
|
140
|
+
injectData.options?.onOpenChange?.(isOpen);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const onClosed = mergedOptions.onClosed;
|
|
145
|
+
mergedOptions.onClosed = () => {
|
|
146
|
+
onClosed?.();
|
|
147
|
+
if (mergedOptions.destroyOnClose && !isConsumed) {
|
|
148
|
+
if (injectData.consumed !== undefined) {
|
|
149
|
+
injectData.consumed = false;
|
|
150
|
+
}
|
|
151
|
+
void injectData.reCreateDrawer?.();
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const api = new DrawerApi<TResolvedData>(mergedOptions);
|
|
155
|
+
|
|
156
|
+
const extendedApi = api as ExtendedDrawerApi<TResolvedData>;
|
|
157
|
+
|
|
158
|
+
extendedApi.useStore = (selector) => {
|
|
159
|
+
return useSelector(api.store, selector);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const Drawer = defineComponent(
|
|
163
|
+
(props: DrawerProps, { attrs, slots }) => {
|
|
164
|
+
return () =>
|
|
165
|
+
h(VbenDrawer, { ...props, ...attrs, drawerApi: extendedApi }, slots);
|
|
166
|
+
},
|
|
167
|
+
// eslint-disable-next-line vue/one-component-per-file
|
|
168
|
+
{
|
|
169
|
+
name: 'VbenDrawer',
|
|
170
|
+
inheritAttrs: false,
|
|
171
|
+
},
|
|
172
|
+
);
|
|
173
|
+
injectData.extendApi?.(extendedApi);
|
|
174
|
+
return [Drawer, extendedApi] as const;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function createVbenDrawer<TData = unknown>() {
|
|
178
|
+
return function useTypedVbenDrawer<
|
|
179
|
+
TConnectedComponent extends Component = Component,
|
|
180
|
+
>(options: DrawerApiOptions<TConnectedComponent> = {}) {
|
|
181
|
+
return useVbenDrawer<TData, TConnectedComponent>(options);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
async function checkProps<TData>(
|
|
186
|
+
api: ExtendedDrawerApi<TData>,
|
|
187
|
+
attrs: Record<string, any>,
|
|
188
|
+
) {
|
|
189
|
+
if (!attrs || Object.keys(attrs).length === 0) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
await nextTick();
|
|
193
|
+
|
|
194
|
+
const state = api?.store?.state;
|
|
195
|
+
|
|
196
|
+
if (!state) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const stateKeys = new Set(Object.keys(state));
|
|
201
|
+
|
|
202
|
+
for (const attr of Object.keys(attrs)) {
|
|
203
|
+
if (stateKeys.has(attr) && !['class'].includes(attr)) {
|
|
204
|
+
// connectedComponent存在时,不要传入Drawer的props,会造成复杂度提升,如果你需要修改Drawer的props,请使用 useVbenDrawer 或者api
|
|
205
|
+
console.warn(
|
|
206
|
+
`[Vben Drawer]: When 'connectedComponent' exists, do not set props or slots '${attr}', which will increase complexity. If you need to modify the props of Drawer, please use useVbenDrawer or api.`,
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { ModalApiOptions, ModalState } from './modal';
|
|
2
|
+
|
|
3
|
+
import { Store } from '@melt-js/libs-vben/shared/store';
|
|
4
|
+
import { bindMethods, isFunction } from '@melt-js/libs-vben/shared/utils';
|
|
5
|
+
|
|
6
|
+
export class ModalApi<TData = unknown> {
|
|
7
|
+
// 共享数据
|
|
8
|
+
public sharedData: Record<'payload', TData | undefined> = {
|
|
9
|
+
payload: undefined,
|
|
10
|
+
};
|
|
11
|
+
public store: Store<ModalState>;
|
|
12
|
+
|
|
13
|
+
private api: Pick<
|
|
14
|
+
ModalApiOptions,
|
|
15
|
+
| 'onBeforeClose'
|
|
16
|
+
| 'onCancel'
|
|
17
|
+
| 'onClosed'
|
|
18
|
+
| 'onConfirm'
|
|
19
|
+
| 'onOpenChange'
|
|
20
|
+
| 'onOpened'
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
// private prevState!: ModalState;
|
|
24
|
+
private state!: ModalState;
|
|
25
|
+
|
|
26
|
+
constructor(options: ModalApiOptions = {}) {
|
|
27
|
+
const {
|
|
28
|
+
connectedComponent: _,
|
|
29
|
+
onBeforeClose,
|
|
30
|
+
onCancel,
|
|
31
|
+
onClosed,
|
|
32
|
+
onConfirm,
|
|
33
|
+
onOpenChange,
|
|
34
|
+
onOpened,
|
|
35
|
+
...storeState
|
|
36
|
+
} = options;
|
|
37
|
+
|
|
38
|
+
const defaultState: ModalState = {
|
|
39
|
+
bordered: true,
|
|
40
|
+
centered: false,
|
|
41
|
+
class: '',
|
|
42
|
+
closeOnClickModal: true,
|
|
43
|
+
closeOnPressEscape: true,
|
|
44
|
+
confirmDisabled: false,
|
|
45
|
+
confirmLoading: false,
|
|
46
|
+
contentClass: '',
|
|
47
|
+
destroyOnClose: true,
|
|
48
|
+
draggable: false,
|
|
49
|
+
overflow: false,
|
|
50
|
+
footer: true,
|
|
51
|
+
footerClass: '',
|
|
52
|
+
fullscreen: false,
|
|
53
|
+
fullscreenButton: true,
|
|
54
|
+
header: true,
|
|
55
|
+
headerClass: '',
|
|
56
|
+
isOpen: false,
|
|
57
|
+
loading: false,
|
|
58
|
+
modal: true,
|
|
59
|
+
openAutoFocus: false,
|
|
60
|
+
showCancelButton: true,
|
|
61
|
+
showConfirmButton: true,
|
|
62
|
+
title: '',
|
|
63
|
+
animationType: 'slide',
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
this.store = new Store<ModalState>({
|
|
67
|
+
...defaultState,
|
|
68
|
+
...storeState,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
this.store.subscribe((state) => {
|
|
72
|
+
// 每次更新状态时,都会调用 onOpenChange 回调函数
|
|
73
|
+
const prevIsOpen = this.state?.isOpen;
|
|
74
|
+
this.state = state;
|
|
75
|
+
if (state?.isOpen !== prevIsOpen) {
|
|
76
|
+
this.api.onOpenChange?.(!!state?.isOpen);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
this.state = this.store.state;
|
|
81
|
+
|
|
82
|
+
this.api = {
|
|
83
|
+
onBeforeClose,
|
|
84
|
+
onCancel,
|
|
85
|
+
onClosed,
|
|
86
|
+
onConfirm,
|
|
87
|
+
onOpenChange,
|
|
88
|
+
onOpened,
|
|
89
|
+
};
|
|
90
|
+
bindMethods(this);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* 关闭弹窗
|
|
95
|
+
* @description 关闭弹窗时会调用 onBeforeClose 钩子函数,如果 onBeforeClose 返回 false,则不关闭弹窗
|
|
96
|
+
*/
|
|
97
|
+
async close() {
|
|
98
|
+
// 通过 onBeforeClose 钩子函数来判断是否允许关闭弹窗
|
|
99
|
+
// 如果 onBeforeClose 返回 false,则不关闭弹窗
|
|
100
|
+
const allowClose = (await this.api.onBeforeClose?.()) ?? true;
|
|
101
|
+
if (allowClose) {
|
|
102
|
+
this.store.setState((prev) => ({
|
|
103
|
+
...prev,
|
|
104
|
+
isOpen: false,
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
getData(): TData | undefined {
|
|
110
|
+
return this.sharedData.payload;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* 锁定弹窗状态(用于提交过程中的等待状态)
|
|
115
|
+
* @description 锁定状态将禁用默认的取消按钮,使用spinner覆盖弹窗内容,隐藏关闭按钮,阻止手动关闭弹窗,将默认的提交按钮标记为loading状态
|
|
116
|
+
* @param isLocked 是否锁定
|
|
117
|
+
*/
|
|
118
|
+
lock(isLocked = true) {
|
|
119
|
+
return this.setState({ submitting: isLocked });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 取消操作
|
|
124
|
+
*/
|
|
125
|
+
onCancel() {
|
|
126
|
+
if (this.api.onCancel) {
|
|
127
|
+
this.api.onCancel?.();
|
|
128
|
+
} else {
|
|
129
|
+
void this.close();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 弹窗关闭动画播放完毕后的回调
|
|
135
|
+
*/
|
|
136
|
+
onClosed() {
|
|
137
|
+
if (!this.state.isOpen) {
|
|
138
|
+
this.api.onClosed?.();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* 确认操作
|
|
144
|
+
*/
|
|
145
|
+
onConfirm() {
|
|
146
|
+
this.api.onConfirm?.();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 弹窗打开动画播放完毕后的回调
|
|
151
|
+
*/
|
|
152
|
+
onOpened() {
|
|
153
|
+
if (this.state.isOpen) {
|
|
154
|
+
this.api.onOpened?.();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
open() {
|
|
159
|
+
this.store.setState((prev) => ({
|
|
160
|
+
...prev,
|
|
161
|
+
isOpen: true,
|
|
162
|
+
submitting: false,
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
setData(payload: TData) {
|
|
167
|
+
this.sharedData.payload = payload;
|
|
168
|
+
return this;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
setState(
|
|
172
|
+
stateOrFn:
|
|
173
|
+
| ((prev: ModalState) => Partial<ModalState>)
|
|
174
|
+
| Partial<ModalState>,
|
|
175
|
+
) {
|
|
176
|
+
if (isFunction(stateOrFn)) {
|
|
177
|
+
this.store.setState(stateOrFn);
|
|
178
|
+
} else {
|
|
179
|
+
this.store.setState((prev) => ({ ...prev, ...stateOrFn }));
|
|
180
|
+
}
|
|
181
|
+
return this;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* 解除弹窗的锁定状态
|
|
186
|
+
* @description 解除由lock方法设置的锁定状态,是lock(false)的别名
|
|
187
|
+
*/
|
|
188
|
+
unlock() {
|
|
189
|
+
return this.lock(false);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type { ClassType, MaybePromise } from '@melt-js/libs-vben/typings';
|
|
4
|
+
|
|
5
|
+
import type { ModalApi } from './modal-api';
|
|
6
|
+
|
|
7
|
+
export interface ModalProps {
|
|
8
|
+
/**
|
|
9
|
+
* 动画类型
|
|
10
|
+
* @default 'slide'
|
|
11
|
+
*/
|
|
12
|
+
animationType?: 'scale' | 'slide';
|
|
13
|
+
/**
|
|
14
|
+
* 是否要挂载到内容区域
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
appendToMain?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 是否显示边框
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
bordered?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 取消按钮文字
|
|
25
|
+
*/
|
|
26
|
+
cancelText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* 是否居中
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
centered?: boolean;
|
|
32
|
+
|
|
33
|
+
class?: ClassType;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 是否显示右上角的关闭按钮
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
closable?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 点击弹窗遮罩是否关闭弹窗
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
closeOnClickModal?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 按下 ESC 键是否关闭弹窗
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
closeOnPressEscape?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 禁用确认按钮
|
|
52
|
+
*/
|
|
53
|
+
confirmDisabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 确定按钮 loading
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
confirmLoading?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 确定按钮文字
|
|
61
|
+
*/
|
|
62
|
+
confirmText?: string;
|
|
63
|
+
contentClass?: ClassType;
|
|
64
|
+
/**
|
|
65
|
+
* 弹窗描述
|
|
66
|
+
*/
|
|
67
|
+
description?: string;
|
|
68
|
+
/**
|
|
69
|
+
* 在关闭时销毁弹窗
|
|
70
|
+
*/
|
|
71
|
+
destroyOnClose?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 是否可拖拽
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
draggable?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 是否显示底部
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
footer?: boolean;
|
|
82
|
+
footerClass?: ClassType;
|
|
83
|
+
/**
|
|
84
|
+
* 是否全屏
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
fullscreen?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 是否显示全屏按钮
|
|
90
|
+
* @default true
|
|
91
|
+
*/
|
|
92
|
+
fullscreenButton?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* 是否显示顶栏
|
|
95
|
+
* @default true
|
|
96
|
+
*/
|
|
97
|
+
header?: boolean;
|
|
98
|
+
headerClass?: ClassType;
|
|
99
|
+
/**
|
|
100
|
+
* 弹窗加载状态
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
loading?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* 是否显示遮罩
|
|
106
|
+
* @default true
|
|
107
|
+
*/
|
|
108
|
+
modal?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* 是否自动聚焦
|
|
111
|
+
*/
|
|
112
|
+
openAutoFocus?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* 拖动范围是否可以超出可视区
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
overflow?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* 弹窗遮罩模糊效果
|
|
120
|
+
*/
|
|
121
|
+
overlayBlur?: number;
|
|
122
|
+
/**
|
|
123
|
+
* 是否显示取消按钮
|
|
124
|
+
* @default true
|
|
125
|
+
*/
|
|
126
|
+
showCancelButton?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* 是否显示确认按钮
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
showConfirmButton?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* 提交中(锁定弹窗状态)
|
|
134
|
+
*/
|
|
135
|
+
submitting?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* 弹窗标题
|
|
138
|
+
*/
|
|
139
|
+
title?: string;
|
|
140
|
+
/**
|
|
141
|
+
* 弹窗标题提示
|
|
142
|
+
*/
|
|
143
|
+
titleTooltip?: string;
|
|
144
|
+
/**
|
|
145
|
+
* 弹窗层级
|
|
146
|
+
*/
|
|
147
|
+
zIndex?: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface ModalState extends ModalProps {
|
|
151
|
+
/** 弹窗打开状态 */
|
|
152
|
+
isOpen?: boolean;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type ExtendedModalApi<TData = unknown> = ModalApi<TData> & {
|
|
156
|
+
useStore: <T = NoInfer<ModalState>>(
|
|
157
|
+
selector?: (state: NoInfer<ModalState>) => T,
|
|
158
|
+
) => Readonly<Ref<T>>;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
type ModalComponentInstance<TComponent extends Component> =
|
|
162
|
+
TComponent extends abstract new (...args: any[]) => infer TInstance
|
|
163
|
+
? TInstance
|
|
164
|
+
: never;
|
|
165
|
+
|
|
166
|
+
export type InferModalData<TComponent extends Component> = [
|
|
167
|
+
ModalComponentInstance<TComponent>,
|
|
168
|
+
] extends [never]
|
|
169
|
+
? unknown
|
|
170
|
+
: ModalComponentInstance<TComponent> extends {
|
|
171
|
+
modalApi: ExtendedModalApi<infer TData>;
|
|
172
|
+
}
|
|
173
|
+
? TData
|
|
174
|
+
: unknown;
|
|
175
|
+
|
|
176
|
+
export interface ModalApiOptions<
|
|
177
|
+
TConnectedComponent extends Component = Component,
|
|
178
|
+
> extends ModalState {
|
|
179
|
+
/**
|
|
180
|
+
* 独立的弹窗组件
|
|
181
|
+
*/
|
|
182
|
+
connectedComponent?: TConnectedComponent;
|
|
183
|
+
/**
|
|
184
|
+
* 关闭前的回调,返回 false 可以阻止关闭
|
|
185
|
+
* @returns
|
|
186
|
+
*/
|
|
187
|
+
onBeforeClose?: () => MaybePromise<boolean | undefined>;
|
|
188
|
+
/**
|
|
189
|
+
* 点击取消按钮的回调
|
|
190
|
+
*/
|
|
191
|
+
onCancel?: () => void;
|
|
192
|
+
/**
|
|
193
|
+
* 弹窗关闭动画结束的回调
|
|
194
|
+
* @returns
|
|
195
|
+
*/
|
|
196
|
+
onClosed?: () => void;
|
|
197
|
+
/**
|
|
198
|
+
* 点击确定按钮的回调
|
|
199
|
+
*/
|
|
200
|
+
onConfirm?: () => void;
|
|
201
|
+
/**
|
|
202
|
+
* 弹窗状态变化回调
|
|
203
|
+
* @param isOpen
|
|
204
|
+
* @returns
|
|
205
|
+
*/
|
|
206
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
207
|
+
/**
|
|
208
|
+
* 弹窗打开动画结束的回调
|
|
209
|
+
* @returns
|
|
210
|
+
*/
|
|
211
|
+
onOpened?: () => void;
|
|
212
|
+
}
|