@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,30 @@
|
|
|
1
|
+
import { RuntimeContext, RuntimeContextServiceToken } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 60 })
|
|
8
|
+
export class DebugRuntimeMaskService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
if (!runtimeContext.viewAction) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const maskTemplate = SPI.RawInstantiate(RuntimeContextServiceToken)?.seekViewMask(
|
|
15
|
+
runtimeContext.viewAction,
|
|
16
|
+
DebugUtils.getPageParameters()?.module
|
|
17
|
+
);
|
|
18
|
+
if (!maskTemplate) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
title: '运行时Mask',
|
|
23
|
+
message: '运行时上下文Mask',
|
|
24
|
+
stackInfo: DebugUtils.toJSONString(maskTemplate)
|
|
25
|
+
};
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.error('Runtime mask analysis error.', e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 70 })
|
|
8
|
+
export class DebugRuntimeTemplateService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
return {
|
|
11
|
+
title: '运行时渲染模板',
|
|
12
|
+
message: '合并Layout和DSL后的Template',
|
|
13
|
+
stackInfo: DebugUtils.toJSONString(runtimeContext.viewTemplate)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RuntimeContext } from '@oinone/kunlun-engine';
|
|
2
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
3
|
+
import { DebugErrorAnalysisResult } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import { DebugRuntimeContextService, DebugRuntimeContextServiceToken } from '../../DebugRuntimeContextService';
|
|
6
|
+
|
|
7
|
+
@SPI.Service(DebugRuntimeContextServiceToken, { priority: 30 })
|
|
8
|
+
export class DebugRuntimeViewService implements DebugRuntimeContextService {
|
|
9
|
+
public analysis(runtimeContext: RuntimeContext): DebugErrorAnalysisResult | undefined {
|
|
10
|
+
return {
|
|
11
|
+
title: '运行时视图',
|
|
12
|
+
message: '运行时上下文视图',
|
|
13
|
+
stackInfo: DebugUtils.toJSONString(runtimeContext.view)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
3
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
4
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
5
|
+
|
|
6
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'bizStack', priority: 0 })
|
|
7
|
+
export class DebugBizStackService extends DebugDefaultStackInfoService implements DebugStackInfoService {
|
|
8
|
+
public analysis(error: DebugResponseError): DebugErrorAnalysisResult | undefined {
|
|
9
|
+
const stackInfo = this.getStackInfo(error);
|
|
10
|
+
if (!stackInfo) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
title: '业务与Oinone堆栈',
|
|
15
|
+
message: error.message,
|
|
16
|
+
stackInfo: this.beautifyJSON(stackInfo)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
3
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
4
|
+
|
|
5
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'configure', priority: 0 })
|
|
6
|
+
export class DebugConfigureService extends DebugDefaultStackInfoService implements DebugStackInfoService {}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { isArray } from 'lodash-es';
|
|
3
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
4
|
+
import { DebugUtils } from '../../../debug-utils';
|
|
5
|
+
import {
|
|
6
|
+
DebugDefaultStackInfoServiceType,
|
|
7
|
+
DebugStackInfoService,
|
|
8
|
+
DebugStackInfoServiceToken,
|
|
9
|
+
DebugUnhandledExceptionTitle
|
|
10
|
+
} from '../../DebugStackInfoService';
|
|
11
|
+
|
|
12
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: DebugDefaultStackInfoServiceType, priority: 0 })
|
|
13
|
+
export class DebugDefaultStackInfoService implements DebugStackInfoService {
|
|
14
|
+
public analysis(error: DebugResponseError, errors: DebugResponseError[]): DebugErrorAnalysisResult | undefined {
|
|
15
|
+
const stackInfo = this.getStackInfo(error);
|
|
16
|
+
if (!stackInfo) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
title: error.message || DebugUnhandledExceptionTitle,
|
|
21
|
+
message: error.message,
|
|
22
|
+
stackInfo: this.beautifyJSON(stackInfo)
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public parseStackInfo(error: DebugResponseError, errors: DebugResponseError[]): Record<string, unknown> | undefined {
|
|
27
|
+
const stackInfo = this.getStackInfo(error);
|
|
28
|
+
if (!stackInfo) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
return JSON.parse(stackInfo);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.error('Invalid json data.', e);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
protected getStackInfo(error: DebugResponseError): string | undefined {
|
|
39
|
+
const stackInfo = error.extensions?.stackTraceMsg;
|
|
40
|
+
if (!stackInfo || stackInfo === 'null') {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return stackInfo;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected beautifyJSON(stackInfo: unknown): string {
|
|
47
|
+
if (typeof stackInfo === 'string') {
|
|
48
|
+
try {
|
|
49
|
+
const jsonData = JSON.parse(stackInfo);
|
|
50
|
+
if (isArray(jsonData)) {
|
|
51
|
+
if (jsonData.every((v) => typeof v === 'string')) {
|
|
52
|
+
return jsonData.join('\n');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return DebugUtils.toJSONString(jsonData);
|
|
56
|
+
} catch (e) {
|
|
57
|
+
return stackInfo;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return DebugUtils.toJSONString(stackInfo);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
3
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
4
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
5
|
+
|
|
6
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'exception', priority: 0 })
|
|
7
|
+
export class DebugExceptionStackService extends DebugDefaultStackInfoService implements DebugStackInfoService {
|
|
8
|
+
public analysis(error: DebugResponseError): DebugErrorAnalysisResult | undefined {
|
|
9
|
+
const stackInfo = this.getStackInfo(error);
|
|
10
|
+
if (!stackInfo) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
title: '全部堆栈',
|
|
15
|
+
message: error.message,
|
|
16
|
+
stackInfo: this.beautifyJSON(stackInfo)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
3
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
4
|
+
|
|
5
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'function', priority: 0 })
|
|
6
|
+
export class DebugFunctionService extends DebugDefaultStackInfoService implements DebugStackInfoService {}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
3
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
4
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
5
|
+
|
|
6
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'halfPureBizStack', priority: 0 })
|
|
7
|
+
export class DebugHalfPureBizStackService extends DebugDefaultStackInfoService implements DebugStackInfoService {
|
|
8
|
+
public analysis(error: DebugResponseError): DebugErrorAnalysisResult | undefined {
|
|
9
|
+
const stackInfo = this.getStackInfo(error);
|
|
10
|
+
if (!stackInfo) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
title: '业务堆栈',
|
|
15
|
+
message: error.message,
|
|
16
|
+
stackInfo: this.beautifyJSON(stackInfo)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
3
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
4
|
+
|
|
5
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'model', priority: 0 })
|
|
6
|
+
export class DebugModelService extends DebugDefaultStackInfoService implements DebugStackInfoService {}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
3
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
4
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
5
|
+
|
|
6
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'pureBizStack', priority: 0 })
|
|
7
|
+
export class DebugPureBizStackService extends DebugDefaultStackInfoService implements DebugStackInfoService {
|
|
8
|
+
public analysis(error: DebugResponseError): DebugErrorAnalysisResult | undefined {
|
|
9
|
+
const stackInfo = this.getStackInfo(error);
|
|
10
|
+
if (!stackInfo) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
title: '异常抛出栈',
|
|
15
|
+
message: error.message,
|
|
16
|
+
stackInfo: this.beautifyJSON(stackInfo)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
package/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
3
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
4
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
5
|
+
|
|
6
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'stacktraceGqlRequestContext', priority: 0 })
|
|
7
|
+
export class DebugStacktraceGqlRequestContextService
|
|
8
|
+
extends DebugDefaultStackInfoService
|
|
9
|
+
implements DebugStackInfoService
|
|
10
|
+
{
|
|
11
|
+
public analysis(error: DebugResponseError): DebugErrorAnalysisResult | undefined {
|
|
12
|
+
const stackInfo = this.getStackInfo(error);
|
|
13
|
+
if (!stackInfo) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
title: 'GQL上下文',
|
|
18
|
+
message: error.message,
|
|
19
|
+
stackInfo: this.beautifyJSON(stackInfo)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
3
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
4
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
5
|
+
|
|
6
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'stacktraceSceneAnalysis', priority: 0 })
|
|
7
|
+
export class DebugStacktraceSceneAnalysisService extends DebugDefaultStackInfoService implements DebugStackInfoService {
|
|
8
|
+
public analysis(error: DebugResponseError, errors: DebugResponseError[]): DebugErrorAnalysisResult | undefined {
|
|
9
|
+
const stackInfo = this.getStackInfo(error);
|
|
10
|
+
if (!stackInfo) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const scene = this.getTitle(error);
|
|
14
|
+
let stackInfoString: string | undefined;
|
|
15
|
+
if (scene) {
|
|
16
|
+
const jsonData = this.parseStackInfo(error, errors);
|
|
17
|
+
if (jsonData) {
|
|
18
|
+
stackInfoString = this.beautifyJSON(jsonData[scene]);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
title: scene || '场景追踪堆栈',
|
|
23
|
+
message: error.message,
|
|
24
|
+
stackInfo: stackInfoString || this.beautifyJSON(stackInfo)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
protected getTitle(error: DebugResponseError): string | undefined {
|
|
29
|
+
const match = error.message?.match(/\[(.*)]/);
|
|
30
|
+
if (!match) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
return match[1];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { DebugErrorAnalysisResult, DebugResponseError } from '../../../../typing';
|
|
3
|
+
import { DebugStackInfoService, DebugStackInfoServiceToken } from '../../DebugStackInfoService';
|
|
4
|
+
import { DebugDefaultStackInfoService } from './DebugDefaultStackInfoService';
|
|
5
|
+
|
|
6
|
+
@SPI.Service(DebugStackInfoServiceToken, { name: 'stacktraceSession', priority: 0 })
|
|
7
|
+
export class DebugStacktraceSessionService extends DebugDefaultStackInfoService implements DebugStackInfoService {
|
|
8
|
+
public analysis(error: DebugResponseError): DebugErrorAnalysisResult | undefined {
|
|
9
|
+
const stackInfo = this.getStackInfo(error);
|
|
10
|
+
if (!stackInfo) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
title: '会话上下文',
|
|
15
|
+
message: error.message,
|
|
16
|
+
stackInfo: this.beautifyJSON(stackInfo)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './DebugStackInfoService';
|
|
2
|
+
|
|
3
|
+
export * from './impl/runtime-context/DebugDefaultRuntimeContextService';
|
|
4
|
+
export * from './impl/runtime-context/DebugRuntimeActionService';
|
|
5
|
+
export * from './impl/runtime-context/DebugRuntimeDslService';
|
|
6
|
+
export * from './impl/runtime-context/DebugRuntimeFieldService';
|
|
7
|
+
export * from './impl/runtime-context/DebugRuntimeLayoutService';
|
|
8
|
+
export * from './impl/runtime-context/DebugRuntimeMaskService';
|
|
9
|
+
export * from './impl/runtime-context/DebugRuntimeTemplateService';
|
|
10
|
+
export * from './impl/runtime-context/DebugRuntimeViewService';
|
|
11
|
+
|
|
12
|
+
export * from './impl/stack-info/DebugBizStackService';
|
|
13
|
+
export * from './impl/stack-info/DebugConfigureService';
|
|
14
|
+
export * from './impl/stack-info/DebugDefaultStackInfoService';
|
|
15
|
+
export * from './impl/stack-info/DebugExceptionStackService';
|
|
16
|
+
export * from './impl/stack-info/DebugFunctionService';
|
|
17
|
+
export * from './impl/stack-info/DebugHalfBizStackService';
|
|
18
|
+
export * from './impl/stack-info/DebugModelService';
|
|
19
|
+
export * from './impl/stack-info/DebugPureBizStackService';
|
|
20
|
+
export * from './impl/stack-info/DebugStacktraceGqlRequestContextService';
|
|
21
|
+
export * from './impl/stack-info/DebugStacktraceSceneAnalysisService';
|
|
22
|
+
export * from './impl/stack-info/DebugStacktraceSessionService';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RuntimeContext, RuntimeViewAction, ViewActionQueryParameter } from '@oinone/kunlun-engine';
|
|
2
|
+
import { StandardEventManager } from '@oinone/kunlun-shared';
|
|
3
|
+
import { DebugRequestInfo } from '../typing';
|
|
4
|
+
|
|
5
|
+
enum EventKeys {
|
|
6
|
+
'update' = 'update'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type UpdateEventHandler = (storage: DebugInfoStorage) => void;
|
|
10
|
+
|
|
11
|
+
export class DebugInfoStorage extends StandardEventManager<typeof EventKeys> {
|
|
12
|
+
public static INSTANCE = new DebugInfoStorage();
|
|
13
|
+
|
|
14
|
+
public pageParameters?: ViewActionQueryParameter;
|
|
15
|
+
|
|
16
|
+
public viewAction?: RuntimeViewAction;
|
|
17
|
+
|
|
18
|
+
public requestInfo?: DebugRequestInfo;
|
|
19
|
+
|
|
20
|
+
public responseData?: string;
|
|
21
|
+
|
|
22
|
+
public runtimeContext?: RuntimeContext;
|
|
23
|
+
|
|
24
|
+
public forceUpdate(): void {
|
|
25
|
+
this.notifyHandler(EventKeys.update);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public onUpdate(fn: UpdateEventHandler) {
|
|
29
|
+
this.on(EventKeys.update, fn);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public clearOnUpdate(fn: UpdateEventHandler) {
|
|
33
|
+
this.clearOn(EventKeys.update, fn);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { DebugRequestInfo } from '../typing';
|
|
3
|
+
|
|
4
|
+
export function useDebugRequestInfo(props: { requestInfo?: DebugRequestInfo }) {
|
|
5
|
+
const isShowResponseInfo = computed(() => {
|
|
6
|
+
return !!props.requestInfo?.allDuration;
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const isShowError = computed(() => {
|
|
10
|
+
return isShowResponseInfo.value && !!props.requestInfo?.errorCode;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
isShowResponseInfo,
|
|
15
|
+
isShowError
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="divider-container">
|
|
3
|
+
<a-divider type="vertical" style="height: 16px; margin-top: 2px" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { defineComponent } from 'vue';
|
|
8
|
+
import { Divider } from 'ant-design-vue';
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
components: {
|
|
12
|
+
ADivider: Divider
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { BaseMaskWidget, MaskWidget } from '../../basic';
|
|
3
|
+
import DividerComponent from './Divider.vue';
|
|
4
|
+
|
|
5
|
+
@SPI.ClassFactory(MaskWidget.Token({ widget: 'divider' }))
|
|
6
|
+
export class DividerWidget extends BaseMaskWidget {
|
|
7
|
+
public initialize(props) {
|
|
8
|
+
super.initialize(props);
|
|
9
|
+
this.setComponent(DividerComponent);
|
|
10
|
+
return this;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DividerWidget';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './style/index.scss';
|
|
2
|
+
|
|
3
|
+
export * from './app-switcher';
|
|
4
|
+
export * from './breadcrumb';
|
|
5
|
+
export * from './debug';
|
|
6
|
+
export * from './divider';
|
|
7
|
+
export * from './language';
|
|
8
|
+
export * from './layout';
|
|
9
|
+
export * from './menu';
|
|
10
|
+
export * from './multi-tabs';
|
|
11
|
+
export * from './notification';
|
|
12
|
+
export * from './order-statistic';
|
|
13
|
+
export * from './partner-switcher';
|
|
14
|
+
export * from './quick-search';
|
|
15
|
+
export * from './user';
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-dropdown :trigger="['click']" placement="bottom">
|
|
3
|
+
<div v-if="currentLanguage" class="k-layout-lang">
|
|
4
|
+
<span>
|
|
5
|
+
<div
|
|
6
|
+
v-if="currentIsChinese"
|
|
7
|
+
class="country-logo"
|
|
8
|
+
:class="[currentLanguage.code]"
|
|
9
|
+
:style="{
|
|
10
|
+
'background-image': `url(${genStaticPath('country.png')})`
|
|
11
|
+
}"
|
|
12
|
+
></div>
|
|
13
|
+
<oio-icon v-else :icon="currentLanguage.icon" size="18px" style="margin-right: 10px"></oio-icon>
|
|
14
|
+
{{ currentLanguage.name }}
|
|
15
|
+
</span>
|
|
16
|
+
<caret-down-outlined :style="{ fontSize: '12px', color: 'var(--oio-icon-color)' }" />
|
|
17
|
+
</div>
|
|
18
|
+
<template #overlay>
|
|
19
|
+
<a-menu class="k-language-dropdown">
|
|
20
|
+
<a-menu-item v-for="language of languages" :key="language.code" @click="onChange(language)">
|
|
21
|
+
<div style="display: flex; align-items: center">
|
|
22
|
+
<div
|
|
23
|
+
v-if="isChinese(language)"
|
|
24
|
+
class="country-logo"
|
|
25
|
+
:style="{
|
|
26
|
+
'background-image': `url(${genStaticPath('country.png')})`
|
|
27
|
+
}"
|
|
28
|
+
:class="[language.code]"
|
|
29
|
+
></div>
|
|
30
|
+
<oio-icon
|
|
31
|
+
v-else
|
|
32
|
+
:icon="language.icon"
|
|
33
|
+
size="18px"
|
|
34
|
+
style="vertical-align: middle; margin-right: 6px"
|
|
35
|
+
></oio-icon>
|
|
36
|
+
{{ language.name }}
|
|
37
|
+
</div>
|
|
38
|
+
</a-menu-item>
|
|
39
|
+
</a-menu>
|
|
40
|
+
</template>
|
|
41
|
+
</a-dropdown>
|
|
42
|
+
</template>
|
|
43
|
+
<script lang="ts">
|
|
44
|
+
import { CaretDownOutlined } from '@ant-design/icons-vue';
|
|
45
|
+
import { OioIcon } from '@oinone/kunlun-vue-ui-antd';
|
|
46
|
+
import { Dropdown as ADropdown, Menu as AMenu, MenuItem as AMenuItem } from 'ant-design-vue';
|
|
47
|
+
import { computed, defineComponent, PropType } from 'vue';
|
|
48
|
+
import { RuntimeLanguage, ZH_CN_CODE } from '@oinone/kunlun-vue-ui-common';
|
|
49
|
+
|
|
50
|
+
export default defineComponent({
|
|
51
|
+
name: 'DefaultLanguage',
|
|
52
|
+
inheritAttrs: false,
|
|
53
|
+
components: {
|
|
54
|
+
ADropdown,
|
|
55
|
+
AMenu,
|
|
56
|
+
AMenuItem,
|
|
57
|
+
CaretDownOutlined,
|
|
58
|
+
OioIcon
|
|
59
|
+
},
|
|
60
|
+
props: {
|
|
61
|
+
languages: {
|
|
62
|
+
type: Array as PropType<RuntimeLanguage[]>
|
|
63
|
+
},
|
|
64
|
+
currentLanguage: {
|
|
65
|
+
type: Object as PropType<RuntimeLanguage>
|
|
66
|
+
},
|
|
67
|
+
onChange: {
|
|
68
|
+
type: Function
|
|
69
|
+
},
|
|
70
|
+
genStaticPath: {
|
|
71
|
+
type: Function
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
setup(props) {
|
|
75
|
+
const languages = computed(() => {
|
|
76
|
+
return props.languages || [];
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const currentIsChinese = computed(() => {
|
|
80
|
+
return isChinese(props.currentLanguage);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const isChinese = (language: RuntimeLanguage | undefined) => {
|
|
84
|
+
return language?.code === ZH_CN_CODE;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
languages,
|
|
89
|
+
currentIsChinese,
|
|
90
|
+
|
|
91
|
+
isChinese
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style lang="scss">
|
|
98
|
+
.country-logo {
|
|
99
|
+
box-shadow: 0 0 1px 0 #888;
|
|
100
|
+
background-repeat: no-repeat;
|
|
101
|
+
background-color: #dbdbdb;
|
|
102
|
+
background-position: 20px 0;
|
|
103
|
+
width: 18px;
|
|
104
|
+
height: 12px;
|
|
105
|
+
margin-right: 6px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.zh-CN {
|
|
109
|
+
background-position: -1049px 0;
|
|
110
|
+
}
|
|
111
|
+
</style>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ClearCache, CurrentLanguage, ReloadMaskCallChainingParameters } from '@oinone/kunlun-engine';
|
|
2
|
+
import { Matched, Router, useMatched } from '@oinone/kunlun-router';
|
|
3
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
4
|
+
import { useRouter } from '@oinone/kunlun-vue-router';
|
|
5
|
+
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
6
|
+
import { EN_US_CODE, RuntimeLanguage, ZH_CN_CODE } from '@oinone/kunlun-vue-ui-common';
|
|
7
|
+
import { MaskWidget } from '../../basic';
|
|
8
|
+
import { TopBarService } from '../../service';
|
|
9
|
+
import DefaultLanguage from './DefaultLanguage.vue';
|
|
10
|
+
|
|
11
|
+
// 语言切换功能允许用户在不同的语言间进行快速切换,默认使用LanguageWidget.ts作为该功能的基类
|
|
12
|
+
@SPI.ClassFactory(MaskWidget.Token({ widget: 'language' }))
|
|
13
|
+
export class LanguageWidget extends MaskWidget {
|
|
14
|
+
protected router!: Router;
|
|
15
|
+
|
|
16
|
+
protected matched!: Matched;
|
|
17
|
+
|
|
18
|
+
public initialize(props) {
|
|
19
|
+
super.initialize(props);
|
|
20
|
+
this.setComponent(DefaultLanguage);
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Widget.Reactive()
|
|
25
|
+
protected languages: RuntimeLanguage[] | undefined;
|
|
26
|
+
|
|
27
|
+
@Widget.Reactive()
|
|
28
|
+
protected currentLanguage: RuntimeLanguage | undefined;
|
|
29
|
+
|
|
30
|
+
@Widget.Method()
|
|
31
|
+
protected onChange(value: RuntimeLanguage) {
|
|
32
|
+
this.currentLanguage = value;
|
|
33
|
+
TopBarService.activeLang(value.id).then(() => {
|
|
34
|
+
ClearCache.clear();
|
|
35
|
+
window.location.reload();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
protected async initLanguages(): Promise<void> {
|
|
40
|
+
if (!this.languages) {
|
|
41
|
+
const languages = await TopBarService.queryLanguageList();
|
|
42
|
+
this.languages = languages.map((v) => {
|
|
43
|
+
if (!v.icon) {
|
|
44
|
+
if (v.code === EN_US_CODE) {
|
|
45
|
+
v.icon = 'oinone-yingguo';
|
|
46
|
+
} else {
|
|
47
|
+
v.icon = 'oinone-zhongguo';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return v;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
protected initCurrentLanguage(code: string) {
|
|
56
|
+
if (!this.currentLanguage || this.currentLanguage.code !== code) {
|
|
57
|
+
this.currentLanguage = this.languages!.find((v) => v.code === code);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
protected reloadMaskProcess(reloadParameters: ReloadMaskCallChainingParameters) {
|
|
62
|
+
return this.initLanguages().then(async () => {
|
|
63
|
+
this.initCurrentLanguage(await CurrentLanguage.getCode());
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
protected $$mounted() {
|
|
68
|
+
super.$$mounted();
|
|
69
|
+
this.router = useRouter().router;
|
|
70
|
+
this.matched = useMatched().matched;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LanguageWidget';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseMaskWidget, BaseMaskWidgetProps } from '../../basic';
|
|
2
|
+
import MaskBlock from './MaskBlock.vue';
|
|
3
|
+
|
|
4
|
+
export class BaseMaskLayoutWidget<
|
|
5
|
+
Props extends BaseMaskWidgetProps = BaseMaskWidgetProps
|
|
6
|
+
> extends BaseMaskWidget<Props> {
|
|
7
|
+
public initialize(props) {
|
|
8
|
+
super.initialize(props);
|
|
9
|
+
this.setComponent(MaskBlock);
|
|
10
|
+
return this;
|
|
11
|
+
}
|
|
12
|
+
}
|