@epxing/core 5.3.0-beta.2 → 5.3.0-beta.4

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 (100) hide show
  1. package/API.md +715 -714
  2. package/README.md +3 -1
  3. package/dist/.cache/route-chart-release/frontend/frame/public/js/ecStat.min.js +4 -0
  4. package/dist/.cache/route-chart-release/frontend/frame/public/js/echarts-wordcloud.min.js +6 -0
  5. package/dist/.cache/route-chart-release/frontend/frame/public/js/echarts.min.js +49 -0
  6. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  7. package/dist/_virtual/jsencrypt.min.js +1 -1
  8. package/dist/assets/role_select-DTqRlFNz.webp +0 -0
  9. package/dist/{_vendor → frontend/frame/_vendor}/.pnpm/jsencrypt@3.5.4/_vendor/jsencrypt/bin/jsencrypt.min.js +1 -1
  10. package/dist/src/RootApp.js +54 -0
  11. package/dist/src/api/createHttp.js +6 -0
  12. package/dist/src/app-ui-settings.js +49 -0
  13. package/dist/src/axios.js +10 -15
  14. package/dist/src/chart-runtime-assets.js +19 -0
  15. package/dist/src/chart-runtime-sources.js +8 -0
  16. package/dist/src/create-app.js +3 -6
  17. package/dist/src/index.js +2 -0
  18. package/dist/src/loadComponent.js +2 -2
  19. package/dist/src/menu-route.js +11 -0
  20. package/dist/src/mixins/component.js +3 -0
  21. package/dist/src/navigation-context.js +47 -0
  22. package/dist/src/navigation.js +43 -12
  23. package/dist/src/package-install.js +3 -2
  24. package/dist/src/plugins/element-plus.js +8 -8
  25. package/dist/src/public-api.js +4 -2
  26. package/dist/src/route-components.js +9 -0
  27. package/dist/src/router/config.js +7 -8
  28. package/dist/src/runtime-services.js +1 -1
  29. package/dist/src/runtime-utils/meta.js +3 -0
  30. package/dist/src/runtime-utils/pdf.viewer.js +31 -15
  31. package/dist/src/runtime-utils/util.js +28 -5
  32. package/dist/src/shared-packages.js +1 -3
  33. package/dist/src/store/modules/list.js +25 -3
  34. package/dist/src/store/modules/meta.js +49 -7
  35. package/dist/src/style-presets.js +4 -4
  36. package/dist/src/ui-settings.js +90 -18
  37. package/dist/src/views/App.js +48 -0
  38. package/dist/src/views/AppRoleSelect.js +233 -0
  39. package/dist/src/views/Error.js +210 -0
  40. package/dist/src/views/Module.js +173 -0
  41. package/dist/style.css +251 -0
  42. package/package.json +4 -4
  43. package/src/RootApp.vue +75 -0
  44. package/src/api/createHttp.js +7 -0
  45. package/src/api/index.js +47 -47
  46. package/src/app-ui-settings.js +31 -0
  47. package/src/axios.js +311 -318
  48. package/src/chart-runtime-assets.js +13 -0
  49. package/src/chart-runtime-sources.js +5 -0
  50. package/src/create-app.js +3 -7
  51. package/src/index.js +28 -28
  52. package/src/install.js +157 -157
  53. package/src/loadComponent.js +187 -187
  54. package/src/loadLibrary.js +99 -99
  55. package/src/menu-route.js +12 -1
  56. package/src/mixins/component.js +1464 -1461
  57. package/src/navigation-context.js +49 -0
  58. package/src/navigation.js +208 -176
  59. package/src/package-install.js +2 -1
  60. package/src/plugins/element-plus.js +302 -302
  61. package/src/plugins/frame.js +178 -178
  62. package/src/public-api.js +1 -0
  63. package/src/route-components.js +7 -0
  64. package/src/router/config.js +861 -864
  65. package/src/router/public.js +1 -1
  66. package/src/runtime-services.js +1 -1
  67. package/src/runtime-utils/fieldFactory.js +179 -179
  68. package/src/runtime-utils/meta.js +399 -378
  69. package/src/runtime-utils/pdf.viewer.js +672 -644
  70. package/src/runtime-utils/util.js +1359 -1330
  71. package/src/shared-packages.js +1 -3
  72. package/src/store/modules/config.js +351 -351
  73. package/src/store/modules/list.js +30 -3
  74. package/src/store/modules/locale.js +236 -236
  75. package/src/store/modules/meta.js +314 -265
  76. package/src/style-presets.js +4 -4
  77. package/src/ui-settings.js +84 -23
  78. package/src/views/App.vue +53 -0
  79. package/src/views/AppRoleSelect.vue +334 -0
  80. package/src/views/Error.vue +63 -0
  81. package/src/views/Module.vue +210 -0
  82. package/src/xss.js +26 -26
  83. package/types/app.d.ts +10 -10
  84. package/types/axios.d.ts +1 -1
  85. package/types/component-mixin.d.ts +1 -1
  86. package/types/field-factory.d.ts +1 -1
  87. package/types/global-mixin.d.ts +1 -1
  88. package/types/http.d.ts +1 -1
  89. package/types/index.d.ts +3 -0
  90. package/types/meta.d.ts +1 -1
  91. package/types/navigation.d.ts +21 -21
  92. package/types/pdf-viewer.d.ts +1 -1
  93. package/types/runtime.d.ts +13 -13
  94. package/types/store.d.ts +1 -1
  95. package/types/util.d.ts +2 -2
  96. /package/dist/{build → .cache/route-chart-release/frontend/frame/build}/stubs/empty-components.js +0 -0
  97. /package/dist/{src → .cache/route-chart-release/frontend/frame/src}/element-icons.names.js +0 -0
  98. /package/dist/{src → .cache/route-chart-release/frontend/frame/src}/element-plus.lazy.js +0 -0
  99. /package/dist/{_vendor → frontend/frame/_vendor}/.pnpm/element-plus@2.14.3_vue@3.5.39_typescript@5.9.3_/_vendor/element-plus/dist/locale/en.js +0 -0
  100. /package/dist/{_vendor → frontend/frame/_vendor}/.pnpm/element-plus@2.14.3_vue@3.5.39_typescript@5.9.3_/_vendor/element-plus/dist/locale/zh-cn.js +0 -0
