@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,450 @@
|
|
|
1
|
+
import {
|
|
2
|
+
$systemMajorConfig,
|
|
3
|
+
executeViewAction,
|
|
4
|
+
IMultiTabsManager,
|
|
5
|
+
MultiTabInstance,
|
|
6
|
+
MultiTabsApplicationHomepageConfig,
|
|
7
|
+
MultiTabsConfigManager,
|
|
8
|
+
MultiTabsHelper,
|
|
9
|
+
MultiTabsManager,
|
|
10
|
+
MultiTabsModuleHomepageConfig,
|
|
11
|
+
MultiTabsRouter,
|
|
12
|
+
MultiTabsRuntimeManifestMergedConfigManager,
|
|
13
|
+
MultiTabTheme,
|
|
14
|
+
MultiTabType,
|
|
15
|
+
RedirectTargetEnum,
|
|
16
|
+
ReloadMainViewCallChainingParameters,
|
|
17
|
+
systemMajorConfig,
|
|
18
|
+
translateValueByKey
|
|
19
|
+
} from '@oinone/kunlun-engine';
|
|
20
|
+
import { Matched, Router, useMatched } from '@oinone/kunlun-router';
|
|
21
|
+
import { BooleanHelper, Optional } from '@oinone/kunlun-shared';
|
|
22
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
23
|
+
import { Subscription } from '@oinone/kunlun-state';
|
|
24
|
+
import { useRouter } from '@oinone/kunlun-vue-router';
|
|
25
|
+
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
26
|
+
|
|
27
|
+
import { MaskWidget } from '../../basic';
|
|
28
|
+
import { ModuleService } from '../../service';
|
|
29
|
+
import MultiTabs from './MultiTabs.vue';
|
|
30
|
+
import { MultiTabItem } from './typing';
|
|
31
|
+
|
|
32
|
+
@SPI.ClassFactory(MaskWidget.Token({ dslNodeType: 'multi-tabs' }))
|
|
33
|
+
export class MultiTabsWidget extends MaskWidget {
|
|
34
|
+
public initialize(props) {
|
|
35
|
+
super.initialize(props);
|
|
36
|
+
this.setComponent(MultiTabs);
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
protected router!: Router;
|
|
41
|
+
|
|
42
|
+
protected matched!: Matched;
|
|
43
|
+
|
|
44
|
+
@Widget.Reactive()
|
|
45
|
+
protected outTabClassList = {
|
|
46
|
+
[MultiTabTheme.tab1]: '',
|
|
47
|
+
[MultiTabTheme.tab2]: 'theme1',
|
|
48
|
+
[MultiTabTheme.tab3]: 'theme2',
|
|
49
|
+
[MultiTabTheme.tab4]: 'theme3'
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
@Widget.Reactive()
|
|
53
|
+
protected internalTabClassList = {
|
|
54
|
+
[MultiTabTheme.tab1]: 'theme1',
|
|
55
|
+
[MultiTabTheme.tab2]: 'theme2',
|
|
56
|
+
[MultiTabTheme.tab3]: 'theme3',
|
|
57
|
+
[MultiTabTheme.tab4]: 'theme4'
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
@Widget.Reactive()
|
|
61
|
+
protected multiTabConfig =
|
|
62
|
+
systemMajorConfig.extend?.systemStyleConfig?.multiTabConfig ?? systemMajorConfig.multiTabTheme;
|
|
63
|
+
|
|
64
|
+
protected $systemMajorConfig!: Subscription;
|
|
65
|
+
|
|
66
|
+
protected isEnabled(module?: string): boolean {
|
|
67
|
+
const enabled = this.multiTabConfig?.enabled;
|
|
68
|
+
if (enabled == null) {
|
|
69
|
+
return MultiTabsConfigManager.isEnabled(module);
|
|
70
|
+
}
|
|
71
|
+
if (enabled && module) {
|
|
72
|
+
return !MultiTabsConfigManager.getFilter().includes(module);
|
|
73
|
+
}
|
|
74
|
+
return enabled;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@Widget.Reactive()
|
|
78
|
+
protected get draggable(): boolean {
|
|
79
|
+
const draggable = this.multiTabConfig?.draggable;
|
|
80
|
+
if (draggable == null) {
|
|
81
|
+
return Optional.ofNullable(MultiTabsConfigManager.getConfig().draggable)
|
|
82
|
+
.map(BooleanHelper.toBoolean)
|
|
83
|
+
.orElse(true)!;
|
|
84
|
+
}
|
|
85
|
+
return draggable;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@Widget.Reactive()
|
|
89
|
+
protected get showModuleLogo() {
|
|
90
|
+
if (this.isEnabledModuleHomepage) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
return this.multiTabConfig?.showModuleLogo ?? MultiTabsConfigManager.isShowModuleLogo();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@Widget.Reactive()
|
|
97
|
+
protected get isEnabledHomepage(): boolean | undefined {
|
|
98
|
+
if (this.isEnabledModuleHomepage) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (BooleanHelper.toBoolean(this.multiTabConfig?.homepage)) {
|
|
103
|
+
return this.multiTabConfig?.homepage as boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
(this.multiTabConfig?.homepage as MultiTabsApplicationHomepageConfig | undefined)?.enabled ??
|
|
108
|
+
MultiTabsConfigManager.isEnabledHomepage()
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@Widget.Reactive()
|
|
113
|
+
protected get isEnabledModuleHomepage(): boolean {
|
|
114
|
+
if (BooleanHelper.toBoolean(this.multiTabConfig?.moduleHomepage)) {
|
|
115
|
+
return this.multiTabConfig?.enabledModuleHomepage as boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
(this.multiTabConfig?.moduleHomepage as MultiTabsModuleHomepageConfig | undefined)?.enabled ??
|
|
120
|
+
MultiTabsConfigManager.isEnabledModuleHomepage()
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@Widget.Reactive()
|
|
125
|
+
protected get tabThemeClass() {
|
|
126
|
+
const { inline = false, theme = MultiTabTheme.tab1 } = this.multiTabConfig || {};
|
|
127
|
+
|
|
128
|
+
if (inline) {
|
|
129
|
+
return this.internalTabClassList[theme];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return this.outTabClassList[theme];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@Widget.Reactive()
|
|
136
|
+
protected homepageTab: MultiTabItem | null | undefined;
|
|
137
|
+
|
|
138
|
+
@Widget.Reactive()
|
|
139
|
+
protected tabs: MultiTabItem[] = [];
|
|
140
|
+
|
|
141
|
+
@Widget.Reactive()
|
|
142
|
+
protected activeKey: string | undefined;
|
|
143
|
+
|
|
144
|
+
@Widget.Reactive()
|
|
145
|
+
protected invisible = false;
|
|
146
|
+
|
|
147
|
+
protected getTabs() {
|
|
148
|
+
// 防止onClose、onActive的回调内拿不到vue的响应式变量值
|
|
149
|
+
return this.getOperator<this>().tabs;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@Widget.Reactive()
|
|
153
|
+
protected get inline() {
|
|
154
|
+
const dslInline = BooleanHelper.toBoolean(this.getDsl().inline);
|
|
155
|
+
|
|
156
|
+
if (dslInline) {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const { inline } = this.multiTabConfig || {};
|
|
161
|
+
if (inline) {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@Widget.Method()
|
|
169
|
+
protected closable(tabs: MultiTabItem[], tab: MultiTabItem, index: number): boolean {
|
|
170
|
+
if (this.isEnabledHomepage || this.isEnabledModuleHomepage) {
|
|
171
|
+
return tabs.length >= 2 && index !== 0;
|
|
172
|
+
}
|
|
173
|
+
return tabs.length >= 2;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@Widget.Method()
|
|
177
|
+
protected onClickTab(tab: MultiTabItem) {
|
|
178
|
+
const { key, instance } = tab;
|
|
179
|
+
this.activeKey = key;
|
|
180
|
+
MultiTabsManager.INSTANCE.active(key);
|
|
181
|
+
MultiTabsRouter.useRouter(this.router).to(instance);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@Widget.Method()
|
|
185
|
+
protected onRefreshTab(tab: MultiTabItem) {
|
|
186
|
+
MultiTabsManager.INSTANCE.refresh(tab.key);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@Widget.Method()
|
|
190
|
+
protected onCloseTab(tab: MultiTabItem) {
|
|
191
|
+
this.consumerTargetTab(tab, (activeIndex, targetIndex) => {
|
|
192
|
+
if (activeIndex === targetIndex) {
|
|
193
|
+
const nextActiveTab = this.findNextActiveTab(this.getTabs(), activeIndex);
|
|
194
|
+
if (nextActiveTab) {
|
|
195
|
+
this.onClickTab(nextActiveTab);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
this.getTabs().splice(targetIndex, 1);
|
|
200
|
+
if (MultiTabsManager.INSTANCE.getTab(tab.key)) {
|
|
201
|
+
MultiTabsManager.INSTANCE.close(tab.key);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@Widget.Method()
|
|
207
|
+
protected onCloseOtherTabs(tab: MultiTabItem) {
|
|
208
|
+
const ignoredKeys = this.generatorCloseIgnoredKeys(tab);
|
|
209
|
+
this.consumerTargetTab(tab, (activeIndex, targetIndex) => {
|
|
210
|
+
this.$onCloseOtherTabs(
|
|
211
|
+
tab,
|
|
212
|
+
activeIndex,
|
|
213
|
+
(target, index) => index !== targetIndex && !ignoredKeys.includes(target.key)
|
|
214
|
+
);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@Widget.Method()
|
|
219
|
+
protected onCloseLeftTabs(tab: MultiTabItem) {
|
|
220
|
+
const ignoredKeys = this.generatorCloseIgnoredKeys(tab);
|
|
221
|
+
this.consumerTargetTab(tab, (activeIndex, targetIndex) => {
|
|
222
|
+
this.$onCloseOtherTabs(
|
|
223
|
+
tab,
|
|
224
|
+
activeIndex,
|
|
225
|
+
(target, index) => index < targetIndex && !ignoredKeys.includes(target.key)
|
|
226
|
+
);
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@Widget.Method()
|
|
231
|
+
protected onCloseRightTabs(tab: MultiTabItem) {
|
|
232
|
+
const ignoredKeys = this.generatorCloseIgnoredKeys(tab);
|
|
233
|
+
this.consumerTargetTab(tab, (activeIndex, targetIndex) => {
|
|
234
|
+
this.$onCloseOtherTabs(
|
|
235
|
+
tab,
|
|
236
|
+
activeIndex,
|
|
237
|
+
(target, index) => index > targetIndex && !ignoredKeys.includes(target.key)
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
protected generatorCloseIgnoredKeys(tab: MultiTabItem) {
|
|
243
|
+
const ignoredKeys: string[] = [tab.key];
|
|
244
|
+
const homepageKey = this.homepageTab?.key;
|
|
245
|
+
if (homepageKey) {
|
|
246
|
+
ignoredKeys.push(homepageKey);
|
|
247
|
+
}
|
|
248
|
+
return ignoredKeys;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
protected $onCloseOtherTabs(
|
|
252
|
+
tab: MultiTabItem,
|
|
253
|
+
currentActiveIndex: number,
|
|
254
|
+
filter: (tab: MultiTabItem, index: number) => boolean
|
|
255
|
+
) {
|
|
256
|
+
const { activeKey } = this;
|
|
257
|
+
let isClosedActiveTab = false;
|
|
258
|
+
const cloneTabs = [...this.getTabs()];
|
|
259
|
+
let index = 0;
|
|
260
|
+
for (let i = 0; i < cloneTabs.length; i++) {
|
|
261
|
+
const targetTab = cloneTabs[i];
|
|
262
|
+
const { key } = targetTab;
|
|
263
|
+
if (filter(targetTab, index)) {
|
|
264
|
+
cloneTabs.splice(i, 1);
|
|
265
|
+
i--;
|
|
266
|
+
MultiTabsManager.INSTANCE.close(key);
|
|
267
|
+
if (activeKey === key) {
|
|
268
|
+
isClosedActiveTab = true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
index++;
|
|
272
|
+
}
|
|
273
|
+
this.tabs = cloneTabs;
|
|
274
|
+
if (isClosedActiveTab) {
|
|
275
|
+
const nextActiveTab = this.findNextActiveTab(cloneTabs, currentActiveIndex);
|
|
276
|
+
if (nextActiveTab) {
|
|
277
|
+
this.onClickTab(nextActiveTab);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
protected findNextActiveTab(tabs: MultiTabItem[], currentActiveIndex: number) {
|
|
283
|
+
let nextTab: MultiTabItem;
|
|
284
|
+
if (currentActiveIndex === 0) {
|
|
285
|
+
nextTab = tabs[currentActiveIndex + 1];
|
|
286
|
+
} else {
|
|
287
|
+
nextTab = tabs[currentActiveIndex - 1];
|
|
288
|
+
}
|
|
289
|
+
return nextTab;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@Widget.Method()
|
|
293
|
+
protected async onOpenNewWindow(tab: MultiTabItem) {
|
|
294
|
+
const currentStack = tab.instance.stack;
|
|
295
|
+
const lastedStackItem = currentStack[currentStack.length - 1];
|
|
296
|
+
executeViewAction(
|
|
297
|
+
lastedStackItem.action,
|
|
298
|
+
this.router,
|
|
299
|
+
this.matched,
|
|
300
|
+
await MultiTabsHelper.generatorParameters(lastedStackItem),
|
|
301
|
+
RedirectTargetEnum.BLANK
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
@Widget.Method()
|
|
306
|
+
protected onMoveToSelfCallback(dragTab: MultiTabItem, targetTab: MultiTabItem): boolean {
|
|
307
|
+
const targetTabType = targetTab.instance.type;
|
|
308
|
+
return targetTabType == null || targetTabType === MultiTabType.NORMAL;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
@Widget.Method()
|
|
312
|
+
protected onMovedCallback(tab: MultiTabItem) {
|
|
313
|
+
const sortKeys: string[] = [];
|
|
314
|
+
if (this.homepageTab) {
|
|
315
|
+
sortKeys.push(this.homepageTab.key);
|
|
316
|
+
}
|
|
317
|
+
this.getTabs().forEach((v) => {
|
|
318
|
+
sortKeys.push(v.key);
|
|
319
|
+
});
|
|
320
|
+
MultiTabsManager.INSTANCE.setSortKeys(sortKeys);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
protected consumerTargetTab(tab: MultiTabItem, fn: (activeIndex: number, targetIndex: number) => void) {
|
|
324
|
+
const { activeKey } = this;
|
|
325
|
+
const activeIndex = this.getTabs().findIndex((v) => v.key === activeKey);
|
|
326
|
+
const targetKey = tab.key;
|
|
327
|
+
const targetIndex = this.getTabs().findIndex((v) => v.key === targetKey);
|
|
328
|
+
fn(activeIndex, targetIndex);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@Widget.Reactive()
|
|
332
|
+
protected get homepageType(): MultiTabType | undefined {
|
|
333
|
+
if (this.isEnabledHomepage) {
|
|
334
|
+
return MultiTabType.HOMEPAGE;
|
|
335
|
+
}
|
|
336
|
+
if (this.isEnabledModuleHomepage) {
|
|
337
|
+
return MultiTabType.MODULE_HOMEPAGE;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
protected async reloadTabs(): Promise<void> {
|
|
342
|
+
const currentTabs = MultiTabsManager.INSTANCE.getTabs();
|
|
343
|
+
const tabs: MultiTabItem[] = [];
|
|
344
|
+
let usingHomepage = false;
|
|
345
|
+
const { homepageType } = this;
|
|
346
|
+
for (const currentTab of currentTabs) {
|
|
347
|
+
const { type, key } = currentTab;
|
|
348
|
+
const tabItem = {
|
|
349
|
+
key,
|
|
350
|
+
title: this.generatorTabTitle(currentTab),
|
|
351
|
+
instance: currentTab
|
|
352
|
+
};
|
|
353
|
+
if (!usingHomepage && homepageType && type === homepageType) {
|
|
354
|
+
tabItem.title = translateValueByKey('首页');
|
|
355
|
+
this.homepageTab = tabItem;
|
|
356
|
+
usingHomepage = true;
|
|
357
|
+
tabs.splice(0, 0, tabItem);
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
tabs.push(tabItem);
|
|
361
|
+
}
|
|
362
|
+
this.tabs = tabs;
|
|
363
|
+
if (!usingHomepage) {
|
|
364
|
+
this.homepageTab = null;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
protected generatorTabTitle(tab: MultiTabInstance): string {
|
|
369
|
+
const { title, stack } = tab;
|
|
370
|
+
return title || ModuleService.generatorViewTitle(stack[stack.length - 1].action);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
protected async reloadActiveTab(): Promise<void> {
|
|
374
|
+
const activeTab = MultiTabsManager.INSTANCE.getActiveTab();
|
|
375
|
+
if (!activeTab) {
|
|
376
|
+
throw new Error('Invalid active tab.');
|
|
377
|
+
}
|
|
378
|
+
const tab = this.getTabs().find((a) => a.key === activeTab.key);
|
|
379
|
+
if (tab) {
|
|
380
|
+
const stackLength = activeTab.stack.length;
|
|
381
|
+
tab.title =
|
|
382
|
+
stackLength > 1 ? ModuleService.generatorViewTitle(activeTab.stack[stackLength - 1].action) : tab.title;
|
|
383
|
+
}
|
|
384
|
+
this.activeKey = activeTab.key;
|
|
385
|
+
let invisible = false;
|
|
386
|
+
if (activeTab.type === MultiTabType.HOMEPAGE) {
|
|
387
|
+
const autoInvisible = Optional.ofNullable(
|
|
388
|
+
MultiTabsRuntimeManifestMergedConfigManager.getApplicationHomepageConfig()
|
|
389
|
+
)
|
|
390
|
+
.map((v) => v.autoInvisible)
|
|
391
|
+
.orElse(true);
|
|
392
|
+
if (autoInvisible) {
|
|
393
|
+
invisible = true;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
this.invisible = invisible;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
protected async reloadMainViewProcess(reloadParameters: ReloadMainViewCallChainingParameters) {
|
|
400
|
+
const { module } = reloadParameters;
|
|
401
|
+
if (!this.isEnabled(module)) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
await this.reloadTabs();
|
|
405
|
+
await this.reloadActiveTab();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
protected onActive = (manager: IMultiTabsManager, instance: MultiTabInstance) => {
|
|
409
|
+
this.activeKey = instance.key;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
protected onClose = (manager: IMultiTabsManager, instance: MultiTabInstance) => {
|
|
413
|
+
const { key } = instance;
|
|
414
|
+
const targetTab = this.getTabs().find((v) => v.key === key);
|
|
415
|
+
if (targetTab) {
|
|
416
|
+
this.onCloseTab(targetTab);
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
protected $$created(): void {
|
|
421
|
+
super.$$created();
|
|
422
|
+
this.$systemMajorConfig = $systemMajorConfig.subscribe((config) => {
|
|
423
|
+
if (!this.multiTabConfig) {
|
|
424
|
+
this.multiTabConfig = {};
|
|
425
|
+
}
|
|
426
|
+
if (config.multiTabTheme) {
|
|
427
|
+
Object.assign(this.multiTabConfig, config.multiTabTheme);
|
|
428
|
+
}
|
|
429
|
+
if (config.extend?.systemStyleConfig?.multiTabConfig) {
|
|
430
|
+
Object.assign(this.multiTabConfig, config.extend.systemStyleConfig.multiTabConfig);
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
protected $$mounted() {
|
|
436
|
+
super.$$mounted();
|
|
437
|
+
this.router = useRouter().router;
|
|
438
|
+
this.matched = useMatched().matched;
|
|
439
|
+
MultiTabsManager.INSTANCE.onActive(this.onActive.bind(this));
|
|
440
|
+
MultiTabsManager.INSTANCE.onClose(this.onClose.bind(this));
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
protected $$unmounted() {
|
|
444
|
+
super.$$unmounted();
|
|
445
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
446
|
+
this.$systemMajorConfig && this.$systemMajorConfig.unsubscribe();
|
|
447
|
+
MultiTabsManager.INSTANCE.clearOnActive(this.onActive);
|
|
448
|
+
MultiTabsManager.INSTANCE.clearOnClose(this.onClose);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
@import './mixin.scss';
|
|
2
|
+
|
|
3
|
+
$base: k-layout-multi-tabs;
|
|
4
|
+
|
|
5
|
+
@mixin tab-radial-gradient-combination() {
|
|
6
|
+
&:before {
|
|
7
|
+
@include tab-radial-gradient(transparent);
|
|
8
|
+
right: calc(-1 * 4px);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:after {
|
|
12
|
+
@include tab-radial-gradient(transparent);
|
|
13
|
+
left: calc(-1 * 4px);
|
|
14
|
+
transform: scaleX(-1);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin tab-radial-gradient-combination-color($backgroundColor) {
|
|
19
|
+
&:before {
|
|
20
|
+
@include tab-radial-gradient-color($backgroundColor);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:after {
|
|
24
|
+
@include tab-radial-gradient-color($backgroundColor);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.#{$base} {
|
|
29
|
+
height: 40px;
|
|
30
|
+
overflow: auto hidden;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: 1;
|
|
33
|
+
padding-top: 6px;
|
|
34
|
+
|
|
35
|
+
scrollbar-width: 0;
|
|
36
|
+
|
|
37
|
+
&::-webkit-scrollbar {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
scrollbar-width: thin;
|
|
43
|
+
|
|
44
|
+
&::-webkit-scrollbar {
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-wrapper {
|
|
50
|
+
position: relative;
|
|
51
|
+
display: flex;
|
|
52
|
+
background-color: var(--oio-multi-tabs-background);
|
|
53
|
+
padding: 0 24px;
|
|
54
|
+
column-gap: 16px;
|
|
55
|
+
|
|
56
|
+
&-inline {
|
|
57
|
+
width: 100%;
|
|
58
|
+
background-color: var(--oio-multi-tabs-background-color-inline);
|
|
59
|
+
padding-left: calc(var(--oio-padding-lg) - 4px);
|
|
60
|
+
|
|
61
|
+
.#{$base} {
|
|
62
|
+
margin-bottom: 8px;
|
|
63
|
+
|
|
64
|
+
&:after {
|
|
65
|
+
content: '';
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 8px;
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
background-color: var(--oio-multi-tabs-active-background-color-inline);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
& + .k-layout-content {
|
|
76
|
+
padding-top: calc(var(--oio-padding-lg) - 8px);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.#{$base}-tab {
|
|
80
|
+
color: var(--oio-multi-tabs-color-inline);
|
|
81
|
+
|
|
82
|
+
&:not(.#{$base}-tab-active):hover {
|
|
83
|
+
background-color: var(--oio-multi-tabs-hover-background-color-inline);
|
|
84
|
+
|
|
85
|
+
@include tab-radial-gradient-combination-color(var(--oio-multi-tabs-hover-background-color-inline));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.#{$base}-tab-active {
|
|
90
|
+
color: var(--oio-multi-tabs-active-color-inline);
|
|
91
|
+
background-color: var(--oio-multi-tabs-active-background-color-inline);
|
|
92
|
+
|
|
93
|
+
@include tab-radial-gradient-combination-color(var(--oio-multi-tabs-active-background-color-inline));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.#{$base}-toolbar {
|
|
97
|
+
margin-bottom: 11px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&-tab {
|
|
103
|
+
position: relative;
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
height: 34px;
|
|
108
|
+
border-radius: 4px 4px 0 0;
|
|
109
|
+
color: var(--oio-multi-tabs-color);
|
|
110
|
+
|
|
111
|
+
&:first-child {
|
|
112
|
+
margin-left: 4px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@include tab-radial-gradient-combination();
|
|
116
|
+
|
|
117
|
+
&:not(.#{$base + -tab-active}):hover {
|
|
118
|
+
background-color: var(--oio-multi-tabs-hover-background-color);
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
|
|
121
|
+
@include tab-radial-gradient-combination-color(var(--oio-multi-tabs-hover-background-color));
|
|
122
|
+
|
|
123
|
+
.oio-divider {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&-title {
|
|
129
|
+
margin-left: 8px;
|
|
130
|
+
font-size: 12px;
|
|
131
|
+
min-width: 82px;
|
|
132
|
+
text-overflow: ellipsis;
|
|
133
|
+
white-space: nowrap;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
height: 16px;
|
|
136
|
+
line-height: 16px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&-active {
|
|
140
|
+
color: var(--oio-multi-tabs-active-color);
|
|
141
|
+
font-weight: var(--oio-multi-tabs-active-font-weight);
|
|
142
|
+
background-color: var(--oio-multi-tabs-active-background);
|
|
143
|
+
|
|
144
|
+
@include tab-radial-gradient-combination-color(var(--oio-multi-tabs-active-background));
|
|
145
|
+
|
|
146
|
+
.oio-divider {
|
|
147
|
+
display: none;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&-closable {
|
|
152
|
+
.k-layout-multi-tabs-tab-close-btn {
|
|
153
|
+
display: block;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&-close-btn {
|
|
158
|
+
display: none;
|
|
159
|
+
align-self: center;
|
|
160
|
+
width: 20px;
|
|
161
|
+
margin-left: 8px;
|
|
162
|
+
|
|
163
|
+
.oio-icon {
|
|
164
|
+
color: var(--oio-multi-tabs-icon-color);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.oio-divider.ant-divider-vertical {
|
|
169
|
+
position: absolute;
|
|
170
|
+
right: -2px;
|
|
171
|
+
height: 16px;
|
|
172
|
+
border-color: #9d9d9d;
|
|
173
|
+
margin-top: 10px;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&-homepage-icon,
|
|
178
|
+
&-application-icon {
|
|
179
|
+
display: flex;
|
|
180
|
+
padding-left: 4px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&-application-logo {
|
|
184
|
+
width: 14px;
|
|
185
|
+
height: 14px;
|
|
186
|
+
flex-basis: 14px;
|
|
187
|
+
flex-shrink: 0;
|
|
188
|
+
display: flex;
|
|
189
|
+
margin-left: 8px;
|
|
190
|
+
|
|
191
|
+
img {
|
|
192
|
+
width: auto;
|
|
193
|
+
height: auto;
|
|
194
|
+
max-width: 100%;
|
|
195
|
+
max-height: 100%;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&-toolbar {
|
|
200
|
+
flex: 0;
|
|
201
|
+
align-self: center;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&-toolbar-overlay {
|
|
206
|
+
width: 127px;
|
|
207
|
+
|
|
208
|
+
.ant-dropdown-menu {
|
|
209
|
+
padding: 7px 0;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@import './theme1.scss';
|
|
215
|
+
@import './theme2.scss';
|
|
216
|
+
@import './theme3.scss';
|
|
217
|
+
@import './theme4.scss';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@mixin tab-radial-gradient($backgroundColor) {
|
|
2
|
+
content: '';
|
|
3
|
+
display: block;
|
|
4
|
+
height: 4px;
|
|
5
|
+
width: 4px;
|
|
6
|
+
position: absolute;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
@include tab-radial-gradient-color($backgroundColor);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin tab-radial-gradient-color($backgroundColor) {
|
|
12
|
+
background: radial-gradient(4px at 4px 0px, transparent 4px, $backgroundColor 4px);
|
|
13
|
+
}
|