@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
package/API.md CHANGED
@@ -1,559 +1,560 @@
1
- # @epxing/core API
2
-
3
- Vue 3 应用启动、公共混入、实体请求、元数据、状态、路由和运行时服务。
4
-
5
- 本页对应包版本 `5.3.0-beta.2`。导出名、子路径和签名从当前源码、package.json 与类型声明生成。
6
-
7
- ## 安装与使用
8
-
9
-
10
- ```sh
11
- pnpm add @epxing/core@5.3.0-beta.2
12
- ```
13
-
14
-
15
- ```js
16
- import { createApp } from '@epxing/core'
17
- import Hr from './hr'
18
-
19
- const app = createApp()
20
- app.use(Hr)
21
- app.mount('#app')
22
-
23
- // 也可覆盖默认服务:createApp({ rootComponent: App, store, router, http: productHttp })
24
- ```
25
-
26
- ## 接入约定
27
-
28
- createApp 返回 Vue App,可继续 app.use / app.component / app.mount。自建 Vue 应用时使用 app.use(EpxCore, { store, router, http });store 与 router 必须提供。产品 HTTP 客户端需实现页面实际调用的实体协议,方法和参数见 HttpClient 与 EntityRequest 类型。
29
-
30
- 仅安装 core 会创建核心运行环境;产品插件负责业务路由和页面。需要基础组件、业务选择器、设计器或看板时,另外安装并导入对应包,样式自动加载。getSystemMeta/getSysId/usePlugin 等依赖当前系统上下文,初始化系统后再调用。
31
-
32
- 本版 JS 入口自动加载本包聚合样式,根导入和稳定子路径均无需手动 import style.css;保留显式样式入口以兼容旧代码。样式按包加载,产品覆盖样式放在框架导入之后。
33
-
34
- ## 根入口完整导出
35
-
36
- | 导出名 | 形态 | 用途 | 参数 / 配置 / 事件 |
37
- | --- | --- | --- | --- |
38
- | `installCore` | 函数 | 向现有 Vue 应用安装核心服务,返回 app、store、router、http、fieldFactory 上下文。 | 见下方签名或接入约定 |
39
- | `ComponentMixin` | 对象 / 常量 | 配置驱动组件的公共混入,提供 $configs、服务访问、查询上下文、刷新和组件通信协议。 | [详细参考](../../docs/revision/core/api/mixins/component.md) |
40
- | `GlobalMixin` | 对象 / 常量 | 全局公共混入;通常由 core 安装,包含平台公共实例能力。 | [详细参考](../../docs/revision/core/api/mixins/global.md) |
41
- | `mixins` | 对象 / 常量 | 混入集合:component 与 ComponentMixin 相同,global 与 GlobalMixin 相同。 | [详细参考](../../docs/revision/core/api/mixins/index.md) |
42
- | `axios` | 对象 / 常量 | 平台 Axios 实例及拦截器;用于通用网络请求。业务实体请求优先使用 http 或注入的 $http。 | [详细参考](../../docs/revision/core/api/axios.md) |
43
- | `http` | 对象 / 常量 | 平台实体请求客户端,包含 list/find/get/save/update/getCount/getCodes/getTree/apply 与 $get/$post/$request 等方法。 | [详细参考](../../docs/revision/core/api/api/index.md) |
44
- | `util` | 对象 / 常量 | 平台运行时工具单例,管理系统、资源地址、表达式、打印及远程插件加载等能力。 | [详细参考](../../docs/revision/utils/api/util.md) |
45
- | `getSystemMeta` | 函数 | 按元数据代码取得当前系统对应的元数据标识;依赖已初始化的系统上下文。 | [详细参考](../../docs/revision/utils/api/util.md) |
46
- | `getFileUrl` | 函数 | 按附件 ID、客户端及签名选项生成访问地址;没有 ID 时返回 undefined。 | [详细参考](../../docs/revision/utils/api/util.md) |
47
- | `getSysId` | 函数 | 读取当前系统标识;未初始化系统时可能返回 undefined。 | [详细参考](../../docs/revision/utils/api/util.md) |
48
- | `toLogin` | 函数 | 按当前客户端跳转登录页,clearPath 控制是否清理路径。 | [详细参考](../../docs/revision/utils/api/util.md) |
49
- | `usePlugin` | 函数 | 异步加载并缓存指定产品插件,返回加载结果。 | [详细参考](../../docs/revision/utils/api/util.md) |
50
- | `runExpByScope` | 函数 | 按范围条件计算数据是否匹配;依赖组件查询上下文时使用 runExpByScope.call(vm, scopeList, data)。 | [详细参考](../../docs/revision/utils/api/util.md) |
51
- | `FieldFactory` | 对象 / 常量 | 兼容旧用法的字段工厂默认实例;独立上下文优先使用 createFieldFactory。 | [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
52
- | `FieldFactoryClass` | 类 | 字段工厂类,按元数据生成表单/列表字段;可传入对应应用的 store。 | [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
53
- | `createFieldFactory` | 函数 | 创建独立字段工厂实例,避免产品之间共享可变字段状态。 | [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
54
- | `Meta` | 类 | 将服务端元数据包装为模型,提供主键、属性、表单字段和列表字段访问方法。 | [详细参考](../../docs/revision/utils/api/meta.md) |
55
- | `PdfViewer` | 类 | 浏览器 PDF 预览工具类;按调用需要加载 PDF 资源和渲染依赖。 | [详细参考](../../docs/revision/utils/api/pdf.viewer.md) |
56
- | `createFrameStore` | 函数 | 创建平台 Vuex store;每次调用产生独立模块状态,可传入 StoreOptions。 | 见下方签名或接入约定 |
57
- | `createStoreModules` | 函数 | 返回平台 Vuex 模块集合,模块 state 使用工厂函数;支持按模块覆盖。 | 见下方签名或接入约定 |
58
- | `storeModules` | 对象 / 常量 | 平台 Vuex 模块模板,供产品手工 createStore({ modules: storeModules }) 使用。 | 见下方签名或接入约定 |
59
- | `createFrameRouter` | 函数 | 创建包含平台基础路由和守卫的 Vue Router;默认 hash history,可指定 routes/history/beforeEach。 | 见下方签名或接入约定 |
60
- | `routerConfig` | 对象 / 常量 | 平台基础 routes 与 beforeEach,供产品自行组装 router 时复用。 | 见下方签名或接入约定 |
61
- | `createEventBus` | 函数 | 创建独立事件总线,支持 on/off/emit 以及兼容的 $on/$off/$once/$emit。 | [详细参考](../../docs/revision/core/api/vue.bus.md) |
62
- | `getEventBus` | 函数 | 取得当前已安装应用的事件总线;应在 core 安装后调用。 | [详细参考](../../docs/revision/core/api/vue.bus.md) |
63
- | `getApp` | 函数 | 取得当前运行时登记的 Vue 应用,尚未登记时返回 null。 | [详细参考](../../docs/revision/core/api/app.md) |
64
- | `setApp` | 函数 | 登记当前 Vue 应用;一般由 core 安装流程维护。 | [详细参考](../../docs/revision/core/api/app.md) |
65
- | `registerComponent` | 函数 | 向当前应用登记组件名和实现,供配置渲染及远程产品解析。 | [详细参考](../../docs/revision/core/api/app.md) |
66
- | `resolveComponent` | 函数 | 按注册名取得组件实现,找不到时返回 undefined。 | [详细参考](../../docs/revision/core/api/app.md) |
67
- | `configureRuntime` | 函数 | 配置当前核心运行时的 store、router、HTTP 等依赖;通常由安装流程完成。 | 见下方签名或接入约定 |
68
- | `registerRouteComponents` | 函数 | 登记平台路由使用的页面组件映射。 | 见下方签名或接入约定 |
69
- | `nav` | 对象 / 常量 | 导航服务对象,提供平台菜单/页面打开与路由激活方法。 | [详细参考](../../docs/revision/core/api/navigation.md) |
70
- | `publishCoreRuntime` | 函数 | 将当前 core、utils、Vue、Vuex 命名空间交给远程产品共享注册表;安装 core 时自动调用。 | 见下方签名或接入约定 |
71
- | `createCore` | 函数 | 预置安装选项,返回可交给 app.use 的 core 插件;安装时传入的选项覆盖预置值。 | 见下方签名或接入约定 |
72
- | `createApp` | 函数 | 创建已安装 core 的 Vue 3 应用。默认提供独立 store、hash router 和平台 HTTP;产品可覆盖服务并通过 app.use 安装业务插件。 | 见下方签名或接入约定 |
73
- | `default` | 默认导出 | EpxCore 插件对象,同时提供 createApp/createCore/installCore 和公开工具成员。 | 见下方签名或接入约定 |
74
-
75
- ## 函数、类与工具对象
76
-
77
- 签名中的 any 表示现有声明未进一步限定结构;源代码方法签名保留默认参数。异步结果与泛型以声明为准。
78
-
79
- ### installCore
80
-
81
- 向现有 Vue 应用安装核心服务,返回 app、store、router、http、fieldFactory 上下文。
82
-
83
- ```ts
84
- installCore(app: App<any>, options: CoreOptions): CoreContext
85
- ```
86
-
87
- ### axios
88
-
89
- 平台 Axios 实例及拦截器;用于通用网络请求。业务实体请求优先使用 http 或注入的 $http。
90
-
91
- ```ts
92
- axios<T = any, R = AxiosResponse<T, any, {}>, D = any>(config: AxiosRequestConfig<D>): Promise<R>
93
- axios<T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>
94
- ```
95
-
96
- [详细参考](../../docs/revision/core/api/axios.md),包括参数、返回值与运行约束。
97
-
98
- ### util
99
-
100
- 平台运行时工具单例,管理系统、资源地址、表达式、打印及远程插件加载等能力。
101
-
102
- | 方法 | 说明 |
103
- | --- | --- |
104
- | `getSysId()` | 返回当前工具保存的系统标识。 |
105
- | `setSysId(sysId)` | 更新工具维护的系统标识。 |
106
- | `getPublicPath()` | 读取平台静态资源公开基路径。 |
107
- | `getStaticJsDir()` | 返回按需脚本目录,优先采用运行时 STATIC_JS_DIR 配置。 |
108
- | `getRootPath()` | 读取当前应用部署的根路径。 |
109
- | `getRoutePath()` | 根据路由环境读取有效应用路径。 |
110
- | `getClientCode()` | 从当前路由/配置读取客户端代码。 |
111
- | `setToken(v, routeClientCode)` | 实现见本节的详细参考。 |
112
- | `getToken(routeClientCode)` | 实现见本节的详细参考。 |
113
- | `removeToken(routeClientCode)` | 实现见本节的详细参考。 |
114
- | `consumeUrlToken(routeClientCode)` | 实现见本节的详细参考。 |
115
- | `search(name, path)` | 从指定地址或当前 location 中解析 URL 查询参数;这里不是实体列表的 search(scopeParams)。 |
116
- | `getCurrentLanguage(routeClientCode)` | 按客户端配置与本地偏好取得当前语言。 |
117
- | `setCurrentLanguage(language)` | 保存当前客户端语言选择。 |
118
- | `isChineseLanguage(language = this.getCurrentLanguage())` | 判断传入或当前语言是否为中文。 |
119
- | `toPx(v)` | 将尺寸值转换为像素样式表达式。 |
120
- | `toLogin(clearPath)` | 按当前客户端跳转登录页,clearPath 控制是否清理路径。 |
121
- | `urlToBase64(url)` | 在浏览器中获取资源并转换为 Base64/Data URL,仍受跨域和资源权限约束。 |
122
- | `getFileUrl(id, client, flag = true, useSignOrigin = false)` | 按附件 ID、客户端及签名选项生成访问地址;没有 ID 时返回 undefined。 |
123
- | `getOfficeFileUrl(id, client, flag = true, useSignOrigin = false)` | 实现见本节的详细参考。 |
124
- | `getOfficeServerUrl()` | 读取 ONLYOFFICE Document Server 的运行时地址。 |
125
- | `getAbsPath(path, params = {})` | 结合部署环境和参数生成绝对访问地址。 |
126
- | `getPlatformRequestUrl(params = {})` | 生成平台项目的请求 URL,与当前产品系统接口地址区分。 |
127
- | `getRequestUrl(params = {}, { requestKey = 'api' } = {})` | 实现见本节的详细参考。 |
128
- | `getSystemMeta(metaCode)` | 获取当前系统对应的元数据信息。 |
129
- | `isWeiXin()` | 检测当前环境是否为微信内置浏览器。 |
130
- | `isFeishu()` | 检测当前环境是否为飞书客户端。 |
131
- | `isDingTalk()` | 检测当前环境是否为钉钉客户端。 |
132
- | `isIos()` | 检测当前环境是否为 iOS。 |
133
- | `canPreviewPdfInline()` | 判断当前客户端是否适合内嵌 PDF 预览。 |
134
- | `printHtml(html)` | 创建/组织 HTML 内容的打印流程。 |
135
- | `printWindow(win)` | 对指定窗口发起打印。 |
136
- | `pdfDocToImages(pdfDoc, scale = 3)` | 将已加载的 PDF 文档逐页转换为图片,scale 决定渲染分辨率。 |
137
- | `getBrowserVersion()` | 读取浏览器类型或版本信息用于兼容判断。 |
138
- | `runExp(exp, point)` | 按指定数据上下文执行配置表达式。 |
139
- | `runExpByScope(scopeList, data = {})` | 根据范围条件集合判断当前数据是否满足条件。 |
140
- | `awaitWrap(promise)` | 实现见本节的详细参考。 |
141
- | `isLoadLibrary(systemCode)` | 检查指定系统远程库的加载记录。 |
142
- | `loadJS(options)` | 实现见本节的详细参考。 |
143
- | `loadJs(file, cb)` | 实现见本节的详细参考。 |
144
- | `loadCss(options)` | 实现见本节的详细参考。 |
145
- | `dataURLtoBlob(dataurl)` | 将 Data URL 转成 Blob,保留对应 MIME 信息。 |
146
- | `dataURLtoFile(dataurl, filename)` | 将 Data URL 转成指定文件名的 File。 |
147
- | `usePlugin(plugin)` | 异步加载并缓存指定产品插件,返回加载结果。 |
148
- | `utf8to16(str)` | 对字符串执行历史编码转换。 |
149
- | `genId(length = 3)` | 实现见本节的详细参考。 |
150
- | `uuid()` | 实现见本节的详细参考。 |
151
- | `copyToClipboard(text, callback)` | 复制文本到剪贴板并按调用约定回调。 |
152
- | `getQueryValue(path, obj)` | 实现见本节的详细参考。 |
153
- | `getValueByPath(path, obj)` | 实现见本节的详细参考。 |
154
- | `formatAfterTriggerParams(afterTriggerParams, { res, data } = {}, ctx = {})` | 将操作按钮的后续事件参数与响应、数据及上下文合成。 |
155
- | `evalExpression(el, data, errorValue = false)` | 按数据上下文求值配置表达式,并按 errorValue 处理异常。 |
156
- | `openWindow(url)` | 按当前客户端环境打开访问地址。 |
157
- | `encrypt(content, key, { type } = {})` | 按 type/key 选择现有加密实现,异步库加载及服务端算法必须配套。 |
158
- | `decrypt(content, { type, key })` | 按 type/key 解密已有内容,不能替代认证与授权。 |
159
- | `appendCss(id, css)` | 实现见本节的详细参考。 |
160
- | `removeCss(id)` | 实现见本节的详细参考。 |
161
-
162
- [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
163
-
164
- ### getSystemMeta
165
-
166
- 按元数据代码取得当前系统对应的元数据标识;依赖已初始化的系统上下文。
167
-
168
- ```ts
169
- getSystemMeta(metaCode: string): string
170
- ```
171
-
172
- [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
173
-
174
- ### getFileUrl
175
-
176
- 按附件 ID、客户端及签名选项生成访问地址;没有 ID 时返回 undefined。
177
-
178
- ```ts
179
- getFileUrl(id?: string, client?: string | FileUrlOptions, flag?: boolean, useSignOrigin?: boolean): string
180
- ```
181
-
182
- [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
183
-
184
- ### getSysId
185
-
186
- 读取当前系统标识;未初始化系统时可能返回 undefined。
187
-
188
- ```ts
189
- getSysId(): string
190
- ```
191
-
192
- [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
193
-
194
- ### toLogin
195
-
196
- 按当前客户端跳转登录页,clearPath 控制是否清理路径。
197
-
198
- ```ts
199
- toLogin(clearPath?: boolean): void
200
- ```
201
-
202
- [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
203
-
204
- ### usePlugin
205
-
206
- 异步加载并缓存指定产品插件,返回加载结果。
207
-
208
- ```ts
209
- usePlugin<T = any>(plugin: string): Promise<T>
210
- ```
211
-
212
- [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
213
-
214
- ### runExpByScope
215
-
216
- 按范围条件计算数据是否匹配;依赖组件查询上下文时使用 runExpByScope.call(vm, scopeList, data)。
217
-
218
- ```ts
219
- runExpByScope(this: void | Record<string, any>, scopeList: ScopeCondition[], data?: Record<string, any>): boolean
220
- ```
221
-
222
- [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
223
-
224
- ### FieldFactoryClass
225
-
226
- 字段工厂类,按元数据生成表单/列表字段;可传入对应应用的 store。
227
-
228
- ```js
229
- new FieldFactoryClass(store = runtimeStore)
230
- ```
231
-
232
- | 方法 | 说明 |
233
- | --- | --- |
234
- | `createFields({ fields, fieldScope, meta, pageType = 'DETAIL', metaId = '', metaViewId, hiddenFields = [], defaultFieldConfigs = {}, type = 'list' })` | 创建字段配置 |
235
- | `createFieldConfig({ fieldFromMeta, fieldConfig, fieldName })` | 实现见本节的详细参考。 |
236
- | `setList(dataType, codeKey, { optionType })` | 实现见本节的详细参考。 |
237
-
238
- [详细参考](../../docs/revision/utils/api/fieldFactory.md),包括参数、返回值与运行约束。
239
-
240
- ### createFieldFactory
241
-
242
- 创建独立字段工厂实例,避免产品之间共享可变字段状态。
243
-
244
- ```ts
245
- createFieldFactory(store?: Store<any>): FieldFactoryClass
246
- ```
247
-
248
- [详细参考](../../docs/revision/utils/api/fieldFactory.md),包括参数、返回值与运行约束。
249
-
250
- ### Meta
251
-
252
- 将服务端元数据包装为模型,提供主键、属性、表单字段和列表字段访问方法。
253
-
254
- ```js
255
- new Meta(props = {})
256
- ```
257
-
258
- | 方法 | 说明 |
259
- | --- | --- |
260
- | `getId()` | 返回元数据 ID。 |
261
- | `getCode()` | 返回元数据代码。 |
262
- | `getName()` | 返回元数据名称。 |
263
- | `getLabel()` | 返回元数据标签字段。 |
264
- | `getSystemId()` | 返回所属系统 ID。 |
265
- | `getSystemCode()` | 返回所属系统代码。 |
266
- | `getServerCode()` | 返回对应服务代码。 |
267
- | `getKeyType()` | 返回主键类型。 |
268
- | `getAttributes()` | 返回对象属性集合。 |
269
- | `getAttriIds()` | 取得属性 ID 集合。 |
270
- | `getAttriNames()` | 取得属性名称集合。 |
271
- | `getKeyNames()` | 实现见本节的详细参考。 |
272
- | `getRelatedEntitys()` | 返回关联实体集合。 |
273
- | `getModel()` | 实现见本节的详细参考。 |
274
- | `getAttribute(field)` | 按字段名查找元属性。 |
275
- | `getAllFields()` | 返回全部字段名。 |
276
- | `getListFields()` | 返回列表默认字段。 |
277
- | `getFormFields()` | 返回表单默认字段。 |
278
- | `getAllFieldConfigs()` | 返回全部字段的默认配置。 |
279
- | `getIndex(orderNum, fields)` | 实现见本节的详细参考。 |
280
- | `getExportFields()` | 返回导出所使用的字段配置。 |
281
- | `getKey()` | 返回主键字段名称。 |
282
- | `getKeyAttribute()` | 返回主键字段的元属性。 |
283
- | `getBusiKeyAttrs()` | 返回业务键属性。 |
284
- | `getAttris()` | 获取所有属性 |
285
- | `getIdLabelAttris()` | ID对应LAVEL |
286
- | `getNameLabelAttris()` | NAME对应LAVEL |
287
- | `getAttriNameById(attriId)` | 根据字段ID获取字段Name |
288
- | `getLabelByField(field)` | 取得指定字段对应的显示标签。 |
289
- | `getDataType(field)` | 取得指定字段的数据类型。 |
290
- | `getRelationByMetaId(relatedMetaId)` | 按关联元数据查找关系。 |
291
- | `getRelationIdByMetaId(linkLabel)` | 实现见本节的详细参考。 |
292
- | `getRelations()` | 返回关系集合。 |
293
- | `getRelatedEntitysOfEdit()` | 返回编辑场景可用的关联实体。 |
294
- | `getRelatedEntitysOfDetail()` | 返回详情场景关联实体。 |
295
- | `getRelationByFlag(flag)` | 按关系标识查找关联配置。 |
296
- | `getLinkAttrs()` | 返回关系连接属性。 |
297
- | `getLinkAttr(key)` | 按键查找连接属性。 |
298
-
299
- [详细参考](../../docs/revision/utils/api/meta.md),包括参数、返回值与运行约束。
300
-
301
- ### PdfViewer
302
-
303
- 浏览器 PDF 预览工具类;按调用需要加载 PDF 资源和渲染依赖。
304
-
305
- ```js
306
- new PdfViewer()
307
- ```
308
-
309
- | 方法 | 说明 |
310
- | --- | --- |
311
- | `destroy()` | 页面 div 是 append 进容器的,实例不销毁就会跟下一份预览叠在一起;;scroll 监听和 ResizeObserver 也得一并摘掉,否则每预览一次多留一份。 |
312
- | `searchTextInPDF(searchText)` | 实现见本节的详细参考。 |
313
- | `calculateTextBoundingBox(textItem, startIndex, endIndex, viewport, currentScale)` | 实现见本节的详细参考。 |
314
- | `highlightText(pageNum, x, y, width, height)` | 实现见本节的详细参考。 |
315
- | `clearHighlights()` | 实现见本节的详细参考。 |
316
- | `scrollToPage({ pageNum, x, y, width, height })` | 实现见本节的详细参考。 |
317
- | `loadPdf()` | 实现见本节的详细参考。 |
318
- | `run(config)` | 实现见本节的详细参考。 |
319
- | `load(pdfDocument)` | 实现见本节的详细参考。 |
320
- | `createPageView({ container, id })` | 实现见本节的详细参考。 |
321
- | `resetPageStyle()` | 实现见本节的详细参考。 |
322
- | `updatePageView()` | 实现见本节的详细参考。 |
323
- | `scrollUpdate()` | 实现见本节的详细参考。 |
324
- | `getVisiblePages()` | 实现见本节的详细参考。 |
325
- | `resizeVisiblePages(newCacheSize)` | 实现见本节的详细参考。 |
326
- | `destroyPageView({ id })` | 实现见本节的详细参考。 |
327
- | `renderPageView(visible, cb)` | 实现见本节的详细参考。 |
328
- | `drawerCanvas(num)` | 实现见本节的详细参考。 |
329
- | `scaleChanged(scale)` | 实现见本节的详细参考。 |
330
- | `rotateChanged(delta)` | 实现见本节的详细参考。 |
331
- | `print()` | 实现见本节的详细参考。 |
332
-
333
- [详细参考](../../docs/revision/utils/api/pdf.viewer.md),包括参数、返回值与运行约束。
334
-
335
- ### createFrameStore
336
-
337
- 创建平台 Vuex store;每次调用产生独立模块状态,可传入 StoreOptions。
338
-
339
- ```ts
340
- createFrameStore(options?: StoreOptions<any>): Store<any>
341
- ```
342
-
343
- ### createStoreModules
344
-
345
- 返回平台 Vuex 模块集合,模块 state 使用工厂函数;支持按模块覆盖。
346
-
347
- ```ts
348
- createStoreModules(overrides?: ModuleTree<any>): ModuleTree<any>
349
- ```
350
-
351
- ### createFrameRouter
352
-
353
- 创建包含平台基础路由和守卫的 Vue Router;默认 hash history,可指定 routes/history/beforeEach。
354
-
355
- ```ts
356
- createFrameRouter(options?: FrameRouterOptions): Router
357
- ```
358
-
359
- ### routerConfig
360
-
361
- 平台基础 routes 与 beforeEach,供产品自行组装 router 时复用。
362
-
363
- | 方法 | 说明 |
364
- | --- | --- |
365
- | `beforeEach(to, from, next)` | 实现见对应源码。 |
366
-
367
- ### createEventBus
368
-
369
- 创建独立事件总线,支持 on/off/emit 以及兼容的 $on/$off/$once/$emit。
370
-
371
- ```ts
372
- createEventBus(): EventBus
373
- ```
374
-
375
- [详细参考](../../docs/revision/core/api/vue.bus.md),包括参数、返回值与运行约束。
376
-
377
- ### getEventBus
378
-
379
- 取得当前已安装应用的事件总线;应在 core 安装后调用。
380
-
381
- ```ts
382
- getEventBus(): EventBus
383
- ```
384
-
385
- [详细参考](../../docs/revision/core/api/vue.bus.md),包括参数、返回值与运行约束。
386
-
387
- ### getApp
388
-
389
- 取得当前运行时登记的 Vue 应用,尚未登记时返回 null。
390
-
391
- ```ts
392
- getApp(): App<any>
393
- ```
394
-
395
- [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
396
-
397
- ### setApp
398
-
399
- 登记当前 Vue 应用;一般由 core 安装流程维护。
400
-
401
- ```ts
402
- setApp(app: App<any>): void
403
- ```
404
-
405
- [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
406
-
407
- ### registerComponent
408
-
409
- 向当前应用登记组件名和实现,供配置渲染及远程产品解析。
410
-
411
- ```ts
412
- registerComponent(name: string, component: Component): void
413
- ```
414
-
415
- [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
416
-
417
- ### resolveComponent
418
-
419
- 按注册名取得组件实现,找不到时返回 undefined。
420
-
421
- ```ts
422
- resolveComponent(name: string): Component
423
- ```
424
-
425
- [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
426
-
427
- ### configureRuntime
428
-
429
- 配置当前核心运行时的 store、router、HTTP 等依赖;通常由安装流程完成。
430
-
431
- ```ts
432
- configureRuntime(options?: Partial<CoreOptions>): void
433
- ```
434
-
435
- ### registerRouteComponents
436
-
437
- 登记平台路由使用的页面组件映射。
438
-
439
- ```ts
440
- registerRouteComponents(components: Record<string, Component>): void
441
- ```
442
-
443
- ### nav
444
-
445
- 导航服务对象,提供平台菜单/页面打开与路由激活方法。
446
-
447
- | 方法 | 说明 |
448
- | --- | --- |
449
- | `toMenu(keyOrId, { replace = false, query } = {})` | 跳到某菜单(key=编号或 ID)。等同用户点击菜单,URL 一并更新 |
450
- | `menuUrl(keyOrId, query)` | 生成某菜单的可分享 URL(含 /m/:key,不含 role——打开者用自己的角色) |
451
- | `currentMenuKey()` | 当前 URL 上的菜单键(无则 '') |
452
- | `getMenuKey(menu)` | 读取菜单 MODULE_CODE,缺少代码时回退到 ID。 |
453
- | `findMenuByKey(menus = [], key)` | 递归查找菜单,优先精确匹配 MODULE_CODE,再匹配 ID。 |
454
-
455
- [详细参考](../../docs/revision/core/api/navigation.md),包括参数、返回值与运行约束。
456
-
457
- ### publishCoreRuntime
458
-
459
- 将当前 core、utils、Vue、Vuex 命名空间交给远程产品共享注册表;安装 core 时自动调用。
460
-
461
- ```ts
462
- publishCoreRuntime(): void
463
- ```
464
-
465
- ### createCore
466
-
467
- 预置安装选项,返回可交给 app.use 的 core 插件;安装时传入的选项覆盖预置值。
468
-
469
- ```ts
470
- createCore(options?: Partial<CoreOptions>): Plugin
471
- ```
472
-
473
- ### createApp
474
-
475
- 创建已安装 core 的 Vue 3 应用。默认提供独立 store、hash router 和平台 HTTP;产品可覆盖服务并通过 app.use 安装业务插件。
476
-
477
- ```ts
478
- createApp(options?: CreateAppOptions): App<any>
479
- ```
480
-
481
- ## 稳定子路径
482
-
483
- 下表按实际 package.json 的公开入口列出。default 使用默认导入,其他名称使用具名导入;类型接口用 import type。
484
-
485
- | 导入路径 | 完整导出名 | 用途 / 详细说明 |
486
- | --- | --- | --- |
487
- | `@epxing/core/app` | `setApp`、`getApp`、`resolveComponent`、`registerComponent`、`useVuePlugin`、`default` | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 [详细参考](../../docs/revision/core/api/app.md) |
488
- | `@epxing/core/http` | `default` | 平台实体请求客户端,包含 list/find/get/save/update/getCount/getCodes/getTree/apply 与 $get/$post/$request 等方法。 [详细参考](../../docs/revision/core/api/api/index.md) |
489
- | `@epxing/core/axios` | `default` | 平台 Axios 实例及拦截器;用于通用网络请求。业务实体请求优先使用 http 或注入的 $http。 [详细参考](../../docs/revision/core/api/axios.md) |
490
- | `@epxing/core/navigation` | `getMenuKey`、`findMenuByKey`、`findMenuPath`、`roleStorage`、`resolveRouteRole`、`MENU_ROUTE_ALIAS`、`effectiveRouteName`、`menuLocation`、`activateMenu`、`syncMenuUrl`、`clearMenuUrl`、`activateFromRoute`、`activateHome`、`nav`、`default`、`MenuRecord`(类型)、`MenuActivationOptions`(类型) | 导航服务对象,提供平台菜单/页面打开与路由激活方法。 [详细参考](../../docs/revision/core/api/navigation.md) |
491
- | `@epxing/core/component-mixin` | `default` | 配置驱动组件的公共混入,提供 $configs、服务访问、查询上下文、刷新和组件通信协议。 [详细参考](../../docs/revision/core/api/mixins/component.md) |
492
- | `@epxing/core/global-mixin` | `default` | 全局公共混入;通常由 core 安装,包含平台公共实例能力。 [详细参考](../../docs/revision/core/api/mixins/global.md) |
493
- | `@epxing/core/field-factory` | `FieldFactory`、`createFieldFactory`、`default` | 兼容旧用法的字段工厂默认实例;独立上下文优先使用 createFieldFactory。 [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
494
- | `@epxing/core/meta` | `default` | 将服务端元数据包装为模型,提供主键、属性、表单字段和列表字段访问方法。 [详细参考](../../docs/revision/utils/api/meta.md) |
495
- | `@epxing/core/pdf-viewer` | `default` | 浏览器 PDF 预览工具类;按调用需要加载 PDF 资源和渲染依赖。 [详细参考](../../docs/revision/utils/api/pdf.viewer.md) |
496
- | `@epxing/core/util` | `getSystemMeta`、`getFileUrl`、`getSysId`、`toLogin`、`usePlugin`、`runExpByScope`、`default` | 平台运行时工具单例,管理系统、资源地址、表达式、打印及远程插件加载等能力。 [详细参考](../../docs/revision/utils/api/util.md) |
497
- | `@epxing/core/store` | `createStoreModules`、`storeModules`、`createFrameStore` | 返回平台 Vuex 模块集合,模块 state 使用工厂函数;支持按模块覆盖。 |
498
- | `@epxing/core/runtime` | `getConfiguredRuntimeService`、`configureRuntime`、`getRuntimeService`、`runtimeStore`、`runtimeRouter`、`registerRouteComponents`、`runtimeRouteComponent`、`loadBusinessComponents`、`RuntimeServices`(类型)、`BusinessComponentRegistry`(类型) | 对应 `runtime` 模块。 |
499
- | `@epxing/core/mixins` | `default`、`global`、`component` | 混入集合:component 与 ComponentMixin 相同,global 与 GlobalMixin 相同。 [详细参考](../../docs/revision/core/api/mixins/index.md) |
500
- | `@epxing/core/router` | `routerConfig`、`createFrameRouter`、`default`、`FrameRouterOptions`(类型) | 平台基础 routes 与 beforeEach,供产品自行组装 router 时复用。 |
501
- | `@epxing/core/event-bus` | `createEventBus`、`getEventBus`、`default`、`EventBus`(类型)、`EventListener`(类型) | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 [详细参考](../../docs/revision/core/api/vue.bus.md) |
502
- | `@epxing/core/style.css` | 可选的显式样式入口 | JS 入口自动加载本包样式;保留此路径以兼容旧代码。 |
503
-
504
- ## 子路径补充导出
505
-
506
- 本节列出仅在稳定子路径中提供的具名 API;从本节标题对应路径导入。
507
-
508
- ### @epxing/core/app
509
-
510
- | 导出 / 调用签名 | 用途 | 详细接口 |
511
- | --- | --- | --- |
512
- | `useVuePlugin(plugin: Plugin & { runtime?: string; }, options?: any): void \| App<any> \| Promise<void>` | 向当前应用安装远程插件;runtime: vue3 使用原生 app.use,旧插件按兼容开关加载垫片。 | [详细参考](../../docs/revision/core/api/app.md) |
513
-
514
- ### @epxing/core/navigation
515
-
516
- | 导出 / 调用签名 | 用途 | 详细接口 |
517
- | --- | --- | --- |
518
- | `getMenuKey(menu?: MenuRecord): string` | 读取菜单 MODULE_CODE,缺少代码时回退到 ID。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
519
- | `findMenuByKey(menus: MenuRecord[], key: string): MenuRecord` | 递归查找菜单,优先精确匹配 MODULE_CODE,再匹配 ID。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
520
- | `findMenuPath(menus: MenuRecord[], key: string): MenuRecord[]` | 返回从根到目标菜单的路径,包含目标菜单;不存在时返回空数组。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
521
- | `roleStorage` | 按客户和系统维度读写当前角色,包含 key/get/set 方法及响应式缓存。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
522
- | `resolveRouteRole(route?: Pick<RouteLocationNormalizedGeneric, "params">): string \| string[]` | 读取路由角色,URL 优先,缺少时回退到角色存储。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
523
- | `MENU_ROUTE_ALIAS` | 直达菜单路由到基础路由的别名映射:appMenu → app1,hallMenu → hall。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
524
- | `effectiveRouteName(name?: string \| symbol): string \| symbol` | 将直达菜单路由名归一为对应基础路由名。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
525
- | `menuLocation(route: RouteLocationNormalizedGeneric, key: string, query?: LocationQueryRaw): string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric` | 根据当前路由、菜单键和查询参数生成菜单直达位置。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
526
- | `activateMenu(menuId: string, extraProps?: Record<string, any>, options?: MenuActivationOptions): boolean` | 按菜单 ID 激活页面,可控制同步 URL、替换历史和查询参数。 | [详细参考](../../docs/revision/core/api/navigation.md) |
527
- | `syncMenuUrl(menu: MenuRecord, options?: { replace?: boolean; query?: LocationQueryRaw; }): void` | 将当前菜单写入 URL;只处理受支持的应用/大厅路由。 | [详细参考](../../docs/revision/core/api/navigation.md) |
528
- | `clearMenuUrl(options?: { replace?: boolean; }): void` | 移除 URL 中的菜单键并返回基础应用/大厅路由。 | [详细参考](../../docs/revision/core/api/navigation.md) |
529
- | `activateFromRoute(route: RouteLocationNormalizedGeneric): boolean` | 按 URL 中的 menuKey 激活对应菜单,找不到时返回 false。 | [详细参考](../../docs/revision/core/api/navigation.md) |
530
- | `activateHome(): boolean` | 激活已存在或暂存的应用首页;没有首页时返回 false。 | [详细参考](../../docs/revision/core/api/navigation.md) |
531
-
532
- ### @epxing/core/runtime
533
-
534
- | 导出 / 调用签名 | 用途 | 详细接口 |
535
- | --- | --- | --- |
536
- | `getConfiguredRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K]` | 读取显式注入的核心服务;未配置时返回 undefined,不访问 window 回退。 | 见声明及接入约定 |
537
- | `getRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K]` | 读取已注入服务,兼容 window 回退;缺少服务时抛出初始化错误。 | 见声明及接入约定 |
538
- | `runtimeStore` | 当前运行时 store 的代理,访问成员时解析实际注入的 store。 | 见声明及接入约定 |
539
- | `runtimeRouter` | 当前运行时 router 的代理,访问成员时解析实际注入的 router。 | 见声明及接入约定 |
540
- | `runtimeRouteComponent(name: string): () => Promise<Component>` | 按登记名生成异步路由组件加载函数;尚未登记时加载失败。 | 见声明及接入约定 |
541
- | `loadBusinessComponents(app: App<any>): Promise<BusinessComponentRegistry>` | 调用已配置的业务组件加载器;没有加载器时返回空解析器。 | 见声明及接入约定 |
542
-
543
- ### @epxing/core/mixins
544
-
545
- | 导出 / 调用签名 | 用途 | 详细接口 |
546
- | --- | --- | --- |
547
- | `global` | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 | [详细参考](../../docs/revision/core/api/mixins/global.md) |
548
- | `component` | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 | [详细参考](../../docs/revision/core/api/mixins/component.md) |
549
-
550
- ## 导出的 TypeScript 类型
551
-
552
- 以下名称仅存在于类型系统,用 import type 导入,不作为运行时对象使用。
553
-
554
- ### CoreOptions
555
-
556
- ```ts
1
+ # @epxing/core API
2
+
3
+ Vue 3 应用启动、公共混入、实体请求、元数据、状态、路由和运行时服务。
4
+
5
+ 本页对应包版本 `5.3.0-beta.4`。导出名、子路径和签名从当前源码、package.json 与类型声明生成。
6
+
7
+ ## 安装与使用
8
+
9
+
10
+ ```sh
11
+ pnpm add @epxing/core@5.3.0-beta.3
12
+ ```
13
+
14
+
15
+ ```js
16
+ import { createApp } from '@epxing/core'
17
+ import Hr from './hr'
18
+
19
+ const app = createApp()
20
+ app.use(Hr)
21
+ app.mount('#app')
22
+
23
+ // 也可覆盖默认服务:createApp({ rootComponent: App, store, router, http: productHttp })
24
+ ```
25
+
26
+ ## 接入约定
27
+
28
+ createApp 返回 Vue App,可继续 app.use / app.component / app.mount。自建 Vue 应用时使用 app.use(EpxCore, { store, router, http });store 与 router 必须提供。产品 HTTP 客户端需实现页面实际调用的实体协议,方法和参数见 HttpClient 与 EntityRequest 类型。
29
+
30
+ 仅安装 core 会创建核心运行环境;产品插件负责业务路由和页面。需要基础组件、业务选择器、设计器或看板时,另外安装并导入对应包,样式自动加载。getSystemMeta/getSysId/usePlugin 等依赖当前系统上下文,初始化系统后再调用。
31
+
32
+ 本版 JS 入口自动加载本包聚合样式,根导入和稳定子路径均无需手动 import style.css;保留显式样式入口以兼容旧代码。样式按包加载,产品覆盖样式放在框架导入之后。
33
+
34
+ ## 根入口完整导出
35
+
36
+ | 导出名 | 形态 | 用途 | 参数 / 配置 / 事件 |
37
+ | --- | --- | --- | --- |
38
+ | `installCore` | 函数 | 向现有 Vue 应用安装核心服务,返回 app、store、router、http、fieldFactory 上下文。 | 见下方签名或接入约定 |
39
+ | `ComponentMixin` | 对象 / 常量 | 配置驱动组件的公共混入,提供 $configs、服务访问、查询上下文、刷新和组件通信协议。 | [详细参考](../../docs/revision/core/api/mixins/component.md) |
40
+ | `GlobalMixin` | 对象 / 常量 | 全局公共混入;通常由 core 安装,包含平台公共实例能力。 | [详细参考](../../docs/revision/core/api/mixins/global.md) |
41
+ | `mixins` | 对象 / 常量 | 混入集合:component 与 ComponentMixin 相同,global 与 GlobalMixin 相同。 | [详细参考](../../docs/revision/core/api/mixins/index.md) |
42
+ | `axios` | 对象 / 常量 | 平台 Axios 实例及拦截器;用于通用网络请求。业务实体请求优先使用 http 或注入的 $http。 | [详细参考](../../docs/revision/core/api/axios.md) |
43
+ | `http` | 对象 / 常量 | 平台实体请求客户端,包含 list/find/get/save/update/getCount/getCodes/getTree/apply 与 $get/$post/$request 等方法。 | [详细参考](../../docs/revision/core/api/api/index.md) |
44
+ | `util` | 对象 / 常量 | 平台运行时工具单例,管理系统、资源地址、表达式、打印及远程插件加载等能力。 | [详细参考](../../docs/revision/utils/api/util.md) |
45
+ | `getSystemMeta` | 函数 | 按元数据代码取得当前系统对应的元数据标识;依赖已初始化的系统上下文。 | [详细参考](../../docs/revision/utils/api/util.md) |
46
+ | `getFileUrl` | 函数 | 按附件 ID、客户端及签名选项生成访问地址;没有 ID 时返回 undefined。 | [详细参考](../../docs/revision/utils/api/util.md) |
47
+ | `getSysId` | 函数 | 读取当前系统标识;未初始化系统时可能返回 undefined。 | [详细参考](../../docs/revision/utils/api/util.md) |
48
+ | `toLogin` | 函数 | 按当前客户端跳转登录页,clearPath 控制是否清理路径。 | [详细参考](../../docs/revision/utils/api/util.md) |
49
+ | `usePlugin` | 函数 | 异步加载并缓存指定产品插件,返回加载结果。 | [详细参考](../../docs/revision/utils/api/util.md) |
50
+ | `runExpByScope` | 函数 | 按范围条件计算数据是否匹配;依赖组件查询上下文时使用 runExpByScope.call(vm, scopeList, data)。 | [详细参考](../../docs/revision/utils/api/util.md) |
51
+ | `FieldFactory` | 对象 / 常量 | 兼容旧用法的字段工厂默认实例;独立上下文优先使用 createFieldFactory。 | [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
52
+ | `FieldFactoryClass` | 类 | 字段工厂类,按元数据生成表单/列表字段;可传入对应应用的 store。 | [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
53
+ | `createFieldFactory` | 函数 | 创建独立字段工厂实例,避免产品之间共享可变字段状态。 | [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
54
+ | `Meta` | 类 | 将服务端元数据包装为模型,提供主键、属性、表单字段和列表字段访问方法。 | [详细参考](../../docs/revision/utils/api/meta.md) |
55
+ | `PdfViewer` | 类 | 浏览器 PDF 预览工具类;按调用需要加载 PDF 资源和渲染依赖。 | [详细参考](../../docs/revision/utils/api/pdf.viewer.md) |
56
+ | `createFrameStore` | 函数 | 创建平台 Vuex store;每次调用产生独立模块状态,可传入 StoreOptions。 | 见下方签名或接入约定 |
57
+ | `createStoreModules` | 函数 | 返回平台 Vuex 模块集合,模块 state 使用工厂函数;支持按模块覆盖。 | 见下方签名或接入约定 |
58
+ | `storeModules` | 对象 / 常量 | 平台 Vuex 模块模板,供产品手工 createStore({ modules: storeModules }) 使用。 | 见下方签名或接入约定 |
59
+ | `createFrameRouter` | 函数 | 创建包含平台基础路由和守卫的 Vue Router;默认 hash history,可指定 routes/history/beforeEach。 | 见下方签名或接入约定 |
60
+ | `routerConfig` | 对象 / 常量 | 平台基础 routes 与 beforeEach,供产品自行组装 router 时复用。 | 见下方签名或接入约定 |
61
+ | `createEventBus` | 函数 | 创建独立事件总线,支持 on/off/emit 以及兼容的 $on/$off/$once/$emit。 | [详细参考](../../docs/revision/core/api/vue.bus.md) |
62
+ | `getEventBus` | 函数 | 取得当前已安装应用的事件总线;应在 core 安装后调用。 | [详细参考](../../docs/revision/core/api/vue.bus.md) |
63
+ | `getApp` | 函数 | 取得当前运行时登记的 Vue 应用,尚未登记时返回 null。 | [详细参考](../../docs/revision/core/api/app.md) |
64
+ | `setApp` | 函数 | 登记当前 Vue 应用;一般由 core 安装流程维护。 | [详细参考](../../docs/revision/core/api/app.md) |
65
+ | `registerComponent` | 函数 | 向当前应用登记组件名和实现,供配置渲染及远程产品解析。 | [详细参考](../../docs/revision/core/api/app.md) |
66
+ | `resolveComponent` | 函数 | 按注册名取得组件实现,找不到时返回 undefined。 | [详细参考](../../docs/revision/core/api/app.md) |
67
+ | `configureRuntime` | 函数 | 配置当前核心运行时的 store、router、HTTP 等依赖;通常由安装流程完成。 | 见下方签名或接入约定 |
68
+ | `registerRouteComponents` | 函数 | 登记平台路由使用的页面组件映射。 | 见下方签名或接入约定 |
69
+ | `routeComponents` | 对象 / 常量 | 基础路由页面映射,包含 App、Module、AppRoleSelect、Error,随 core 自动注册。 | 可由 options.routeComponents 覆盖 |
70
+ | `nav` | 对象 / 常量 | 导航服务对象,提供平台菜单/页面打开与路由激活方法。 | [详细参考](../../docs/revision/core/api/navigation.md) |
71
+ | `publishCoreRuntime` | 函数 | 将当前 core、utils、Vue、Vuex 命名空间交给远程产品共享注册表;安装 core 时自动调用。 | 见下方签名或接入约定 |
72
+ | `createCore` | 函数 | 预置安装选项,返回可交给 app.use 的 core 插件;安装时传入的选项覆盖预置值。 | 见下方签名或接入约定 |
73
+ | `createApp` | 函数 | 创建已安装 core 的 Vue 3 应用。默认提供独立 store、hash router 和平台 HTTP;产品可覆盖服务并通过 app.use 安装业务插件。 | 见下方签名或接入约定 |
74
+ | `default` | 默认导出 | EpxCore 插件对象,同时提供 createApp/createCore/installCore 和公开工具成员。 | 见下方签名或接入约定 |
75
+
76
+ ## 函数、类与工具对象
77
+
78
+ 签名中的 any 表示现有声明未进一步限定结构;源代码方法签名保留默认参数。异步结果与泛型以声明为准。
79
+
80
+ ### installCore
81
+
82
+ 向现有 Vue 应用安装核心服务,返回 app、store、router、http、fieldFactory 上下文。
83
+
84
+ ```ts
85
+ installCore(app: App<any>, options: CoreOptions): CoreContext
86
+ ```
87
+
88
+ ### axios
89
+
90
+ 平台 Axios 实例及拦截器;用于通用网络请求。业务实体请求优先使用 http 或注入的 $http。
91
+
92
+ ```ts
93
+ axios<T = any, R = AxiosResponse<T, any, {}>, D = any>(config: AxiosRequestConfig<D>): Promise<R>
94
+ axios<T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>
95
+ ```
96
+
97
+ [详细参考](../../docs/revision/core/api/axios.md),包括参数、返回值与运行约束。
98
+
99
+ ### util
100
+
101
+ 平台运行时工具单例,管理系统、资源地址、表达式、打印及远程插件加载等能力。
102
+
103
+ | 方法 | 说明 |
104
+ | --- | --- |
105
+ | `getSysId()` | 返回当前工具保存的系统标识。 |
106
+ | `setSysId(sysId)` | 更新工具维护的系统标识。 |
107
+ | `getPublicPath()` | 读取平台静态资源公开基路径。 |
108
+ | `getStaticJsDir()` | 返回按需脚本目录,优先采用运行时 STATIC_JS_DIR 配置。 |
109
+ | `getRootPath()` | 读取当前应用部署的根路径。 |
110
+ | `getRoutePath()` | 根据路由环境读取有效应用路径。 |
111
+ | `getClientCode()` | 从当前路由/配置读取客户端代码。 |
112
+ | `setToken(v, routeClientCode)` | 实现见本节的详细参考。 |
113
+ | `getToken(routeClientCode)` | 实现见本节的详细参考。 |
114
+ | `removeToken(routeClientCode)` | 实现见本节的详细参考。 |
115
+ | `consumeUrlToken(routeClientCode)` | 实现见本节的详细参考。 |
116
+ | `search(name, path)` | 从指定地址或当前 location 中解析 URL 查询参数;这里不是实体列表的 search(scopeParams)。 |
117
+ | `getCurrentLanguage(routeClientCode)` | 按客户端配置与本地偏好取得当前语言。 |
118
+ | `setCurrentLanguage(language)` | 保存当前客户端语言选择。 |
119
+ | `isChineseLanguage(language = this.getCurrentLanguage())` | 判断传入或当前语言是否为中文。 |
120
+ | `toPx(v)` | 将尺寸值转换为像素样式表达式。 |
121
+ | `toLogin(clearPath)` | 按当前客户端跳转登录页,clearPath 控制是否清理路径。 |
122
+ | `urlToBase64(url)` | 在浏览器中获取资源并转换为 Base64/Data URL,仍受跨域和资源权限约束。 |
123
+ | `getFileUrl(id, client, flag = true, useSignOrigin = false)` | 按附件 ID、客户端及签名选项生成访问地址;没有 ID 时返回 undefined。 |
124
+ | `getOfficeFileUrl(id, client, flag = true, useSignOrigin = false)` | 实现见本节的详细参考。 |
125
+ | `getOfficeServerUrl()` | 读取 ONLYOFFICE Document Server 的运行时地址。 |
126
+ | `getAbsPath(path, params = {})` | 结合部署环境和参数生成绝对访问地址。 |
127
+ | `getPlatformRequestUrl(params = {})` | 生成平台项目的请求 URL,与当前产品系统接口地址区分。 |
128
+ | `getRequestUrl(params = {}, { requestKey = 'api' } = {})` | 实现见本节的详细参考。 |
129
+ | `getSystemMeta(metaCode)` | 获取当前系统对应的元数据信息。 |
130
+ | `isWeiXin()` | 检测当前环境是否为微信内置浏览器。 |
131
+ | `isFeishu()` | 检测当前环境是否为飞书客户端。 |
132
+ | `isDingTalk()` | 检测当前环境是否为钉钉客户端。 |
133
+ | `isIos()` | 检测当前环境是否为 iOS。 |
134
+ | `canPreviewPdfInline()` | 判断当前客户端是否适合内嵌 PDF 预览。 |
135
+ | `printHtml(html)` | 创建/组织 HTML 内容的打印流程。 |
136
+ | `printWindow(win)` | 对指定窗口发起打印。 |
137
+ | `pdfDocToImages(pdfDoc, scale = 3)` | 将已加载的 PDF 文档逐页转换为图片,scale 决定渲染分辨率。 |
138
+ | `getBrowserVersion()` | 读取浏览器类型或版本信息用于兼容判断。 |
139
+ | `runExp(exp, point)` | 按指定数据上下文执行配置表达式。 |
140
+ | `runExpByScope(scopeList, data = {})` | 根据范围条件集合判断当前数据是否满足条件。 |
141
+ | `awaitWrap(promise)` | 实现见本节的详细参考。 |
142
+ | `isLoadLibrary(systemCode)` | 检查指定系统远程库的加载记录。 |
143
+ | `loadJS(options)` | 实现见本节的详细参考。 |
144
+ | `loadJs(file, cb)` | 实现见本节的详细参考。 |
145
+ | `loadCss(options)` | 实现见本节的详细参考。 |
146
+ | `dataURLtoBlob(dataurl)` | 将 Data URL 转成 Blob,保留对应 MIME 信息。 |
147
+ | `dataURLtoFile(dataurl, filename)` | 将 Data URL 转成指定文件名的 File。 |
148
+ | `usePlugin(plugin)` | 异步加载并缓存指定产品插件,返回加载结果。 |
149
+ | `utf8to16(str)` | 对字符串执行历史编码转换。 |
150
+ | `genId(length = 3)` | 实现见本节的详细参考。 |
151
+ | `uuid()` | 实现见本节的详细参考。 |
152
+ | `copyToClipboard(text, callback)` | 复制文本到剪贴板并按调用约定回调。 |
153
+ | `getQueryValue(path, obj)` | 实现见本节的详细参考。 |
154
+ | `getValueByPath(path, obj)` | 实现见本节的详细参考。 |
155
+ | `formatAfterTriggerParams(afterTriggerParams, { res, data } = {}, ctx = {})` | 将操作按钮的后续事件参数与响应、数据及上下文合成。 |
156
+ | `evalExpression(el, data, errorValue = false)` | 按数据上下文求值配置表达式,并按 errorValue 处理异常。 |
157
+ | `openWindow(url)` | 按当前客户端环境打开访问地址。 |
158
+ | `encrypt(content, key, { type } = {})` | 按 type/key 选择现有加密实现,异步库加载及服务端算法必须配套。 |
159
+ | `decrypt(content, { type, key })` | 按 type/key 解密已有内容,不能替代认证与授权。 |
160
+ | `appendCss(id, css)` | 实现见本节的详细参考。 |
161
+ | `removeCss(id)` | 实现见本节的详细参考。 |
162
+
163
+ [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
164
+
165
+ ### getSystemMeta
166
+
167
+ 按元数据代码取得当前系统对应的元数据标识;依赖已初始化的系统上下文。
168
+
169
+ ```ts
170
+ getSystemMeta(metaCode: string): string
171
+ ```
172
+
173
+ [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
174
+
175
+ ### getFileUrl
176
+
177
+ 按附件 ID、客户端及签名选项生成访问地址;没有 ID 时返回 undefined。
178
+
179
+ ```ts
180
+ getFileUrl(id?: string, client?: string | FileUrlOptions, flag?: boolean, useSignOrigin?: boolean): string
181
+ ```
182
+
183
+ [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
184
+
185
+ ### getSysId
186
+
187
+ 读取当前系统标识;未初始化系统时可能返回 undefined。
188
+
189
+ ```ts
190
+ getSysId(): string
191
+ ```
192
+
193
+ [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
194
+
195
+ ### toLogin
196
+
197
+ 按当前客户端跳转登录页,clearPath 控制是否清理路径。
198
+
199
+ ```ts
200
+ toLogin(clearPath?: boolean): void
201
+ ```
202
+
203
+ [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
204
+
205
+ ### usePlugin
206
+
207
+ 异步加载并缓存指定产品插件,返回加载结果。
208
+
209
+ ```ts
210
+ usePlugin<T = any>(plugin: string): Promise<T>
211
+ ```
212
+
213
+ [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
214
+
215
+ ### runExpByScope
216
+
217
+ 按范围条件计算数据是否匹配;依赖组件查询上下文时使用 runExpByScope.call(vm, scopeList, data)。
218
+
219
+ ```ts
220
+ runExpByScope(this: void | Record<string, any>, scopeList: ScopeCondition[], data?: Record<string, any>): boolean
221
+ ```
222
+
223
+ [详细参考](../../docs/revision/utils/api/util.md),包括参数、返回值与运行约束。
224
+
225
+ ### FieldFactoryClass
226
+
227
+ 字段工厂类,按元数据生成表单/列表字段;可传入对应应用的 store。
228
+
229
+ ```js
230
+ new FieldFactoryClass(store = runtimeStore)
231
+ ```
232
+
233
+ | 方法 | 说明 |
234
+ | --- | --- |
235
+ | `createFields({ fields, fieldScope, meta, pageType = 'DETAIL', metaId = '', metaViewId, hiddenFields = [], defaultFieldConfigs = {}, type = 'list' })` | 创建字段配置 |
236
+ | `createFieldConfig({ fieldFromMeta, fieldConfig, fieldName })` | 实现见本节的详细参考。 |
237
+ | `setList(dataType, codeKey, { optionType })` | 实现见本节的详细参考。 |
238
+
239
+ [详细参考](../../docs/revision/utils/api/fieldFactory.md),包括参数、返回值与运行约束。
240
+
241
+ ### createFieldFactory
242
+
243
+ 创建独立字段工厂实例,避免产品之间共享可变字段状态。
244
+
245
+ ```ts
246
+ createFieldFactory(store?: Store<any>): FieldFactoryClass
247
+ ```
248
+
249
+ [详细参考](../../docs/revision/utils/api/fieldFactory.md),包括参数、返回值与运行约束。
250
+
251
+ ### Meta
252
+
253
+ 将服务端元数据包装为模型,提供主键、属性、表单字段和列表字段访问方法。
254
+
255
+ ```js
256
+ new Meta(props = {})
257
+ ```
258
+
259
+ | 方法 | 说明 |
260
+ | --- | --- |
261
+ | `getId()` | 返回元数据 ID。 |
262
+ | `getCode()` | 返回元数据代码。 |
263
+ | `getName()` | 返回元数据名称。 |
264
+ | `getLabel()` | 返回元数据标签字段。 |
265
+ | `getSystemId()` | 返回所属系统 ID。 |
266
+ | `getSystemCode()` | 返回所属系统代码。 |
267
+ | `getServerCode()` | 返回对应服务代码。 |
268
+ | `getKeyType()` | 返回主键类型。 |
269
+ | `getAttributes()` | 返回对象属性集合。 |
270
+ | `getAttriIds()` | 取得属性 ID 集合。 |
271
+ | `getAttriNames()` | 取得属性名称集合。 |
272
+ | `getKeyNames()` | 实现见本节的详细参考。 |
273
+ | `getRelatedEntitys()` | 返回关联实体集合。 |
274
+ | `getModel()` | 实现见本节的详细参考。 |
275
+ | `getAttribute(field)` | 按字段名查找元属性。 |
276
+ | `getAllFields()` | 返回全部字段名。 |
277
+ | `getListFields()` | 返回列表默认字段。 |
278
+ | `getFormFields()` | 返回表单默认字段。 |
279
+ | `getAllFieldConfigs()` | 返回全部字段的默认配置。 |
280
+ | `getIndex(orderNum, fields)` | 实现见本节的详细参考。 |
281
+ | `getExportFields()` | 返回导出所使用的字段配置。 |
282
+ | `getKey()` | 返回主键字段名称。 |
283
+ | `getKeyAttribute()` | 返回主键字段的元属性。 |
284
+ | `getBusiKeyAttrs()` | 返回业务键属性。 |
285
+ | `getAttris()` | 获取所有属性 |
286
+ | `getIdLabelAttris()` | ID对应LAVEL |
287
+ | `getNameLabelAttris()` | NAME对应LAVEL |
288
+ | `getAttriNameById(attriId)` | 根据字段ID获取字段Name |
289
+ | `getLabelByField(field)` | 取得指定字段对应的显示标签。 |
290
+ | `getDataType(field)` | 取得指定字段的数据类型。 |
291
+ | `getRelationByMetaId(relatedMetaId)` | 按关联元数据查找关系。 |
292
+ | `getRelationIdByMetaId(linkLabel)` | 实现见本节的详细参考。 |
293
+ | `getRelations()` | 返回关系集合。 |
294
+ | `getRelatedEntitysOfEdit()` | 返回编辑场景可用的关联实体。 |
295
+ | `getRelatedEntitysOfDetail()` | 返回详情场景关联实体。 |
296
+ | `getRelationByFlag(flag)` | 按关系标识查找关联配置。 |
297
+ | `getLinkAttrs()` | 返回关系连接属性。 |
298
+ | `getLinkAttr(key)` | 按键查找连接属性。 |
299
+
300
+ [详细参考](../../docs/revision/utils/api/meta.md),包括参数、返回值与运行约束。
301
+
302
+ ### PdfViewer
303
+
304
+ 浏览器 PDF 预览工具类;按调用需要加载 PDF 资源和渲染依赖。
305
+
306
+ ```js
307
+ new PdfViewer()
308
+ ```
309
+
310
+ | 方法 | 说明 |
311
+ | --- | --- |
312
+ | `destroy()` | 页面 div 是 append 进容器的,实例不销毁就会跟下一份预览叠在一起;;scroll 监听和 ResizeObserver 也得一并摘掉,否则每预览一次多留一份。 |
313
+ | `searchTextInPDF(searchText)` | 实现见本节的详细参考。 |
314
+ | `calculateTextBoundingBox(textItem, startIndex, endIndex, viewport, currentScale)` | 实现见本节的详细参考。 |
315
+ | `highlightText(pageNum, x, y, width, height)` | 实现见本节的详细参考。 |
316
+ | `clearHighlights()` | 实现见本节的详细参考。 |
317
+ | `scrollToPage({ pageNum, x, y, width, height })` | 实现见本节的详细参考。 |
318
+ | `loadPdf()` | 实现见本节的详细参考。 |
319
+ | `run(config)` | 实现见本节的详细参考。 |
320
+ | `load(pdfDocument)` | 实现见本节的详细参考。 |
321
+ | `createPageView({ container, id })` | 实现见本节的详细参考。 |
322
+ | `resetPageStyle()` | 实现见本节的详细参考。 |
323
+ | `updatePageView()` | 实现见本节的详细参考。 |
324
+ | `scrollUpdate()` | 实现见本节的详细参考。 |
325
+ | `getVisiblePages()` | 实现见本节的详细参考。 |
326
+ | `resizeVisiblePages(newCacheSize)` | 实现见本节的详细参考。 |
327
+ | `destroyPageView({ id })` | 实现见本节的详细参考。 |
328
+ | `renderPageView(visible, cb)` | 实现见本节的详细参考。 |
329
+ | `drawerCanvas(num)` | 实现见本节的详细参考。 |
330
+ | `scaleChanged(scale)` | 实现见本节的详细参考。 |
331
+ | `rotateChanged(delta)` | 实现见本节的详细参考。 |
332
+ | `print()` | 实现见本节的详细参考。 |
333
+
334
+ [详细参考](../../docs/revision/utils/api/pdf.viewer.md),包括参数、返回值与运行约束。
335
+
336
+ ### createFrameStore
337
+
338
+ 创建平台 Vuex store;每次调用产生独立模块状态,可传入 StoreOptions。
339
+
340
+ ```ts
341
+ createFrameStore(options?: StoreOptions<any>): Store<any>
342
+ ```
343
+
344
+ ### createStoreModules
345
+
346
+ 返回平台 Vuex 模块集合,模块 state 使用工厂函数;支持按模块覆盖。
347
+
348
+ ```ts
349
+ createStoreModules(overrides?: ModuleTree<any>): ModuleTree<any>
350
+ ```
351
+
352
+ ### createFrameRouter
353
+
354
+ 创建包含平台基础路由和守卫的 Vue Router;默认 hash history,可指定 routes/history/beforeEach。
355
+
356
+ ```ts
357
+ createFrameRouter(options?: FrameRouterOptions): Router
358
+ ```
359
+
360
+ ### routerConfig
361
+
362
+ 平台基础 routes 与 beforeEach,供产品自行组装 router 时复用。
363
+
364
+ | 方法 | 说明 |
365
+ | --- | --- |
366
+ | `beforeEach(to, from, next)` | 实现见对应源码。 |
367
+
368
+ ### createEventBus
369
+
370
+ 创建独立事件总线,支持 on/off/emit 以及兼容的 $on/$off/$once/$emit。
371
+
372
+ ```ts
373
+ createEventBus(): EventBus
374
+ ```
375
+
376
+ [详细参考](../../docs/revision/core/api/vue.bus.md),包括参数、返回值与运行约束。
377
+
378
+ ### getEventBus
379
+
380
+ 取得当前已安装应用的事件总线;应在 core 安装后调用。
381
+
382
+ ```ts
383
+ getEventBus(): EventBus
384
+ ```
385
+
386
+ [详细参考](../../docs/revision/core/api/vue.bus.md),包括参数、返回值与运行约束。
387
+
388
+ ### getApp
389
+
390
+ 取得当前运行时登记的 Vue 应用,尚未登记时返回 null。
391
+
392
+ ```ts
393
+ getApp(): App<any>
394
+ ```
395
+
396
+ [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
397
+
398
+ ### setApp
399
+
400
+ 登记当前 Vue 应用;一般由 core 安装流程维护。
401
+
402
+ ```ts
403
+ setApp(app: App<any>): void
404
+ ```
405
+
406
+ [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
407
+
408
+ ### registerComponent
409
+
410
+ 向当前应用登记组件名和实现,供配置渲染及远程产品解析。
411
+
412
+ ```ts
413
+ registerComponent(name: string, component: Component): void
414
+ ```
415
+
416
+ [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
417
+
418
+ ### resolveComponent
419
+
420
+ 按注册名取得组件实现,找不到时返回 undefined。
421
+
422
+ ```ts
423
+ resolveComponent(name: string): Component
424
+ ```
425
+
426
+ [详细参考](../../docs/revision/core/api/app.md),包括参数、返回值与运行约束。
427
+
428
+ ### configureRuntime
429
+
430
+ 配置当前核心运行时的 store、router、HTTP 等依赖;通常由安装流程完成。
431
+
432
+ ```ts
433
+ configureRuntime(options?: Partial<CoreOptions>): void
434
+ ```
435
+
436
+ ### registerRouteComponents
437
+
438
+ 登记平台路由使用的页面组件映射。
439
+
440
+ ```ts
441
+ registerRouteComponents(components: Record<string, Component>): void
442
+ ```
443
+
444
+ ### nav
445
+
446
+ 导航服务对象,提供平台菜单/页面打开与路由激活方法。
447
+
448
+ | 方法 | 说明 |
449
+ | --- | --- |
450
+ | `toMenu(keyOrId, { replace = false, query } = {})` | 跳到某菜单(key=编号或 ID)。等同用户点击菜单,URL 一并更新 |
451
+ | `menuUrl(keyOrId, query)` | 生成某菜单的可分享 URL(含 /m/:key,不含 role——打开者用自己的角色) |
452
+ | `currentMenuKey()` | 当前 URL 上的菜单键(无则 '') |
453
+ | `getMenuKey(menu)` | 读取菜单 MODULE_CODE,缺少代码时回退到 ID。 |
454
+ | `findMenuByKey(menus = [], key)` | 递归查找菜单,优先精确匹配 MODULE_CODE,再匹配 ID。 |
455
+
456
+ [详细参考](../../docs/revision/core/api/navigation.md),包括参数、返回值与运行约束。
457
+
458
+ ### publishCoreRuntime
459
+
460
+ 将当前 core、utils、Vue、Vuex 命名空间交给远程产品共享注册表;安装 core 时自动调用。
461
+
462
+ ```ts
463
+ publishCoreRuntime(): void
464
+ ```
465
+
466
+ ### createCore
467
+
468
+ 预置安装选项,返回可交给 app.use 的 core 插件;安装时传入的选项覆盖预置值。
469
+
470
+ ```ts
471
+ createCore(options?: Partial<CoreOptions>): Plugin
472
+ ```
473
+
474
+ ### createApp
475
+
476
+ 创建已安装 core 的 Vue 3 应用。默认提供独立 store、hash router 和平台 HTTP;产品可覆盖服务并通过 app.use 安装业务插件。
477
+
478
+ ```ts
479
+ createApp(options?: CreateAppOptions): App<any>
480
+ ```
481
+
482
+ ## 稳定子路径
483
+
484
+ 下表按实际 package.json 的公开入口列出。default 使用默认导入,其他名称使用具名导入;类型接口用 import type。
485
+
486
+ | 导入路径 | 完整导出名 | 用途 / 详细说明 |
487
+ | --- | --- | --- |
488
+ | `@epxing/core/app` | `setApp`、`getApp`、`resolveComponent`、`registerComponent`、`useVuePlugin`、`default` | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 [详细参考](../../docs/revision/core/api/app.md) |
489
+ | `@epxing/core/http` | `default` | 平台实体请求客户端,包含 list/find/get/save/update/getCount/getCodes/getTree/apply 与 $get/$post/$request 等方法。 [详细参考](../../docs/revision/core/api/api/index.md) |
490
+ | `@epxing/core/axios` | `default` | 平台 Axios 实例及拦截器;用于通用网络请求。业务实体请求优先使用 http 或注入的 $http。 [详细参考](../../docs/revision/core/api/axios.md) |
491
+ | `@epxing/core/navigation` | `getMenuKey`、`findMenuByKey`、`findMenuPath`、`roleStorage`、`resolveRouteRole`、`MENU_ROUTE_ALIAS`、`effectiveRouteName`、`menuLocation`、`activateMenu`、`syncMenuUrl`、`clearMenuUrl`、`activateFromRoute`、`activateHome`、`nav`、`default`、`MenuRecord`(类型)、`MenuActivationOptions`(类型) | 导航服务对象,提供平台菜单/页面打开与路由激活方法。 [详细参考](../../docs/revision/core/api/navigation.md) |
492
+ | `@epxing/core/component-mixin` | `default` | 配置驱动组件的公共混入,提供 $configs、服务访问、查询上下文、刷新和组件通信协议。 [详细参考](../../docs/revision/core/api/mixins/component.md) |
493
+ | `@epxing/core/global-mixin` | `default` | 全局公共混入;通常由 core 安装,包含平台公共实例能力。 [详细参考](../../docs/revision/core/api/mixins/global.md) |
494
+ | `@epxing/core/field-factory` | `FieldFactory`、`createFieldFactory`、`default` | 兼容旧用法的字段工厂默认实例;独立上下文优先使用 createFieldFactory。 [详细参考](../../docs/revision/utils/api/fieldFactory.md) |
495
+ | `@epxing/core/meta` | `default` | 将服务端元数据包装为模型,提供主键、属性、表单字段和列表字段访问方法。 [详细参考](../../docs/revision/utils/api/meta.md) |
496
+ | `@epxing/core/pdf-viewer` | `default` | 浏览器 PDF 预览工具类;按调用需要加载 PDF 资源和渲染依赖。 [详细参考](../../docs/revision/utils/api/pdf.viewer.md) |
497
+ | `@epxing/core/util` | `getSystemMeta`、`getFileUrl`、`getSysId`、`toLogin`、`usePlugin`、`runExpByScope`、`default` | 平台运行时工具单例,管理系统、资源地址、表达式、打印及远程插件加载等能力。 [详细参考](../../docs/revision/utils/api/util.md) |
498
+ | `@epxing/core/store` | `createStoreModules`、`storeModules`、`createFrameStore` | 返回平台 Vuex 模块集合,模块 state 使用工厂函数;支持按模块覆盖。 |
499
+ | `@epxing/core/runtime` | `getConfiguredRuntimeService`、`configureRuntime`、`getRuntimeService`、`runtimeStore`、`runtimeRouter`、`registerRouteComponents`、`runtimeRouteComponent`、`loadBusinessComponents`、`RuntimeServices`(类型)、`BusinessComponentRegistry`(类型) | 对应 `runtime` 模块。 |
500
+ | `@epxing/core/mixins` | `default`、`global`、`component` | 混入集合:component 与 ComponentMixin 相同,global 与 GlobalMixin 相同。 [详细参考](../../docs/revision/core/api/mixins/index.md) |
501
+ | `@epxing/core/router` | `routerConfig`、`createFrameRouter`、`default`、`FrameRouterOptions`(类型) | 平台基础 routes 与 beforeEach,供产品自行组装 router 时复用。 |
502
+ | `@epxing/core/event-bus` | `createEventBus`、`getEventBus`、`default`、`EventBus`(类型)、`EventListener`(类型) | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 [详细参考](../../docs/revision/core/api/vue.bus.md) |
503
+ | `@epxing/core/style.css` | 可选的显式样式入口 | JS 入口自动加载本包样式;保留此路径以兼容旧代码。 |
504
+
505
+ ## 子路径补充导出
506
+
507
+ 本节列出仅在稳定子路径中提供的具名 API;从本节标题对应路径导入。
508
+
509
+ ### @epxing/core/app
510
+
511
+ | 导出 / 调用签名 | 用途 | 详细接口 |
512
+ | --- | --- | --- |
513
+ | `useVuePlugin(plugin: Plugin & { runtime?: string; }, options?: any): void \| App<any> \| Promise<void>` | 向当前应用安装远程插件;runtime: vue3 使用原生 app.use,旧插件按兼容开关加载垫片。 | [详细参考](../../docs/revision/core/api/app.md) |
514
+
515
+ ### @epxing/core/navigation
516
+
517
+ | 导出 / 调用签名 | 用途 | 详细接口 |
518
+ | --- | --- | --- |
519
+ | `getMenuKey(menu?: MenuRecord): string` | 读取菜单 MODULE_CODE,缺少代码时回退到 ID。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
520
+ | `findMenuByKey(menus: MenuRecord[], key: string): MenuRecord` | 递归查找菜单,优先精确匹配 MODULE_CODE,再匹配 ID。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
521
+ | `findMenuPath(menus: MenuRecord[], key: string): MenuRecord[]` | 返回从根到目标菜单的路径,包含目标菜单;不存在时返回空数组。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
522
+ | `roleStorage` | 按客户和系统维度读写当前角色,包含 key/get/set 方法及响应式缓存。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
523
+ | `resolveRouteRole(route?: Pick<RouteLocationNormalizedGeneric, "params">): string \| string[]` | 读取路由角色,URL 优先,缺少时回退到角色存储。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
524
+ | `MENU_ROUTE_ALIAS` | 直达菜单路由到基础路由的别名映射:appMenu → app1,hallMenu → hall。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
525
+ | `effectiveRouteName(name?: string \| symbol): string \| symbol` | 将直达菜单路由名归一为对应基础路由名。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
526
+ | `menuLocation(route: RouteLocationNormalizedGeneric, key: string, query?: LocationQueryRaw): string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric` | 根据当前路由、菜单键和查询参数生成菜单直达位置。 | [详细参考](../../docs/revision/core/api/menu-route.md) |
527
+ | `activateMenu(menuId: string, extraProps?: Record<string, any>, options?: MenuActivationOptions): boolean` | 按菜单 ID 激活页面,可控制同步 URL、替换历史和查询参数。 | [详细参考](../../docs/revision/core/api/navigation.md) |
528
+ | `syncMenuUrl(menu: MenuRecord, options?: { replace?: boolean; query?: LocationQueryRaw; context?: Record<string, any>; }): void` | 将当前菜单写入 URL,按需将来源容器存入 sessionStorage,供刷新恢复;只处理受支持的路由。 | [详细参考](../../docs/revision/core/api/navigation.md) |
529
+ | `clearMenuUrl(options?: { replace?: boolean; }): void` | 移除 URL 中的菜单键并返回基础应用/大厅路由。 | [详细参考](../../docs/revision/core/api/navigation.md) |
530
+ | `activateFromRoute(route: RouteLocationNormalizedGeneric): boolean` | 按 URL 中的 menuKey 激活对应菜单,找不到时返回 false。 | [详细参考](../../docs/revision/core/api/navigation.md) |
531
+ | `activateHome(): boolean` | 激活已存在或暂存的应用首页;没有首页时返回 false。 | [详细参考](../../docs/revision/core/api/navigation.md) |
532
+
533
+ ### @epxing/core/runtime
534
+
535
+ | 导出 / 调用签名 | 用途 | 详细接口 |
536
+ | --- | --- | --- |
537
+ | `getConfiguredRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K]` | 读取显式注入的核心服务;未配置时返回 undefined,不访问 window 回退。 | 见声明及接入约定 |
538
+ | `getRuntimeService<K extends keyof RuntimeServices>(name: K): RuntimeServices[K]` | 读取已注入服务,兼容 window 回退;缺少服务时抛出初始化错误。 | 见声明及接入约定 |
539
+ | `runtimeStore` | 当前运行时 store 的代理,访问成员时解析实际注入的 store。 | 见声明及接入约定 |
540
+ | `runtimeRouter` | 当前运行时 router 的代理,访问成员时解析实际注入的 router。 | 见声明及接入约定 |
541
+ | `runtimeRouteComponent(name: string): () => Promise<Component>` | 按登记名生成异步路由组件加载函数;尚未登记时加载失败。 | 见声明及接入约定 |
542
+ | `loadBusinessComponents(app: App<any>): Promise<BusinessComponentRegistry>` | 调用已配置的业务组件加载器;没有加载器时返回空解析器。 | 见声明及接入约定 |
543
+
544
+ ### @epxing/core/mixins
545
+
546
+ | 导出 / 调用签名 | 用途 | 详细接口 |
547
+ | --- | --- | --- |
548
+ | `global` | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 | [详细参考](../../docs/revision/core/api/mixins/global.md) |
549
+ | `component` | 该模块提供平台运行或配置能力;下方按真实导出、依赖和调用事实说明接口。 | [详细参考](../../docs/revision/core/api/mixins/component.md) |
550
+
551
+ ## 导出的 TypeScript 类型
552
+
553
+ 以下名称仅存在于类型系统,用 import type 导入,不作为运行时对象使用。
554
+
555
+ ### CoreOptions
556
+
557
+ ```ts
557
558
  interface CoreOptions {
558
559
  store: Store<any>
559
560
  router: Router
@@ -565,172 +566,172 @@ interface CoreOptions {
565
566
  businessLoader?: (app: App) => Promise<{ resolve(app: App, name: string): Promise<Component | null> }>
566
567
  globalProperties?: Record<string, unknown>
567
568
  i18n?: unknown
568
- }
569
- ```
570
-
571
- ### CoreContext
572
-
573
- ```ts
569
+ }
570
+ ```
571
+
572
+ ### CoreContext
573
+
574
+ ```ts
574
575
  interface CoreContext {
575
576
  app: App
576
577
  store: Store<any>
577
578
  router: Router
578
579
  http: Record<string, any>
579
580
  fieldFactory: FieldFactoryClass
580
- }
581
- ```
582
-
583
- ### CreateAppOptions
584
-
585
- ```ts
581
+ }
582
+ ```
583
+
584
+ ### CreateAppOptions
585
+
586
+ ```ts
586
587
  interface CreateAppOptions extends Partial<CoreOptions> {
587
588
  rootComponent?: Component
588
589
  rootProps?: Record<string, any> | null
589
590
  routes?: RouteRecordRaw[]
590
591
  history?: RouterHistory
591
- }
592
- ```
593
-
594
- ### EntityRequest
595
-
596
- ```ts
597
- interface EntityRequest extends Record<string, any> {
598
- entityId?: string
599
- metaId?: string
600
- action?: string
601
- }
602
- ```
603
-
604
- ### EntityRequestMethod
605
-
606
- ```ts
607
- interface EntityRequestMethod {
608
- <T = any>(params?: EntityRequest | string, ...args: any[]): Promise<T>
609
- }
610
- ```
611
-
612
- ### HttpClient
613
-
614
- ```ts
615
- interface HttpClient extends Record<string, any> {
616
- list: EntityRequestMethod
617
- find: EntityRequestMethod
618
- get: EntityRequestMethod
619
- save: EntityRequestMethod
620
- update: EntityRequestMethod
621
- getCount: EntityRequestMethod
622
- getCodes: EntityRequestMethod
623
- getTree: EntityRequestMethod
624
- apply: EntityRequestMethod
625
- $post: EntityRequestMethod
626
- $get: EntityRequestMethod
627
- $request: EntityRequestMethod
628
- }
629
- ```
630
-
631
- ### FileUrlOptions
632
-
633
- ```ts
634
- interface FileUrlOptions { client?: string; flag?: boolean; useSignOrigin?: boolean }
635
- ```
636
-
637
- ### ScopeCondition
638
-
639
- ```ts
640
- interface ScopeCondition extends Record<string, any> { field: string; mode?: string; values?: any }
641
- ```
642
-
643
- ### RuntimeUtil
644
-
645
- ```ts
646
- interface RuntimeUtil extends Record<string, any> {
647
- getSystemMeta: typeof getSystemMeta
648
- getFileUrl: typeof getFileUrl
649
- getSysId: typeof getSysId
650
- toLogin: typeof toLogin
651
- usePlugin: typeof usePlugin
652
- runExpByScope: typeof runExpByScope
653
- }
654
- ```
655
-
656
- ### FrameRouterOptions
657
-
658
- ```ts
659
- interface FrameRouterOptions extends Partial<RouterOptions> { beforeEach?: NavigationGuard | false }
660
- ```
661
-
662
- ### EventListener
663
-
664
- ```ts
665
- type EventListener = (...args: any[]) => void
666
- ```
667
-
668
- ### EventBus
669
-
670
- ```ts
671
- interface EventBus {
672
- on(event: string, listener: EventListener): void
673
- off(event?: string, listener?: EventListener): void
674
- emit(event: string, ...args: any[]): void
675
- $on(event: string | string[], listener: EventListener): EventBus
676
- $off(event?: string | string[], listener?: EventListener): EventBus
677
- $once(event: string, listener: EventListener): EventBus
678
- $emit(event: string, ...args: any[]): EventBus
679
- }
680
- ```
681
-
682
- ### MenuRecord
683
-
684
- ```ts
685
- interface MenuRecord { ID?: string; MODULE_CODE?: string; children?: MenuRecord[]; [key: string]: any }
686
- ```
687
-
688
- ### MenuActivationOptions
689
-
690
- ```ts
691
- interface MenuActivationOptions { syncUrl?: boolean; replaceUrl?: boolean; query?: LocationQueryRaw }
692
- ```
693
-
694
- ### RuntimeServices
695
-
696
- ```ts
697
- interface RuntimeServices { store: Store<any>; router: Router; http: HttpClient }
698
- ```
699
-
700
- ### BusinessComponentRegistry
701
-
702
- ```ts
703
- interface BusinessComponentRegistry { resolve(app: App, name: string): Promise<Component | null> }
704
- ```
705
-
706
- ## 源码兼容与其他入口
707
-
708
- /src 路径保留给已有产品和源码级扩展,可能包含平台内部实现;新产品优先采用上方根导出与稳定子路径。通配符表示按实际文件名匹配,不代表所有源码都属于根入口。
709
-
710
- | 公开路径模式 | 实际目标 |
711
- | --- | --- |
712
- | `@epxing/core/src` | `./dist/src/index.js` |
713
- | `@epxing/core/src/api` | `./dist/src/api/index.js` |
714
- | `@epxing/core/src/components/draggable` | `./dist/src/components/draggable/index.js` |
715
- | `@epxing/core/src/mixins` | `./dist/src/mixins/index.js` |
716
- | `@epxing/core/src/router` | `./dist/src/router/index.js` |
717
- | `@epxing/core/src/store` | `./dist/src/store/index.js` |
718
- | `@epxing/core/src/store/modules` | `./dist/src/store/modules/index.js` |
719
- | `@epxing/core/src/*.css` | `./src/*.css` |
720
- | `@epxing/core/src/*.scss` | `./src/*.scss` |
721
- | `@epxing/core/src/*.png` | `./src/*.png` |
722
- | `@epxing/core/src/*.svg` | `./src/*.svg` |
723
- | `@epxing/core/src/*.jpg` | `./src/*.jpg` |
724
- | `@epxing/core/src/*.gif` | `./src/*.gif` |
725
- | `@epxing/core/src/*.woff` | `./src/*.woff` |
726
- | `@epxing/core/src/*.woff2` | `./src/*.woff2` |
727
- | `@epxing/core/src/*.ttf` | `./src/*.ttf` |
728
- | `@epxing/core/src/*.js` | `./dist/src/*.js` |
729
- | `@epxing/core/src/*.jsx` | `./dist/src/*.js` |
730
- | `@epxing/core/src/*.vue` | `./dist/src/*.js` |
731
- | `@epxing/core/src/*` | `./dist/src/*.js` |
732
- | `@epxing/core/package.json` | `./package.json` |
733
-
734
- ## 文档维护
735
-
736
- 本页由 build/gen-package-api-docs.mjs 生成。修改公开入口并更新构建产物和类型声明后,在框架根运行 `pnpm docs:api`;`pnpm docs:api:check` 检查清单、类型、包内文档与站点镜像是否同步,同时验证页面编译和文档链接。用途和示例维护在 build/package-api-notes.mjs,组件和源码方法的详细参考位于 docs/revision。
592
+ }
593
+ ```
594
+
595
+ ### EntityRequest
596
+
597
+ ```ts
598
+ interface EntityRequest extends Record<string, any> {
599
+ entityId?: string
600
+ metaId?: string
601
+ action?: string
602
+ }
603
+ ```
604
+
605
+ ### EntityRequestMethod
606
+
607
+ ```ts
608
+ interface EntityRequestMethod {
609
+ <T = any>(params?: EntityRequest | string, ...args: any[]): Promise<T>
610
+ }
611
+ ```
612
+
613
+ ### HttpClient
614
+
615
+ ```ts
616
+ interface HttpClient extends Record<string, any> {
617
+ list: EntityRequestMethod
618
+ find: EntityRequestMethod
619
+ get: EntityRequestMethod
620
+ save: EntityRequestMethod
621
+ update: EntityRequestMethod
622
+ getCount: EntityRequestMethod
623
+ getCodes: EntityRequestMethod
624
+ getTree: EntityRequestMethod
625
+ apply: EntityRequestMethod
626
+ $post: EntityRequestMethod
627
+ $get: EntityRequestMethod
628
+ $request: EntityRequestMethod
629
+ }
630
+ ```
631
+
632
+ ### FileUrlOptions
633
+
634
+ ```ts
635
+ interface FileUrlOptions { client?: string; flag?: boolean; useSignOrigin?: boolean }
636
+ ```
637
+
638
+ ### ScopeCondition
639
+
640
+ ```ts
641
+ interface ScopeCondition extends Record<string, any> { field: string; mode?: string; values?: any }
642
+ ```
643
+
644
+ ### RuntimeUtil
645
+
646
+ ```ts
647
+ interface RuntimeUtil extends Record<string, any> {
648
+ getSystemMeta: typeof getSystemMeta
649
+ getFileUrl: typeof getFileUrl
650
+ getSysId: typeof getSysId
651
+ toLogin: typeof toLogin
652
+ usePlugin: typeof usePlugin
653
+ runExpByScope: typeof runExpByScope
654
+ }
655
+ ```
656
+
657
+ ### FrameRouterOptions
658
+
659
+ ```ts
660
+ interface FrameRouterOptions extends Partial<RouterOptions> { beforeEach?: NavigationGuard | false }
661
+ ```
662
+
663
+ ### EventListener
664
+
665
+ ```ts
666
+ type EventListener = (...args: any[]) => void
667
+ ```
668
+
669
+ ### EventBus
670
+
671
+ ```ts
672
+ interface EventBus {
673
+ on(event: string, listener: EventListener): void
674
+ off(event?: string, listener?: EventListener): void
675
+ emit(event: string, ...args: any[]): void
676
+ $on(event: string | string[], listener: EventListener): EventBus
677
+ $off(event?: string | string[], listener?: EventListener): EventBus
678
+ $once(event: string, listener: EventListener): EventBus
679
+ $emit(event: string, ...args: any[]): EventBus
680
+ }
681
+ ```
682
+
683
+ ### MenuRecord
684
+
685
+ ```ts
686
+ interface MenuRecord { ID?: string; MODULE_CODE?: string; children?: MenuRecord[]; [key: string]: any }
687
+ ```
688
+
689
+ ### MenuActivationOptions
690
+
691
+ ```ts
692
+ interface MenuActivationOptions { syncUrl?: boolean; replaceUrl?: boolean; query?: LocationQueryRaw }
693
+ ```
694
+
695
+ ### RuntimeServices
696
+
697
+ ```ts
698
+ interface RuntimeServices { store: Store<any>; router: Router; http: HttpClient }
699
+ ```
700
+
701
+ ### BusinessComponentRegistry
702
+
703
+ ```ts
704
+ interface BusinessComponentRegistry { resolve(app: App, name: string): Promise<Component | null> }
705
+ ```
706
+
707
+ ## 源码兼容与其他入口
708
+
709
+ /src 路径保留给已有产品和源码级扩展,可能包含平台内部实现;新产品优先采用上方根导出与稳定子路径。通配符表示按实际文件名匹配,不代表所有源码都属于根入口。
710
+
711
+ | 公开路径模式 | 实际目标 |
712
+ | --- | --- |
713
+ | `@epxing/core/src` | `./dist/src/index.js` |
714
+ | `@epxing/core/src/api` | `./dist/src/api/index.js` |
715
+ | `@epxing/core/src/components/draggable` | `./dist/src/components/draggable/index.js` |
716
+ | `@epxing/core/src/mixins` | `./dist/src/mixins/index.js` |
717
+ | `@epxing/core/src/router` | `./dist/src/router/index.js` |
718
+ | `@epxing/core/src/store` | `./dist/src/store/index.js` |
719
+ | `@epxing/core/src/store/modules` | `./dist/src/store/modules/index.js` |
720
+ | `@epxing/core/src/*.css` | `./src/*.css` |
721
+ | `@epxing/core/src/*.scss` | `./src/*.scss` |
722
+ | `@epxing/core/src/*.png` | `./src/*.png` |
723
+ | `@epxing/core/src/*.svg` | `./src/*.svg` |
724
+ | `@epxing/core/src/*.jpg` | `./src/*.jpg` |
725
+ | `@epxing/core/src/*.gif` | `./src/*.gif` |
726
+ | `@epxing/core/src/*.woff` | `./src/*.woff` |
727
+ | `@epxing/core/src/*.woff2` | `./src/*.woff2` |
728
+ | `@epxing/core/src/*.ttf` | `./src/*.ttf` |
729
+ | `@epxing/core/src/*.js` | `./dist/src/*.js` |
730
+ | `@epxing/core/src/*.jsx` | `./dist/src/*.js` |
731
+ | `@epxing/core/src/*.vue` | `./dist/src/*.js` |
732
+ | `@epxing/core/src/*` | `./dist/src/*.js` |
733
+ | `@epxing/core/package.json` | `./package.json` |
734
+
735
+ ## 文档维护
736
+
737
+ 本页由 build/gen-package-api-docs.mjs 生成。修改公开入口并更新构建产物和类型声明后,在框架根运行 `pnpm docs:api`;`pnpm docs:api:check` 检查清单、类型、包内文档与站点镜像是否同步,同时验证页面编译和文档链接。用途和示例维护在 build/package-api-notes.mjs,组件和源码方法的详细参考位于 docs/revision。