@jzg223/design-runtime 0.0.0-stage → 0.0.1

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 (229) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/README.md +275 -2
  3. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  4. package/dist/api.js +149 -0
  5. package/dist/comb/design-comb.vue.js +7 -0
  6. package/dist/comb/design-comb2.vue.js +591 -0
  7. package/dist/compat.js +74 -0
  8. package/dist/components/ApiSwitch.vue.js +7 -0
  9. package/dist/components/ApiSwitch2.vue.js +98 -0
  10. package/dist/components/design-debug/dev-mode-toggle.vue.js +7 -0
  11. package/dist/components/design-debug/dev-mode-toggle2.vue.js +41 -0
  12. package/dist/components/design-debug/dev-mode.js +45 -0
  13. package/dist/components/design-debug/dev-state-button.vue.js +7 -0
  14. package/dist/components/design-debug/dev-state-button2.vue.js +447 -0
  15. package/dist/components/design-debug/expr-eval.js +81 -0
  16. package/dist/components/design-shared/host-api.js +47 -0
  17. package/dist/components/design-shared/popup-host.js +11 -0
  18. package/dist/components/design-table/design-table-inner.vue.js +7 -0
  19. package/dist/components/design-table/design-table-inner2.vue.js +39 -0
  20. package/dist/components/design-table/design-table.vue.js +7 -0
  21. package/dist/components/design-table/design-table2.vue.js +937 -0
  22. package/dist/components/design-table/row-actions/delete-action.vue.js +4 -0
  23. package/dist/components/design-table/row-actions/delete-action2.vue.js +42 -0
  24. package/dist/components/design-table/row-actions/edit-action.vue.js +4 -0
  25. package/dist/components/design-table/row-actions/edit-action2.vue.js +145 -0
  26. package/dist/components/design-table/row-actions/index.js +36 -0
  27. package/dist/components/design-table/row-actions/modal-comb-action.vue.js +4 -0
  28. package/dist/components/design-table/row-actions/modal-comb-action2.vue.js +66 -0
  29. package/dist/components/design-table/row-actions/modal-custom-action.vue.js +7 -0
  30. package/dist/components/design-table/row-actions/modal-custom-action2.vue.js +105 -0
  31. package/dist/components/design-table/row-actions/modal-form-action.vue.js +4 -0
  32. package/dist/components/design-table/row-actions/modal-form-action2.vue.js +82 -0
  33. package/dist/components/design-table/row-actions/modal-table-action.vue.js +4 -0
  34. package/dist/components/design-table/row-actions/modal-table-action2.vue.js +67 -0
  35. package/dist/components/design-table/row-actions/modal-tree-action.vue.js +4 -0
  36. package/dist/components/design-table/row-actions/modal-tree-action2.vue.js +70 -0
  37. package/dist/components/design-table/row-actions/navigate-comb-action.vue.js +4 -0
  38. package/dist/components/design-table/row-actions/navigate-comb-action2.vue.js +47 -0
  39. package/dist/components/design-table/row-actions/navigate-form-action.vue.js +4 -0
  40. package/dist/components/design-table/row-actions/navigate-form-action2.vue.js +47 -0
  41. package/dist/components/design-table/row-actions/navigate-table-action.vue.js +4 -0
  42. package/dist/components/design-table/row-actions/navigate-table-action2.vue.js +47 -0
  43. package/dist/components/design-table/row-actions/navigate-tree-action.vue.js +4 -0
  44. package/dist/components/design-table/row-actions/navigate-tree-action2.vue.js +47 -0
  45. package/dist/components/design-table/row-actions/other-action.vue.js +4 -0
  46. package/dist/components/design-table/row-actions/other-action2.vue.js +44 -0
  47. package/dist/components/design-tools/add-tool.vue.js +4 -0
  48. package/dist/components/design-tools/add-tool2.vue.js +136 -0
  49. package/dist/components/design-tools/command-executor.js +135 -0
  50. package/dist/components/design-tools/export-tool.vue.js +4 -0
  51. package/dist/components/design-tools/export-tool2.vue.js +46 -0
  52. package/dist/components/design-tools/import-tool.vue.js +4 -0
  53. package/dist/components/design-tools/import-tool2.vue.js +101 -0
  54. package/dist/components/design-tools/index.js +36 -0
  55. package/dist/components/design-tools/modal-comb-tool.vue.js +4 -0
  56. package/dist/components/design-tools/modal-comb-tool2.vue.js +56 -0
  57. package/dist/components/design-tools/modal-form-tool.vue.js +4 -0
  58. package/dist/components/design-tools/modal-form-tool2.vue.js +66 -0
  59. package/dist/components/design-tools/modal-hcm-tool.vue.js +7 -0
  60. package/dist/components/design-tools/modal-hcm-tool2.vue.js +85 -0
  61. package/dist/components/design-tools/modal-table-tool.vue.js +4 -0
  62. package/dist/components/design-tools/modal-table-tool2.vue.js +54 -0
  63. package/dist/components/design-tools/modal-tree-tool.vue.js +4 -0
  64. package/dist/components/design-tools/modal-tree-tool2.vue.js +57 -0
  65. package/dist/components/design-tools/navigate-comb-tool.vue.js +4 -0
  66. package/dist/components/design-tools/navigate-comb-tool2.vue.js +34 -0
  67. package/dist/components/design-tools/navigate-form-tool.vue.js +4 -0
  68. package/dist/components/design-tools/navigate-form-tool2.vue.js +34 -0
  69. package/dist/components/design-tools/navigate-table-tool.vue.js +4 -0
  70. package/dist/components/design-tools/navigate-table-tool2.vue.js +33 -0
  71. package/dist/components/design-tools/other-tool.vue.js +4 -0
  72. package/dist/components/design-tools/other-tool2.vue.js +34 -0
  73. package/dist/components/flow-status-cell/flow-status-cell.vue.js +7 -0
  74. package/dist/components/flow-status-cell/flow-status-cell2.vue.js +124 -0
  75. package/dist/flow.js +22 -0
  76. package/dist/form/cell-condition.js +122 -0
  77. package/dist/form/derived-express.js +34 -0
  78. package/dist/form/design-form-inner.vue.js +7 -0
  79. package/dist/form/design-form-inner2.vue.js +449 -0
  80. package/dist/form/design-form.vue.js +7 -0
  81. package/dist/form/design-form2.vue.js +681 -0
  82. package/dist/form/fields/checkbox-field.vue.js +88 -0
  83. package/dist/form/fields/checkbox-field2.vue.js +4 -0
  84. package/dist/form/fields/custom-field.vue.js +36 -0
  85. package/dist/form/fields/custom-field2.vue.js +4 -0
  86. package/dist/form/fields/date-field.vue.js +64 -0
  87. package/dist/form/fields/date-field2.vue.js +4 -0
  88. package/dist/form/fields/embedded-list-field.vue.js +7 -0
  89. package/dist/form/fields/embedded-list-field2.vue.js +437 -0
  90. package/dist/form/fields/file-field.vue.js +88 -0
  91. package/dist/form/fields/file-field2.vue.js +4 -0
  92. package/dist/form/fields/image-field.vue.js +90 -0
  93. package/dist/form/fields/image-field2.vue.js +4 -0
  94. package/dist/form/fields/index.js +106 -0
  95. package/dist/form/fields/month-field.vue.js +51 -0
  96. package/dist/form/fields/month-field2.vue.js +4 -0
  97. package/dist/form/fields/org-select-field.vue.js +7 -0
  98. package/dist/form/fields/org-select-field2.vue.js +187 -0
  99. package/dist/form/fields/orgs-select-field.vue.js +182 -0
  100. package/dist/form/fields/orgs-select-field2.vue.js +4 -0
  101. package/dist/form/fields/radio-field.vue.js +91 -0
  102. package/dist/form/fields/radio-field2.vue.js +4 -0
  103. package/dist/form/fields/select-field.vue.js +7 -0
  104. package/dist/form/fields/select-field2.vue.js +317 -0
  105. package/dist/form/fields/splitline-field.vue.js +7 -0
  106. package/dist/form/fields/splitline-field2.vue.js +50 -0
  107. package/dist/form/fields/switch-field.vue.js +32 -0
  108. package/dist/form/fields/switch-field2.vue.js +4 -0
  109. package/dist/form/fields/text-field.vue.js +78 -0
  110. package/dist/form/fields/text-field2.vue.js +4 -0
  111. package/dist/form/fields/time-field.vue.js +50 -0
  112. package/dist/form/fields/time-field2.vue.js +4 -0
  113. package/dist/form/fields/tree-field.vue.js +157 -0
  114. package/dist/form/fields/tree-field2.vue.js +4 -0
  115. package/dist/form/number-precision.js +18 -0
  116. package/dist/form/transformer.js +162 -0
  117. package/dist/host.js +76 -0
  118. package/dist/http.js +19 -0
  119. package/dist/index.js +166 -0
  120. package/dist/mapping.js +44 -0
  121. package/dist/org/dept-api.js +30 -0
  122. package/dist/org/dept-tree-source.js +53 -0
  123. package/dist/org/dept-tree.js +122 -0
  124. package/dist/registry.js +77 -0
  125. package/dist/search/design-search.vue.js +7 -0
  126. package/dist/search/design-search2.vue.js +232 -0
  127. package/dist/search/transformer.js +115 -0
  128. package/dist/style.css +1220 -0
  129. package/dist/table/data.js +18 -0
  130. package/dist/table/load-gate.js +19 -0
  131. package/dist/table/query-body.js +59 -0
  132. package/dist/table/query-dedupe.js +54 -0
  133. package/dist/table/query-search.js +9 -0
  134. package/dist/table/row-action-mapping.js +34 -0
  135. package/dist/table/transformer.js +328 -0
  136. package/dist/tree/design-tree.vue.js +7 -0
  137. package/dist/tree/design-tree2.vue.js +783 -0
  138. package/dist/types/api.d.ts +83 -0
  139. package/dist/types/comb/design-comb.vue.d.ts +38 -0
  140. package/dist/types/compat.d.ts +46 -0
  141. package/dist/types/components/ApiSwitch.vue.d.ts +31 -0
  142. package/dist/types/components/design-debug/dev-mode-toggle.vue.d.ts +2 -0
  143. package/dist/types/components/design-debug/dev-mode.d.ts +8 -0
  144. package/dist/types/components/design-debug/dev-state-button.vue.d.ts +55 -0
  145. package/dist/types/components/design-debug/expr-eval.d.ts +55 -0
  146. package/dist/types/components/design-shared/host-api.d.ts +60 -0
  147. package/dist/types/components/design-shared/popup-host.d.ts +13 -0
  148. package/dist/types/components/design-table/design-table-inner.vue.d.ts +19 -0
  149. package/dist/types/components/design-table/design-table.vue.d.ts +70 -0
  150. package/dist/types/components/design-table/row-actions/delete-action.vue.d.ts +12 -0
  151. package/dist/types/components/design-table/row-actions/edit-action.vue.d.ts +14 -0
  152. package/dist/types/components/design-table/row-actions/index.d.ts +25 -0
  153. package/dist/types/components/design-table/row-actions/modal-comb-action.vue.d.ts +10 -0
  154. package/dist/types/components/design-table/row-actions/modal-custom-action.vue.d.ts +15 -0
  155. package/dist/types/components/design-table/row-actions/modal-form-action.vue.d.ts +10 -0
  156. package/dist/types/components/design-table/row-actions/modal-table-action.vue.d.ts +10 -0
  157. package/dist/types/components/design-table/row-actions/modal-tree-action.vue.d.ts +10 -0
  158. package/dist/types/components/design-table/row-actions/navigate-comb-action.vue.d.ts +10 -0
  159. package/dist/types/components/design-table/row-actions/navigate-form-action.vue.d.ts +10 -0
  160. package/dist/types/components/design-table/row-actions/navigate-table-action.vue.d.ts +10 -0
  161. package/dist/types/components/design-table/row-actions/navigate-tree-action.vue.d.ts +10 -0
  162. package/dist/types/components/design-table/row-actions/other-action.vue.d.ts +14 -0
  163. package/dist/types/components/design-tools/add-tool.vue.d.ts +23 -0
  164. package/dist/types/components/design-tools/command-executor.d.ts +80 -0
  165. package/dist/types/components/design-tools/export-tool.vue.d.ts +9 -0
  166. package/dist/types/components/design-tools/import-tool.vue.d.ts +14 -0
  167. package/dist/types/components/design-tools/index.d.ts +23 -0
  168. package/dist/types/components/design-tools/modal-comb-tool.vue.d.ts +12 -0
  169. package/dist/types/components/design-tools/modal-form-tool.vue.d.ts +12 -0
  170. package/dist/types/components/design-tools/modal-hcm-tool.vue.d.ts +23 -0
  171. package/dist/types/components/design-tools/modal-table-tool.vue.d.ts +12 -0
  172. package/dist/types/components/design-tools/modal-tree-tool.vue.d.ts +12 -0
  173. package/dist/types/components/design-tools/navigate-comb-tool.vue.d.ts +12 -0
  174. package/dist/types/components/design-tools/navigate-form-tool.vue.d.ts +11 -0
  175. package/dist/types/components/design-tools/navigate-table-tool.vue.d.ts +12 -0
  176. package/dist/types/components/design-tools/other-tool.vue.d.ts +16 -0
  177. package/dist/types/components/flow-status-cell/flow-status-cell.vue.d.ts +14 -0
  178. package/dist/types/components/index.d.ts +33 -0
  179. package/dist/types/flow.d.ts +50 -0
  180. package/dist/types/form/cell-condition.d.ts +35 -0
  181. package/dist/types/form/derived-express.d.ts +28 -0
  182. package/dist/types/form/design-form-inner.vue.d.ts +55 -0
  183. package/dist/types/form/design-form.vue.d.ts +96 -0
  184. package/dist/types/form/fields/checkbox-field.vue.d.ts +14 -0
  185. package/dist/types/form/fields/custom-field.vue.d.ts +22 -0
  186. package/dist/types/form/fields/date-field.vue.d.ts +12 -0
  187. package/dist/types/form/fields/embedded-list-field.vue.d.ts +26 -0
  188. package/dist/types/form/fields/file-field.vue.d.ts +12 -0
  189. package/dist/types/form/fields/image-field.vue.d.ts +12 -0
  190. package/dist/types/form/fields/index.d.ts +34 -0
  191. package/dist/types/form/fields/month-field.vue.d.ts +12 -0
  192. package/dist/types/form/fields/org-select-field.vue.d.ts +14 -0
  193. package/dist/types/form/fields/orgs-select-field.vue.d.ts +12 -0
  194. package/dist/types/form/fields/radio-field.vue.d.ts +14 -0
  195. package/dist/types/form/fields/select-field.vue.d.ts +14 -0
  196. package/dist/types/form/fields/splitline-field.vue.d.ts +7 -0
  197. package/dist/types/form/fields/switch-field.vue.d.ts +12 -0
  198. package/dist/types/form/fields/text-field.vue.d.ts +12 -0
  199. package/dist/types/form/fields/time-field.vue.d.ts +12 -0
  200. package/dist/types/form/fields/tree-field.vue.d.ts +12 -0
  201. package/dist/types/form/number-precision.d.ts +15 -0
  202. package/dist/types/form/transformer.d.ts +27 -0
  203. package/dist/types/host.d.ts +182 -0
  204. package/dist/types/http.d.ts +59 -0
  205. package/dist/types/index.d.ts +41 -0
  206. package/dist/types/mapping.d.ts +39 -0
  207. package/dist/types/org/dept-api.d.ts +12 -0
  208. package/dist/types/org/dept-tree-source.d.ts +15 -0
  209. package/dist/types/org/dept-tree.d.ts +62 -0
  210. package/dist/types/registry.d.ts +79 -0
  211. package/dist/types/search/design-search.vue.d.ts +46 -0
  212. package/dist/types/search/transformer.d.ts +36 -0
  213. package/dist/types/table/data.d.ts +30 -0
  214. package/dist/types/table/index.d.ts +20 -0
  215. package/dist/types/table/load-gate.d.ts +24 -0
  216. package/dist/types/table/query-body.d.ts +46 -0
  217. package/dist/types/table/query-dedupe.d.ts +42 -0
  218. package/dist/types/table/query-search.d.ts +21 -0
  219. package/dist/types/table/row-action-mapping.d.ts +36 -0
  220. package/dist/types/table/transformer.d.ts +59 -0
  221. package/dist/types/tree/design-tree.vue.d.ts +33 -0
  222. package/dist/types/types.d.ts +525 -0
  223. package/dist/types/utils/default-value.d.ts +16 -0
  224. package/dist/types/utils/download.d.ts +9 -0
  225. package/dist/types/utils/popup-width.d.ts +21 -0
  226. package/dist/utils/default-value.js +38 -0
  227. package/dist/utils/download.js +19 -0
  228. package/dist/utils/popup-width.js +19 -0
  229. package/package.json +73 -4
