@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.
Files changed (355) hide show
  1. package/README.md +1 -0
  2. package/dist/oinone-kunlun-vue-admin-layout.css +1 -0
  3. package/dist/oinone-kunlun-vue-admin-layout.esm.js +12049 -0
  4. package/dist/oinone-kunlun-vue-admin-layout.scss +1 -0
  5. package/dist/types/index.d.ts +1 -0
  6. package/dist/types/src/basic/MaskWidget.d.ts +17 -0
  7. package/dist/types/src/basic/index.d.ts +2 -0
  8. package/dist/types/src/basic/register/index.d.ts +1 -0
  9. package/dist/types/src/basic/register/manager.d.ts +7 -0
  10. package/dist/types/src/basic/token/BaseMaskWidget.d.ts +55 -0
  11. package/dist/types/src/basic/token/index.d.ts +1 -0
  12. package/dist/types/src/component/app-switcher/AppSwitcher.vue.d.ts +84 -0
  13. package/dist/types/src/component/app-switcher/AppSwitcherMask.vue.d.ts +61 -0
  14. package/dist/types/src/component/app-switcher/AppSwitcherWidget.d.ts +33 -0
  15. package/dist/types/src/component/app-switcher/index.d.ts +3 -0
  16. package/dist/types/src/component/breadcrumb/BreadcrumbWidget.d.ts +33 -0
  17. package/dist/types/src/component/breadcrumb/DefaultBreadcrumb.vue.d.ts +58 -0
  18. package/dist/types/src/component/breadcrumb/index.d.ts +2 -0
  19. package/dist/types/src/component/debug/Debug.vue.d.ts +11 -0
  20. package/dist/types/src/component/debug/DebugWidget.d.ts +8 -0
  21. package/dist/types/src/component/debug/constants.d.ts +2 -0
  22. package/dist/types/src/component/debug/index.d.ts +6 -0
  23. package/dist/types/src/component/debug/spi/DebugMaskEditor.d.ts +6 -0
  24. package/dist/types/src/component/debug/spi/DebugRouterInitializeService.d.ts +4 -0
  25. package/dist/types/src/component/debug/spi/index.d.ts +1 -0
  26. package/dist/types/src/component/debug/typing.d.ts +159 -0
  27. package/dist/types/src/component/debug/view/DebugMainView.vue.d.ts +28 -0
  28. package/dist/types/src/component/debug/view/DebugMainViewWidget.d.ts +9 -0
  29. package/dist/types/src/component/debug/view/components/DebugDefaultInfo.vue.d.ts +22 -0
  30. package/dist/types/src/component/debug/view/components/DebugJsonView.vue.d.ts +26 -0
  31. package/dist/types/src/component/debug/view/components/DebugRequestInfoPanel.vue.d.ts +22 -0
  32. package/dist/types/src/component/debug/view/components/DebugResponsePanel.vue.d.ts +12 -0
  33. package/dist/types/src/component/debug/view/debug-api/DebugApi.vue.d.ts +52 -0
  34. package/dist/types/src/component/debug/view/debug-api/DebugApiWidget.d.ts +32 -0
  35. package/dist/types/src/component/debug/view/debug-utils.d.ts +44 -0
  36. package/dist/types/src/component/debug/view/debug-view/DebugView.vue.d.ts +78 -0
  37. package/dist/types/src/component/debug/view/debug-view/DebugViewWidget.d.ts +26 -0
  38. package/dist/types/src/component/debug/view/index.d.ts +5 -0
  39. package/dist/types/src/component/debug/view/service/DebugRuntimeContextService.d.ts +18 -0
  40. package/dist/types/src/component/debug/view/service/DebugStackInfoService.d.ts +27 -0
  41. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.d.ts +6 -0
  42. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.d.ts +7 -0
  43. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.d.ts +6 -0
  44. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.d.ts +7 -0
  45. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.d.ts +6 -0
  46. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.d.ts +6 -0
  47. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.d.ts +6 -0
  48. package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.d.ts +6 -0
  49. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugBizStackService.d.ts +6 -0
  50. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugConfigureService.d.ts +4 -0
  51. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.d.ts +8 -0
  52. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.d.ts +6 -0
  53. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugFunctionService.d.ts +4 -0
  54. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.d.ts +6 -0
  55. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugModelService.d.ts +4 -0
  56. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.d.ts +6 -0
  57. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.d.ts +6 -0
  58. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.d.ts +7 -0
  59. package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.d.ts +6 -0
  60. package/dist/types/src/component/debug/view/service/index.d.ts +20 -0
  61. package/dist/types/src/component/debug/view/storage.d.ts +19 -0
  62. package/dist/types/src/component/debug/view/useDebugRequestInfo.d.ts +7 -0
  63. package/dist/types/src/component/divider/Divider.vue.d.ts +2 -0
  64. package/dist/types/src/component/divider/DividerWidget.d.ts +4 -0
  65. package/dist/types/src/component/divider/index.d.ts +1 -0
  66. package/dist/types/src/component/index.d.ts +14 -0
  67. package/dist/types/src/component/language/DefaultLanguage.vue.d.ts +34 -0
  68. package/dist/types/src/component/language/LanguageWidget.d.ts +16 -0
  69. package/dist/types/src/component/language/index.d.ts +1 -0
  70. package/dist/types/src/component/layout/BaseMaskLayoutWidget.d.ts +4 -0
  71. package/dist/types/src/component/layout/MaskBlock.vue.d.ts +24 -0
  72. package/dist/types/src/component/layout/block/MaskBlockWidget.d.ts +4 -0
  73. package/dist/types/src/component/layout/block/index.d.ts +1 -0
  74. package/dist/types/src/component/layout/container/MaskContainerWidget.d.ts +4 -0
  75. package/dist/types/src/component/layout/container/index.d.ts +1 -0
  76. package/dist/types/src/component/layout/content/MaskContentWidget.d.ts +7 -0
  77. package/dist/types/src/component/layout/content/index.d.ts +1 -0
  78. package/dist/types/src/component/layout/grid/Grid.vue.d.ts +2 -0
  79. package/dist/types/src/component/layout/grid/GridWidget.d.ts +9 -0
  80. package/dist/types/src/component/layout/grid/index.d.ts +1 -0
  81. package/dist/types/src/component/layout/header/MaskHeaderWidget.d.ts +4 -0
  82. package/dist/types/src/component/layout/header/index.d.ts +1 -0
  83. package/dist/types/src/component/layout/index.d.ts +9 -0
  84. package/dist/types/src/component/layout/mask/MaskRootWidget.d.ts +4 -0
  85. package/dist/types/src/component/layout/mask/index.d.ts +1 -0
  86. package/dist/types/src/component/layout/sidebar/MaskSidebarWidget.d.ts +10 -0
  87. package/dist/types/src/component/layout/sidebar/index.d.ts +1 -0
  88. package/dist/types/src/component/layout/widget/MaskCommonWidget.d.ts +14 -0
  89. package/dist/types/src/component/layout/widget/index.d.ts +1 -0
  90. package/dist/types/src/component/menu/DefaultMenu.vue.d.ts +115 -0
  91. package/dist/types/src/component/menu/DefaultSubMenu.vue.d.ts +17 -0
  92. package/dist/types/src/component/menu/MenuWidget.d.ts +71 -0
  93. package/dist/types/src/component/menu/index.d.ts +3 -0
  94. package/dist/types/src/component/multi-tabs/MultiTabs.vue.d.ts +151 -0
  95. package/dist/types/src/component/multi-tabs/MultiTabsWidget.d.ts +60 -0
  96. package/dist/types/src/component/multi-tabs/index.d.ts +2 -0
  97. package/dist/types/src/component/multi-tabs/typing.d.ts +6 -0
  98. package/dist/types/src/component/notification/DefaultNotification.vue.d.ts +61 -0
  99. package/dist/types/src/component/notification/NotificationWidget.d.ts +139 -0
  100. package/dist/types/src/component/notification/index.d.ts +2 -0
  101. package/dist/types/src/component/order-statistic/OrderStatistic.vue.d.ts +8 -0
  102. package/dist/types/src/component/order-statistic/index.d.ts +14 -0
  103. package/dist/types/src/component/partner-switcher/PartnerSwitcher.vue.d.ts +28 -0
  104. package/dist/types/src/component/partner-switcher/PartnerSwitcherWidget.d.ts +15 -0
  105. package/dist/types/src/component/partner-switcher/index.d.ts +6 -0
  106. package/dist/types/src/component/partner-switcher/service/PartnerSwitcherService.d.ts +17 -0
  107. package/dist/types/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.d.ts +17 -0
  108. package/dist/types/src/component/partner-switcher/service/index.d.ts +2 -0
  109. package/dist/types/src/component/partner-switcher/session/PartnerInfoSession.d.ts +26 -0
  110. package/dist/types/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.d.ts +15 -0
  111. package/dist/types/src/component/partner-switcher/session/index.d.ts +2 -0
  112. package/dist/types/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.d.ts +6 -0
  113. package/dist/types/src/component/partner-switcher/spi/index.d.ts +1 -0
  114. package/dist/types/src/component/partner-switcher/typing/index.d.ts +1 -0
  115. package/dist/types/src/component/partner-switcher/typing/partner.d.ts +20 -0
  116. package/dist/types/src/component/quick-search/QuickSearch.vue.d.ts +29 -0
  117. package/dist/types/src/component/quick-search/index.d.ts +24 -0
  118. package/dist/types/src/component/user/DefaultUser.vue.d.ts +39 -0
  119. package/dist/types/src/component/user/UserWidget.d.ts +16 -0
  120. package/dist/types/src/component/user/index.d.ts +1 -0
  121. package/dist/types/src/config/DebugConfig.d.ts +16 -0
  122. package/dist/types/src/config/PartnerSwitcherConfig.d.ts +16 -0
  123. package/dist/types/src/config/index.d.ts +2 -0
  124. package/dist/types/src/index.d.ts +10 -0
  125. package/dist/types/src/service/index.d.ts +5 -0
  126. package/dist/types/src/service/menu-service.d.ts +12 -0
  127. package/dist/types/src/service/message-service.d.ts +16 -0
  128. package/dist/types/src/service/module-service.d.ts +7 -0
  129. package/dist/types/src/service/top-bar-service.d.ts +10 -0
  130. package/dist/types/src/service/user-service.d.ts +4 -0
  131. package/dist/types/src/spi/index.d.ts +1 -0
  132. package/dist/types/src/spi/mask-editor.d.ts +54 -0
  133. package/dist/types/src/tags/Block.vue.d.ts +5 -0
  134. package/dist/types/src/tags/Breadcrumb.vue.d.ts +5 -0
  135. package/dist/types/src/tags/Container.vue.d.ts +5 -0
  136. package/dist/types/src/tags/Content.vue.d.ts +5 -0
  137. package/dist/types/src/tags/Header.vue.d.ts +5 -0
  138. package/dist/types/src/tags/Mask.vue.d.ts +5 -0
  139. package/dist/types/src/tags/MultiTabs.vue.d.ts +5 -0
  140. package/dist/types/src/tags/Sidebar.vue.d.ts +5 -0
  141. package/dist/types/src/tags/Widget.vue.d.ts +5 -0
  142. package/dist/types/src/tags/context/context.d.ts +8 -0
  143. package/dist/types/src/tags/context/index.d.ts +1 -0
  144. package/dist/types/src/tags/index.d.ts +6 -0
  145. package/dist/types/src/tags/mixin/MaskWidgetTagMixin.d.ts +2 -0
  146. package/dist/types/src/tags/mixin/index.d.ts +3 -0
  147. package/dist/types/src/tags/mixin/typing.d.ts +6 -0
  148. package/dist/types/src/tags/mixin/use-mask-widget-tag.d.ts +38 -0
  149. package/dist/types/src/tags/register/index.d.ts +1 -0
  150. package/dist/types/src/tags/register/manager.d.ts +9 -0
  151. package/dist/types/src/tags/resolve/index.d.ts +2 -0
  152. package/dist/types/src/tags/resolve/internal/index.d.ts +2 -0
  153. package/dist/types/src/tags/resolve/internal/typing.d.ts +5 -0
  154. package/dist/types/src/tags/resolve/internal/widget-resolve.d.ts +3 -0
  155. package/dist/types/src/tags/resolve/typing.d.ts +26 -0
  156. package/dist/types/src/tags/resolve/widget-resolve.d.ts +5 -0
  157. package/dist/types/src/template/default-mask.d.ts +2 -0
  158. package/dist/types/src/template/index.d.ts +6 -0
  159. package/dist/types/src/theme/index.d.ts +1 -0
  160. package/dist/types/src/typing/constant.d.ts +1 -0
  161. package/dist/types/src/typing/index.d.ts +3 -0
  162. package/dist/types/src/typing/menu.d.ts +12 -0
  163. package/dist/types/src/typing/stream-symble.d.ts +12 -0
  164. package/dist/types/src/util/HomepageUtils.d.ts +3 -0
  165. package/dist/types/src/util/MenuUtil.d.ts +5 -0
  166. package/dist/types/src/util/index.d.ts +3 -0
  167. package/dist/types/src/util/unauthorized-action.d.ts +14 -0
  168. package/dist/types/src/utils.d.ts +86 -0
  169. package/index.ts +1 -0
  170. package/package.json +47 -0
  171. package/rollup.config.js +33 -0
  172. package/src/basic/MaskWidget.ts +74 -0
  173. package/src/basic/index.ts +2 -0
  174. package/src/basic/register/index.ts +1 -0
  175. package/src/basic/register/manager.ts +17 -0
  176. package/src/basic/token/BaseMaskWidget.ts +187 -0
  177. package/src/basic/token/index.ts +1 -0
  178. package/src/component/app-switcher/AppSwitcher.vue +133 -0
  179. package/src/component/app-switcher/AppSwitcherMask.vue +237 -0
  180. package/src/component/app-switcher/AppSwitcherWidget.ts +152 -0
  181. package/src/component/app-switcher/index.ts +3 -0
  182. package/src/component/breadcrumb/BreadcrumbWidget.ts +167 -0
  183. package/src/component/breadcrumb/DefaultBreadcrumb.vue +95 -0
  184. package/src/component/breadcrumb/index.ts +2 -0
  185. package/src/component/debug/Debug.vue +28 -0
  186. package/src/component/debug/DebugWidget.ts +38 -0
  187. package/src/component/debug/constants.ts +3 -0
  188. package/src/component/debug/index.ts +6 -0
  189. package/src/component/debug/spi/DebugMaskEditor.ts +19 -0
  190. package/src/component/debug/spi/DebugRouterInitializeService.ts +21 -0
  191. package/src/component/debug/spi/index.ts +1 -0
  192. package/src/component/debug/typing.ts +191 -0
  193. package/src/component/debug/view/DebugMainView.vue +206 -0
  194. package/src/component/debug/view/DebugMainViewWidget.ts +42 -0
  195. package/src/component/debug/view/components/DebugDefaultInfo.vue +31 -0
  196. package/src/component/debug/view/components/DebugJsonView.vue +107 -0
  197. package/src/component/debug/view/components/DebugRequestInfoPanel.vue +129 -0
  198. package/src/component/debug/view/components/DebugResponsePanel.vue +66 -0
  199. package/src/component/debug/view/components/runtime-context/DebugRuntimeFieldComponent.vue +29 -0
  200. package/src/component/debug/view/debug-api/DebugApi.vue +225 -0
  201. package/src/component/debug/view/debug-api/DebugApiWidget.ts +400 -0
  202. package/src/component/debug/view/debug-utils.ts +114 -0
  203. package/src/component/debug/view/debug-view/DebugView.vue +331 -0
  204. package/src/component/debug/view/debug-view/DebugViewWidget.ts +181 -0
  205. package/src/component/debug/view/index.ts +6 -0
  206. package/src/component/debug/view/service/DebugRuntimeContextService.ts +21 -0
  207. package/src/component/debug/view/service/DebugStackInfoService.ts +33 -0
  208. package/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.ts +16 -0
  209. package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.ts +28 -0
  210. package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.ts +16 -0
  211. package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.ts +33 -0
  212. package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.ts +16 -0
  213. package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.ts +30 -0
  214. package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.ts +16 -0
  215. package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.ts +16 -0
  216. package/src/component/debug/view/service/impl/stack-info/DebugBizStackService.ts +19 -0
  217. package/src/component/debug/view/service/impl/stack-info/DebugConfigureService.ts +6 -0
  218. package/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.ts +62 -0
  219. package/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.ts +19 -0
  220. package/src/component/debug/view/service/impl/stack-info/DebugFunctionService.ts +6 -0
  221. package/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.ts +19 -0
  222. package/src/component/debug/view/service/impl/stack-info/DebugModelService.ts +6 -0
  223. package/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.ts +19 -0
  224. package/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.ts +22 -0
  225. package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.ts +35 -0
  226. package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.ts +19 -0
  227. package/src/component/debug/view/service/index.ts +22 -0
  228. package/src/component/debug/view/storage.ts +35 -0
  229. package/src/component/debug/view/useDebugRequestInfo.ts +17 -0
  230. package/src/component/divider/Divider.vue +15 -0
  231. package/src/component/divider/DividerWidget.ts +12 -0
  232. package/src/component/divider/index.ts +1 -0
  233. package/src/component/index.ts +15 -0
  234. package/src/component/language/DefaultLanguage.vue +111 -0
  235. package/src/component/language/LanguageWidget.ts +72 -0
  236. package/src/component/language/index.ts +1 -0
  237. package/src/component/layout/BaseMaskLayoutWidget.ts +12 -0
  238. package/src/component/layout/MaskBlock.vue +31 -0
  239. package/src/component/layout/block/MaskBlockWidget.ts +17 -0
  240. package/src/component/layout/block/index.ts +1 -0
  241. package/src/component/layout/container/MaskContainerWidget.ts +13 -0
  242. package/src/component/layout/container/index.ts +1 -0
  243. package/src/component/layout/content/MaskContentWidget.ts +41 -0
  244. package/src/component/layout/content/index.ts +1 -0
  245. package/src/component/layout/grid/Grid.vue +10 -0
  246. package/src/component/layout/grid/GridWidget.ts +62 -0
  247. package/src/component/layout/grid/index.ts +1 -0
  248. package/src/component/layout/header/MaskHeaderWidget.ts +13 -0
  249. package/src/component/layout/header/index.ts +1 -0
  250. package/src/component/layout/index.ts +9 -0
  251. package/src/component/layout/mask/MaskRootWidget.ts +13 -0
  252. package/src/component/layout/mask/index.ts +1 -0
  253. package/src/component/layout/sidebar/MaskSidebarWidget.ts +31 -0
  254. package/src/component/layout/sidebar/index.ts +1 -0
  255. package/src/component/layout/widget/MaskCommonWidget.ts +95 -0
  256. package/src/component/layout/widget/index.ts +1 -0
  257. package/src/component/menu/DefaultMenu.vue +252 -0
  258. package/src/component/menu/DefaultSubMenu.vue +68 -0
  259. package/src/component/menu/MenuWidget.ts +349 -0
  260. package/src/component/menu/index.ts +3 -0
  261. package/src/component/menu/style/common.scss +411 -0
  262. package/src/component/menu/style/index.scss +2 -0
  263. package/src/component/menu/style/menu-theme/index.scss +5 -0
  264. package/src/component/menu/style/menu-theme/theme2.scss +37 -0
  265. package/src/component/menu/style/menu-theme/theme3.scss +59 -0
  266. package/src/component/menu/style/menu-theme/theme4.scss +56 -0
  267. package/src/component/menu/style/menu-theme/theme5.scss +45 -0
  268. package/src/component/menu/style/menu-theme/theme6.scss +45 -0
  269. package/src/component/menu/style/mixin.scss +23 -0
  270. package/src/component/multi-tabs/MultiTabs.vue +475 -0
  271. package/src/component/multi-tabs/MultiTabsWidget.ts +450 -0
  272. package/src/component/multi-tabs/index.ts +2 -0
  273. package/src/component/multi-tabs/style/index.scss +217 -0
  274. package/src/component/multi-tabs/style/mixin.scss +13 -0
  275. package/src/component/multi-tabs/style/parameters.scss +2 -0
  276. package/src/component/multi-tabs/style/theme1.scss +92 -0
  277. package/src/component/multi-tabs/style/theme2.scss +89 -0
  278. package/src/component/multi-tabs/style/theme3.scss +60 -0
  279. package/src/component/multi-tabs/style/theme4.scss +85 -0
  280. package/src/component/multi-tabs/typing.ts +7 -0
  281. package/src/component/notification/DefaultNotification.vue +455 -0
  282. package/src/component/notification/NotificationWidget.ts +332 -0
  283. package/src/component/notification/index.ts +2 -0
  284. package/src/component/order-statistic/OrderStatistic.vue +12 -0
  285. package/src/component/order-statistic/index.ts +146 -0
  286. package/src/component/partner-switcher/PartnerSwitcher.vue +75 -0
  287. package/src/component/partner-switcher/PartnerSwitcherWidget.ts +70 -0
  288. package/src/component/partner-switcher/index.ts +6 -0
  289. package/src/component/partner-switcher/service/PartnerSwitcherService.ts +20 -0
  290. package/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.ts +48 -0
  291. package/src/component/partner-switcher/service/index.ts +2 -0
  292. package/src/component/partner-switcher/session/PartnerInfoSession.ts +32 -0
  293. package/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.ts +46 -0
  294. package/src/component/partner-switcher/session/index.ts +2 -0
  295. package/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.ts +24 -0
  296. package/src/component/partner-switcher/spi/index.ts +1 -0
  297. package/src/component/partner-switcher/typing/index.ts +1 -0
  298. package/src/component/partner-switcher/typing/partner.ts +22 -0
  299. package/src/component/quick-search/QuickSearch.vue +34 -0
  300. package/src/component/quick-search/index.ts +237 -0
  301. package/src/component/style/index.scss +4 -0
  302. package/src/component/style/layout.scss +229 -0
  303. package/src/component/user/DefaultUser.vue +92 -0
  304. package/src/component/user/UserWidget.ts +129 -0
  305. package/src/component/user/index.ts +1 -0
  306. package/src/config/DebugConfig.ts +30 -0
  307. package/src/config/PartnerSwitcherConfig.ts +30 -0
  308. package/src/config/index.ts +2 -0
  309. package/src/index.ts +11 -0
  310. package/src/service/index.ts +5 -0
  311. package/src/service/menu-service.ts +105 -0
  312. package/src/service/message-service.ts +65 -0
  313. package/src/service/module-service.ts +69 -0
  314. package/src/service/top-bar-service.ts +144 -0
  315. package/src/service/user-service.ts +10 -0
  316. package/src/shim-translate.d.ts +7 -0
  317. package/src/shim-vue.d.ts +6 -0
  318. package/src/spi/index.ts +1 -0
  319. package/src/spi/mask-editor.ts +102 -0
  320. package/src/tags/Block.vue +16 -0
  321. package/src/tags/Breadcrumb.vue +16 -0
  322. package/src/tags/Container.vue +16 -0
  323. package/src/tags/Content.vue +16 -0
  324. package/src/tags/Header.vue +16 -0
  325. package/src/tags/Mask.vue +16 -0
  326. package/src/tags/MultiTabs.vue +16 -0
  327. package/src/tags/Sidebar.vue +16 -0
  328. package/src/tags/Widget.vue +16 -0
  329. package/src/tags/context/context.ts +24 -0
  330. package/src/tags/context/index.ts +1 -0
  331. package/src/tags/index.ts +48 -0
  332. package/src/tags/mixin/MaskWidgetTagMixin.ts +79 -0
  333. package/src/tags/mixin/index.ts +3 -0
  334. package/src/tags/mixin/typing.ts +8 -0
  335. package/src/tags/mixin/use-mask-widget-tag.ts +172 -0
  336. package/src/tags/register/index.ts +1 -0
  337. package/src/tags/register/manager.ts +43 -0
  338. package/src/tags/resolve/index.ts +2 -0
  339. package/src/tags/resolve/internal/index.ts +2 -0
  340. package/src/tags/resolve/internal/typing.ts +6 -0
  341. package/src/tags/resolve/internal/widget-resolve.ts +57 -0
  342. package/src/tags/resolve/typing.ts +39 -0
  343. package/src/tags/resolve/widget-resolve.ts +64 -0
  344. package/src/template/default-mask.ts +51 -0
  345. package/src/template/index.ts +26 -0
  346. package/src/theme/index.ts +1 -0
  347. package/src/typing/constant.ts +3 -0
  348. package/src/typing/index.ts +3 -0
  349. package/src/typing/menu.ts +15 -0
  350. package/src/typing/stream-symble.ts +14 -0
  351. package/src/util/HomepageUtils.ts +41 -0
  352. package/src/util/MenuUtil.ts +18 -0
  353. package/src/util/index.ts +3 -0
  354. package/src/util/unauthorized-action.ts +98 -0
  355. package/src/utils.ts +716 -0
