sky-ui-kit 0.1.7 → 0.1.9

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 (38) hide show
  1. package/components.json +495 -8
  2. package/dist/components/AppSelect.vue.d.ts +7 -0
  3. package/dist/components/DefenseMapLayout.vue.d.ts +25 -3
  4. package/dist/components/ManagementResourceLayout.vue.d.ts +19 -0
  5. package/dist/components/MapBottomProcessPanel.vue.d.ts +11 -0
  6. package/dist/components/MapPageLayout.vue.d.ts +61 -0
  7. package/dist/components/MapTimeline.vue.d.ts +9 -0
  8. package/dist/components/MapWorkspacePanel.vue.d.ts +11 -1
  9. package/dist/components/ModelWorkspace.vue.d.ts +24 -0
  10. package/dist/components/ModelWorkspaceHeader.vue.d.ts +19 -0
  11. package/dist/components/ModelWorkspacePanel.vue.d.ts +32 -0
  12. package/dist/components/ProcessDataTable.vue.d.ts +9 -1
  13. package/dist/components/ProjectMenu.vue.d.ts +11 -0
  14. package/dist/components/WorkbenchPanel.vue.d.ts +9 -0
  15. package/dist/components/index.d.ts +485 -7
  16. package/dist/components.js +2494 -2233
  17. package/dist/entries/MapPageLayout.d.ts +1 -0
  18. package/dist/entries/MapPageLayout.js +10 -0
  19. package/dist/entries/ModelWorkspace.d.ts +1 -0
  20. package/dist/entries/ModelWorkspace.js +10 -0
  21. package/dist/entries/ModelWorkspaceHeader.d.ts +1 -0
  22. package/dist/entries/ModelWorkspaceHeader.js +10 -0
  23. package/dist/entries/ModelWorkspacePanel.d.ts +1 -0
  24. package/dist/entries/ModelWorkspacePanel.js +10 -0
  25. package/dist/model-workspace.css +47 -0
  26. package/dist/style.css +49 -1
  27. package/dist/utils/dimensions.d.ts +5 -0
  28. package/docs/AI-CHANGELOG.md +92 -0
  29. package/docs/AI-GUIDE.md +122 -9
  30. package/docs/COMPONENT-API.md +187 -1
  31. package/docs/COMPONENT-GUIDE.md +6 -0
  32. package/docs/CSS-THEME.md +44 -0
  33. package/docs/ELEMENT-PLUS-COVERAGE.md +1 -1
  34. package/docs/INTEGRATION.md +44 -0
  35. package/docs/MODEL-WORKSPACE.md +116 -0
  36. package/llms-full.txt +565 -12
  37. package/llms.txt +2 -1
  38. package/package.json +5 -3
@@ -0,0 +1,5 @@
1
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
2
+ export type DesignLength = number | string;
3
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength];
4
+ export declare function designLength(value: DesignLength): string;
5
+ export declare function designSpacing(value: DesignSpacing): string;
@@ -1,7 +1,45 @@
1
1
  # 团队 AI 模块变更记录
2
2
 