@@ -0,0 +1,210 @@
1
+ <template>
2
+ <div ref="module" id="module" class="module">
3
+ <!-- 显示module页面 -->
4
+ <!-- <epx-router-view v-if="initRoute" :init-route="initRoute"></epx-router-view> -->
5
+ <!-- 创建容器 -->
6
+ <epx-page
7
+ @changeRouter="changeRouter"
8
+ @back="back"
9
+ v-if="showPage"
10
+ :pageId="moduleRouter.pageId"
11
+ :flag="moduleRouter.flag"
12
+ :metaId="moduleRouter.metaId"
13
+ :component="moduleRouter.component"
14
+ :router="moduleRouter"
15
+ :current-query="moduleRouter"
16
+ />
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ // 容器页面
22
+ import { DELETE_MODULE_ROUTER, SET_ROUTER } from '@epxing/core/src/store/actions'
23
+ import { mapState } from 'vuex'
24
+ export default {
25
+ name: 'epx-module',
26
+ props: {
27
+ router: {
28
+ type: Object,
29
+ default () {
30
+ return {}
31
+ }
32
+ }
33
+ },
34
+ data () {
35
+ return {
36
+ showPage: false,
37
+ moduleIndexPage: '',
38
+ moduleRouters: [],
39
+ initRoute: null
40
+ }
41
+ },
42
+ computed: {
43
+ ...mapState({
44
+ // routers: state => state.router.moduleRouters,
45
+ // route: state => state.router.moduleRoute,
46
+ user: state => state.user.user
47
+ }),
48
+ pageId () {
49
+ return this.route.pageId || this.moduleIndexPage
50
+ },
51
+ // moduleRouters () {
52
+ // const { children = [] } = this.router
53
+ // return children
54
+ // },
55
+ moduleRouter () {
56
+ return this.moduleRouters[this.moduleRouters.length - 1] || {}
57
+ }
58
+ },
59
+ watch: {
60
+ $routers: {
61
+ handler (routers) {
62
+ routers.forEach(item => {
63
+ if (item.key === this.router.key) {
64
+ const { children = [] } = item
65
+ this.moduleRouters = [...children]
66
+ }
67
+ })
68
+ },
69
+ deep: true
70
+ },
71
+ moduleRouter: {
72
+ handler (v, oldV) {
73
+ // 页面更改、刷新页面
74
+ if (!(v.pageId === oldV.pageId && v.flag === oldV.flag && v.metaId === oldV.metaId && v.component === oldV.component)) {
75
+ this.reloadPageDebounce()
76
+ }
77
+ },
78
+ deep: true
79
+ }
80
+ },
81
+ provide () {
82
+ return {
83
+ $changeRouter: this.changeRouter,
84
+ $reloadPage: this.reloadPage,
85
+ $backPage: this.$popModuleRoute
86
+ }
87
+ },
88
+ methods: {
89
+ reloadPage () {
90
+ this.showPage = false
91
+ this.$nextTick(() => {
92
+ if (this.moduleRouter.pageId || this.moduleRouter.flag || this.moduleIndexPage || this.moduleRouter.component) {
93
+ const timer = setTimeout(() => {
94
+ this.showPage = true
95
+ clearTimeout(timer)
96
+ }, 0)
97
+ }
98
+ })
99
+ },
100
+ getModule () {
101
+ let { moduleId } = this.$route.query
102
+ if (this.router.query) {
103
+ moduleId = this.router.query.moduleId
104
+ }
105
+ if (!moduleId) {
106
+ if (this.user.currentRoleEntity) {
107
+ const { MENU: USER_MENU } = this.user.currentRoleEntity.data
108
+ moduleId = USER_MENU
109
+ }
110
+ }
111
+ // 获取当前模块信息
112
+ // 如果当前模块没绑定页面,获取其子模块页面
113
+ this.$http.get({
114
+ entityId: 'FM_MODULE',
115
+ id: moduleId
116
+ })
117
+ .then(data => {
118
+ if (data) {
119
+ const module = data.data || {}
120
+ const date = new Date().getTime()
121
+ // 初始化模块首页
122
+ // this.$pushModuleRoute({
123
+ // pageId: module.MAIN_PAGE
124
+ // })
125
+ if (!this.router.query) {
126
+ this.$createPage({
127
+ key: this.$routers.length === 0 ? 'nav-' + date : date,
128
+ moduleId: module.ID,
129
+ title: module.NAME,
130
+ openType: '1'
131
+ })
132
+ this.initRoute = {
133
+ key: this.$routers.length === 0 ? 'nav-' + date : date,
134
+ moduleId: module.ID,
135
+ title: module.NAME
136
+ }
137
+ } else {
138
+ if (!this.router.children || this.router.children.length === 0) {
139
+ const router = {
140
+ ...this.router,
141
+ children: [
142
+ { key: date, pageId: module.MAIN_PAGE, moduleId: moduleId }
143
+ ]
144
+ }
145
+ this.initRoute = { key: date, pageId: module.MAIN_PAGE, moduleId: moduleId }
146
+ this.$store.commit(SET_ROUTER, { key: this.router.key, router })
147
+ }
148
+ }
149
+ // this.$createPage({
150
+ // pageId: module.MAIN_PAGE
151
+ // })
152
+ }
153
+ })
154
+ },
155
+ addListenerRouter () {
156
+ // ⚠️ T17 修复轮 2(定向复审 N4):这里原来还有两行
157
+ // this.$bus.on('push', this.pushModuleRoute) / this.$bus.on('pop', this.popModuleRoute)
158
+ // 两个 handler **在本组件里恒为 `undefined`**:它们全仓只定义在 `@epxing/core/src/Container.vue`
159
+ // (:204-213),而本组件**没有 mixins/extends**,globalProperties 里也没有。
160
+ // 往总线塞 `undefined` 只会让 `emit('push')` 抛 `h is not a function`,从来没做过事 ⇒ 删掉。
161
+ // (两个不带 handler 的 off 是挂载侧既有行为,本次不动。)
162
+ this.$bus.off('push')
163
+ this.$bus.off('pop')
164
+ },
165
+ removeListenerRouter () {
166
+ // ⚠️ T17 修复轮 2(定向复审 N4,顶回②的安全性论断被推翻):修复轮 1 认定这里「本来就传了
167
+ // handler,是安全的」。计数没错(该按原修法改的确实是 5 个文件不是 6 个),**但安全性论断错了**:
168
+ // `this.pushModuleRoute` / `this.popModuleRoute` 都是 `undefined`,而 `vue.bus.js` 的 off
169
+ // 判的是 `if (!callback)` ⇒ `off(event, undefined)` 走「删光该事件全部监听」那条分支,
170
+ // 与裸 `off('push')` 完全等价、一样连坐删掉别人的监听。
171
+ // 本组件从来没有成功注册过任何 handler,没有东西可摘 ⇒ 两行 off 一并删掉,只留 commit。
172
+ // 把二级路由清空
173
+ this.$store.commit(DELETE_MODULE_ROUTER)
174
+ },
175
+ changeRouter (v) {
176
+ // const { mode, router } = v
177
+ // if (mode === 'replace') {
178
+ // this.$popModuleRoute()
179
+ // }
180
+ // this.$pushModuleRoute(router)
181
+ },
182
+ back () {
183
+ this.$popModuleRoute()
184
+ }
185
+ },
186
+ created () {
187
+ this.getModule()
188
+ this.addListenerRouter()
189
+ this.reloadPageDebounce = this.$_.debounce(this.reloadPage, 20)
190
+ },
191
+ beforeUnmount () {
192
+ this.removeListenerRouter()
193
+ }
194
+ }
195
+ </script>
196
+
197
+ <style scoped>
198
+ .module {
199
+ width: 100%;
200
+ height: 100%;
201
+ padding: 16px;
202
+ box-sizing: border-box;
203
+ position: relative;
204
+ }
205
+ @media only screen and (max-width: 992px) {
206
+ .module{
207
+ padding: 0;
208
+ }
209
+ }
210
+ </style>
package/src/xss.js CHANGED
@@ -1,26 +1,26 @@
1
- import xss from 'xss'
2
- export const newXss = new xss.FilterXSS({
3
- whiteList: {
4
- ...xss.whiteList,
5
- source: ['src', 'type'],
6
- style: ['type'],
7
- label: ['data-name', 'data-field', 'data-express', 'data-mainsource', 'data-imgheight', 'data-imgwidth', 'data-variable'],
8
- a: ['target', 'href', 'title', 'data-doc-id', 'data-doc-name'],
9
- span: [
10
- ...(xss.whiteList.span || []),
11
- 'class', 'contenteditable',
12
- 'data-type', 'data-value'
13
- ]
14
- },
15
- onIgnoreTagAttr: function (tag, name, value, isWhiteAttr) {
16
- if (['style', 'class'].includes(name)) {
17
- return `${name}="${xss.escapeAttrValue(value)}"`
18
- }
19
- },
20
- safeAttrValue (tag, name, value) {
21
- return `${xss.escapeAttrValue(value)}`
22
- }
23
- })
24
-
25
- // 供两个入口复用 / 对外 re-export 的单例
26
- export default newXss
1
+ import xss from 'xss'
2
+ export const newXss = new xss.FilterXSS({
3
+ whiteList: {
4
+ ...xss.whiteList,
5
+ source: ['src', 'type'],
6
+ style: ['type'],
7
+ label: ['data-name', 'data-field', 'data-express', 'data-mainsource', 'data-imgheight', 'data-imgwidth', 'data-variable'],
8
+ a: ['target', 'href', 'title', 'data-doc-id', 'data-doc-name'],
9
+ span: [
10
+ ...(xss.whiteList.span || []),
11
+ 'class', 'contenteditable',
12
+ 'data-type', 'data-value'
13
+ ]
14
+ },
15
+ onIgnoreTagAttr: function (tag, name, value, isWhiteAttr) {
16
+ if (['style', 'class'].includes(name)) {
17
+ return `${name}="${xss.escapeAttrValue(value)}"`
18
+ }
19
+ },
20
+ safeAttrValue (tag, name, value) {
21
+ return `${xss.escapeAttrValue(value)}`
22
+ }
23
+ })
24
+
25
+ // 供两个入口复用 / 对外 re-export 的单例
26
+ export default newXss
package/types/app.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export { getApp, setApp, registerComponent, resolveComponent } from './index'
2
- import type { App, Plugin } from 'vue'
3
- import { getApp, setApp, registerComponent, resolveComponent } from './index'
4
- export declare function useVuePlugin(plugin: Plugin & { runtime?: string }, options?: any): App | void | Promise<void>
5
- declare const appServices: {
6
- getApp: typeof getApp; setApp: typeof setApp
7
- registerComponent: typeof registerComponent; resolveComponent: typeof resolveComponent
8
- useVuePlugin: typeof useVuePlugin
9
- }
10
- export default appServices
1
+ export { getApp, setApp, registerComponent, resolveComponent } from './index'
2
+ import type { App, Plugin } from 'vue'
3
+ import { getApp, setApp, registerComponent, resolveComponent } from './index'
4
+ export declare function useVuePlugin(plugin: Plugin & { runtime?: string }, options?: any): App | void | Promise<void>
5
+ declare const appServices: {
6
+ getApp: typeof getApp; setApp: typeof setApp
7
+ registerComponent: typeof registerComponent; resolveComponent: typeof resolveComponent
8
+ useVuePlugin: typeof useVuePlugin
9
+ }
10
+ export default appServices
package/types/axios.d.ts CHANGED
@@ -1 +1 @@
1
- export { axios as default } from './index'
1
+ export { axios as default } from './index'
@@ -1 +1 @@
1
- export { ComponentMixin as default } from './index'
1
+ export { ComponentMixin as default } from './index'
@@ -1 +1 @@
1
- export { FieldFactory as default, FieldFactoryClass as FieldFactory, createFieldFactory } from './index'
1
+ export { FieldFactory as default, FieldFactoryClass as FieldFactory, createFieldFactory } from './index'
@@ -1 +1 @@
1
- export { GlobalMixin as default } from './index'
1
+ export { GlobalMixin as default } from './index'
package/types/http.d.ts CHANGED
@@ -1 +1 @@
1
- export { http as default } from './index'
1
+ export { http as default } from './index'
package/types/index.d.ts CHANGED
@@ -6,6 +6,8 @@ import type { AxiosInstance } from 'axios'
6
6
  import type { HttpClient, RuntimeUtil, mixins, routerConfig, getEventBus, createEventBus, createStoreModules, storeModules, createFrameRouter } from './product-api'