@@ -0,0 +1,86 @@
1
+ import { RuntimeModel } from '@oinone/kunlun-engine';
2
+ import { Entity, IModel, isPromise } from '@oinone/kunlun-meta';
3
+ import { Condition } from '@oinone/kunlun-request';
4
+ declare const filterRsql: (searchValue: string) => string;
5
+ declare const getCondition: (model: IModel | null, content: Record<string, unknown>, extraContent?: {}, extraConditions?: {
6
+ leftValue: string[];
7
+ operator: string;
8
+ right: unknown;
9
+ }[]) => Condition;
10
+ /**
11
+ * 构造下拉框的搜索条件
12
+ * @param model 关联模型
13
+ * @param searchFieldName 搜索的字段名,可以是逗号分隔的多个字段
14
+ * @param searchValue 搜索的值
15
+ * @param domain 限定条件
16
+ */
17
+ declare const buildSelectSearchCondition: (model: RuntimeModel | undefined, searchFieldName: string, searchValue: string, domain?: string | undefined) => Condition;
18
+ /**
19
+ * 构造下拉框的搜索条件
20
+ * @param searchFieldName 搜索的字段名,可以是逗号分隔的多个字段
21
+ * @param searchValue 搜索的值
22
+ * @param domain 限定条件
23
+ * @deprecated please using buildSelectSearchCondition
24
+ */
25
+ declare const builderSelectSearchCondition: (searchFieldName: string, searchValue: string, domain?: string | undefined) => string;
26
+ /**
27
+ * 自动填充已选中的值到选项列表的头部,非表达式
28
+ * @param relationFieldKey
29
+ * @param selectedValue
30
+ * @param dataList
31
+ * @param labelFields
32
+ * @param separator labelFields的展示时的分隔符
33
+ */
34
+ declare const autoFillSelectedValueToOptions: (relationFieldKey: string, selectedValue: any, dataList: Entity[], labelFields: string[], separator?: string) => Entity[];
35
+ /**
36
+ * 根据label变量表达式自动填充已选中的值到选项列表的头部
37
+ * @param relationFieldKey
38
+ * @param selectedValue
39
+ * @param dataList 可选项数据
40
+ * @param xmlOptionLabel xml配的label表达式
41
+ * @param modelLabel 元数据上的label表达式
42
+ * @param optionLabelContextArgs 表达式运行的数据源参数
43
+ */
44
+ declare const autoFillSelectedValueToOptionsByLabel: (relationFieldKey: string, selectedValues: Entity | Entity[], dataList?: Entity[], xmlOptionLabel?: string | undefined, modelLabel?: string | undefined, optionLabelContextArgs?: string | undefined) => Entity[];
45
+ /**
46
+ * 根据labelFields组装展示数据
47
+ * @param relationFieldKey
48
+ * @param optionData
49
+ * @param labelFields
50
+ * @param separator
51
+ */
52
+ export declare const autoFillByLabelFields: (relationFieldKey: string, optionData: Entity, labelFields: string[], separator?: string | undefined) => Entity;
53
+ /**
54
+ * 根据label组装展示数据
55
+ * @param relationFieldKey
56
+ * @param optionData
57
+ * @param realOptionLabel
58
+ * @param optionLabelContextArgs
59
+ */
60
+ export declare const autoFillByLabel: (relationFieldKey: string, optionData: Entity, realOptionLabel?: string | undefined, optionLabelContextArgs?: string | undefined) => Entity;
61
+ /**
62
+ * 获取xml中配置的labelFields
63
+ * @param dslConfig xml配置
64
+ * @param labelFields 元数据上的labelFields
65
+ */
66
+ declare const fetchLabelFieldsFromXmlConfig: (dslConfig: Entity, labelFields: string[]) => string[];
67
+ /**
68
+ * 判断对象是否为空
69
+ * @param obj
70
+ */
71
+ declare const isEmptyObject: (obj: any) => boolean;
72
+ interface QueryExpression {
73
+ leftValue: string[];
74
+ operator: string;
75
+ right: unknown;
76
+ }
77
+ /**
78
+ * 解析action上的domain到默认搜索条件
79
+ * @param model
80
+ * @param domain
81
+ */
82
+ declare const parseActionDomain4search: (model: IModel, domain: string) => {
83
+ searchBody: {};
84
+ searchConditions: QueryExpression[];
85
+ };
86
+ export { isPromise, filterRsql, getCondition, buildSelectSearchCondition, builderSelectSearchCondition, autoFillSelectedValueToOptions, autoFillSelectedValueToOptionsByLabel, fetchLabelFieldsFromXmlConfig, isEmptyObject, parseActionDomain4search };
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './src';
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@oinone/kunlun-vue-admin-layout",
3
+ "version": "6.2.0",
4
+ "main": "index.ts",
5
+ "scripts": {
6
+ "prebuild": "rimraf dist",
7
+ "build": "rollup -c && npm run build-css",
8
+ "build-css": "sass --style compressed --no-source-map ./dist/oinone-kunlun-vue-admin-layout.scss ./dist/oinone-kunlun-vue-admin-layout.css",
9
+ "dist": "npm run prepublishOnly",
10
+ "index": "npm run postpublish",
11
+ "x-prepublishOnly": "node ../../scripts/prepublish-only.js",
12
+ "x-postpublish": "node ../../scripts/postpublish.js",
13
+ "doc": "typedoc --out docs src/index.ts"
14
+ },
15
+ "dependencies": {
16
+ "@oinone/kunlun-vue-router": "6.2.0",
17
+ "@oinone/kunlun-vue-ui": "6.2.0",
18
+ "@oinone/kunlun-vue-ui-antd": "6.2.0",
19
+ "@oinone/kunlun-vue-ui-common": "6.2.0",
20
+ "@oinone/kunlun-vue-widget": "6.2.0",
21
+ "vue-json-pretty": "^2.4.0"
22
+ },
23
+ "devDependencies": {
24
+ "@oinone/kunlun-dsl": "~6.2.0",
25
+ "@oinone/kunlun-engine": "~6.2.0",
26
+ "@oinone/kunlun-environment": "~6.2.0",
27
+ "@oinone/kunlun-event": "~6.2.0",
28
+ "@oinone/kunlun-expression": "~6.2.0",
29
+ "@oinone/kunlun-meta": "~6.2.0",
30
+ "@oinone/kunlun-request": "~6.2.0",
31
+ "@oinone/kunlun-router": "~6.2.0",
32
+ "@oinone/kunlun-service": "~6.2.0",
33
+ "@oinone/kunlun-shared": "~6.2.0",
34
+ "@oinone/kunlun-spi": "~6.2.0",
35
+ "@oinone/kunlun-state": "~6.2.0",
36
+ "@types/lodash": "4.14.182",
37
+ "@types/lodash-es": "4.17.6",
38
+ "lodash": "4.17.21",
39
+ "lodash-es": "4.17.21",
40
+ "sass": "1.44.0",
41
+ "sass-loader": "10.1.1"
42
+ },
43
+ "peerDependencies": {
44
+ "vue": ">=3.2.40"
45
+ },
46
+ "gitHead": "b65bbf1d649da1017810c5608473d5daa1a41f94"
47
+ }
@@ -0,0 +1,33 @@
1
+ import pkg from './package.json';
2
+ import rollupConfig from '../../scripts/build.config.js';
3
+
4
+ export default rollupConfig(
5
+ pkg.name,
6
+ [
7
+ '@ant-design/icons-vue',
8
+ '@oinone/kunlun-dsl',
9
+ '@oinone/kunlun-engine',
10
+ '@oinone/kunlun-event',
11
+ '@oinone/kunlun-environment',
12
+ '@oinone/kunlun-expression',
13
+ '@oinone/kunlun-meta',
14
+ '@oinone/kunlun-request',
15
+ '@oinone/kunlun-router',
16
+ '@oinone/kunlun-service',
17
+ '@oinone/kunlun-shared',
18
+ '@oinone/kunlun-spi',
19
+ '@oinone/kunlun-state',
20
+ '@oinone/kunlun-vue-router',
21
+ '@oinone/kunlun-vue-ui',
22
+ '@oinone/kunlun-vue-ui-antd',
23
+ '@oinone/kunlun-vue-ui-common',
24
+ '@oinone/kunlun-vue-widget',
25
+ 'ant-design-vue',
26
+ 'lodash',
27
+ 'lodash-es',
28
+ 'vue'
29
+ ],
30
+ true,
31
+ [],
32
+ false
33
+ );
@@ -0,0 +1,74 @@
1
+ import {
2
+ getReloadMainViewParameters,
3
+ getReloadMaskParameters,
4
+ ReloadMainViewCallChainingParameters,
5
+ ReloadMaskCallChainingParameters
6
+ } from '@oinone/kunlun-engine';
7
+ import { CallChaining, ReturnPromise } from '@oinone/kunlun-shared';
8
+ import { Widget } from '@oinone/kunlun-vue-widget';
9
+ import { BaseMaskWidget } from './token';
10
+
11
+ export abstract class MaskWidget extends BaseMaskWidget {
12
+ public get path(): string {
13
+ return this.currentHandle;
14
+ }
15
+
16
+ protected reloadMaskProcess?(reloadParameters: ReloadMaskCallChainingParameters): ReturnPromise<void>;
17
+
18
+ protected reloadMainViewProcess?(reloadParameters: ReloadMainViewCallChainingParameters): ReturnPromise<void>;
19
+
20
+ @Widget.Reactive()
21
+ @Widget.Inject()
22
+ protected reloadMaskCallChaining: CallChaining | undefined;
23
+
24
+ @Widget.Reactive()
25
+ @Widget.Inject()
26
+ protected reloadMainViewCallChaining: CallChaining | undefined;
27
+
28
+ protected hookReloadMaskProcess() {
29
+ if (this.reloadMaskProcess) {
30
+ this.reloadMaskCallChaining?.hook(this.path, async (args) => {
31
+ const reloadParameters = getReloadMaskParameters(args);
32
+ this.reloadMaskProcess?.(reloadParameters);
33
+ });
34
+ }
35
+ }
36
+
37
+ protected hookReloadMainViewProcess() {
38
+ if (this.reloadMainViewProcess) {
39
+ this.reloadMainViewCallChaining?.hook(this.path, async (args) => {
40
+ const reloadParameters = getReloadMainViewParameters(args);
41
+ this.reloadMainViewProcess?.(reloadParameters);
42
+ });
43
+ }
44
+ }
45
+
46
+ protected hookMount() {
47
+ this.hookReloadMaskProcess();
48
+ this.hookReloadMainViewProcess();
49
+ }
50
+
51
+ protected hookUnmount() {
52
+ if (this.reloadMaskProcess) {
53
+ this.reloadMaskCallChaining?.unhook(this.path);
54
+ }
55
+ if (this.reloadMainViewProcess) {
56
+ this.reloadMainViewCallChaining?.unhook(this.path);
57
+ }
58
+ }
59
+
60
+ protected $$mounted() {
61
+ super.$$mounted();
62
+ this.hookMount();
63
+ }
64
+
65
+ protected $$unmounted() {
66
+ super.$$unmounted();
67
+ this.hookUnmount();
68
+ }
69
+
70
+ public dispose() {
71
+ super.dispose();
72
+ this.hookUnmount();
73
+ }
74
+ }
@@ -0,0 +1,2 @@
1
+ export * from './token';
2
+ export * from './MaskWidget';
@@ -0,0 +1 @@
1
+ export * from './manager';
@@ -0,0 +1,17 @@
1
+ export interface IMaskTagManager<Component = unknown> {
2
+ getComponents(): Component[];
3
+
4
+ isInternalWidget(dslNodeType: string): boolean;
5
+
6
+ register(dslNodeType: string): boolean;
7
+ }
8
+
9
+ let maskTagManagerInstance: IMaskTagManager | undefined;
10
+
11
+ export function getMaskTagManagerInstance<Component = unknown>() {
12
+ return maskTagManagerInstance as IMaskTagManager<Component>;
13
+ }
14
+
15
+ export function setMaskTagManagerInstance(instance: IMaskTagManager) {
16
+ maskTagManagerInstance = instance;
17
+ }
@@ -0,0 +1,187 @@
1
+ import { DEFAULT_SLOT_NAME, DslDefinition, DslSlotUtils } from '@oinone/kunlun-dsl';
2
+ import { Align, Layout, Overflow } from '@oinone/kunlun-engine';
3
+ import { useMatched } from '@oinone/kunlun-router';
4
+ import { Constructor, CSSStyle, StringHelper } from '@oinone/kunlun-shared';
5
+ import {
6
+ SPIFactory,
7
+ SPIOperator,
8
+ SPIOptions,
9
+ SPISelectorFactory,
10
+ SPISingleSelector,
11
+ SPITokenFactory
12
+ } from '@oinone/kunlun-spi';
13
+ import { StyleHelper } from '@oinone/kunlun-vue-ui-common';
14
+ import {
15
+ DslRender,
16
+ DslRenderWidget,
17
+ DslRenderWidgetProps,
18
+ InnerWidgetType,
19
+ IViewFilterOptions,
20
+ ViewWidget,
21
+ Widget
22
+ } from '@oinone/kunlun-vue-widget';
23
+ import { Slots, VNode } from 'vue';
24
+ import { getMaskTagManagerInstance } from '../register';
25
+
26
+ /**
27
+ * Mask组件注册可选项
28
+ */
29
+ export interface BaseMaskOptions extends SPIOptions {
30
+ /**
31
+ * 指定XML标签
32
+ */
33
+ dslNodeType?: string;
34
+ /**
35
+ * 指定组件名称
36
+ */
37
+ widget?: string | string[];
38
+ }
39
+
40
+ export interface BaseMaskWidgetProps extends DslRenderWidgetProps {
41
+ /**
42
+ * 自动组件
43
+ */
44
+ automatic?: boolean;
45
+
46
+ class?: string;
47
+ style?: string;
48
+
49
+ height?: string;
50
+ width?: string;
51
+ align?: Align;
52
+ layout?: Layout;
53
+ flexWrap?: string;
54
+ flexDirection?: string;
55
+ alignContent?: string;
56
+ flex?: string;
57
+ wrap?: boolean;
58
+ overflow?: Overflow;
59
+ }
60
+
61
+ const MASK_WIDGET_STORAGE_KEY = Symbol('Mask');
62
+
63
+ ViewWidget.Token = (options) => {
64
+ const { tagName } = options;
65
+ if (tagName) {
66
+ let tagNames: string[];
67
+ if (Array.isArray(tagName)) {
68
+ tagNames = tagName;
69
+ } else {
70
+ tagNames = [tagName];
71
+ }
72
+ for (const tag of tagNames) {
73
+ const maskTagManager = getMaskTagManagerInstance();
74
+ if (maskTagManager && !maskTagManager.isInternalWidget(tag)) {
75
+ maskTagManager.register(tag);
76
+ }
77
+ }
78
+ }
79
+ const maskOptions = {
80
+ ...options,
81
+ dslNodeType: tagName
82
+ };
83
+ delete maskOptions.tagName;
84
+ return SPISelectorFactory.GeneratorToken(MASK_WIDGET_STORAGE_KEY, maskOptions);
85
+ };
86
+
87
+ ViewWidget.Selector = (options) => {
88
+ const { tagName } = options;
89
+ let maskOptions: IViewFilterOptions;
90
+ if (tagName) {
91
+ maskOptions = {
92
+ ...options,
93
+ dslNodeType: tagName
94
+ };
95
+ delete maskOptions.tagName;
96
+ } else {
97
+ maskOptions = options;
98
+ }
99
+ return SPIOperator.selector(MASK_WIDGET_STORAGE_KEY, maskOptions);
100
+ };
101
+
102
+ @SPIFactory.Storage<BaseMaskWidget, BaseMaskOptions>(['dslNodeType', 'widget'], {
103
+ key: MASK_WIDGET_STORAGE_KEY,
104
+ tokenGenerator: (storageKey, options) => {
105
+ const { dslNodeType } = options;
106
+ if (dslNodeType) {
107
+ const maskTagManager = getMaskTagManagerInstance();
108
+ if (maskTagManager && !maskTagManager.isInternalWidget(dslNodeType)) {
109
+ maskTagManager.register(dslNodeType);
110
+ }
111
+ }
112
+ return SPISelectorFactory.GeneratorToken(storageKey, options);
113
+ }
114
+ })
115
+ export class BaseMaskWidget<Props extends BaseMaskWidgetProps = BaseMaskWidgetProps> extends DslRenderWidget<Props> {
116
+ protected $$innerWidgetType = InnerWidgetType.Mask;
117
+
118
+ public static Token: SPITokenFactory<BaseMaskOptions>;
119
+
120
+ public static Selector: SPISingleSelector<BaseMaskOptions, Constructor<BaseMaskWidget>>;
121
+
122
+ @Widget.Reactive()
123
+ protected automatic = false;
124
+
125
+ @Widget.Reactive()
126
+ protected loading = false;
127
+
128
+ @Widget.Reactive()
129
+ protected readonly currentHandle: string;
130
+
131
+ public getCurrentHandle() {
132
+ return this.currentHandle;
133
+ }
134
+
135
+ public constructor(handle?: string) {
136
+ super(handle);
137
+ this.currentHandle = this.getHandle();
138
+ }
139
+
140
+ public initialize(props: Props) {
141
+ if (props.slotNames == null) {
142
+ props.slotNames = [DEFAULT_SLOT_NAME];
143
+ }
144
+ super.initialize(props);
145
+ this.automatic = props.automatic || false;
146
+ return this;
147
+ }
148
+
149
+ @Widget.Reactive()
150
+ public get classNames(): string[] | undefined {
151
+ const classNames = this.getDsl().class;
152
+ if (classNames) {
153
+ return StringHelper.append([], classNames);
154
+ }
155
+ }
156
+
157
+ @Widget.Reactive()
158
+ public get style(): CSSStyle | undefined {
159
+ return StyleHelper.convertStyleByDslDefinition(this.getDsl());
160
+ }
161
+
162
+ /**
163
+ * 获取url参数
164
+ */
165
+ public getUrlParameters(): Record<string, unknown> {
166
+ const { page = {} } = useMatched().matched.segmentParams;
167
+ return page;
168
+ }
169
+
170
+ public async load<R>(fn: (...args) => R, ...args): Promise<R> {
171
+ this.loading = true;
172
+ try {
173
+ return await fn(...args);
174
+ } finally {
175
+ this.loading = false;
176
+ }
177
+ }
178
+
179
+ public render(ctx?: Record<string, unknown>, slots?: Slots): VNode | VNode[] {
180
+ const template = (ctx?.dslDefinition || this.template) as DslDefinition;
181
+ if (template && this.supportedSlotNames.length) {
182
+ this.dslSlots = DslSlotUtils.fetchSlotsBySlotNames(template, this.supportedSlotNames);
183
+ this.slots = DslRender.renderSlots(this.dslSlots);
184
+ }
185
+ return super.render(ctx, slots);
186
+ }
187
+ }
@@ -0,0 +1 @@
1
+ export * from './BaseMaskWidget';
@@ -0,0 +1,133 @@
1
+ <template>
2
+ <div class="k-oinone-application" @click="onShowMask">
3
+ <!-- 预加载图片 start -->
4
+ <img style="display: none" :src="`${genStaticPath('背景1_1650609329143.png')}`" alt="" />
5
+ <img style="display: none" :src="`${genStaticPath('背景_1651138497267.png')}`" alt="" />
6
+ <!-- 预加载图片 end -->
7
+
8
+ <div class="logo">
9
+ <div
10
+ class="logo-background"
11
+ :style="{
12
+ backgroundImage: `url('${collapsed ? collapsedLogo || DEFAULT_APPLICATION_LOGO() : logo}')`
13
+ }"
14
+ ></div>
15
+ </div>
16
+ <div class="app-name">
17
+ <span class="app-name-module" :title="appLabel">{{ appLabel }}</span>
18
+ <caret-down-outlined v-if="!isSingleApps" />
19
+ </div>
20
+ <div v-show="showMask">
21
+ <app-switcher-mask
22
+ v-model:showMask="showMask"
23
+ :apps="apps"
24
+ :genStaticPath="genStaticPath"
25
+ :likeApp="likeApp"
26
+ :onCollectionClick="onCollectionClick"
27
+ @switch-app="onSwitchApp"
28
+ />
29
+ </div>
30
+ </div>
31
+ </template>
32
+ <script lang="ts">
33
+ import { CaretDownOutlined } from '@ant-design/icons-vue';
34
+ import { IModule } from '@oinone/kunlun-meta';
35
+ import { computed, defineComponent, PropType, ref } from 'vue';
36
+ import { DEFAULT_APPLICATION_LOGO } from '../../typing';
37
+ import AppSwitcherMask from './AppSwitcherMask.vue';
38
+
39
+ export default defineComponent({
40
+ name: 'AppSwitcher',
41
+ components: {
42
+ CaretDownOutlined,
43
+ AppSwitcherMask
44
+ },
45
+ inheritAttrs: false,
46
+ props: {
47
+ apps: {
48
+ type: Array as PropType<IModule[]>,
49
+ default: () => []
50
+ },
51
+ module: {
52
+ type: Object as PropType<IModule>
53
+ },
54
+ logo: {
55
+ type: String
56
+ },
57
+ collapsedLogo: {
58
+ type: String
59
+ },
60
+ collapsed: {
61
+ type: Boolean,
62
+ default: undefined
63
+ },
64
+ likeApp: {
65
+ type: Array as PropType<IModule[]>
66
+ },
67
+ onCollectionClick: {
68
+ type: Function
69
+ },
70
+ onSwitchApp: {
71
+ type: Function
72
+ },
73
+ genStaticPath: {
74
+ type: Function
75
+ },
76
+ currentPageUrl: {
77
+ type: Object,
78
+ default: () => ({})
79
+ }
80
+ },
81
+ setup(props) {
82
+ const apps = computed(() => {
83
+ return props.apps || [];
84
+ });
85
+
86
+ const appLabel = computed(() => {
87
+ return props.module?.displayName || props.module?.name;
88
+ });
89
+
90
+ const collapsed = computed(() => {
91
+ return props.collapsed || false;
92
+ });
93
+
94
+ const isSingleApps = computed(() => {
95
+ if (props.apps.length === 0) {
96
+ return true;
97
+ }
98
+
99
+ if (props.apps.length === 1) {
100
+ const [firstApp] = props.apps;
101
+ const { module } = props.currentPageUrl;
102
+ if (module !== firstApp.name) {
103
+ return false;
104
+ }
105
+ return true;
106
+ }
107
+
108
+ return false;
109
+ });
110
+
111
+ const showMask = ref(false);
112
+
113
+ const onShowMask = () => {
114
+ if (isSingleApps.value) {
115
+ return;
116
+ }
117
+
118
+ showMask.value = true;
119
+ };
120
+
121
+ return {
122
+ DEFAULT_APPLICATION_LOGO,
123
+ apps,
124
+ appLabel,
125
+ collapsed,
126
+ showMask,
127
+ isSingleApps,
128
+
129
+ onShowMask
130
+ };
131
+ }
132
+ });
133
+ </script>