@oinone/kunlun-vue-admin-layout 6.2.0
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/README.md +1 -0
- package/dist/oinone-kunlun-vue-admin-layout.css +1 -0
- package/dist/oinone-kunlun-vue-admin-layout.esm.js +12049 -0
- package/dist/oinone-kunlun-vue-admin-layout.scss +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/src/basic/MaskWidget.d.ts +17 -0
- package/dist/types/src/basic/index.d.ts +2 -0
- package/dist/types/src/basic/register/index.d.ts +1 -0
- package/dist/types/src/basic/register/manager.d.ts +7 -0
- package/dist/types/src/basic/token/BaseMaskWidget.d.ts +55 -0
- package/dist/types/src/basic/token/index.d.ts +1 -0
- package/dist/types/src/component/app-switcher/AppSwitcher.vue.d.ts +84 -0
- package/dist/types/src/component/app-switcher/AppSwitcherMask.vue.d.ts +61 -0
- package/dist/types/src/component/app-switcher/AppSwitcherWidget.d.ts +33 -0
- package/dist/types/src/component/app-switcher/index.d.ts +3 -0
- package/dist/types/src/component/breadcrumb/BreadcrumbWidget.d.ts +33 -0
- package/dist/types/src/component/breadcrumb/DefaultBreadcrumb.vue.d.ts +58 -0
- package/dist/types/src/component/breadcrumb/index.d.ts +2 -0
- package/dist/types/src/component/debug/Debug.vue.d.ts +11 -0
- package/dist/types/src/component/debug/DebugWidget.d.ts +8 -0
- package/dist/types/src/component/debug/constants.d.ts +2 -0
- package/dist/types/src/component/debug/index.d.ts +6 -0
- package/dist/types/src/component/debug/spi/DebugMaskEditor.d.ts +6 -0
- package/dist/types/src/component/debug/spi/DebugRouterInitializeService.d.ts +4 -0
- package/dist/types/src/component/debug/spi/index.d.ts +1 -0
- package/dist/types/src/component/debug/typing.d.ts +159 -0
- package/dist/types/src/component/debug/view/DebugMainView.vue.d.ts +28 -0
- package/dist/types/src/component/debug/view/DebugMainViewWidget.d.ts +9 -0
- package/dist/types/src/component/debug/view/components/DebugDefaultInfo.vue.d.ts +22 -0
- package/dist/types/src/component/debug/view/components/DebugJsonView.vue.d.ts +26 -0
- package/dist/types/src/component/debug/view/components/DebugRequestInfoPanel.vue.d.ts +22 -0
- package/dist/types/src/component/debug/view/components/DebugResponsePanel.vue.d.ts +12 -0
- package/dist/types/src/component/debug/view/debug-api/DebugApi.vue.d.ts +52 -0
- package/dist/types/src/component/debug/view/debug-api/DebugApiWidget.d.ts +32 -0
- package/dist/types/src/component/debug/view/debug-utils.d.ts +44 -0
- package/dist/types/src/component/debug/view/debug-view/DebugView.vue.d.ts +78 -0
- package/dist/types/src/component/debug/view/debug-view/DebugViewWidget.d.ts +26 -0
- package/dist/types/src/component/debug/view/index.d.ts +5 -0
- package/dist/types/src/component/debug/view/service/DebugRuntimeContextService.d.ts +18 -0
- package/dist/types/src/component/debug/view/service/DebugStackInfoService.d.ts +27 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugConfigureService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.d.ts +8 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugFunctionService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugModelService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/index.d.ts +20 -0
- package/dist/types/src/component/debug/view/storage.d.ts +19 -0
- package/dist/types/src/component/debug/view/useDebugRequestInfo.d.ts +7 -0
- package/dist/types/src/component/divider/Divider.vue.d.ts +2 -0
- package/dist/types/src/component/divider/DividerWidget.d.ts +4 -0
- package/dist/types/src/component/divider/index.d.ts +1 -0
- package/dist/types/src/component/index.d.ts +14 -0
- package/dist/types/src/component/language/DefaultLanguage.vue.d.ts +34 -0
- package/dist/types/src/component/language/LanguageWidget.d.ts +16 -0
- package/dist/types/src/component/language/index.d.ts +1 -0
- package/dist/types/src/component/layout/BaseMaskLayoutWidget.d.ts +4 -0
- package/dist/types/src/component/layout/MaskBlock.vue.d.ts +24 -0
- package/dist/types/src/component/layout/block/MaskBlockWidget.d.ts +4 -0
- package/dist/types/src/component/layout/block/index.d.ts +1 -0
- package/dist/types/src/component/layout/container/MaskContainerWidget.d.ts +4 -0
- package/dist/types/src/component/layout/container/index.d.ts +1 -0
- package/dist/types/src/component/layout/content/MaskContentWidget.d.ts +7 -0
- package/dist/types/src/component/layout/content/index.d.ts +1 -0
- package/dist/types/src/component/layout/grid/Grid.vue.d.ts +2 -0
- package/dist/types/src/component/layout/grid/GridWidget.d.ts +9 -0
- package/dist/types/src/component/layout/grid/index.d.ts +1 -0
- package/dist/types/src/component/layout/header/MaskHeaderWidget.d.ts +4 -0
- package/dist/types/src/component/layout/header/index.d.ts +1 -0
- package/dist/types/src/component/layout/index.d.ts +9 -0
- package/dist/types/src/component/layout/mask/MaskRootWidget.d.ts +4 -0
- package/dist/types/src/component/layout/mask/index.d.ts +1 -0
- package/dist/types/src/component/layout/sidebar/MaskSidebarWidget.d.ts +10 -0
- package/dist/types/src/component/layout/sidebar/index.d.ts +1 -0
- package/dist/types/src/component/layout/widget/MaskCommonWidget.d.ts +14 -0
- package/dist/types/src/component/layout/widget/index.d.ts +1 -0
- package/dist/types/src/component/menu/DefaultMenu.vue.d.ts +115 -0
- package/dist/types/src/component/menu/DefaultSubMenu.vue.d.ts +17 -0
- package/dist/types/src/component/menu/MenuWidget.d.ts +71 -0
- package/dist/types/src/component/menu/index.d.ts +3 -0
- package/dist/types/src/component/multi-tabs/MultiTabs.vue.d.ts +151 -0
- package/dist/types/src/component/multi-tabs/MultiTabsWidget.d.ts +60 -0
- package/dist/types/src/component/multi-tabs/index.d.ts +2 -0
- package/dist/types/src/component/multi-tabs/typing.d.ts +6 -0
- package/dist/types/src/component/notification/DefaultNotification.vue.d.ts +61 -0
- package/dist/types/src/component/notification/NotificationWidget.d.ts +139 -0
- package/dist/types/src/component/notification/index.d.ts +2 -0
- package/dist/types/src/component/order-statistic/OrderStatistic.vue.d.ts +8 -0
- package/dist/types/src/component/order-statistic/index.d.ts +14 -0
- package/dist/types/src/component/partner-switcher/PartnerSwitcher.vue.d.ts +28 -0
- package/dist/types/src/component/partner-switcher/PartnerSwitcherWidget.d.ts +15 -0
- package/dist/types/src/component/partner-switcher/index.d.ts +6 -0
- package/dist/types/src/component/partner-switcher/service/PartnerSwitcherService.d.ts +17 -0
- package/dist/types/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.d.ts +17 -0
- package/dist/types/src/component/partner-switcher/service/index.d.ts +2 -0
- package/dist/types/src/component/partner-switcher/session/PartnerInfoSession.d.ts +26 -0
- package/dist/types/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.d.ts +15 -0
- package/dist/types/src/component/partner-switcher/session/index.d.ts +2 -0
- package/dist/types/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.d.ts +6 -0
- package/dist/types/src/component/partner-switcher/spi/index.d.ts +1 -0
- package/dist/types/src/component/partner-switcher/typing/index.d.ts +1 -0
- package/dist/types/src/component/partner-switcher/typing/partner.d.ts +20 -0
- package/dist/types/src/component/quick-search/QuickSearch.vue.d.ts +29 -0
- package/dist/types/src/component/quick-search/index.d.ts +24 -0
- package/dist/types/src/component/user/DefaultUser.vue.d.ts +39 -0
- package/dist/types/src/component/user/UserWidget.d.ts +16 -0
- package/dist/types/src/component/user/index.d.ts +1 -0
- package/dist/types/src/config/DebugConfig.d.ts +16 -0
- package/dist/types/src/config/PartnerSwitcherConfig.d.ts +16 -0
- package/dist/types/src/config/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +10 -0
- package/dist/types/src/service/index.d.ts +5 -0
- package/dist/types/src/service/menu-service.d.ts +12 -0
- package/dist/types/src/service/message-service.d.ts +16 -0
- package/dist/types/src/service/module-service.d.ts +7 -0
- package/dist/types/src/service/top-bar-service.d.ts +10 -0
- package/dist/types/src/service/user-service.d.ts +4 -0
- package/dist/types/src/spi/index.d.ts +1 -0
- package/dist/types/src/spi/mask-editor.d.ts +54 -0
- package/dist/types/src/tags/Block.vue.d.ts +5 -0
- package/dist/types/src/tags/Breadcrumb.vue.d.ts +5 -0
- package/dist/types/src/tags/Container.vue.d.ts +5 -0
- package/dist/types/src/tags/Content.vue.d.ts +5 -0
- package/dist/types/src/tags/Header.vue.d.ts +5 -0
- package/dist/types/src/tags/Mask.vue.d.ts +5 -0
- package/dist/types/src/tags/MultiTabs.vue.d.ts +5 -0
- package/dist/types/src/tags/Sidebar.vue.d.ts +5 -0
- package/dist/types/src/tags/Widget.vue.d.ts +5 -0
- package/dist/types/src/tags/context/context.d.ts +8 -0
- package/dist/types/src/tags/context/index.d.ts +1 -0
- package/dist/types/src/tags/index.d.ts +6 -0
- package/dist/types/src/tags/mixin/MaskWidgetTagMixin.d.ts +2 -0
- package/dist/types/src/tags/mixin/index.d.ts +3 -0
- package/dist/types/src/tags/mixin/typing.d.ts +6 -0
- package/dist/types/src/tags/mixin/use-mask-widget-tag.d.ts +38 -0
- package/dist/types/src/tags/register/index.d.ts +1 -0
- package/dist/types/src/tags/register/manager.d.ts +9 -0
- package/dist/types/src/tags/resolve/index.d.ts +2 -0
- package/dist/types/src/tags/resolve/internal/index.d.ts +2 -0
- package/dist/types/src/tags/resolve/internal/typing.d.ts +5 -0
- package/dist/types/src/tags/resolve/internal/widget-resolve.d.ts +3 -0
- package/dist/types/src/tags/resolve/typing.d.ts +26 -0
- package/dist/types/src/tags/resolve/widget-resolve.d.ts +5 -0
- package/dist/types/src/template/default-mask.d.ts +2 -0
- package/dist/types/src/template/index.d.ts +6 -0
- package/dist/types/src/theme/index.d.ts +1 -0
- package/dist/types/src/typing/constant.d.ts +1 -0
- package/dist/types/src/typing/index.d.ts +3 -0
- package/dist/types/src/typing/menu.d.ts +12 -0
- package/dist/types/src/typing/stream-symble.d.ts +12 -0
- package/dist/types/src/util/HomepageUtils.d.ts +3 -0
- package/dist/types/src/util/MenuUtil.d.ts +5 -0
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/unauthorized-action.d.ts +14 -0
- package/dist/types/src/utils.d.ts +86 -0
- package/index.ts +1 -0
- package/package.json +47 -0
- package/rollup.config.js +33 -0
- package/src/basic/MaskWidget.ts +74 -0
- package/src/basic/index.ts +2 -0
- package/src/basic/register/index.ts +1 -0
- package/src/basic/register/manager.ts +17 -0
- package/src/basic/token/BaseMaskWidget.ts +187 -0
- package/src/basic/token/index.ts +1 -0
- package/src/component/app-switcher/AppSwitcher.vue +133 -0
- package/src/component/app-switcher/AppSwitcherMask.vue +237 -0
- package/src/component/app-switcher/AppSwitcherWidget.ts +152 -0
- package/src/component/app-switcher/index.ts +3 -0
- package/src/component/breadcrumb/BreadcrumbWidget.ts +167 -0
- package/src/component/breadcrumb/DefaultBreadcrumb.vue +95 -0
- package/src/component/breadcrumb/index.ts +2 -0
- package/src/component/debug/Debug.vue +28 -0
- package/src/component/debug/DebugWidget.ts +38 -0
- package/src/component/debug/constants.ts +3 -0
- package/src/component/debug/index.ts +6 -0
- package/src/component/debug/spi/DebugMaskEditor.ts +19 -0
- package/src/component/debug/spi/DebugRouterInitializeService.ts +21 -0
- package/src/component/debug/spi/index.ts +1 -0
- package/src/component/debug/typing.ts +191 -0
- package/src/component/debug/view/DebugMainView.vue +206 -0
- package/src/component/debug/view/DebugMainViewWidget.ts +42 -0
- package/src/component/debug/view/components/DebugDefaultInfo.vue +31 -0
- package/src/component/debug/view/components/DebugJsonView.vue +107 -0
- package/src/component/debug/view/components/DebugRequestInfoPanel.vue +129 -0
- package/src/component/debug/view/components/DebugResponsePanel.vue +66 -0
- package/src/component/debug/view/components/runtime-context/DebugRuntimeFieldComponent.vue +29 -0
- package/src/component/debug/view/debug-api/DebugApi.vue +225 -0
- package/src/component/debug/view/debug-api/DebugApiWidget.ts +400 -0
- package/src/component/debug/view/debug-utils.ts +114 -0
- package/src/component/debug/view/debug-view/DebugView.vue +331 -0
- package/src/component/debug/view/debug-view/DebugViewWidget.ts +181 -0
- package/src/component/debug/view/index.ts +6 -0
- package/src/component/debug/view/service/DebugRuntimeContextService.ts +21 -0
- package/src/component/debug/view/service/DebugStackInfoService.ts +33 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.ts +28 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.ts +33 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.ts +30 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.ts +16 -0
- package/src/component/debug/view/service/impl/stack-info/DebugBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugConfigureService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.ts +62 -0
- package/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugFunctionService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugModelService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.ts +22 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.ts +35 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.ts +19 -0
- package/src/component/debug/view/service/index.ts +22 -0
- package/src/component/debug/view/storage.ts +35 -0
- package/src/component/debug/view/useDebugRequestInfo.ts +17 -0
- package/src/component/divider/Divider.vue +15 -0
- package/src/component/divider/DividerWidget.ts +12 -0
- package/src/component/divider/index.ts +1 -0
- package/src/component/index.ts +15 -0
- package/src/component/language/DefaultLanguage.vue +111 -0
- package/src/component/language/LanguageWidget.ts +72 -0
- package/src/component/language/index.ts +1 -0
- package/src/component/layout/BaseMaskLayoutWidget.ts +12 -0
- package/src/component/layout/MaskBlock.vue +31 -0
- package/src/component/layout/block/MaskBlockWidget.ts +17 -0
- package/src/component/layout/block/index.ts +1 -0
- package/src/component/layout/container/MaskContainerWidget.ts +13 -0
- package/src/component/layout/container/index.ts +1 -0
- package/src/component/layout/content/MaskContentWidget.ts +41 -0
- package/src/component/layout/content/index.ts +1 -0
- package/src/component/layout/grid/Grid.vue +10 -0
- package/src/component/layout/grid/GridWidget.ts +62 -0
- package/src/component/layout/grid/index.ts +1 -0
- package/src/component/layout/header/MaskHeaderWidget.ts +13 -0
- package/src/component/layout/header/index.ts +1 -0
- package/src/component/layout/index.ts +9 -0
- package/src/component/layout/mask/MaskRootWidget.ts +13 -0
- package/src/component/layout/mask/index.ts +1 -0
- package/src/component/layout/sidebar/MaskSidebarWidget.ts +31 -0
- package/src/component/layout/sidebar/index.ts +1 -0
- package/src/component/layout/widget/MaskCommonWidget.ts +95 -0
- package/src/component/layout/widget/index.ts +1 -0
- package/src/component/menu/DefaultMenu.vue +252 -0
- package/src/component/menu/DefaultSubMenu.vue +68 -0
- package/src/component/menu/MenuWidget.ts +349 -0
- package/src/component/menu/index.ts +3 -0
- package/src/component/menu/style/common.scss +411 -0
- package/src/component/menu/style/index.scss +2 -0
- package/src/component/menu/style/menu-theme/index.scss +5 -0
- package/src/component/menu/style/menu-theme/theme2.scss +37 -0
- package/src/component/menu/style/menu-theme/theme3.scss +59 -0
- package/src/component/menu/style/menu-theme/theme4.scss +56 -0
- package/src/component/menu/style/menu-theme/theme5.scss +45 -0
- package/src/component/menu/style/menu-theme/theme6.scss +45 -0
- package/src/component/menu/style/mixin.scss +23 -0
- package/src/component/multi-tabs/MultiTabs.vue +475 -0
- package/src/component/multi-tabs/MultiTabsWidget.ts +450 -0
- package/src/component/multi-tabs/index.ts +2 -0
- package/src/component/multi-tabs/style/index.scss +217 -0
- package/src/component/multi-tabs/style/mixin.scss +13 -0
- package/src/component/multi-tabs/style/parameters.scss +2 -0
- package/src/component/multi-tabs/style/theme1.scss +92 -0
- package/src/component/multi-tabs/style/theme2.scss +89 -0
- package/src/component/multi-tabs/style/theme3.scss +60 -0
- package/src/component/multi-tabs/style/theme4.scss +85 -0
- package/src/component/multi-tabs/typing.ts +7 -0
- package/src/component/notification/DefaultNotification.vue +455 -0
- package/src/component/notification/NotificationWidget.ts +332 -0
- package/src/component/notification/index.ts +2 -0
- package/src/component/order-statistic/OrderStatistic.vue +12 -0
- package/src/component/order-statistic/index.ts +146 -0
- package/src/component/partner-switcher/PartnerSwitcher.vue +75 -0
- package/src/component/partner-switcher/PartnerSwitcherWidget.ts +70 -0
- package/src/component/partner-switcher/index.ts +6 -0
- package/src/component/partner-switcher/service/PartnerSwitcherService.ts +20 -0
- package/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.ts +48 -0
- package/src/component/partner-switcher/service/index.ts +2 -0
- package/src/component/partner-switcher/session/PartnerInfoSession.ts +32 -0
- package/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.ts +46 -0
- package/src/component/partner-switcher/session/index.ts +2 -0
- package/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.ts +24 -0
- package/src/component/partner-switcher/spi/index.ts +1 -0
- package/src/component/partner-switcher/typing/index.ts +1 -0
- package/src/component/partner-switcher/typing/partner.ts +22 -0
- package/src/component/quick-search/QuickSearch.vue +34 -0
- package/src/component/quick-search/index.ts +237 -0
- package/src/component/style/index.scss +4 -0
- package/src/component/style/layout.scss +229 -0
- package/src/component/user/DefaultUser.vue +92 -0
- package/src/component/user/UserWidget.ts +129 -0
- package/src/component/user/index.ts +1 -0
- package/src/config/DebugConfig.ts +30 -0
- package/src/config/PartnerSwitcherConfig.ts +30 -0
- package/src/config/index.ts +2 -0
- package/src/index.ts +11 -0
- package/src/service/index.ts +5 -0
- package/src/service/menu-service.ts +105 -0
- package/src/service/message-service.ts +65 -0
- package/src/service/module-service.ts +69 -0
- package/src/service/top-bar-service.ts +144 -0
- package/src/service/user-service.ts +10 -0
- package/src/shim-translate.d.ts +7 -0
- package/src/shim-vue.d.ts +6 -0
- package/src/spi/index.ts +1 -0
- package/src/spi/mask-editor.ts +102 -0
- package/src/tags/Block.vue +16 -0
- package/src/tags/Breadcrumb.vue +16 -0
- package/src/tags/Container.vue +16 -0
- package/src/tags/Content.vue +16 -0
- package/src/tags/Header.vue +16 -0
- package/src/tags/Mask.vue +16 -0
- package/src/tags/MultiTabs.vue +16 -0
- package/src/tags/Sidebar.vue +16 -0
- package/src/tags/Widget.vue +16 -0
- package/src/tags/context/context.ts +24 -0
- package/src/tags/context/index.ts +1 -0
- package/src/tags/index.ts +48 -0
- package/src/tags/mixin/MaskWidgetTagMixin.ts +79 -0
- package/src/tags/mixin/index.ts +3 -0
- package/src/tags/mixin/typing.ts +8 -0
- package/src/tags/mixin/use-mask-widget-tag.ts +172 -0
- package/src/tags/register/index.ts +1 -0
- package/src/tags/register/manager.ts +43 -0
- package/src/tags/resolve/index.ts +2 -0
- package/src/tags/resolve/internal/index.ts +2 -0
- package/src/tags/resolve/internal/typing.ts +6 -0
- package/src/tags/resolve/internal/widget-resolve.ts +57 -0
- package/src/tags/resolve/typing.ts +39 -0
- package/src/tags/resolve/widget-resolve.ts +64 -0
- package/src/template/default-mask.ts +51 -0
- package/src/template/index.ts +26 -0
- package/src/theme/index.ts +1 -0
- package/src/typing/constant.ts +3 -0
- package/src/typing/index.ts +3 -0
- package/src/typing/menu.ts +15 -0
- package/src/typing/stream-symble.ts +14 -0
- package/src/util/HomepageUtils.ts +41 -0
- package/src/util/MenuUtil.ts +18 -0
- package/src/util/index.ts +3 -0
- package/src/util/unauthorized-action.ts +98 -0
- package/src/utils.ts +716 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="['application-mask-container', hideMask && 'application-mask-container-hide']"
|
|
4
|
+
:style="{
|
|
5
|
+
'background-image': `url(${genStaticPath('背景1_1650609329143.png')})`
|
|
6
|
+
}"
|
|
7
|
+
@click.stop="onClose"
|
|
8
|
+
>
|
|
9
|
+
<div class="application-mask-close" @click.stop="onClose">
|
|
10
|
+
<i class="iconfont oinone-fanhui"></i>
|
|
11
|
+
</div>
|
|
12
|
+
<div
|
|
13
|
+
class="mask-container"
|
|
14
|
+
@click.stop="onClose"
|
|
15
|
+
:style="{
|
|
16
|
+
'background-image': `url(${genStaticPath('背景_1651138497267.png')})`
|
|
17
|
+
}"
|
|
18
|
+
>
|
|
19
|
+
<img class="application-mask-container-watermark" :src="genStaticPath('app-finder-bg.png')" />
|
|
20
|
+
<div class="mask-content" v-if="!showSearch">
|
|
21
|
+
<div class="application-collection" @click.stop v-if="likeApp && likeApp.length && !showSearch">
|
|
22
|
+
<div class="common-title">{{ translateValueByKey('我收藏的应用') }}</div>
|
|
23
|
+
<div class="application-collection-list collection-list-content">
|
|
24
|
+
<div
|
|
25
|
+
class="application-collection-item animation"
|
|
26
|
+
v-for="(item, index) in likeApp"
|
|
27
|
+
:key="index"
|
|
28
|
+
@click.stop="$emit('update:showMask', false), onCollectionClick(item)"
|
|
29
|
+
>
|
|
30
|
+
<div style="width: 70px; height: 70px">
|
|
31
|
+
<img :src="item.logo || DEFAULT_APPLICATION_LOGO()" alt="" />
|
|
32
|
+
</div>
|
|
33
|
+
<div class="text">{{ item.displayName || item.name }}</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="application-tabs" :class="!likeApp.length && 'application-tabs-fast'">
|
|
39
|
+
<div class="tabs" @click.stop>
|
|
40
|
+
<div
|
|
41
|
+
class="common-title tab"
|
|
42
|
+
v-if="hasBusiness"
|
|
43
|
+
@click.stop="active = 0"
|
|
44
|
+
:class="[active === 0 && 'active']"
|
|
45
|
+
>
|
|
46
|
+
{{ translateValueByKey('业务应用') }}
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
class="common-title tab"
|
|
50
|
+
v-if="hasDesigner"
|
|
51
|
+
@click.stop="active = 1"
|
|
52
|
+
:class="[active === 1 && 'active']"
|
|
53
|
+
>
|
|
54
|
+
{{ translateValueByKey('设计器') }}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div
|
|
58
|
+
class="application-collection-list"
|
|
59
|
+
@click.stop
|
|
60
|
+
:class="!likeApp.length && 'application-collection-list-fast'"
|
|
61
|
+
>
|
|
62
|
+
<div
|
|
63
|
+
class="application-collection-item animation"
|
|
64
|
+
v-for="app of currentApps"
|
|
65
|
+
:key="app.id"
|
|
66
|
+
@click.stop="onJump(app)"
|
|
67
|
+
>
|
|
68
|
+
<div style="width: 70px; height: 70px">
|
|
69
|
+
<img :src="app.logo || genStaticPath('default.png')" alt="" />
|
|
70
|
+
</div>
|
|
71
|
+
<div class="text">{{ app.displayName || app.name }}</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="search-icon" @click.stop="onSwitchSearch" v-if="!showSearch">
|
|
77
|
+
<oio-icon icon="oinone-sousuo" size="16" color="#fff"></oio-icon>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="search-content" v-if="showSearch">
|
|
80
|
+
<div class="search-wrapper" @click.stop>
|
|
81
|
+
<oio-icon class="left-icon" icon="oinone-sousuo" size="16" color="#fff"></oio-icon>
|
|
82
|
+
<input type="text" v-model="searchValue" ref="searchInputNode" />
|
|
83
|
+
<oio-icon
|
|
84
|
+
class="right-icon"
|
|
85
|
+
icon="oinone-qingchu"
|
|
86
|
+
size="16"
|
|
87
|
+
v-if="searchValue"
|
|
88
|
+
@click="searchValue = ''"
|
|
89
|
+
></oio-icon>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="application-collection-list" style="margin-top: 24px; width: 100%">
|
|
93
|
+
<div
|
|
94
|
+
class="application-collection-item animation"
|
|
95
|
+
v-for="app of searchApps"
|
|
96
|
+
:key="app.id"
|
|
97
|
+
@click.stop="onJump(app)"
|
|
98
|
+
>
|
|
99
|
+
<div style="width: 70px; height: 70px">
|
|
100
|
+
<img :src="app.logo || DEFAULT_APPLICATION_LOGO()" alt="" />
|
|
101
|
+
</div>
|
|
102
|
+
<div class="text">{{ app.displayName || app.name }}</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</template>
|
|
109
|
+
<script lang="ts">
|
|
110
|
+
import { genStaticPath, translateValueByKey } from '@oinone/kunlun-engine';
|
|
111
|
+
import { IModule } from '@oinone/kunlun-meta';
|
|
112
|
+
import { OioIcon } from '@oinone/kunlun-vue-ui-antd';
|
|
113
|
+
|
|
114
|
+
import { computed, defineComponent, nextTick, PropType, ref, watch } from 'vue';
|
|
115
|
+
import { DEFAULT_APPLICATION_LOGO } from '../../typing';
|
|
116
|
+
|
|
117
|
+
export default defineComponent({
|
|
118
|
+
name: 'AppSwitcherMask',
|
|
119
|
+
props: {
|
|
120
|
+
apps: {
|
|
121
|
+
type: Array as PropType<IModule[]>
|
|
122
|
+
},
|
|
123
|
+
likeApp: {
|
|
124
|
+
type: Array as PropType<IModule[]>
|
|
125
|
+
},
|
|
126
|
+
onCollectionClick: {
|
|
127
|
+
type: Function,
|
|
128
|
+
required: true
|
|
129
|
+
},
|
|
130
|
+
genStaticPath: {
|
|
131
|
+
type: Function,
|
|
132
|
+
default: genStaticPath
|
|
133
|
+
},
|
|
134
|
+
showMask: {
|
|
135
|
+
type: Boolean
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
emits: ['update:showMask', 'switch-app'],
|
|
139
|
+
components: {
|
|
140
|
+
OioIcon
|
|
141
|
+
},
|
|
142
|
+
setup(props, { emit }) {
|
|
143
|
+
const active = ref(0);
|
|
144
|
+
const searchValue = ref('');
|
|
145
|
+
const showSearch = ref(false);
|
|
146
|
+
const searchInputNode = ref<HTMLInputElement>(null as any);
|
|
147
|
+
const internalHideMask = ref(false);
|
|
148
|
+
const hideMask = computed<boolean>({
|
|
149
|
+
get: () => {
|
|
150
|
+
return internalHideMask.value || !props.showMask;
|
|
151
|
+
},
|
|
152
|
+
set: (val) => {
|
|
153
|
+
internalHideMask.value = val;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
const searchApps = computed(() => {
|
|
158
|
+
return searchValue.value ? props.apps?.filter((a: any) => a.displayName.includes(searchValue.value)) : [];
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const onSwitchSearch = () => {
|
|
162
|
+
showSearch.value = true;
|
|
163
|
+
|
|
164
|
+
nextTick(() => {
|
|
165
|
+
searchInputNode.value.focus();
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const onJump = (app) => {
|
|
170
|
+
emit('update:showMask', false);
|
|
171
|
+
emit('switch-app', app);
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const onClose = () => {
|
|
175
|
+
if (showSearch.value === true) {
|
|
176
|
+
showSearch.value = false;
|
|
177
|
+
} else {
|
|
178
|
+
hideMask.value = true;
|
|
179
|
+
|
|
180
|
+
const t = setTimeout(() => {
|
|
181
|
+
hideMask.value = false;
|
|
182
|
+
emit('update:showMask', false);
|
|
183
|
+
clearTimeout(t);
|
|
184
|
+
}, 400);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const designerCategory = ['BUSINESS_PROCESS', 'USER_EXPERIENCE'];
|
|
189
|
+
|
|
190
|
+
const hasDesigner = computed(() => {
|
|
191
|
+
return props.apps?.find((a: any) => designerCategory.includes(a.category));
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
const hasBusiness = computed(() => props.apps?.find((a: any) => !designerCategory.includes(a.category)));
|
|
195
|
+
|
|
196
|
+
const currentApps = computed(() => {
|
|
197
|
+
if (active.value === 0) {
|
|
198
|
+
return props.apps?.filter((a: any) => !designerCategory.includes(a.category));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return props.apps?.filter((a: any) => designerCategory.includes(a.category));
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
watch(
|
|
205
|
+
() => props.showMask,
|
|
206
|
+
(val) => {
|
|
207
|
+
if (val) {
|
|
208
|
+
if (!hasBusiness.value && active.value === 0) {
|
|
209
|
+
active.value = 1;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
deep: true
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
return {
|
|
219
|
+
DEFAULT_APPLICATION_LOGO,
|
|
220
|
+
|
|
221
|
+
hasBusiness,
|
|
222
|
+
hideMask,
|
|
223
|
+
active,
|
|
224
|
+
searchValue,
|
|
225
|
+
currentApps,
|
|
226
|
+
showSearch,
|
|
227
|
+
searchApps,
|
|
228
|
+
searchInputNode,
|
|
229
|
+
hasDesigner,
|
|
230
|
+
onSwitchSearch,
|
|
231
|
+
onJump,
|
|
232
|
+
onClose,
|
|
233
|
+
translateValueByKey
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
</script>
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
$systemMajorConfig,
|
|
3
|
+
getMajorConfigByModuleModule,
|
|
4
|
+
MajorConfig,
|
|
5
|
+
ModuleCache,
|
|
6
|
+
ReloadMaskCallChainingParameters,
|
|
7
|
+
setDefaultMajorConfig,
|
|
8
|
+
systemMajorConfig
|
|
9
|
+
} from '@oinone/kunlun-engine';
|
|
10
|
+
import { GlobalConfig, IModule } from '@oinone/kunlun-meta';
|
|
11
|
+
import { Router } from '@oinone/kunlun-router';
|
|
12
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
13
|
+
import { useRouter } from '@oinone/kunlun-vue-router';
|
|
14
|
+
import { Widget, WidgetSubjection } from '@oinone/kunlun-vue-widget';
|
|
15
|
+
import { MaskWidget } from '../../basic';
|
|
16
|
+
import { ModuleService } from '../../service';
|
|
17
|
+
import { appFinderSymbol, MenuCollapsedSymbol } from '../../typing';
|
|
18
|
+
import { gotoHomepage } from '../../util/HomepageUtils';
|
|
19
|
+
import AppSwitcher from './AppSwitcher.vue';
|
|
20
|
+
|
|
21
|
+
@SPI.ClassFactory(
|
|
22
|
+
MaskWidget.Token({
|
|
23
|
+
widget: 'app-switcher'
|
|
24
|
+
})
|
|
25
|
+
)
|
|
26
|
+
export class AppSwitcherWidget extends MaskWidget {
|
|
27
|
+
protected router!: Router;
|
|
28
|
+
|
|
29
|
+
public initialize(props) {
|
|
30
|
+
super.initialize(props);
|
|
31
|
+
this.setComponent(AppSwitcher);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@Widget.SubContext(appFinderSymbol)
|
|
36
|
+
private reloadAppFinder$!: WidgetSubjection<boolean>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 当前应用列表
|
|
40
|
+
* @protected
|
|
41
|
+
*/
|
|
42
|
+
@Widget.Reactive()
|
|
43
|
+
protected apps: IModule[] | undefined;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 收藏应用列表
|
|
47
|
+
* @protected
|
|
48
|
+
*/
|
|
49
|
+
@Widget.Reactive()
|
|
50
|
+
protected get likeApp(): IModule[] {
|
|
51
|
+
return this.apps?.filter((v) => v.like).slice(0, 12) || [];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@Widget.Reactive()
|
|
55
|
+
protected module: IModule | undefined;
|
|
56
|
+
|
|
57
|
+
@Widget.Reactive()
|
|
58
|
+
protected majorConfig = {} as MajorConfig;
|
|
59
|
+
|
|
60
|
+
@Widget.Reactive()
|
|
61
|
+
public logo = systemMajorConfig.logo;
|
|
62
|
+
|
|
63
|
+
@Widget.Reactive()
|
|
64
|
+
public collapsedLogo = systemMajorConfig.appSideLogo;
|
|
65
|
+
|
|
66
|
+
@Widget.Reactive()
|
|
67
|
+
protected currentPageUrl = {};
|
|
68
|
+
|
|
69
|
+
@Widget.Reactive()
|
|
70
|
+
protected collapsed = false;
|
|
71
|
+
|
|
72
|
+
@Widget.SubContext(MenuCollapsedSymbol, false)
|
|
73
|
+
protected collapsed$!: WidgetSubjection<boolean>;
|
|
74
|
+
|
|
75
|
+
@Widget.Method()
|
|
76
|
+
protected async onCollectionClick(item) {
|
|
77
|
+
const module = this.apps?.find((a) => a.module === item.module);
|
|
78
|
+
if (module) {
|
|
79
|
+
await this.onSwitchApp(module);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@Widget.Method()
|
|
84
|
+
protected async onSwitchApp(app: IModule) {
|
|
85
|
+
if (this.module?.module === app.module) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const oldModule = this.module;
|
|
89
|
+
this.module = app;
|
|
90
|
+
|
|
91
|
+
const { module, name: moduleName } = app;
|
|
92
|
+
|
|
93
|
+
const needRoute = await gotoHomepage(module, moduleName, app.urlHomePage, this.router);
|
|
94
|
+
if (!needRoute) {
|
|
95
|
+
this.module = oldModule;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
protected async initApps() {
|
|
100
|
+
if (!this.apps) {
|
|
101
|
+
this.apps = await ModuleService.queryApplications();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
protected async initCurrentModule(moduleName: string): Promise<boolean> {
|
|
106
|
+
if (this.module?.name === moduleName) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
const currentModule = this.apps!.find((v) => v.name === moduleName);
|
|
110
|
+
if (currentModule == null) {
|
|
111
|
+
this.module = await ModuleCache.get(moduleName);
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
this.module = currentModule;
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
protected reloadMaskProcess(reloadParameters: ReloadMaskCallChainingParameters) {
|
|
119
|
+
const { module } = reloadParameters;
|
|
120
|
+
return this.initApps().then(async () => {
|
|
121
|
+
if (await this.initCurrentModule(module)) {
|
|
122
|
+
this.majorConfig = await getMajorConfigByModuleModule(this.module?.module || '');
|
|
123
|
+
const { loginLogo } = GlobalConfig.getConfig();
|
|
124
|
+
const { loginPageLogo } = setDefaultMajorConfig(this.majorConfig, 'appSwitch');
|
|
125
|
+
this.majorConfig.loginPageLogo = loginLogo || loginPageLogo;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
protected $$mounted() {
|
|
131
|
+
super.$$mounted();
|
|
132
|
+
this.router = useRouter().router;
|
|
133
|
+
this.collapsed$.subscribe((val) => {
|
|
134
|
+
this.collapsed = val;
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
this.currentPageUrl = this.getUrlParameters();
|
|
138
|
+
|
|
139
|
+
$systemMajorConfig.subscribe((config) => {
|
|
140
|
+
const { logo, appSideLogo } = config;
|
|
141
|
+
this.logo = logo;
|
|
142
|
+
this.collapsedLogo = appSideLogo;
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 应用中心新建应用的时候,需要重新加载应用
|
|
147
|
+
*/
|
|
148
|
+
this.reloadAppFinder$.subscribe(async () => {
|
|
149
|
+
this.apps = await ModuleService.queryApplications();
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BreadcrumbConfigManager,
|
|
3
|
+
executeViewAction,
|
|
4
|
+
generatorViewActionQueryParameter,
|
|
5
|
+
ReloadMaskCallChainingParameters,
|
|
6
|
+
RuntimeViewAction,
|
|
7
|
+
ViewActionCache
|
|
8
|
+
} from '@oinone/kunlun-engine';
|
|
9
|
+
import { Matched, Router, useMatched } from '@oinone/kunlun-router';
|
|
10
|
+
import { BooleanHelper, Optional, TreeNode } from '@oinone/kunlun-shared';
|
|
11
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
12
|
+
import { useRouter } from '@oinone/kunlun-vue-router';
|
|
13
|
+
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
14
|
+
import { MaskWidget } from '../../basic';
|
|
15
|
+
import { MenuService, ModuleService } from '../../service';
|
|
16
|
+
import { MenuUrlParameters, RuntimeMenu } from '../../typing';
|
|
17
|
+
import DefaultBreadcrumb from './DefaultBreadcrumb.vue';
|
|
18
|
+
|
|
19
|
+
@SPI.ClassFactory(
|
|
20
|
+
MaskWidget.Token({
|
|
21
|
+
dslNodeType: 'breadcrumb'
|
|
22
|
+
})
|
|
23
|
+
)
|
|
24
|
+
export class BreadcrumbWidget extends MaskWidget {
|
|
25
|
+
protected router!: Router;
|
|
26
|
+
|
|
27
|
+
protected matched!: Matched;
|
|
28
|
+
|
|
29
|
+
public initialize(props) {
|
|
30
|
+
super.initialize(props);
|
|
31
|
+
this.setComponent(DefaultBreadcrumb);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@Widget.Reactive()
|
|
36
|
+
protected moduleName: string | undefined;
|
|
37
|
+
|
|
38
|
+
@Widget.Reactive()
|
|
39
|
+
protected menuNodes: TreeNode<RuntimeMenu>[] = [];
|
|
40
|
+
|
|
41
|
+
@Widget.Reactive()
|
|
42
|
+
protected currentViewTitle: string | undefined;
|
|
43
|
+
|
|
44
|
+
@Widget.Reactive()
|
|
45
|
+
protected items: RuntimeMenu[] = [];
|
|
46
|
+
|
|
47
|
+
@Widget.Method()
|
|
48
|
+
public executeAction(action: RuntimeViewAction) {
|
|
49
|
+
executeViewAction(action, this.router, useMatched().matched, {
|
|
50
|
+
id: '',
|
|
51
|
+
context: '',
|
|
52
|
+
searchBody: '',
|
|
53
|
+
searchConditions: ''
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@Widget.Reactive()
|
|
58
|
+
protected get enabledHomepage() {
|
|
59
|
+
return Optional.ofNullable(BreadcrumbConfigManager.getHomepageConfig().enabled)
|
|
60
|
+
.map(BooleanHelper.toBoolean)
|
|
61
|
+
.orElse(true);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@Widget.Method()
|
|
65
|
+
public async onHomepage() {
|
|
66
|
+
const homepage = await ViewActionCache.getHomepage();
|
|
67
|
+
if (!homepage) {
|
|
68
|
+
throw new Error('Invalid homepage.');
|
|
69
|
+
}
|
|
70
|
+
this.router.push({
|
|
71
|
+
segments: [
|
|
72
|
+
{
|
|
73
|
+
path: 'page',
|
|
74
|
+
extra: { preserveParameter: false },
|
|
75
|
+
parameters: generatorViewActionQueryParameter(homepage, { usingLastedUrlParameters: false })
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 在模块发生改变时调用
|
|
83
|
+
* @param moduleName 模块名称
|
|
84
|
+
* @protected
|
|
85
|
+
*/
|
|
86
|
+
protected async onModuleChange(moduleName: string) {
|
|
87
|
+
if (moduleName === this.moduleName) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.moduleName = moduleName;
|
|
91
|
+
this.menuNodes = await this.fetchMenuNodes(moduleName);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 根据模块名称获取菜单
|
|
96
|
+
* @param moduleName 模块名称
|
|
97
|
+
* @protected
|
|
98
|
+
*/
|
|
99
|
+
protected async fetchMenuNodes(moduleName: string): Promise<TreeNode<RuntimeMenu>[]> {
|
|
100
|
+
const menus = (await MenuService.queryMenus(moduleName)) as RuntimeMenu[];
|
|
101
|
+
return MenuService.convert(menus);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
protected async refreshItems(
|
|
105
|
+
model: string,
|
|
106
|
+
action: string,
|
|
107
|
+
parameters: MenuUrlParameters | undefined
|
|
108
|
+
): Promise<void> {
|
|
109
|
+
let selectedMenuItem: TreeNode<RuntimeMenu> | undefined;
|
|
110
|
+
if (parameters) {
|
|
111
|
+
const { selectedKeys } = parameters;
|
|
112
|
+
const lastedSelectKey = selectedKeys[selectedKeys.length - 1];
|
|
113
|
+
if (lastedSelectKey) {
|
|
114
|
+
selectedMenuItem = MenuService.findSelectedMenuItemByKey(this.menuNodes, lastedSelectKey);
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
selectedMenuItem = MenuService.findSelectedMenuItemByAction(this.menuNodes, action);
|
|
118
|
+
}
|
|
119
|
+
if (!selectedMenuItem) {
|
|
120
|
+
this.items = [];
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
let items: RuntimeMenu[] = [];
|
|
124
|
+
let currentNode: TreeNode<RuntimeMenu> | undefined = selectedMenuItem;
|
|
125
|
+
while (currentNode) {
|
|
126
|
+
items = [currentNode.value!, ...items];
|
|
127
|
+
currentNode = currentNode.parent;
|
|
128
|
+
}
|
|
129
|
+
this.items = items;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
protected async refreshViewTitle(model: string, action: string): Promise<void> {
|
|
133
|
+
const viewAction = await ViewActionCache.get(model, action);
|
|
134
|
+
// 菜单上的action不重复显示菜单名称和视图名称
|
|
135
|
+
if (viewAction && viewAction.name !== this.items[this.items.length - 1]?.viewAction?.name) {
|
|
136
|
+
this.currentViewTitle = ModuleService.generatorViewTitle(viewAction);
|
|
137
|
+
} else {
|
|
138
|
+
this.currentViewTitle = '';
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
protected async reloadMaskProcess(reloadParameters: ReloadMaskCallChainingParameters) {
|
|
143
|
+
if (!BreadcrumbConfigManager.isEnabled()) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const { module, model, action, currentPage } = reloadParameters;
|
|
147
|
+
await this.onModuleChange(module);
|
|
148
|
+
|
|
149
|
+
let menuUrlParameters: MenuUrlParameters | undefined;
|
|
150
|
+
if (currentPage) {
|
|
151
|
+
const menu = currentPage.menu as string;
|
|
152
|
+
if (menu) {
|
|
153
|
+
menuUrlParameters = JSON.parse(menu);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
await Promise.allSettled([
|
|
157
|
+
this.refreshItems(model, action, menuUrlParameters),
|
|
158
|
+
this.refreshViewTitle(model, action)
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
protected $$mounted() {
|
|
163
|
+
super.$$mounted();
|
|
164
|
+
this.matched = useMatched().matched;
|
|
165
|
+
this.router = useRouter().router;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { IMenu } from '@oinone/kunlun-meta';
|
|
3
|
+
import { Breadcrumb as ABreadcrumb, BreadcrumbItem as ABreadcrumbItem } from 'ant-design-vue';
|
|
4
|
+
import { createVNode, defineComponent, PropType, VNode } from 'vue';
|
|
5
|
+
import { translateValueByKey } from '@oinone/kunlun-engine';
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: 'DefaultBreadcrumb',
|
|
9
|
+
components: {
|
|
10
|
+
ABreadcrumb,
|
|
11
|
+
ABreadcrumbItem
|
|
12
|
+
},
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
props: {
|
|
15
|
+
items: {
|
|
16
|
+
type: Array as PropType<IMenu[]>
|
|
17
|
+
},
|
|
18
|
+
enabledHomepage: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: undefined
|
|
21
|
+
},
|
|
22
|
+
model: {
|
|
23
|
+
type: String
|
|
24
|
+
},
|
|
25
|
+
action: {
|
|
26
|
+
type: String
|
|
27
|
+
},
|
|
28
|
+
currentViewTitle: {
|
|
29
|
+
type: String
|
|
30
|
+
},
|
|
31
|
+
translate: {
|
|
32
|
+
type: Function
|
|
33
|
+
},
|
|
34
|
+
executeAction: {
|
|
35
|
+
type: Function
|
|
36
|
+
},
|
|
37
|
+
onHomepage: {
|
|
38
|
+
type: Function
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
render() {
|
|
42
|
+
if (!this.items?.length) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
const children: VNode[] = [];
|
|
46
|
+
const breadcrumbChildren: VNode[] = [];
|
|
47
|
+
if (this.enabledHomepage) {
|
|
48
|
+
breadcrumbChildren.push(
|
|
49
|
+
createVNode(
|
|
50
|
+
ABreadcrumbItem,
|
|
51
|
+
{},
|
|
52
|
+
{
|
|
53
|
+
default: () => [
|
|
54
|
+
createVNode(
|
|
55
|
+
'span',
|
|
56
|
+
{
|
|
57
|
+
class: 'breadcrumb-allow-click',
|
|
58
|
+
onClick: () => this.onHomepage?.()
|
|
59
|
+
},
|
|
60
|
+
this.translate?.('kunlun.breadcrumbs.index')
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
this.items.forEach((item, index) => {
|
|
68
|
+
let content: string | VNode[];
|
|
69
|
+
const { viewAction } = item;
|
|
70
|
+
if (!viewAction || (viewAction.model === this.model && viewAction.name === this.action)) {
|
|
71
|
+
content = item.displayName;
|
|
72
|
+
} else {
|
|
73
|
+
content = [
|
|
74
|
+
createVNode(
|
|
75
|
+
'span',
|
|
76
|
+
{
|
|
77
|
+
class: 'breadcrumb-allow-click',
|
|
78
|
+
onClick: () => this.executeAction?.(viewAction, index)
|
|
79
|
+
},
|
|
80
|
+
item.displayName
|
|
81
|
+
)
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
breadcrumbChildren.push(createVNode(ABreadcrumbItem, { key: index }, { default: () => content }));
|
|
85
|
+
});
|
|
86
|
+
if (this.currentViewTitle) {
|
|
87
|
+
breadcrumbChildren.push(
|
|
88
|
+
createVNode(ABreadcrumbItem, {}, { default: () => translateValueByKey(this.currentViewTitle) })
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
children.push(createVNode(ABreadcrumb, {}, { default: () => breadcrumbChildren }));
|
|
92
|
+
return createVNode('div', { class: 'k-tool-bread' }, children);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="oio-debug">
|
|
3
|
+
<oio-button type="link" @click="onClick">{{ $translate('调试') }}</oio-button>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { OioButton } from '@oinone/kunlun-vue-ui-antd';
|
|
8
|
+
import { defineComponent, PropType } from 'vue';
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'Debug',
|
|
12
|
+
components: {
|
|
13
|
+
OioButton
|
|
14
|
+
},
|
|
15
|
+
inheritAttrs: false,
|
|
16
|
+
props: {
|
|
17
|
+
onClick: {
|
|
18
|
+
type: Function as PropType<() => void>
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
<style lang="scss">
|
|
24
|
+
.oio-debug {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
}
|
|
28
|
+
</style>
|