7
7
  export * from './product-api'
8
8
 
9
+ export declare const routeComponents: Record<string, Component>
10
+
9
11
  export interface CoreOptions {
10
12
  store: Store<any>
11
13
  router: Router
@@ -47,6 +49,7 @@ declare const EpxCore: {
47
49
  getApp: typeof getApp
48
50
  setApp: typeof setApp; registerComponent: typeof registerComponent; resolveComponent: typeof resolveComponent
49
51
  configureRuntime: typeof configureRuntime; registerRouteComponents: typeof registerRouteComponents
52
+ routeComponents: typeof routeComponents
50
53
  nav: typeof nav; publishCoreRuntime: typeof publishCoreRuntime
51
54
  getSystemMeta: RuntimeUtil['getSystemMeta']; getFileUrl: RuntimeUtil['getFileUrl']; getSysId: RuntimeUtil['getSysId']
52
55
  toLogin: RuntimeUtil['toLogin']; usePlugin: RuntimeUtil['usePlugin']; runExpByScope: RuntimeUtil['runExpByScope']
package/types/meta.d.ts CHANGED
@@ -1 +1 @@
1
- export { Meta as default } from './index'
1
+ export { Meta as default } from './index'
@@ -1,21 +1,21 @@
1
- export { nav as default, nav } from './index'
2
- import type { RouteLocationNormalized, RouteLocationRaw, LocationQueryRaw } from 'vue-router'
3
- export interface MenuRecord { ID?: string; MODULE_CODE?: string; children?: MenuRecord[]; [key: string]: any }
4
- export declare function getMenuKey(menu?: MenuRecord | null): string
5
- export declare function findMenuByKey(menus: MenuRecord[] | undefined, key: string): MenuRecord | undefined
6
- export declare function findMenuPath(menus: MenuRecord[] | undefined, key: string): MenuRecord[]
7
- export declare const roleStorage: {
8
- key(client?: string, system?: string): string
9
- get(client?: string, system?: string): string
10
- set(client: string, system: string, role: string): void
11
- }
12
- export declare function resolveRouteRole(route?: Pick<RouteLocationNormalized, 'params'>): string | string[]
13
- export declare const MENU_ROUTE_ALIAS: { appMenu: 'app1'; hallMenu: 'hall' }
14
- export declare function effectiveRouteName(name?: string | symbol | null): string | symbol | null | undefined
15
- export declare function menuLocation(route: RouteLocationNormalized, key: string, query?: LocationQueryRaw): RouteLocationRaw
16
- export interface MenuActivationOptions { syncUrl?: boolean; replaceUrl?: boolean; query?: LocationQueryRaw }
17
- export declare function activateMenu(menuId: string, extraProps?: Record<string, any>, options?: MenuActivationOptions): boolean
18
- export declare function syncMenuUrl(menu: MenuRecord, options?: { replace?: boolean; query?: LocationQueryRaw }): void
19
- export declare function clearMenuUrl(options?: { replace?: boolean }): void
20
- export declare function activateFromRoute(route: RouteLocationNormalized): boolean
21
- export declare function activateHome(): boolean
1
+ export { nav as default, nav } from './index'
2
+ import type { RouteLocationNormalized, RouteLocationRaw, LocationQueryRaw } from 'vue-router'
3
+ export interface MenuRecord { ID?: string; MODULE_CODE?: string; children?: MenuRecord[]; [key: string]: any }
4
+ export declare function getMenuKey(menu?: MenuRecord | null): string
5
+ export declare function findMenuByKey(menus: MenuRecord[] | undefined, key: string): MenuRecord | undefined
6
+ export declare function findMenuPath(menus: MenuRecord[] | undefined, key: string): MenuRecord[]
7
+ export declare const roleStorage: {
8
+ key(client?: string, system?: string): string
9
+ get(client?: string, system?: string): string
10
+ set(client: string, system: string, role: string): void
11
+ }
12
+ export declare function resolveRouteRole(route?: Pick<RouteLocationNormalized, 'params'>): string | string[]
13
+ export declare const MENU_ROUTE_ALIAS: { appMenu: 'app1'; hallMenu: 'hall' }
14
+ export declare function effectiveRouteName(name?: string | symbol | null): string | symbol | null | undefined
15
+ export declare function menuLocation(route: RouteLocationNormalized, key: string, query?: LocationQueryRaw): RouteLocationRaw
16
+ export interface MenuActivationOptions { syncUrl?: boolean; replaceUrl?: boolean; query?: LocationQueryRaw }
17
+ export declare function activateMenu(menuId: string, extraProps?: Record<string, any>, options?: MenuActivationOptions): boolean
18
+ export declare function syncMenuUrl(menu: MenuRecord, options?: { replace?: boolean; query?: LocationQueryRaw; context?: Record<string, any> }): void
19
+ export declare function clearMenuUrl(options?: { replace?: boolean }): void
20
+ export declare function activateFromRoute(route: RouteLocationNormalized): boolean
21
+ export declare function activateHome(): boolean
@@ -1 +1 @@
1
- export { PdfViewer as default } from './index'
1
+ export { PdfViewer as default } from './index'
@@ -1,13 +1,13 @@
1
- export { configureRuntime, registerRouteComponents } from './index'
2
- import type { App, Component } from 'vue'
3
- import type { Store } from 'vuex/types/index.d.ts'
4
- import type { Router } from 'vue-router'
5
- import type { HttpClient } from './index'
6
- export interface RuntimeServices { store: Store<any>; router: Router; http: HttpClient }
7
- export interface BusinessComponentRegistry { resolve(app: App, name: string): Promise<Component | null> }
8
- export declare function getConfiguredRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K] | undefined
9
- export declare function getRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K]
10
- export declare const runtimeStore: Store<any>
11
- export declare const runtimeRouter: Router
12
- export declare function runtimeRouteComponent(name: string): () => Promise<Component>
13
- export declare function loadBusinessComponents(app: App): Promise<BusinessComponentRegistry>
1
+ export { configureRuntime, registerRouteComponents } from './index'
2
+ import type { App, Component } from 'vue'
3
+ import type { Store } from 'vuex/types/index.d.ts'
4
+ import type { Router } from 'vue-router'
5
+ import type { HttpClient } from './index'
6
+ export interface RuntimeServices { store: Store<any>; router: Router; http: HttpClient }
7
+ export interface BusinessComponentRegistry { resolve(app: App, name: string): Promise<Component | null> }
8
+ export declare function getConfiguredRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K] | undefined
9
+ export declare function getRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K]
10
+ export declare const runtimeStore: Store<any>
11
+ export declare const runtimeRouter: Router
12
+ export declare function runtimeRouteComponent(name: string): () => Promise<Component>
13
+ export declare function loadBusinessComponents(app: App): Promise<BusinessComponentRegistry>
package/types/store.d.ts CHANGED
@@ -1 +1 @@
1
- export { createFrameStore, createStoreModules, storeModules } from './index'
1
+ export { createFrameStore, createStoreModules, storeModules } from './index'
package/types/util.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { util as default } from './index'
2
- export { getSystemMeta, getFileUrl, getSysId, toLogin, usePlugin, runExpByScope } from './product-api'
1
+ export { util as default } from './index'
2
+ export { getSystemMeta, getFileUrl, getSysId, toLogin, usePlugin, runExpByScope } from './product-api'