@@ -0,0 +1,59 @@
1
+ import type { PlatformTableConfig } from '../types';
2
+ /**
3
+ * 平台表格配置 → vxe-grid 配置(从宿主 `design-table/src/transformer.ts` 搬入)
4
+ *
5
+ * 迁移时只动了两处,其余逐字保留(行为对齐是验收标准):
6
+ * 1. `renderDict`(宿主 `#/utils/render`,依赖宿主的字典 store 与 DictTag 组件)改为
7
+ * **调用方注入** `TransformHost.renderDict`:字典属于宿主的业务数据,库不该也不可能有。
8
+ * 2. 取数走本库 `fetchTableData`(注入的 http),不再 import 宿主的 `api.ts`。
9
+ *
10
+ * 类型口径:`gridOptions` 刻意标成 `Record<string, any>` 而不是 `VxeGridProps`。
11
+ * 原因:`VxeGridProps` 在宿主里来自 `#/adapter/vxe-table`(= `@vben/plugins/vxe-table`),
12
+ * 那些包是 vben monorepo 的 **源码导出**(exports 直接指向 `./src/*.ts`),
13
+ * 发到 npm 的本库若在 .d.ts 里引用它,外部使用方就解析不到类型了。
14
+ * 用结构化宽类型换「装进任何 vben 项目都能编译」,vxe 侧的具体校验留给宿主。
15
+ */
16
+ /**
17
+ * 「自定义列」/「扩展包工具条 / 操作列」需要的宿主能力(2026-10-21)
18
+ *
19
+ * 由 design-table 注入而不是在模块里直接 import 字段注册中心:transformer 被 design-table 引用,
20
+ * 而字段注册中心(design-form 的 fields)里又间接引用了 design-table(内嵌列表),
21
+ * 直接 import 会把这条循环依赖钉死在模块初始化期。
22
+ */
23
+ export interface TransformHost {
24
+ /** 扩展列的平台能力(request / message / reload) */
25
+ getApi?: () => any;
26
+ /** 表格自身参数(扩展列渲染时用,取实时值) */
27
+ getParams?: () => Record<string, any>;
28
+ /**
29
+ * 合计行的值(2026-10-22):数据接口返回的 `summaries`,footerMethod 渲染时读取
30
+ */
31
+ getSummaries?: () => Record<string, any>;
32
+ /** 收到新的合计值(与数据同一次响应返回,先存起来再渲染 footer) */
33
+ onSummaries?: (summaries: Record<string, any>) => void;
34
+ /**
35
+ * 数据接口带回的运行时标题(2026-10-22):列表的标题表达式由后端求值,
36
+ * 随 pager 响应返回 `runtimeTitle`,这里回调给 design-table 抛 `update:title`。
37
+ */
38
+ onRuntimeTitle?: (title: string) => void;
39
+ /**
40
+ * 字典渲染(宿主注入):`formater: 'dict-XXX'` 的列用它把值翻成标签。
41
+ * 未注入时**降级为原值**并 warn 一次 —— 字典数据在宿主(`#/utils/render` 读宿主字典 store),
42
+ * 库里既没有数据也不能自建一份。
43
+ */
44
+ renderDict?: (value: any, dictName: string) => any;
45
+ /** 按 comname 解析扩展包组件(design-table 传 resolveCellComponent) */
46
+ resolveCustom?: (comname: string) => any;
47
+ }
48
+ export interface TransformTableResult {
49
+ /** 预留:查询表单配置(当前宿主实现恒为 false,表单由 search prop 提供) */
50
+ formOptions?: Record<string, any>;
51
+ /** vxe-grid 配置(宽类型,见文件头「类型口径」) */
52
+ gridOptions: Record<string, any>;
53
+ hasSearchForm: boolean;
54
+ isPager: boolean;
55
+ }
56
+ /**
57
+ * 将平台表格配置转换为 VXE-Grid 所需格式
58
+ */
59
+ export declare function transformTableConfig(config: PlatformTableConfig, tableHeight?: number | string, host?: TransformHost): TransformTableResult;
@@ -0,0 +1,33 @@
1
+ import type { DesignTableTool as TableTool, PlatformTreeViewConfig } from '../types';
2
+ type __VLS_Props = {
3
+ /** 模块分类 */
4
+ category?: string;
5
+ /** 配置名称 */
6
+ name?: string;
7
+ /** 直接传入配置(可选,跳过 API 请求) */
8
+ config?: PlatformTreeViewConfig | null;
9
+ /** 上游组件推过来的参数(其他组件跳转携带,如 deptId);与路由参数合并为组件自身 extraParams,并透传给关联目标 */
10
+ parentParams?: Record<string, any>;
11
+ /** dev 悬浮按钮距容器顶部距离(px);嵌套在其它设计组件内时下移,避免与父组件按钮重叠 */
12
+ devButtonTop?: number;
13
+ };
14
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
15
+ "config-loaded": (config: any) => any;
16
+ "update:title": (title: string) => any;
17
+ "tool-command": (tool: TableTool) => any;
18
+ "update:remarks": (remarks: string) => any;
19
+ "update:has-config": (hasConfig: boolean) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ "onConfig-loaded"?: ((config: any) => any) | undefined;
22
+ "onUpdate:title"?: ((title: string) => any) | undefined;
23
+ "onTool-command"?: ((tool: TableTool) => any) | undefined;
24
+ "onUpdate:remarks"?: ((remarks: string) => any) | undefined;
25
+ "onUpdate:has-config"?: ((hasConfig: boolean) => any) | undefined;
26
+ }>, {
27
+ name: string;
28
+ config: PlatformTreeViewConfig | null;
29
+ category: string;
30
+ parentParams: Record<string, any>;
31
+ devButtonTop: number;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ export default _default;
@@ -0,0 +1,525 @@
1
+ /**
2
+ * 配置契约类型(设计端 design-ui 保存、运行端渲染的那份 JSON 的**稳定子集**)
3
+ *
4
+ * 为什么要单独定义:这些类型是「设计端 / 后端快照 / 运行端」三方的公共语言,
5
+ * 属于本库对外的契约面。破坏性改动必须升大版本,并在 CHANGELOG 写清迁移方式。
6
+ */
7
+ /** 字段映射的一行:表达式求值结果 → 目标参数名 */
8
+ export interface DesignMapping {
9
+ /** 目标参数名(推送出去时用的键) */
10
+ paramName?: string;
11
+ /** 取值表达式,作用域由宿主提供(如 `params.deptId`、`node.deptId`) */
12
+ express?: string;
13
+ }
14
+ /** 列表工具条按钮(本库只用其中与映射有关的字段) */
15
+ export interface DesignTableTool {
16
+ /** 工具类型:add / export / navigate-* / modal-* / hcm-tool / other */
17
+ type?: string;
18
+ /** 按钮文案 */
19
+ title?: string;
20
+ /** 老版本的文案字段 */
21
+ label?: string;
22
+ /** 扩展组件名(type = hcm-tool 时用) */
23
+ comname?: string;
24
+ /** 弹窗宽度(px) */
25
+ modalWidth?: number | string;
26
+ /** 目标组件定位(跳转/弹窗类) */
27
+ targetCategory?: string;
28
+ targetFormCategory?: string;
29
+ targetFormName?: string;
30
+ targetTableCategory?: string;
31
+ targetTableName?: string;
32
+ targetComboCategory?: string;
33
+ targetComboName?: string;
34
+ /** 参数映射:作用域 → 目标参数 */
35
+ mappings?: DesignMapping[];
36
+ /** id 提取表达式(目标组件需要 source-id 时用) */
37
+ expressId?: string;
38
+ /** 允许设计端扩展任意字段,避免过窄的类型挡住真实配置 */
39
+ [key: string]: any;
40
+ }
41
+ /** 行操作「跳转/弹窗」的参数映射项:与 DesignMapping 同一形状(paramName + express) */
42
+ export type RowActionMapping = DesignMapping;
43
+ /** 行操作按钮配置 */
44
+ export interface RowAction {
45
+ /** 操作类型: edit=编辑, delete=删除, view=查看, other=自定义脚本 */
46
+ type: 'delete' | 'edit' | 'other' | 'view' | string;
47
+ /** 按钮文字 */
48
+ title: string;
49
+ /** edit/view: 目标表单分类 */
50
+ targetFormCategory?: string;
51
+ /** edit/view: 目标表单名称 */
52
+ targetFormName?: string;
53
+ /** edit/view: 表单抽屉宽度(默认 600px) */
54
+ formWidth?: number;
55
+ /** navigate-table: 目标表格分类(可选,默认沿用当前表格 category) */
56
+ targetTableCategory?: string;
57
+ /** navigate-table: 目标表格名称 */
58
+ targetTableName?: string;
59
+ /** navigate-combo: 目标组合视图分类(可选,默认沿用当前表格 category) */
60
+ targetComboCategory?: string;
61
+ /** navigate-combo: 目标组合视图名称 */
62
+ targetComboName?: string;
63
+ /** navigate-tree: 目标树形视图分类(可选,默认沿用当前表格 category) */
64
+ targetTreeCategory?: string;
65
+ /** navigate-tree: 目标树形视图名称 */
66
+ targetTreeName?: string;
67
+ /** navigate-*: 参数映射(跳转时传给目标视图的参数,作用域 params + row) */
68
+ mappings?: RowActionMapping[];
69
+ /**
70
+ * modal-custom: 弹窗里渲染的**业务组件名**(宿主注册表登记的名字,如 `employee-select`)。
71
+ * 解析走本库的 comname 注册表(见 registry.ts)。
72
+ */
73
+ comname?: string;
74
+ /** modal-custom: 弹窗宽度(px,默认 800) */
75
+ modalWidth?: number;
76
+ /** other: 需要执行的 JS 脚本(函数体,脚本内可直接访问 row/action/api) */
77
+ command?: string;
78
+ }
79
+ /** 平台表格列配置(content JSON 解析后的每一项) */
80
+ export interface PlatformColumn {
81
+ /** 列名:这一列在行数据里的名字(服务端反显写它、运行端读它)。留空 = 来源字段 */
82
+ name?: string;
83
+ /**
84
+ * 是否显示这一列:`false`(或 `0`/`'0'`/`'false'`)= 配置了但不渲染。
85
+ * 注意隐藏**不影响接口返回**:列上配的字段照样返回(行操作 mappings 可能要用),
86
+ * 少返回字段靠不配这一列 —— 后端按列配置裁剪 pager/list 的返回字段。缺省 = 显示。
87
+ */
88
+ isShow?: boolean | number | string;
89
+ /** 来源字段(数据字段):这一列从哪个字段取值 */
90
+ field?: string;
91
+ /** 列标题 */
92
+ title: string;
93
+ /** 列宽度,支持 "120" 或 "120:200:300"(width:minWidth:maxWidth) */
94
+ width?: string;
95
+ /** 列类型: seNo=序号, dataSelect=复选框 */
96
+ type?: 'dataSelect' | 'seNo' | string;
97
+ /** 格式化器/插槽名: action=操作列, dict-{code}=字典, file=文件, 其他=自定义slot */
98
+ formater?: string;
99
+ /** 固定列: left | right */
100
+ fixed?: string;
101
+ /** 行内编辑配置 JSON 字符串: {text_type, name, type, isneed, validate, ...} */
102
+ edit?: string;
103
+ }
104
+ /** 平台表格配置(API 返回的 config 对象) */
105
+ export interface PlatformTableConfig {
106
+ id: number;
107
+ name: string;
108
+ title: string;
109
+ /** JSON 字符串: PlatformColumn[] */
110
+ content: string;
111
+ /** 数据接口路径 */
112
+ url: string;
113
+ /** 是否分页: 1=分页, 0=不分页 */
114
+ pager: number;
115
+ /** 每页条数 */
116
+ pagesize: number;
117
+ /** 模块名 */
118
+ moduleName?: string;
119
+ /** 表名 */
120
+ tableName?: string;
121
+ /** 主键字段名(edittable 用) */
122
+ pfield?: string;
123
+ /** 表格列(从外部传入,直接使用) */
124
+ columns?: any[];
125
+ /** 工具栏按钮配置 */
126
+ toolBars?: DesignTableTool[];
127
+ /** 行操作按钮配置 */
128
+ rowActions?: RowAction[];
129
+ /** 删除接口 */
130
+ deleteUrl?: string;
131
+ /** 查看/编辑时加载表单数据的接口 */
132
+ showUrl?: string;
133
+ /** @deprecated 见宿主 RelationTextResolver:反显文本现在写在行数据的「列名」上 */
134
+ dataSets?: Record<string, any[]>;
135
+ /** 树组件:树数据接口地址 */
136
+ treeUrl?: string;
137
+ /** 树组件:选中树节点后注入表格查询的字段名(如 deptId) */
138
+ treeFilterField?: string;
139
+ /** 绑定的查询表单名称(渲染在表格上方,通过 category + 该 name 调 sform 接口拉取配置) */
140
+ searchForm?: null | string;
141
+ /**
142
+ * 查询参数(列表基本信息里配置的 JSON 对象,后端 design_tabledesign.query_params):
143
+ * 取数时并入请求体的 `params`(表达式 env,供动作条件里的 ${params.x} 取值),**不进 search**;
144
+ * 与运行时参数同名时**以配置为准**;空白/非法 JSON/非对象 → 忽略(见 parseConfigParams)。
145
+ */
146
+ queryParams?: null | Record<string, any> | string;
147
+ /**
148
+ * 附加配置(JSON 字符串或对象,后端 design_tabledesign.extra_config)。
149
+ * 约定键:
150
+ * - `query.when`:加载条件表达式(作用域 `search` / `params`),假值不加载;
151
+ * - `query.tip` :未满足时的提示文案。
152
+ */
153
+ extraConfig?: null | Record<string, any> | string;
154
+ }
155
+ /** 表格数据 API 响应(宿主拦截器已剥 `{code,data}`,这里按后端原始形状兼容读) */
156
+ export interface TableDataResponse {
157
+ code?: number;
158
+ datas?: any[];
159
+ message?: string;
160
+ records?: any[];
161
+ summaries?: Record<string, any>;
162
+ total?: number;
163
+ /** 运行时标题(后端按标题表达式求值,随 pager 响应返回) */
164
+ runtimeTitle?: string;
165
+ [key: string]: any;
166
+ }
167
+ /** 字典项(dicts 数组元素) */
168
+ export interface PlatformDictItem {
169
+ dictLabel: string;
170
+ dictValue: string;
171
+ dictType?: string;
172
+ dictCode?: number;
173
+ dictSort?: number;
174
+ isDefault?: string;
175
+ cssClass?: string;
176
+ listClass?: string;
177
+ default?: boolean;
178
+ remark?: string;
179
+ /** select_sql 查询场景:SQL 该行全部字段(树形/其它列直接取用) */
180
+ data?: Record<string, any>;
181
+ [key: string]: any;
182
+ }
183
+ /** cell 样式 */
184
+ export interface PlatformCellStyle {
185
+ fontColor?: null | string;
186
+ fontSize?: null | string;
187
+ fontFamily?: null | string;
188
+ bold?: boolean;
189
+ italic?: boolean;
190
+ underline?: null | string;
191
+ strikethrough?: null | string;
192
+ bgColor?: null | string;
193
+ colWidth?: number;
194
+ rowHeight?: number;
195
+ mergeColCount?: number;
196
+ mergeRowCount?: number;
197
+ border?: {
198
+ t?: {
199
+ s: number;
200
+ cl: {
201
+ rgb: string;
202
+ };
203
+ };
204
+ r?: {
205
+ s: number;
206
+ cl: {
207
+ rgb: string;
208
+ };
209
+ };
210
+ b?: {
211
+ s: number;
212
+ cl: {
213
+ rgb: string;
214
+ };
215
+ };
216
+ l?: {
217
+ s: number;
218
+ cl: {
219
+ rgb: string;
220
+ };
221
+ };
222
+ };
223
+ }
224
+ /** 平台表单字段 cell(content.cells 数组元素) */
225
+ export interface PlatformFormCell {
226
+ /** 行索引 */
227
+ row: number;
228
+ /** 列索引 */
229
+ col: number;
230
+ /** 标签标题(label 用 title,有 name 的才是字段) */
231
+ title: string;
232
+ /** 字段名(有 name 的是表单字段,无 name 的是纯标签/说明) */
233
+ name?: string;
234
+ /** 字段类型: text|select|date|month|time|tree|radio|checkbox|image|file|fj|switch|splitline|org-select|orgs-select|my */
235
+ type?: string;
236
+ /** 自定义组件名(构建端「类型=自定义」时填的名字,运行端按 comname 注册表解析) */
237
+ comname?: string;
238
+ /** 子类型: text=文本, number=数字, textarea=多行文本, password=密码 */
239
+ text_type?: string;
240
+ /** 小数位数(text_type=number 时用) */
241
+ decimalLen?: number | string;
242
+ /** 只读: "0"=可编辑, "1"=有值时只读, "2"=始终只读 */
243
+ readonly?: string;
244
+ /** 是否必填: "1"=必填 */
245
+ isneed?: string;
246
+ /** 正则校验表达式 */
247
+ validate?: string;
248
+ /** 备注说明:有值时单元格最右侧显示 ? 图标 */
249
+ remark?: string;
250
+ /** 选择项: "01| 男\n02| 女" 格式 */
251
+ select_options?: string;
252
+ /** 字典数据(select/checkbox/radio 用,优先于 select_options) */
253
+ dicts?: PlatformDictItem[];
254
+ /** 字典编码(tree 类型用) */
255
+ dict?: string;
256
+ /** 日期返回类型: "0"=时间戳 */
257
+ returnType?: string;
258
+ /** 日期类型: yyyy-MM-dd, yyyy-MM-dd HH:mm:ss 等 */
259
+ dateType?: string;
260
+ /** 后置文本 */
261
+ after?: string;
262
+ /** 前置文本 */
263
+ before?: string;
264
+ /** 隐藏条件表达式(历史遗留,运行端不消费;用 vif/vshow) */
265
+ hidd?: string;
266
+ /** 渲染条件(v-if 语义):假 → 不渲染输入组件但保留表格占位 */
267
+ vif?: string;
268
+ /** 显示条件(v-show 语义):假 → 照常渲染但不可见 */
269
+ vshow?: string;
270
+ /** 样式 */
271
+ style?: PlatformCellStyle;
272
+ /** 合并列数 */
273
+ mergeColCount?: number;
274
+ /** 合并行数 */
275
+ mergeRowCount?: number;
276
+ /** splitline: 分割线方向 */
277
+ orientation?: string;
278
+ /** splitline: 是否虚线 */
279
+ dashed?: number | string;
280
+ /** splitline: 是否正文样式 */
281
+ plain?: number | string;
282
+ /** 选项过滤表达式:row=选项整行,data=derivedValues 全量值空间 */
283
+ dictFilter?: string;
284
+ /** 派生赋值:本 cell 值变化后,把选中项的 source 属性赋给派生字段 field */
285
+ deriveTo?: Array<{
286
+ field: string;
287
+ source: string;
288
+ }>;
289
+ /** 绑定派生字段(依赖声明) */
290
+ bindDerived?: string;
291
+ /** 取值表达式(JS):派生值变化时求值并回填本 cell 的 name 字段 */
292
+ derivedExpress?: string;
293
+ /** 内嵌列表(embedded-list):引用的本模块列表 */
294
+ embeddedList?: {
295
+ module?: string;
296
+ name?: string;
297
+ title?: string;
298
+ };
299
+ /** 内嵌列表关系映射 */
300
+ mappings?: RowActionMapping[];
301
+ /** 内嵌列表数据区高度(px) */
302
+ embeddedHeight?: number;
303
+ }
304
+ /** 平台表单 content(JSON 解析后) */
305
+ export interface PlatformFormContent {
306
+ cells: PlatformFormCell[];
307
+ totalRow: number;
308
+ totalCol: number;
309
+ colWidths: number[];
310
+ rowHeights: number[];
311
+ }
312
+ /** 派生字段定义(表单维护「派生字段」弹窗配置) */
313
+ export interface PlatformDerivedField {
314
+ /** 派生字段名(= 数据库列名) */
315
+ name: string;
316
+ /** 标题 */
317
+ title?: string;
318
+ /** 类型 */
319
+ type?: string;
320
+ /** 来源声明(运行时派生值由组件 deriveTo emit,此字段仅说明) */
321
+ source?: string;
322
+ /** 是否随表单提交存库 */
323
+ persist?: boolean;
324
+ /** 是否只读 */
325
+ readonly?: boolean;
326
+ }
327
+ /** 平台表单配置(API 返回或前端传入) */
328
+ export interface PlatformFormConfig {
329
+ id: number;
330
+ name: string;
331
+ title: string;
332
+ /** JSON 字符串: PlatformFormContent(旧格式);新格式为 null,用 `config` */
333
+ content: null | string;
334
+ /** label 宽度 */
335
+ labelwidth: number;
336
+ /**
337
+ * 表单宽度(用于抽屉/弹窗)
338
+ * ⚠ 后端落库是字符串("800" / "" / "0"),运行端必须归一化成数字,
339
+ * 直接传 antd Drawer/Modal 会因类型非法被丢弃 → 面板 0px,只剩遮罩
340
+ */
341
+ width?: number | string;
342
+ /** 模块名 */
343
+ moduleName?: string;
344
+ /** 新增接口 */
345
+ insertUrl?: string;
346
+ /** 更新接口 */
347
+ updateUrl?: string;
348
+ /** 删除接口 */
349
+ deleteUrl?: string;
350
+ /** 查看接口 */
351
+ showUrl?: string;
352
+ /** 按参数查询接口(无 source-id 时带 extraParams 调它取单条) */
353
+ showByParamsUrl?: string;
354
+ /** 主键字段名 */
355
+ pfield?: string;
356
+ /** 变更回调 */
357
+ changecallback?: null | string;
358
+ /** 工具条 */
359
+ toolBars?: DesignTableTool[];
360
+ /** 新格式:直接包含 cells 对象 */
361
+ config?: null | PlatformFormContent;
362
+ /** 派生字段 */
363
+ derivedFieldList?: PlatformDerivedField[];
364
+ }
365
+ /** AMIS 页面组件 */
366
+ export interface PlatformViewComponent {
367
+ type: 'chart' | 'iframe' | 'tpl' | string;
368
+ id?: string;
369
+ tpl?: string;
370
+ wrapperComponent?: string;
371
+ inline?: boolean;
372
+ src?: string;
373
+ height?: string;
374
+ config?: Record<string, any>;
375
+ replaceChartOption?: boolean;
376
+ dataFilter?: string;
377
+ body?: PlatformViewComponent[];
378
+ }
379
+ /** 平台视图/页面配置(content JSON 解析后) */
380
+ export interface PlatformViewContent {
381
+ type: 'page';
382
+ body: PlatformViewComponent[];
383
+ id: string;
384
+ asideResizor?: boolean;
385
+ pullRefresh?: {
386
+ disabled: boolean;
387
+ };
388
+ }
389
+ /** 平台视图配置(API 返回的 config 对象) */
390
+ export interface PlatformViewConfig {
391
+ id: number;
392
+ name: string;
393
+ title: string;
394
+ /** JSON 字符串: PlatformViewContent */
395
+ content: string;
396
+ moduleName?: string;
397
+ toolBars?: DesignTableTool[];
398
+ }
399
+ /** 查询表单字段 cell(比表单 cell 简单) */
400
+ export interface SearchFieldCell {
401
+ /** 字段标签 */
402
+ title: string;
403
+ /** 字段名(查询参数名) */
404
+ name?: string;
405
+ /** 字段类型: text|select|date|time|tree|radio|checkbox 等 */
406
+ type?: string;
407
+ /** 只读: "0"=可编辑, "1"=有值时只读, "2"=始终只读 */
408
+ readonly?: string;
409
+ /** 子类型: text=文本, number=数字, textarea=多行文本 */
410
+ text_type?: string;
411
+ /** 选择项: "01| 男\n02| 女" 格式 */
412
+ select_options?: string;
413
+ /** 字典数据(select/radio/checkbox 用) */
414
+ dicts?: PlatformDictItem[];
415
+ /** 占位提示 */
416
+ placeholder?: string;
417
+ /** 是否必填 */
418
+ isneed?: string;
419
+ [key: string]: any;
420
+ }
421
+ /**
422
+ * 查询表单配置:二维数组,每个内层数组是一行,元素为该行的字段 cell。
423
+ * 示例: [[{ title: '名称', name: 'name', type: 'text' }]]
424
+ */
425
+ export type PlatformSearchConfig = SearchFieldCell[][];
426
+ /** 查询表单配置对象(sform 接口返回的结构) */
427
+ export interface SearchFormConfig {
428
+ /** 二维数组,每个内层数组是一行查询字段 */
429
+ cells: SearchFieldCell[][];
430
+ [key: string]: any;
431
+ }
432
+ /** 组合视图的单个渲染目标 */
433
+ export interface PlatformCombItem {
434
+ /** 渲染类型: form=表单, table=表格, view=视图 */
435
+ type: string;
436
+ /** 目标配置名称 */
437
+ name: string;
438
+ /** 目标分类(可选,为空时沿用组合视图自身的 category) */
439
+ module?: string;
440
+ /** Tab 标签文字 */
441
+ title?: string;
442
+ /** id 提取表达式(覆盖 comb 级别的 expressId) */
443
+ expressId?: string;
444
+ /** 字段映射:表达式作用域 params / data */
445
+ mappings?: RowActionMapping[];
446
+ [key: string]: any;
447
+ }
448
+ /** 组合视图配置(API 返回的 config 对象) */
449
+ export interface PlatformCombConfig {
450
+ id: number;
451
+ name: string;
452
+ title: string;
453
+ /** 待渲染目标数组(后端可能返回 JSON 字符串或已解析数组) */
454
+ config: PlatformCombItem[] | string;
455
+ /** 显示方式: tabs=左侧页签(默认) / flat=平铺上下堆叠 */
456
+ displayMode?: 'flat' | 'tabs';
457
+ /** 数据接口 URL:获取组合视图上下文数据(用于生成标题) */
458
+ dataUrl?: string;
459
+ /** 标题表达式:模板占位 ${字段名} */
460
+ expressTitle?: string;
461
+ /** id 提取表达式:模板占位 ${字段路径} */
462
+ expressId?: string;
463
+ /** 副标题 */
464
+ remarks?: string;
465
+ moduleName?: string;
466
+ [key: string]: any;
467
+ }
468
+ /** 树节点→关联目标参数的映射项 */
469
+ export interface PlatformTreeMapping {
470
+ /** 传给关联目标的参数名 */
471
+ paramName: string;
472
+ /** 映射表达式:作用域含 node(当前节点)、router(路由参数),如 node.dept_id */
473
+ express: string;
474
+ }
475
+ /**
476
+ * 树形视图「节点数量」配置(写进 design_tree_view.extra_config.nodeCount)。
477
+ * 发布时后端收敛成运行端要的展示参数,SQL / 数据集编码不下发;
478
+ * 取数统一走 `POST /design/treeView/nodeCount`。
479
+ */
480
+ export interface TreeNodeCountConfig {
481
+ /** 是否启用(后端只在启用时下发本对象) */
482
+ enabled?: boolean;
483
+ /** 取值方式:dataset=关联数据集 / sql=关联SQL(主库) */
484
+ mode?: 'dataset' | 'sql';
485
+ /** 关联字段:结果集里用来匹配节点的列 */
486
+ keyColumn?: string;
487
+ /** 值字段:数量所在列 */
488
+ valueColumn?: string;
489
+ /** 节点上取哪个字段做匹配值;留空 = node.key */
490
+ matchField?: string;
491
+ /** 未命中时显示什么(如 0);留空 = 不显示徽标 */
492
+ defaultValue?: string;
493
+ /** 数字后缀(如 人 / 条) */
494
+ suffix?: string;
495
+ /** 数量为 0 时是否隐藏 */
496
+ hideZero?: boolean;
497
+ }
498
+ /** 树形视图配置(API 返回的 config 对象) */
499
+ export interface PlatformTreeViewConfig {
500
+ id: number;
501
+ name: string;
502
+ title: string;
503
+ /** 绑定数据集编码(运行时先取配置,再按它调 /design/dataSet/* 加载树数据) */
504
+ dataSetName?: string;
505
+ /** @deprecated 树数据已不随配置返回,用 /design/dataSet/tree/sync 或 tree/async */
506
+ datas?: any[];
507
+ /** 关联类型: form=表单, table=表格, comboView=组合视图, tree=树形视图 */
508
+ relationType?: string;
509
+ /** 关联目标名称 */
510
+ relationTargetName?: string;
511
+ /** id 提取表达式(JS):作用域 node / params / router */
512
+ expressId?: string;
513
+ /** 描述文字(展示在页面标题下方) */
514
+ remarks?: string;
515
+ /** 节点→参数映射 */
516
+ mappings?: PlatformTreeMapping[];
517
+ /** 树宽度(px):左侧树面板初始宽度,可拖拽调整(本地记忆覆盖) */
518
+ treeWidth?: number;
519
+ /** 工具栏按钮配置 */
520
+ toolBars?: DesignTableTool[];
521
+ /** 节点数量:有值且 enabled=true → 树加载后按节点批量取数量 */
522
+ nodeCount?: null | TreeNodeCountConfig;
523
+ moduleName?: string;
524
+ [key: string]: any;
525
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 查询表单字段「默认值」解析(搬自宿主 `components/design/design-runtime/default-value.ts`)
3
+ *
4
+ * 约定(设计端「额外属性」里配):
5
+ * - `defaultNow = 1` → 当前时间:month 类型输出 `YYYY-MM`,其它日期类型按 `dateType`,兜底 `YYYY-MM-DD`
6
+ * - `defaultValue` → 固定默认值;支持 `${now}`(同上按类型格式化)与 `${now:YYYY/MM/DD}` 自定义格式
7
+ *
8
+ * 设计上刻意只支持这几种 token,**不跑任意 JS**:默认值来自配置,安全边界比"表达式"低一档。
9
+ */
10
+ /** 按格式串把日期拼出来(只支持 YYYY / MM / DD / HH / mm / ss,够用且无依赖) */
11
+ export declare function formatNow(format?: string, date?: Date): string;
12
+ /**
13
+ * 解析默认值:返回 undefined 表示"没有默认值"
14
+ * (调用方不要再写空串,否则会覆盖字段的真实空态)。
15
+ */
16
+ export declare function resolveDefaultValue(cell: null | Record<string, any> | undefined): any;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 文件下载工具(搬自宿主 `#/utils/file/download`,只取设计组件真正用到的部分)
3
+ *
4
+ * 导出类工具(`export`)走后端文件流,返回 Blob 后交给这里落盘。
5
+ * `downloadByBase64` / `downloadByOnlineUrl` 需要宿主的 base64 转换工具,本库用不到,未搬。
6
+ *
7
+ * 只在浏览器里可用(用到 `document` / `URL`),SSR 环境调用会抛错 —— 导出本来就是浏览器行为。
8
+ */
9
+ export declare function downloadByData(data: BlobPart, filename: string, mime?: string, bom?: BlobPart): void;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 弹层(抽屉/弹窗)宽度归一化(搬自宿主 `components/design/popup-width.ts`)
3
+ *
4
+ * 背景:构建端表单设计里的「宽度」落库是**字符串**(`design_formdesign.width`),
5
+ * 运行端拿到的是 `"800"` / `""` / `"0"` 这类值。而 antd `Drawer` 的 `width`
6
+ * 只接受 **number**:传字符串会被判定为非法值直接丢弃(控制台只报
7
+ * `Invalid value type of 'width' or 'height' which should be number type instead`),
8
+ * 抽屉面板宽度算成 `0px` —— 结果就是**只出现遮罩(整页变灰)、看不到抽屉和表单**。
9
+ *
10
+ * 所以凡是「配置宽度 → 弹层宽度」的地方,都要先过这里:
11
+ * 数字/数字字符串都能解析,非正数(0/负数)、空、非法值统一回退。
12
+ */
13
+ /** 弹层默认宽度(与构建端「未设置宽度」时的运行端默认保持一致) */
14
+ export declare const DEFAULT_POPUP_WIDTH = 600;
15
+ /** 解析单个宽度值:能解析成正数就返回整数,否则 undefined(0/空/非法都视为「没配」) */
16
+ export declare function toPopupWidth(raw: unknown): number | undefined;
17
+ /**
18
+ * 按优先级取第一个可用宽度(如 `cfg.width` → `tool.formWidth` → 默认 600)。
19
+ * 空字符串、`"0"`、`NaN`、`undefined` 都会被跳过,不会产出 0px 的隐形弹层。
20
+ */
21
+ export declare function resolvePopupWidth(...candidates: unknown[]): number;