3
+ ## 2026-11-02 · 沿用原平台浮动区域层级
4
+
5
+ - MapPageLayout 对齐 metrics/TemplateLayout.vue 的聚焦 5、移入 6;沿用内容 1、普通区域 2、图例 3、工具栏 4,统一覆盖时间轴与右栏,保持透明工具间隙穿透与子面板随区域置顶。
6
+ - 同步文档与生成 API;未发包,未修改参考项目。
7
+
8
+ ## 2026-11-02 · 模块移入置顶
9
+
10
+ - 统一区域层级变量,区域子展开面板随模块置顶;限定普通内容层,透明工具间隙不拦截地图。
11
+ - 图例及底部外层移除滚动裁剪,预览新增模拟遮挡开关;未发布或修改消费项目。
12
+
13
+ ## 2026-11-02 · 按用户约定改用 VFit 缩放
14
+
15
+ - 撤回新增的 720px 容器断点、右侧抽屉、compact 属性/事件及会商单列重排;保持区域与列数,使用应用 VFit 尺寸变量。
16
+ - 会商网格移除 260px 最小行高,均分顶部操作区之外的剩余高度,消除该最小行高引起的内部滚动条;删除外壳固定 1px 尺寸覆盖。
17
+ - 同步预览说明、示例和行为检查。未构建、发包或修改消费项目布局。
18
+
19
+ ## 2026-11-02 · 完善地图布局行为(源码待用户预览)
20
+
21
+ - 导航直接显示 MapPageLayout 名称,开发指南增加地图布局直达入口,避免新组件沿用旧名称而难以查找。
22
+
23
+ - 新增 MapPageLayout,与旧 TemplateLayout 并行,旧接口不变;新布局仅负责区域排列,位置参数独立于业务类名。
24
+ - 增加实际容器宽度检测、非模态右侧覆盖面板、关闭事件、区域 hover / focus 层级和时间轴避让。
25
+ - DefenseMapLayout 新增可选 structured 模式、toolbar、列数与窄容器单列;默认保持原样式外壳。
26
+ - 预览支持宽窄容器、右栏和时间轴开关;同步接入、样式、组件指南与生成 API。未发布,未更新消费项目布局。
27
+
28
+ ## 2026-11-02 · 布局说明按三层重写(待用户预览确认)
29
+
30
+ - 开发指南新增“布局怎么选”直达入口(#layout-guide),避免说明藏在基础组件深层目录。
31
+
32
+ - 布局容器页新增“平台外壳 → 页面分区 → 局部面板”示意及按场景选择组件的说明,区分 WorkbenchShell、TemplateLayout、管理布局、面板与基础容器。
33
+ - 修正地图布局说明中的默认工具栏、遗漏 left 插槽及项目同名组件 API 混用;明确右栏受控条件和应用的地图生命周期责任。
34
+ - 同步 AI 指南并生成 AI 文档;未发布 npm,未更新消费项目布局。由用户在预览站确认文案后再安排发布。
35
+
3
36
  本文件记录源码模块调整与接入影响,不作为 npm 发布完成的依据。团队使用安装包时以包内文档及 package.json 版本为准;使用当前源码时读取仓库中的同名文档。
4
37
 
38
+ ## 2026-11-02 · 清理历史本地联调锁记录
39
+
40
+ - 删除 package-lock.json 中一体机消费项目的 extraneous 记录及其中旧 vendor tgz 引用;现有库依赖版本保持不变,未修改消费项目。
41
+ - 同步 AI 指南并重新生成 AI 文档;未构建、打包、发布或提交 Git。
42
+
5
43
  ## 2026-10-13 · 0.1.2 发布准备
6
44
 
7
45
  - 核对并重新生成组件 API、AI 指南、llms 索引和完整文档,包含项目图标、全局适配、独立常驻示例和导航调整。
@@ -389,3 +427,57 @@ SVG 图库从主入口移到可选 icons 入口,SvgIcon 不再自动注册;
389
427
  ## 2026-10-29 · 0.1.7 发布准备
390
428
 
391
429
  正式发布按需入口与可选图库,默认主题和组件 CSS 随 npm 包分发,无开发机样式依赖。构建前清理 dist 防止旧 chunk 混入;图标注册迁移见 ON-DEMAND.md。
430
+
431
+
432
+ ## 2026-10-30 · 四项目模型主题
433
+
434
+ 读取四个项目最终覆盖主题,提取蓝白/深蓝青绿 token、渐变标题与面板。新增三个隔离主题组件、显式原生表单适配和可复制示例。公共 CSS 合入 style.css;未构建、未发布。
435
+
436
+
437
+ ## 2026-10-30 · HTML / Vue 双接入文档
438
+
439
+ 新增独立 model-workspace.css 发布出口,原生 HTML 用 CSS 和结构类,Vue 用主题组件与公共 CSS。补齐两套完整示例、主题切换、事件绑定和部署路径说明,未构建发布。
440
+
441
+ ## 2026-11-02 · 0.1.8 发布准备
442
+
443
+ - 发布当前组件源码、按需入口及模型工作区主题;HTML 使用 model-workspace.css,Vue 使用组件与 style.css。清除旧消费项目锁记录。发布状态以 npm 注册表为准。
444
+
445
+
446
+
447
+ ## 2026-11-03:可配置 VFit 尺寸(源码待发布)
448
+
449
+ 数字尺寸代表设计单位,由组件转换为 `calc(var(--cp-font-1, 1px) * n)`;CSS 字符串原样使用,不额外注册 VFit 或 transform。DesignSpacing 支持单值及2/3/4项数组,遵循CSS间距顺序。0是有效值。调用方传裸字符串 `"12"` 不是合法CSS长度,应使用 `:gap="12"`;`"12px"` 是固定CSS像素。
450
+
451
+ 所有新增参数有默认值;下表空字符串表示使用组件现有布局/样式默认值,不是0。根style可控制组件根尺寸,内部内边距通过对应props调整,无需deep覆盖。
452
+
453
+ | 组件 | 参数与默认值 |
454
+ | --- | --- |
455
+ | MapPageLayout | 新增gap=12;已有rightPanelWidth=328、leftPanelWidth=320、edge=12等参数兼容字符串并支持数字;top/bottom/toolbar/timeline偏移默认空字符串,沿用自动避让 |
456
+ | DefenseMapLayout | gap=4、padding=4、toolbarGap=12、toolbarPadding=12;topOffset默认64设计单位,兼容数字/字符串 |
457
+ | MapWorkspacePanel | headerPadding=16、bodyPadding=16、footerPadding=[12,16]、gap=16 |
458
+ | ModelWorkspacePanel | headerPadding=[12,16]、bodyPadding=16、footerPadding=[12,16]、gap=12 |
459
+ | WorkbenchPanel | width='auto'、height='auto'、padding=0、gap=0;gap只在调用方使用flex/grid时产生间距,不强改display |
460
+ | ManagementResourceLayout | gap=20、padding=[0,24,20](内容区域)、introPadding=24、filterGap=20、filterPadding=[20,24]、inputWidth=260、selectWidth=160、cascaderWidth=280、responsive=false |
461
+ | AppSelect | width='100%'、controlHeight=''(按size取主题小/中/大高度)、controlPadding=[0,10];多选内容可增高;浮层不再设100%最小宽度,使用底层fit-input-width等配置 |
462
+ | ProjectMenu | width=''、itemHeight=''、itemPadding=''、padding=''(分别保留横/纵菜单已有默认值)、gap=2 |
463
+ | MapTimeline | padding=[10,12]、gap=9、trackHeight=88、controlHeight=30;不改变播放/时次数据API |
464
+ | MapBottomProcessPanel | height=320、maxHeight='42dvh'、headerPadding=[10,16]、metaPadding=[8,16,0]、gap=12 |
465
+ | ProcessDataTable | cellPadding=[6,10]、paginationGap=12、paginationPadding=5 |
466
+
467
+ ManagementResourceLayout默认按VFit保持结构,不在700px阈值自动切换;旧调用方如需原断点布局显式传responsive=true。这是需要在升级说明中说明的行为变化。其内容区域padding与介绍区padding分开,避免改变原默认留白。
468
+
469
+ 地图布局时间轴测量改为offsetHeight,使用布局坐标而非transform后的视口像素,防止再次乘入缩放系数。UiButton/UiSelect/UiTable等基础组件继续使用底层size、width、height及主题token,无重复同义接口。旧TemplateLayout保留兼容接口,不冒充MapPageLayout别名。
470
+
471
+ 示例:
472
+ ```vue
473
+ <MapWorkspacePanel title="降水统计" :header-padding="[12, 16]" :body-padding="[8, 12]" :gap="8">
474
+ 业务内容
475
+ </MapWorkspacePanel>
476
+ <MapPageLayout :right-panel-width="320" :edge="12" :gap="8" />
477
+ ```
478
+ 预览入口:MapPageLayout布局演示,点击“查看紧凑尺寸”比较右栏宽度、边距与面板内边距。其他组件参数与默认值可在生成API查询。当前未构建、打包、发布或浏览器验证,用户预览确认后自行发版。
479
+
480
+ ## 2026-11-03 · 0.1.9 发布准备
481
+
482
+ - 将当前布局、面板、尺寸适配与主题调整纳入新版,重新生成 AI 文档并检查组件包。发布结果以 npm 注册表为准。
483
+
package/docs/AI-GUIDE.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # sky-ui-kit:AI 使用指南
2
2
 
3
+ MapPageLayout 沿用参考项目 D:/Work/01-项目code/一体化平台/webv1/src/components/layout/TemplateLayout.vue 的 1/2/3/4/5/6 层级约定,并补齐底部时间轴和右侧面板。层级按区域统一管理:鼠标移入 left/top/toolbar/right/legend/timeline 时提升整个区域到 hover 层,优先于 focus-within;子展开面板随所属区域一起提升,移出后恢复。普通 content 限定在底层独立堆叠上下文,透明工具间隙穿透地图。图例和时间轴外层不再 overflow:auto 裁剪浮层;长内容滚动由内部业务组件负责。Teleport 到 body 的浮层仍由组件自身管理层级。预览“模拟模块遮挡”可核对重叠交互;完全被覆盖的部分不接收鼠标,应从模块可见区域移入。
4
+
5
+ ## 新地图布局行为(源码待预览,尚未发布)
6
+
7
+ 预览入口:开发指南 → MapPageLayout 地图布局(#project-template-layout);基础组件 → 布局容器下也显示“地图布局 · MapPageLayout”,支持按组件名搜索。
8
+
9
+ 新页面优先用 MapPageLayout;旧 TemplateLayout 保持接口及业务样式兼容,并非两者 API 的别名。MapPageLayout 不携带任何依赖 rainfall-process、地图标题或分析面板类名的定位规则。消费方使用 topOffset / bottomOffset / toolbarTop / timelineLeft / timelineRight / timelineBottom / edge 配置位置。
10
+
11
+ rightOpen 与 rightPanelEnabled、right 插槽共同决定右栏显示。区域关系固定,右栏打开时工具栏、图例及时间轴始终避让。按用户约定移除 compactBreakpoint / compactRightMode / compact-change:不按 720px 容器宽度切抽屉或重排。尺寸由消费项目注册的 VFit 写入 --cp-vfit-scale,再经 --cp-font-1 等变量传入;库不重复注册 VFit,不额外 transform 缩放。
12
+
13
+ 默认区域层级 2、图例 3、工具栏 4;键盘 focus-within 为 5,鼠标 hover 为 6。时间轴高度通过 timeline-height 通知,图例自动避让;监听在卸载释放。
14
+
15
+ DefenseMapLayout 默认 structured=false 保留原样式壳。structured=true 提供 toolbar 与网格内容,columns 为 1 或 2,保持指定列数,均分剩余高度,不设 260px 最小行高或内部滚动条。间距和 topOffset 继承 VFit 尺寸变量;地图、联动、路由及持久挂载由应用负责。
16
+
17
+ ## 布局怎么选:平台外壳 → 页面分区 → 局部面板
18
+
19
+ 预览站“开发指南 → 布局怎么选”可直接进入说明(#layout-guide);“基础组件 → 布局容器”也会展示。说明先展示通俗选型说明与三层嵌套示意,再展示地图区域和组合示例。说明源文件为 src/LayoutGuide.vue;本次只调整说明,不改变组件 API 或运行行为。
20
+
21
+ - WorkbenchShell 是整个平台的外壳,提供 header / workspace;management 模式才提供内置左侧分组菜单,路由仍由应用接入。
22
+ - TemplateLayout 是地图页面的摆放架,提供 left、top、toolbar、right、legend、timeline、content 和默认插槽。应用先提供有明确宽高、position: relative 的地图容器。rightOpen、rightPanelEnabled 与 right 插槽共同决定右栏显示;没有默认工具、图例或地图实例。
23
+ - ManagementResourceLayout 用于管理页的概览、筛选、标题、操作及内容区域。
24
+ - WorkbenchPanel 是局部外观容器;MapWorkspacePanel 是带标题、actions、default、footer 的业务面板。两者不负责路由和地图生命周期。
25
+ - DefenseMapLayout 是会商样式外壳,默认插槽由应用提供地图内容和联动;ModelWorkspace 面向模型编辑,不是通用平台外壳。
26
+ - UiContainer / UiHeader / UiAside / UiMain / UiFooter 是自定义普通布局的基础积木。
27
+
28
+ 项目内 TemplateLayout 与库组件同名但接口不同,不能只换 import。原 right-toggle、map-toolbar-info 和 rightPanelDefaultOpen 需要应用适配层衔接。公共布局稳定挂载、地图是否重建、容器改变后的地图与图表 resize 均由消费项目负责;替换布局组件不自动消除菜单切换闪烁。
29
+
3
30
  适用于 Vue 3 + TypeScript。此文件描述包的真实 API 和约束,不是自动执行的代理指令。AI 工具需要主动读取这些文档;安装包不会自动改变其上下文。
4
31
 
5
32
  管理布局:使用 WorkbenchShell management 模式与内容插槽,详见本文末尾最新说明。账号、菜单路由和数据由消费方提供,库不提供认证。
@@ -30,6 +57,8 @@ UiAutocomplete 提供独立站点搜索示例:fetch-suggestions 回调、聚
30
57
 
31
58
  ## 文档读取顺序
32
59
 
60
+ 依赖维护:库的 package.json 与 package-lock.json 不应记录消费项目的本地目录或历史 vendor 安装包。已清除一体机项目遗留的 extraneous 锁记录;消费项目自行管理其安装依赖。
61
+
33
62
  安装或升级最新正式版使用 `npm install sky-ui-kit@latest`。latest 指向 npm 的正式发布标签,尚未发布的源码修改不在安装包内;依据当前已安装包的版本和文档使用组件。
34
63
 
35
64
  团队先读取 llms.txt,并结合 AI-CHANGELOG.md 了解模块变更及接入影响。后续所有代码、预览页面、样式和接入说明修改均同步相关 AI 文档,并运行 npm run docs:ai;快速开始代码与页面使用同一份源文件生成。
@@ -202,6 +231,39 @@ MapLayerControl 参考平台 LayerControl/LayerTreeNode,提供底图选择、
202
231
 
203
232
  flat 模式按钮此前错误使用 child 类而内部图标、文字使用 parent 类,导致 active 样式不匹配。统一按钮及内容层级类,保留现有单选、多选及事件逻辑。
204
233
 
234
+ ## 2026-11-03:可配置 VFit 尺寸(源码待发布)
235
+
236
+ 数字尺寸代表设计单位,由组件转换为 `calc(var(--cp-font-1, 1px) * n)`;CSS 字符串原样使用,不额外注册 VFit 或 transform。DesignSpacing 支持单值及2/3/4项数组,遵循CSS间距顺序。0是有效值。调用方传裸字符串 `"12"` 不是合法CSS长度,应使用 `:gap="12"`;`"12px"` 是固定CSS像素。
237
+
238
+ 所有新增参数有默认值;下表空字符串表示使用组件现有布局/样式默认值,不是0。根style可控制组件根尺寸,内部内边距通过对应props调整,无需deep覆盖。
239
+
240
+ | 组件 | 参数与默认值 |
241
+ | --- | --- |
242
+ | MapPageLayout | 新增gap=12;已有rightPanelWidth=328、leftPanelWidth=320、edge=12等参数兼容字符串并支持数字;top/bottom/toolbar/timeline偏移默认空字符串,沿用自动避让 |
243
+ | DefenseMapLayout | gap=4、padding=4、toolbarGap=12、toolbarPadding=12;topOffset默认64设计单位,兼容数字/字符串 |
244
+ | MapWorkspacePanel | headerPadding=16、bodyPadding=16、footerPadding=[12,16]、gap=16 |
245
+ | ModelWorkspacePanel | headerPadding=[12,16]、bodyPadding=16、footerPadding=[12,16]、gap=12 |
246
+ | WorkbenchPanel | width='auto'、height='auto'、padding=0、gap=0;gap只在调用方使用flex/grid时产生间距,不强改display |
247
+ | ManagementResourceLayout | gap=20、padding=[0,24,20](内容区域)、introPadding=24、filterGap=20、filterPadding=[20,24]、inputWidth=260、selectWidth=160、cascaderWidth=280、responsive=false |
248
+ | AppSelect | width='100%'、controlHeight=''(按size取主题小/中/大高度)、controlPadding=[0,10];多选内容可增高;浮层不再设100%最小宽度,使用底层fit-input-width等配置 |
249
+ | ProjectMenu | width=''、itemHeight=''、itemPadding=''、padding=''(分别保留横/纵菜单已有默认值)、gap=2 |
250
+ | MapTimeline | padding=[10,12]、gap=9、trackHeight=88、controlHeight=30;不改变播放/时次数据API |
251
+ | MapBottomProcessPanel | height=320、maxHeight='42dvh'、headerPadding=[10,16]、metaPadding=[8,16,0]、gap=12 |
252
+ | ProcessDataTable | cellPadding=[6,10]、paginationGap=12、paginationPadding=5 |
253
+
254
+ ManagementResourceLayout默认按VFit保持结构,不在700px阈值自动切换;旧调用方如需原断点布局显式传responsive=true。这是需要在升级说明中说明的行为变化。其内容区域padding与介绍区padding分开,避免改变原默认留白。
255
+
256
+ 地图布局时间轴测量改为offsetHeight,使用布局坐标而非transform后的视口像素,防止再次乘入缩放系数。UiButton/UiSelect/UiTable等基础组件继续使用底层size、width、height及主题token,无重复同义接口。旧TemplateLayout保留兼容接口,不冒充MapPageLayout别名。
257
+
258
+ 示例:
259
+ ```vue
260
+ <MapWorkspacePanel title="降水统计" :header-padding="[12, 16]" :body-padding="[8, 12]" :gap="8">
261
+ 业务内容
262
+ </MapWorkspacePanel>
263
+ <MapPageLayout :right-panel-width="320" :edge="12" :gap="8" />
264
+ ```
265
+ 预览入口:MapPageLayout布局演示,点击“查看紧凑尺寸”比较右栏宽度、边距与面板内边距。其他组件参数与默认值可在生成API查询。当前未构建、打包、发布或浏览器验证,用户预览确认后自行发版。
266
+
205
267
  <!-- GENERATED EXAMPLES -->
206
268
 
207
269
  ### 快速开始:安装最新正式版本
@@ -945,20 +1007,45 @@ const items = [{ key: 'overview', label: '运行概览' }, { key: 'data', label:
945
1007
  ```vue
946
1008
  <script setup lang="ts">
947
1009
  import { ref } from 'vue'
948
- import { TemplateLayout, UiButton, MapTools, WorkbenchPanel } from 'sky-ui-kit'
1010
+ import { MapPageLayout, DefenseMapLayout, UiButton, MapTools, WorkbenchPanel, MapWorkspacePanel } from 'sky-ui-kit'
949
1011
  const rightOpen = ref(true)
1012
+ const showTimeline = ref(true)
1013
+ const overlap = ref(false)
1014
+ const compactDimensions = ref(false)
950
1015
  </script>
951
1016
  <template>
952
- <div style="position: relative; height: 460px">
953
- <TemplateLayout :right-open="rightOpen">
954
- <template #top><UiButton @click="rightOpen = !rightOpen">{{ rightOpen ? '收起右栏' : '展开右栏' }}</UiButton></template>
955
- <template #toolbar><MapTools :items="[{ key: 'layers', label: '图层' }]" /></template>
956
- <template #right><WorkbenchPanel style="height: 100%">right · 业务面板</WorkbenchPanel></template>
957
- <template #legend>legend · 图例</template>
958
- <template #timeline>timeline · 时间轴</template>
959
- </TemplateLayout>
1017
+ <div class="layout-demo-controls">
1018
+ <UiButton @click="compactDimensions = !compactDimensions">{{ compactDimensions ? '切回默认尺寸' : '查看紧凑尺寸' }}</UiButton>
1019
+ <UiButton @click="rightOpen = !rightOpen">{{ rightOpen ? '收起右栏' : '展开右栏' }}</UiButton>
1020
+ <UiButton @click="showTimeline = !showTimeline">{{ showTimeline ? '隐藏时间轴' : '显示时间轴' }}</UiButton>
1021
+ <UiButton @click="overlap = !overlap">{{ overlap ? '恢复正常避让' : '模拟模块遮挡' }}</UiButton>
1022
+ </div>
1023
+ <div class="layout-demo-map" >
1024
+ <MapPageLayout v-model:right-open="rightOpen" :gap="compactDimensions ? 6 : 12" :edge="compactDimensions ? 6 : 12" :right-panel-width="compactDimensions ? 280 : 328" :timeline-right="overlap ? 'var(--map-layout-edge)' : ''">
1025
+ <template #top><span>地图标题 / 查询区域</span></template>
1026
+ <template #toolbar><MapTools :items="[{ key: 'layers', label: '图层' }]" /><WorkbenchPanel v-if="overlap" class="layout-demo-expanded">右上展开面板<br>鼠标移入时整个工具区域置顶</WorkbenchPanel></template>
1027
+ <template #right><MapWorkspacePanel title="可配置面板" :header-padding="compactDimensions ? [8, 12] : 16" :body-padding="compactDimensions ? [8, 12] : 16" :gap="compactDimensions ? 8 : 16">数字为 VFit 设计尺寸;默认值无需重复传入。<template #footer>鼠标移入当前区域时置顶</template></MapWorkspacePanel></template>
1028
+ <template #legend><WorkbenchPanel :class="{ 'layout-demo-overlap-legend': overlap }">图例 · 鼠标移入置顶</WorkbenchPanel></template>
1029
+ <template v-if="showTimeline" #timeline><WorkbenchPanel class="layout-demo-timeline">时间轴 / 过程图区域 · 鼠标移入置顶</WorkbenchPanel></template>
1030
+ </MapPageLayout>
1031
+ </div>
1032
+ <p>尺寸参数:数字自动跟随 VFit,数组为上/右/下/左间距,CSS 字符串原样使用。例如 :body-padding="[8, 12]"、:gap="8"。</p>
1033
+ <h3>会商布局 · 顶部操作区 + 四个地图位置</h3>
1034
+ <p>以下仅展示区域,不创建地图。保持两列布局,尺寸沿用 VFit 缩放变量;四个地图位置均分剩余高度,不产生内部滚动条。</p>
1035
+ <div class="layout-demo-map" >
1036
+ <DefenseMapLayout structured top-offset="0" :columns="2">
1037
+ <template #toolbar>时次选择 / 设置按钮放在这里</template>
1038
+ <WorkbenchPanel v-for="index in 4" :key="index">地图位置 {{ index }} · 由页面提供地图宿主</WorkbenchPanel>
1039
+ </DefenseMapLayout>
960
1040
  </div>
961
1041
  </template>
1042
+ <style scoped>
1043
+ .layout-demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
1044
+ .layout-demo-map { position: relative; height: calc(var(--cp-font-1, 1px) * 460); border: 1px dashed var(--color-soft-border); background: var(--surface-control); }
1045
+ .layout-demo-expanded { position: absolute; right: 0; top: calc(var(--cp-font-1, 1px) * 40); width: calc(var(--cp-font-1, 1px) * 260); height: calc(var(--cp-font-1, 1px) * 300); box-sizing: border-box; border: 1px solid var(--color-soft-border); background: var(--color-panel); }
1046
+ .layout-demo-overlap-legend { transform: translateY(calc(var(--cp-font-1, 1px) * 50)); background: var(--color-panel); border: 1px solid var(--color-soft-border); }
1047
+ .layout-demo-timeline { min-height: calc(var(--cp-font-1, 1px) * 90); background: var(--color-panel); border: 1px solid var(--color-soft-border); }
1048
+ </style>
962
1049
 
963
1050
  ```
964
1051
 
@@ -2938,3 +3025,29 @@ const items = [{ key: 'rain', label: '降水', icon: Pouring }, { key: 'water',
2938
3025
  </style>
2939
3026
 
2940
3027
  ```
3028
+
3029
+ ### 模型工作区统一主题示例
3030
+
3031
+ ```vue
3032
+ <script setup lang="ts">
3033
+ import { ref } from 'vue'
3034
+ import { ModelWorkspace, ModelWorkspaceHeader, ModelWorkspacePanel, UiButton, UiInput } from 'sky-ui-kit'
3035
+ const theme = ref<'light' | 'dark'>('light')
3036
+ const name = ref('汉口站')
3037
+ const message = ref('等待配置')
3038
+ </script>
3039
+ <template>
3040
+ <ModelWorkspace :theme="theme" native-controls>
3041
+ <template #header><ModelWorkspaceHeader title="模型计算工作区" description="分布式水文 / 水资源配置 / 新安江 / LSTM 共用主题">
3042
+ <template #actions><UiButton @click="theme = theme === 'light' ? 'dark' : 'light'">切换主题</UiButton></template>
3043
+ </ModelWorkspaceHeader></template>
3044
+ <ModelWorkspacePanel title="模型配置">
3045
+ <UiInput v-model="name" placeholder="测站名称" />
3046
+ <p>原生控件逐步迁移时,可显式启用 native-controls。</p>
3047
+ <button type="button" class="primary" @click="message = '执行配置:' + name">原生操作示例</button>
3048
+ <template #footer><span role="status">{{ message }}</span><UiButton @click="message = '保存配置由使用方接入'">保存配置</UiButton></template>
3049
+ </ModelWorkspacePanel>
3050
+ </ModelWorkspace>
3051
+ </template>
3052
+
3053
+ ```
@@ -27,6 +27,9 @@ Slots: No declared content slots.
27
27
 
28
28
  | Name | Type | Required | Default expression |
29
29
  |---|---|---|---|
30
+ | width | DesignLength | false | '100%' |
31
+ | controlHeight | DesignLength | false | '' |
32
+ | controlPadding | DesignSpacing | false | () => [0, 10] |
30
33
  | modelValue | AppSelectValue | false | undefined |
31
34
  | options | AppSelectOption[] | false | () => [] |
32
35
  | emptyLabel | string | false | '暂无可选项' |
@@ -41,6 +44,10 @@ Slots: No declared content slots.
41
44
  Slots: No declared content slots.
42
45
 
43
46
  ```ts
47
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
48
+ export type DesignLength = number | string
49
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
50
+
44
51
  export type AppSelectValue = string | number | boolean | Record<string, unknown> | AppSelectValue[] | null | undefined
45
52
  export type AppSelectOption = {
46
53
  label: string
@@ -55,6 +62,10 @@ export type AppSelectOption = {
55
62
 
56
63
  | Name | Type | Required | Default expression |
57
64
  |---|---|---|---|
65
+ | padding | DesignSpacing | false | () => [10, 12] |
66
+ | gap | DesignLength | false | 9 |
67
+ | trackHeight | DesignLength | false | 88 |
68
+ | controlHeight | DesignLength | false | 30 |
58
69
  | modelValue | number | false | 0 |
59
70
  | startTime | TimelineTimeInput | false | () => new Date() |
60
71
  | points | TimelinePoint[] | false | () => [] |
@@ -89,6 +100,10 @@ export type AppSelectOption = {
89
100
  Slots: date-select
90
101
 
91
102
  ```ts
103
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
104
+ export type DesignLength = number | string
105
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
106
+
92
107
  type IntervalUnit = 'minute' | 'hour' | 'day' | 'month' | 'year'
93
108
  type TimelineKind = 'observed' | 'forecast'
94
109
  type TimelineTimeInput = string | number | Date
@@ -178,6 +193,11 @@ export type TimeRangeQuickOption = {
178
193
 
179
194
  | Name | Type | Required | Default expression |
180
195
  |---|---|---|---|
196
+ | width | DesignLength | false | '' |
197
+ | itemHeight | DesignLength | false | '' |
198
+ | itemPadding | DesignSpacing | false | '' |
199
+ | padding | DesignSpacing | false | '' |
200
+ | gap | DesignLength | false | 2 |
181
201
  | direction | 'horizontal' &#124; 'vertical' | false | 'horizontal' |
182
202
  | active | string | false | '' |
183
203
  | items | ProjectMenuItem[] | false | () => [] |
@@ -191,6 +211,10 @@ export type TimeRangeQuickOption = {
191
211
  Slots: No declared content slots.
192
212
 
193
213
  ```ts
214
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
215
+ export type DesignLength = number | string
216
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
217
+
194
218
  export interface ProjectMenuItem { key: string; label: string; disabled?: boolean; icon?: Component; children?: ProjectMenuItem[] }
195
219
  export interface ProjectMenuGroup { label: string; items: ProjectMenuItem[] }
196
220
  ```
@@ -298,6 +322,9 @@ Slots: No declared content slots.
298
322
  | times | string[] | true | undefined / no declared default |
299
323
  | series | { name: string; data: (number &#124; null)[] }[] | true | undefined / no declared default |
300
324
  | loading | boolean | false | undefined / no declared default |
325
+ | cellPadding | DesignSpacing | false | () => [6, 10] |
326
+ | paginationGap | DesignLength | false | 12 |
327
+ | paginationPadding | DesignSpacing | false | 5 |
301
328
 
302
329
  ### Events
303
330
 
@@ -305,6 +332,13 @@ No declared events.
305
332
 
306
333
  Slots: No declared content slots.
307
334
 
335
+ ```ts
336
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
337
+ export type DesignLength = number | string
338
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
339
+
340
+ ```
341
+
308
342
  ## WorkbenchShell
309
343
 
310
344
  ### Props
@@ -332,6 +366,10 @@ Slots: header, sidebar-footer, workspace, default
332
366
  |---|---|---|---|
333
367
  | as | 'section' &#124; 'aside' &#124; 'div' | false | 'section' |
334
368
  | floating | boolean | false | true |
369
+ | width | DesignLength | false | 'auto' |
370
+ | height | DesignLength | false | 'auto' |
371
+ | padding | DesignSpacing | false | 0 |
372
+ | gap | DesignLength | false | 0 |
335
373
 
336
374
  ### Events
337
375
 
@@ -339,6 +377,13 @@ No declared events.
339
377
 
340
378
  Slots: default
341
379
 
380
+ ```ts
381
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
382
+ export type DesignLength = number | string
383
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
384
+
385
+ ```
386
+
342
387
  ## MetricCard
343
388
 
344
389
  ### Props
@@ -437,6 +482,39 @@ export interface MapLayerNode { id: string; name: string; visible?: boolean; opa
437
482
 
438
483
  Slots: left, top, toolbar, right, legend, timeline, content, default
439
484
 
485
+ ## MapPageLayout
486
+
487
+ ### Props
488
+
489
+ | Name | Type | Required | Default expression |
490
+ |---|---|---|---|
491
+ | gap | DesignLength | false | 12 |
492
+ | rightOpen | boolean | false | false |
493
+ | rightPanelEnabled | boolean | false | true |
494
+ | rightPanelWidth | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 328)' |
495
+ | leftPanelWidth | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 320)' |
496
+ | edge | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 12)' |
497
+ | topOffset | DesignLength | false | '' |
498
+ | bottomOffset | DesignLength | false | '' |
499
+ | toolbarTop | DesignLength | false | '' |
500
+ | timelineLeft | DesignLength | false | '' |
501
+ | timelineRight | DesignLength | false | '' |
502
+ | timelineBottom | DesignLength | false | '' |
503
+
504
+ ### Events
505
+
506
+ - `update:rightOpen` — `[open: boolean]`
507
+ - `timeline-height` — `[height: number]`
508
+
509
+ Slots: left, top, toolbar, right, legend, timeline, content, default
510
+
511
+ ```ts
512
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
513
+ export type DesignLength = number | string
514
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
515
+
516
+ ```
517
+
440
518
  ## RainfallRankingTable
441
519
 
442
520
  ### Props
@@ -775,6 +853,15 @@ Slots: message, primary, default, footer
775
853
  | title | string | false | undefined / no declared default |
776
854
  | description | string | false | undefined / no declared default |
777
855
  | showIntro | boolean | false | true |
856
+ | gap | DesignLength | false | 20 |
857
+ | padding | DesignSpacing | false | () => [0, 24, 20] |
858
+ | introPadding | DesignSpacing | false | 24 |
859
+ | filterGap | DesignLength | false | 20 |
860
+ | filterPadding | DesignSpacing | false | () => [20, 24] |
861
+ | inputWidth | DesignLength | false | 260 |
862
+ | selectWidth | DesignLength | false | 160 |
863
+ | cascaderWidth | DesignLength | false | 280 |
864
+ | responsive | boolean | false | false |
778
865
 
779
866
  ### Events
780
867
 
@@ -782,6 +869,13 @@ No declared events.
782
869
 
783
870
  Slots: summary, filters, heading, actions, default
784
871
 
872
+ ```ts
873
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
874
+ export type DesignLength = number | string
875
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
876
+
877
+ ```
878
+
785
879
  ## GlobalMapLayerDock
786
880
 
787
881
  ### Props
@@ -847,6 +941,11 @@ Slots: footer
847
941
 
848
942
  | Name | Type | Required | Default expression |
849
943
  |---|---|---|---|
944
+ | height | DesignLength | false | 320 |
945
+ | maxHeight | DesignLength | false | '42dvh' |
946
+ | headerPadding | DesignSpacing | false | ()=>[10,16] |
947
+ | metaPadding | DesignSpacing | false | ()=>[8,16,0] |
948
+ | gap | DesignLength | false | 12 |
850
949
  | title | string | true | undefined / no declared default |
851
950
  | subtitle | string | false | '' |
852
951
  | demo | boolean | false | false |
@@ -862,6 +961,13 @@ Slots: footer
862
961
 
863
962
  Slots: No declared content slots.
864
963
 
964
+ ```ts
965
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
966
+ export type DesignLength = number | string
967
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
968
+
969
+ ```
970
+
865
971
  ## MapWorkspacePanel
866
972
 
867
973
  ### Props
@@ -870,6 +976,10 @@ Slots: No declared content slots.
870
976
  |---|---|---|---|
871
977
  | title | string | true | undefined / no declared default |
872
978
  | subtitle | string | false | undefined / no declared default |
979
+ | headerPadding | DesignSpacing | false | 16 |
980
+ | bodyPadding | DesignSpacing | false | 16 |
981
+ | footerPadding | DesignSpacing | false | () => [12, 16] |
982
+ | gap | DesignLength | false | 16 |
873
983
 
874
984
  ### Events
875
985
 
@@ -877,6 +987,13 @@ No declared events.
877
987
 
878
988
  Slots: actions, default, footer
879
989
 
990
+ ```ts
991
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
992
+ export type DesignLength = number | string
993
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
994
+
995
+ ```
996
+
880
997
  ## NationalHydroSidebar
881
998
 
882
999
  ### Props
@@ -944,12 +1061,81 @@ Slots: No declared content slots.
944
1061
 
945
1062
  | Name | Type | Required | Default expression |
946
1063
  |---|---|---|---|
1064
+ | structured | boolean | false | false |
1065
+ | columns | 1 &#124; 2 | false | 2 |
1066
+ | gap | DesignLength | false | 4 |
1067
+ | padding | DesignSpacing | false | 4 |
1068
+ | toolbarGap | DesignLength | false | 12 |
1069
+ | toolbarPadding | DesignSpacing | false | 12 |
1070
+ | topOffset | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 64)' |
947
1071
 
948
1072
  ### Events
949
1073
 
950
1074
  No declared events.
951
1075
 
952
- Slots: default
1076
+ Slots: toolbar, default
1077
+
1078
+ ```ts
1079
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
1080
+ export type DesignLength = number | string
1081
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
1082
+
1083
+ ```
1084
+
1085
+ ## ModelWorkspace
1086
+
1087
+ ### Props
1088
+
1089
+ | Name | Type | Required | Default expression |
1090
+ |---|---|---|---|
1091
+ | theme | 'light' &#124; 'dark' | false | 'light' |
1092
+ | nativeControls | boolean | false | false |
1093
+
1094
+ ### Events
1095
+
1096
+ No declared events.
1097
+
1098
+ Slots: header, default, footer
1099
+
1100
+ ## ModelWorkspaceHeader
1101
+
1102
+ ### Props
1103
+
1104
+ | Name | Type | Required | Default expression |
1105
+ |---|---|---|---|
1106
+ | title | string | true | undefined / no declared default |
1107
+ | description | string | false | undefined / no declared default |
1108
+
1109
+ ### Events
1110
+
1111
+ No declared events.
1112
+
1113
+ Slots: title, actions
1114
+
1115
+ ## ModelWorkspacePanel
1116
+
1117
+ ### Props
1118
+
1119
+ | Name | Type | Required | Default expression |
1120
+ |---|---|---|---|
1121
+ | title | string | false | undefined / no declared default |
1122
+ | headerPadding | DesignSpacing | false | () => [12, 16] |
1123
+ | bodyPadding | DesignSpacing | false | 16 |
1124
+ | footerPadding | DesignSpacing | false | () => [12, 16] |
1125
+ | gap | DesignLength | false | 12 |
1126
+
1127
+ ### Events
1128
+
1129
+ No declared events.
1130
+
1131
+ Slots: header, actions, default, footer
1132
+
1133
+ ```ts
1134
+ /** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
1135
+ export type DesignLength = number | string
1136
+ export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
1137
+
1138
+ ```
953
1139
 
954
1140
  ## UiAffix
955
1141
 
@@ -1,5 +1,11 @@
1
1
  # 组件使用说明
2
2
 
3
+ ## 布局选择(当前源码)
4
+
5
+ WorkbenchShell 管平台外壳;MapPageLayout 管地图上的区域;WorkbenchPanel / MapWorkspacePanel 装具体业务内容。旧 TemplateLayout 保留历史行为,新页面建议 MapPageLayout,不能直接按同名接口替换。MapPageLayout 使用 v-model:right-open;保持区域关系,右栏打开时其他浮动区域避让,尺寸沿用应用的 VFit 变量,不提供按宽度切换抽屉的断点。它不创建地图,不自动解决路由重新挂载。
6
+
7
+ DefenseMapLayout 默认是旧样式外壳;structured=true 启用顶部 toolbar 和 columns=1/2 网格,保持指定列数并均分剩余高度,不设最小行高撑出内部滚动条。默认插槽传各幅地图宿主,应用管理地图实例和联动。
8
+
3
9
  本指南说明当前包已导出的 11 个项目组件的用途、数据约定和交互边界。完整属性类型、默认值、事件签名和插槽列表见 [组件 API](COMPONENT-API.md);完整示例见 [AI-GUIDE](AI-GUIDE.md)。原项目组件清单中的文件不一定已经进入本包,以 `src/components/index.ts` 和 `components.json` 为准。
4
10
 
5
11
  ## SvgIcon 与原项目适配