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.
- package/components.json +495 -8
- package/dist/components/AppSelect.vue.d.ts +7 -0
- package/dist/components/DefenseMapLayout.vue.d.ts +25 -3
- package/dist/components/ManagementResourceLayout.vue.d.ts +19 -0
- package/dist/components/MapBottomProcessPanel.vue.d.ts +11 -0
- package/dist/components/MapPageLayout.vue.d.ts +61 -0
- package/dist/components/MapTimeline.vue.d.ts +9 -0
- package/dist/components/MapWorkspacePanel.vue.d.ts +11 -1
- package/dist/components/ModelWorkspace.vue.d.ts +24 -0
- package/dist/components/ModelWorkspaceHeader.vue.d.ts +19 -0
- package/dist/components/ModelWorkspacePanel.vue.d.ts +32 -0
- package/dist/components/ProcessDataTable.vue.d.ts +9 -1
- package/dist/components/ProjectMenu.vue.d.ts +11 -0
- package/dist/components/WorkbenchPanel.vue.d.ts +9 -0
- package/dist/components/index.d.ts +485 -7
- package/dist/components.js +2494 -2233
- package/dist/entries/MapPageLayout.d.ts +1 -0
- package/dist/entries/MapPageLayout.js +10 -0
- package/dist/entries/ModelWorkspace.d.ts +1 -0
- package/dist/entries/ModelWorkspace.js +10 -0
- package/dist/entries/ModelWorkspaceHeader.d.ts +1 -0
- package/dist/entries/ModelWorkspaceHeader.js +10 -0
- package/dist/entries/ModelWorkspacePanel.d.ts +1 -0
- package/dist/entries/ModelWorkspacePanel.js +10 -0
- package/dist/model-workspace.css +47 -0
- package/dist/style.css +49 -1
- package/dist/utils/dimensions.d.ts +5 -0
- package/docs/AI-CHANGELOG.md +92 -0
- package/docs/AI-GUIDE.md +122 -9
- package/docs/COMPONENT-API.md +187 -1
- package/docs/COMPONENT-GUIDE.md +6 -0
- package/docs/CSS-THEME.md +44 -0
- package/docs/ELEMENT-PLUS-COVERAGE.md +1 -1
- package/docs/INTEGRATION.md +44 -0
- package/docs/MODEL-WORKSPACE.md +116 -0
- package/llms-full.txt +565 -12
- package/llms.txt +2 -1
- package/package.json +5 -3
package/llms-full.txt
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# sky-ui-kit
|
|
2
2
|
|
|
3
|
-
> Vue 3 components compatible with Element Plus, project menus, timeline and map tools. Version 0.1.
|
|
3
|
+
> Vue 3 components compatible with Element Plus, project menus, timeline and map tools. Version 0.1.9. AI tools must explicitly load these files.
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
7
7
|
- [Consumers](docs/CONSUMERS.md): shared project convention and local integration.
|
|
8
8
|
- [AI guide](docs/AI-GUIDE.md): setup, examples, icon/event bindings and limits.
|
|
9
9
|
- [Component API](docs/COMPONENT-API.md): props, defaults, events, slots and types.
|
|
10
|
+
- [Model workspace](docs/MODEL-WORKSPACE.md): shared theme and native control migration.
|
|
10
11
|
- [On-demand imports](docs/ON-DEMAND.md): per-component entries and remaining CSS/icon limits.
|
|
11
12
|
- [AI module changes](docs/AI-CHANGELOG.md): module updates and integration impact.
|
|
12
13
|
- [Project usage](docs/COMPONENT-USAGE.md): current source usage counts and call sites.
|
|
@@ -26,6 +27,33 @@ Import element-plus/dist/index.css then sky-ui-kit/style.css once in main.ts. Im
|
|
|
26
27
|
|
|
27
28
|
# sky-ui-kit:AI 使用指南
|
|
28
29
|
|
|
30
|
+
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 的浮层仍由组件自身管理层级。预览“模拟模块遮挡”可核对重叠交互;完全被覆盖的部分不接收鼠标,应从模块可见区域移入。
|
|
31
|
+
|
|
32
|
+
## 新地图布局行为(源码待预览,尚未发布)
|
|
33
|
+
|
|
34
|
+
预览入口:开发指南 → MapPageLayout 地图布局(#project-template-layout);基础组件 → 布局容器下也显示“地图布局 · MapPageLayout”,支持按组件名搜索。
|
|
35
|
+
|
|
36
|
+
新页面优先用 MapPageLayout;旧 TemplateLayout 保持接口及业务样式兼容,并非两者 API 的别名。MapPageLayout 不携带任何依赖 rainfall-process、地图标题或分析面板类名的定位规则。消费方使用 topOffset / bottomOffset / toolbarTop / timelineLeft / timelineRight / timelineBottom / edge 配置位置。
|
|
37
|
+
|
|
38
|
+
rightOpen 与 rightPanelEnabled、right 插槽共同决定右栏显示。区域关系固定,右栏打开时工具栏、图例及时间轴始终避让。按用户约定移除 compactBreakpoint / compactRightMode / compact-change:不按 720px 容器宽度切抽屉或重排。尺寸由消费项目注册的 VFit 写入 --cp-vfit-scale,再经 --cp-font-1 等变量传入;库不重复注册 VFit,不额外 transform 缩放。
|
|
39
|
+
|
|
40
|
+
默认区域层级 2、图例 3、工具栏 4;键盘 focus-within 为 5,鼠标 hover 为 6。时间轴高度通过 timeline-height 通知,图例自动避让;监听在卸载释放。
|
|
41
|
+
|
|
42
|
+
DefenseMapLayout 默认 structured=false 保留原样式壳。structured=true 提供 toolbar 与网格内容,columns 为 1 或 2,保持指定列数,均分剩余高度,不设 260px 最小行高或内部滚动条。间距和 topOffset 继承 VFit 尺寸变量;地图、联动、路由及持久挂载由应用负责。
|
|
43
|
+
|
|
44
|
+
## 布局怎么选:平台外壳 → 页面分区 → 局部面板
|
|
45
|
+
|
|
46
|
+
预览站“开发指南 → 布局怎么选”可直接进入说明(#layout-guide);“基础组件 → 布局容器”也会展示。说明先展示通俗选型说明与三层嵌套示意,再展示地图区域和组合示例。说明源文件为 src/LayoutGuide.vue;本次只调整说明,不改变组件 API 或运行行为。
|
|
47
|
+
|
|
48
|
+
- WorkbenchShell 是整个平台的外壳,提供 header / workspace;management 模式才提供内置左侧分组菜单,路由仍由应用接入。
|
|
49
|
+
- TemplateLayout 是地图页面的摆放架,提供 left、top、toolbar、right、legend、timeline、content 和默认插槽。应用先提供有明确宽高、position: relative 的地图容器。rightOpen、rightPanelEnabled 与 right 插槽共同决定右栏显示;没有默认工具、图例或地图实例。
|
|
50
|
+
- ManagementResourceLayout 用于管理页的概览、筛选、标题、操作及内容区域。
|
|
51
|
+
- WorkbenchPanel 是局部外观容器;MapWorkspacePanel 是带标题、actions、default、footer 的业务面板。两者不负责路由和地图生命周期。
|
|
52
|
+
- DefenseMapLayout 是会商样式外壳,默认插槽由应用提供地图内容和联动;ModelWorkspace 面向模型编辑,不是通用平台外壳。
|
|
53
|
+
- UiContainer / UiHeader / UiAside / UiMain / UiFooter 是自定义普通布局的基础积木。
|
|
54
|
+
|
|
55
|
+
项目内 TemplateLayout 与库组件同名但接口不同,不能只换 import。原 right-toggle、map-toolbar-info 和 rightPanelDefaultOpen 需要应用适配层衔接。公共布局稳定挂载、地图是否重建、容器改变后的地图与图表 resize 均由消费项目负责;替换布局组件不自动消除菜单切换闪烁。
|
|
56
|
+
|
|
29
57
|
适用于 Vue 3 + TypeScript。此文件描述包的真实 API 和约束,不是自动执行的代理指令。AI 工具需要主动读取这些文档;安装包不会自动改变其上下文。
|
|
30
58
|
|
|
31
59
|
管理布局:使用 WorkbenchShell management 模式与内容插槽,详见本文末尾最新说明。账号、菜单路由和数据由消费方提供,库不提供认证。
|
|
@@ -56,6 +84,8 @@ UiAutocomplete 提供独立站点搜索示例:fetch-suggestions 回调、聚
|
|
|
56
84
|
|
|
57
85
|
## 文档读取顺序
|
|
58
86
|
|
|
87
|
+
依赖维护:库的 package.json 与 package-lock.json 不应记录消费项目的本地目录或历史 vendor 安装包。已清除一体机项目遗留的 extraneous 锁记录;消费项目自行管理其安装依赖。
|
|
88
|
+
|
|
59
89
|
安装或升级最新正式版使用 `npm install sky-ui-kit@latest`。latest 指向 npm 的正式发布标签,尚未发布的源码修改不在安装包内;依据当前已安装包的版本和文档使用组件。
|
|
60
90
|
|
|
61
91
|
团队先读取 llms.txt,并结合 AI-CHANGELOG.md 了解模块变更及接入影响。后续所有代码、预览页面、样式和接入说明修改均同步相关 AI 文档,并运行 npm run docs:ai;快速开始代码与页面使用同一份源文件生成。
|
|
@@ -228,6 +258,39 @@ MapLayerControl 参考平台 LayerControl/LayerTreeNode,提供底图选择、
|
|
|
228
258
|
|
|
229
259
|
flat 模式按钮此前错误使用 child 类而内部图标、文字使用 parent 类,导致 active 样式不匹配。统一按钮及内容层级类,保留现有单选、多选及事件逻辑。
|
|
230
260
|
|
|
261
|
+
## 2026-11-03:可配置 VFit 尺寸(源码待发布)
|
|
262
|
+
|
|
263
|
+
数字尺寸代表设计单位,由组件转换为 `calc(var(--cp-font-1, 1px) * n)`;CSS 字符串原样使用,不额外注册 VFit 或 transform。DesignSpacing 支持单值及2/3/4项数组,遵循CSS间距顺序。0是有效值。调用方传裸字符串 `"12"` 不是合法CSS长度,应使用 `:gap="12"`;`"12px"` 是固定CSS像素。
|
|
264
|
+
|
|
265
|
+
所有新增参数有默认值;下表空字符串表示使用组件现有布局/样式默认值,不是0。根style可控制组件根尺寸,内部内边距通过对应props调整,无需deep覆盖。
|
|
266
|
+
|
|
267
|
+
| 组件 | 参数与默认值 |
|
|
268
|
+
| --- | --- |
|
|
269
|
+
| MapPageLayout | 新增gap=12;已有rightPanelWidth=328、leftPanelWidth=320、edge=12等参数兼容字符串并支持数字;top/bottom/toolbar/timeline偏移默认空字符串,沿用自动避让 |
|
|
270
|
+
| DefenseMapLayout | gap=4、padding=4、toolbarGap=12、toolbarPadding=12;topOffset默认64设计单位,兼容数字/字符串 |
|
|
271
|
+
| MapWorkspacePanel | headerPadding=16、bodyPadding=16、footerPadding=[12,16]、gap=16 |
|
|
272
|
+
| ModelWorkspacePanel | headerPadding=[12,16]、bodyPadding=16、footerPadding=[12,16]、gap=12 |
|
|
273
|
+
| WorkbenchPanel | width='auto'、height='auto'、padding=0、gap=0;gap只在调用方使用flex/grid时产生间距,不强改display |
|
|
274
|
+
| ManagementResourceLayout | gap=20、padding=[0,24,20](内容区域)、introPadding=24、filterGap=20、filterPadding=[20,24]、inputWidth=260、selectWidth=160、cascaderWidth=280、responsive=false |
|
|
275
|
+
| AppSelect | width='100%'、controlHeight=''(按size取主题小/中/大高度)、controlPadding=[0,10];多选内容可增高;浮层不再设100%最小宽度,使用底层fit-input-width等配置 |
|
|
276
|
+
| ProjectMenu | width=''、itemHeight=''、itemPadding=''、padding=''(分别保留横/纵菜单已有默认值)、gap=2 |
|
|
277
|
+
| MapTimeline | padding=[10,12]、gap=9、trackHeight=88、controlHeight=30;不改变播放/时次数据API |
|
|
278
|
+
| MapBottomProcessPanel | height=320、maxHeight='42dvh'、headerPadding=[10,16]、metaPadding=[8,16,0]、gap=12 |
|
|
279
|
+
| ProcessDataTable | cellPadding=[6,10]、paginationGap=12、paginationPadding=5 |
|
|
280
|
+
|
|
281
|
+
ManagementResourceLayout默认按VFit保持结构,不在700px阈值自动切换;旧调用方如需原断点布局显式传responsive=true。这是需要在升级说明中说明的行为变化。其内容区域padding与介绍区padding分开,避免改变原默认留白。
|
|
282
|
+
|
|
283
|
+
地图布局时间轴测量改为offsetHeight,使用布局坐标而非transform后的视口像素,防止再次乘入缩放系数。UiButton/UiSelect/UiTable等基础组件继续使用底层size、width、height及主题token,无重复同义接口。旧TemplateLayout保留兼容接口,不冒充MapPageLayout别名。
|
|
284
|
+
|
|
285
|
+
示例:
|
|
286
|
+
```vue
|
|
287
|
+
<MapWorkspacePanel title="降水统计" :header-padding="[12, 16]" :body-padding="[8, 12]" :gap="8">
|
|
288
|
+
业务内容
|
|
289
|
+
</MapWorkspacePanel>
|
|
290
|
+
<MapPageLayout :right-panel-width="320" :edge="12" :gap="8" />
|
|
291
|
+
```
|
|
292
|
+
预览入口:MapPageLayout布局演示,点击“查看紧凑尺寸”比较右栏宽度、边距与面板内边距。其他组件参数与默认值可在生成API查询。当前未构建、打包、发布或浏览器验证,用户预览确认后自行发版。
|
|
293
|
+
|
|
231
294
|
<!-- GENERATED EXAMPLES -->
|
|
232
295
|
|
|
233
296
|
### 快速开始:安装最新正式版本
|
|
@@ -971,20 +1034,45 @@ const items = [{ key: 'overview', label: '运行概览' }, { key: 'data', label:
|
|
|
971
1034
|
```vue
|
|
972
1035
|
<script setup lang="ts">
|
|
973
1036
|
import { ref } from 'vue'
|
|
974
|
-
import {
|
|
1037
|
+
import { MapPageLayout, DefenseMapLayout, UiButton, MapTools, WorkbenchPanel, MapWorkspacePanel } from 'sky-ui-kit'
|
|
975
1038
|
const rightOpen = ref(true)
|
|
1039
|
+
const showTimeline = ref(true)
|
|
1040
|
+
const overlap = ref(false)
|
|
1041
|
+
const compactDimensions = ref(false)
|
|
976
1042
|
</script>
|
|
977
1043
|
<template>
|
|
978
|
-
<div
|
|
979
|
-
<
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1044
|
+
<div class="layout-demo-controls">
|
|
1045
|
+
<UiButton @click="compactDimensions = !compactDimensions">{{ compactDimensions ? '切回默认尺寸' : '查看紧凑尺寸' }}</UiButton>
|
|
1046
|
+
<UiButton @click="rightOpen = !rightOpen">{{ rightOpen ? '收起右栏' : '展开右栏' }}</UiButton>
|
|
1047
|
+
<UiButton @click="showTimeline = !showTimeline">{{ showTimeline ? '隐藏时间轴' : '显示时间轴' }}</UiButton>
|
|
1048
|
+
<UiButton @click="overlap = !overlap">{{ overlap ? '恢复正常避让' : '模拟模块遮挡' }}</UiButton>
|
|
1049
|
+
</div>
|
|
1050
|
+
<div class="layout-demo-map" >
|
|
1051
|
+
<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)' : ''">
|
|
1052
|
+
<template #top><span>地图标题 / 查询区域</span></template>
|
|
1053
|
+
<template #toolbar><MapTools :items="[{ key: 'layers', label: '图层' }]" /><WorkbenchPanel v-if="overlap" class="layout-demo-expanded">右上展开面板<br>鼠标移入时整个工具区域置顶</WorkbenchPanel></template>
|
|
1054
|
+
<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>
|
|
1055
|
+
<template #legend><WorkbenchPanel :class="{ 'layout-demo-overlap-legend': overlap }">图例 · 鼠标移入置顶</WorkbenchPanel></template>
|
|
1056
|
+
<template v-if="showTimeline" #timeline><WorkbenchPanel class="layout-demo-timeline">时间轴 / 过程图区域 · 鼠标移入置顶</WorkbenchPanel></template>
|
|
1057
|
+
</MapPageLayout>
|
|
1058
|
+
</div>
|
|
1059
|
+
<p>尺寸参数:数字自动跟随 VFit,数组为上/右/下/左间距,CSS 字符串原样使用。例如 :body-padding="[8, 12]"、:gap="8"。</p>
|
|
1060
|
+
<h3>会商布局 · 顶部操作区 + 四个地图位置</h3>
|
|
1061
|
+
<p>以下仅展示区域,不创建地图。保持两列布局,尺寸沿用 VFit 缩放变量;四个地图位置均分剩余高度,不产生内部滚动条。</p>
|
|
1062
|
+
<div class="layout-demo-map" >
|
|
1063
|
+
<DefenseMapLayout structured top-offset="0" :columns="2">
|
|
1064
|
+
<template #toolbar>时次选择 / 设置按钮放在这里</template>
|
|
1065
|
+
<WorkbenchPanel v-for="index in 4" :key="index">地图位置 {{ index }} · 由页面提供地图宿主</WorkbenchPanel>
|
|
1066
|
+
</DefenseMapLayout>
|
|
986
1067
|
</div>
|
|
987
1068
|
</template>
|
|
1069
|
+
<style scoped>
|
|
1070
|
+
.layout-demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
|
|
1071
|
+
.layout-demo-map { position: relative; height: calc(var(--cp-font-1, 1px) * 460); border: 1px dashed var(--color-soft-border); background: var(--surface-control); }
|
|
1072
|
+
.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); }
|
|
1073
|
+
.layout-demo-overlap-legend { transform: translateY(calc(var(--cp-font-1, 1px) * 50)); background: var(--color-panel); border: 1px solid var(--color-soft-border); }
|
|
1074
|
+
.layout-demo-timeline { min-height: calc(var(--cp-font-1, 1px) * 90); background: var(--color-panel); border: 1px solid var(--color-soft-border); }
|
|
1075
|
+
</style>
|
|
988
1076
|
|
|
989
1077
|
```
|
|
990
1078
|
|
|
@@ -2965,10 +3053,74 @@ const items = [{ key: 'rain', label: '降水', icon: Pouring }, { key: 'water',
|
|
|
2965
3053
|
|
|
2966
3054
|
```
|
|
2967
3055
|
|
|
3056
|
+
### 模型工作区统一主题示例
|
|
3057
|
+
|
|
3058
|
+
```vue
|
|
3059
|
+
<script setup lang="ts">
|
|
3060
|
+
import { ref } from 'vue'
|
|
3061
|
+
import { ModelWorkspace, ModelWorkspaceHeader, ModelWorkspacePanel, UiButton, UiInput } from 'sky-ui-kit'
|
|
3062
|
+
const theme = ref<'light' | 'dark'>('light')
|
|
3063
|
+
const name = ref('汉口站')
|
|
3064
|
+
const message = ref('等待配置')
|
|
3065
|
+
</script>
|
|
3066
|
+
<template>
|
|
3067
|
+
<ModelWorkspace :theme="theme" native-controls>
|
|
3068
|
+
<template #header><ModelWorkspaceHeader title="模型计算工作区" description="分布式水文 / 水资源配置 / 新安江 / LSTM 共用主题">
|
|
3069
|
+
<template #actions><UiButton @click="theme = theme === 'light' ? 'dark' : 'light'">切换主题</UiButton></template>
|
|
3070
|
+
</ModelWorkspaceHeader></template>
|
|
3071
|
+
<ModelWorkspacePanel title="模型配置">
|
|
3072
|
+
<UiInput v-model="name" placeholder="测站名称" />
|
|
3073
|
+
<p>原生控件逐步迁移时,可显式启用 native-controls。</p>
|
|
3074
|
+
<button type="button" class="primary" @click="message = '执行配置:' + name">原生操作示例</button>
|
|
3075
|
+
<template #footer><span role="status">{{ message }}</span><UiButton @click="message = '保存配置由使用方接入'">保存配置</UiButton></template>
|
|
3076
|
+
</ModelWorkspacePanel>
|
|
3077
|
+
</ModelWorkspace>
|
|
3078
|
+
</template>
|
|
3079
|
+
|
|
3080
|
+
```
|
|
3081
|
+
|
|
2968
3082
|
# 团队 AI 模块变更记录
|
|
2969
3083
|
|
|
3084
|
+
## 2026-11-02 · 沿用原平台浮动区域层级
|
|
3085
|
+
|
|
3086
|
+
- MapPageLayout 对齐 metrics/TemplateLayout.vue 的聚焦 5、移入 6;沿用内容 1、普通区域 2、图例 3、工具栏 4,统一覆盖时间轴与右栏,保持透明工具间隙穿透与子面板随区域置顶。
|
|
3087
|
+
- 同步文档与生成 API;未发包,未修改参考项目。
|
|
3088
|
+
|
|
3089
|
+
## 2026-11-02 · 模块移入置顶
|
|
3090
|
+
|
|
3091
|
+
- 统一区域层级变量,区域子展开面板随模块置顶;限定普通内容层,透明工具间隙不拦截地图。
|
|
3092
|
+
- 图例及底部外层移除滚动裁剪,预览新增模拟遮挡开关;未发布或修改消费项目。
|
|
3093
|
+
|
|
3094
|
+
## 2026-11-02 · 按用户约定改用 VFit 缩放
|
|
3095
|
+
|
|
3096
|
+
- 撤回新增的 720px 容器断点、右侧抽屉、compact 属性/事件及会商单列重排;保持区域与列数,使用应用 VFit 尺寸变量。
|
|
3097
|
+
- 会商网格移除 260px 最小行高,均分顶部操作区之外的剩余高度,消除该最小行高引起的内部滚动条;删除外壳固定 1px 尺寸覆盖。
|
|
3098
|
+
- 同步预览说明、示例和行为检查。未构建、发包或修改消费项目布局。
|
|
3099
|
+
|
|
3100
|
+
## 2026-11-02 · 完善地图布局行为(源码待用户预览)
|
|
3101
|
+
|
|
3102
|
+
- 导航直接显示 MapPageLayout 名称,开发指南增加地图布局直达入口,避免新组件沿用旧名称而难以查找。
|
|
3103
|
+
|
|
3104
|
+
- 新增 MapPageLayout,与旧 TemplateLayout 并行,旧接口不变;新布局仅负责区域排列,位置参数独立于业务类名。
|
|
3105
|
+
- 增加实际容器宽度检测、非模态右侧覆盖面板、关闭事件、区域 hover / focus 层级和时间轴避让。
|
|
3106
|
+
- DefenseMapLayout 新增可选 structured 模式、toolbar、列数与窄容器单列;默认保持原样式外壳。
|
|
3107
|
+
- 预览支持宽窄容器、右栏和时间轴开关;同步接入、样式、组件指南与生成 API。未发布,未更新消费项目布局。
|
|
3108
|
+
|
|
3109
|
+
## 2026-11-02 · 布局说明按三层重写(待用户预览确认)
|
|
3110
|
+
|
|
3111
|
+
- 开发指南新增“布局怎么选”直达入口(#layout-guide),避免说明藏在基础组件深层目录。
|
|
3112
|
+
|
|
3113
|
+
- 布局容器页新增“平台外壳 → 页面分区 → 局部面板”示意及按场景选择组件的说明,区分 WorkbenchShell、TemplateLayout、管理布局、面板与基础容器。
|
|
3114
|
+
- 修正地图布局说明中的默认工具栏、遗漏 left 插槽及项目同名组件 API 混用;明确右栏受控条件和应用的地图生命周期责任。
|
|
3115
|
+
- 同步 AI 指南并生成 AI 文档;未发布 npm,未更新消费项目布局。由用户在预览站确认文案后再安排发布。
|
|
3116
|
+
|
|
2970
3117
|
本文件记录源码模块调整与接入影响,不作为 npm 发布完成的依据。团队使用安装包时以包内文档及 package.json 版本为准;使用当前源码时读取仓库中的同名文档。
|
|
2971
3118
|
|
|
3119
|
+
## 2026-11-02 · 清理历史本地联调锁记录
|
|
3120
|
+
|
|
3121
|
+
- 删除 package-lock.json 中一体机消费项目的 extraneous 记录及其中旧 vendor tgz 引用;现有库依赖版本保持不变,未修改消费项目。
|
|
3122
|
+
- 同步 AI 指南并重新生成 AI 文档;未构建、打包、发布或提交 Git。
|
|
3123
|
+
|
|
2972
3124
|
## 2026-10-13 · 0.1.2 发布准备
|
|
2973
3125
|
|
|
2974
3126
|
- 核对并重新生成组件 API、AI 指南、llms 索引和完整文档,包含项目图标、全局适配、独立常驻示例和导航调整。
|
|
@@ -3356,6 +3508,60 @@ SVG 图库从主入口移到可选 icons 入口,SvgIcon 不再自动注册;
|
|
|
3356
3508
|
## 2026-10-29 · 0.1.7 发布准备
|
|
3357
3509
|
|
|
3358
3510
|
正式发布按需入口与可选图库,默认主题和组件 CSS 随 npm 包分发,无开发机样式依赖。构建前清理 dist 防止旧 chunk 混入;图标注册迁移见 ON-DEMAND.md。
|
|
3511
|
+
|
|
3512
|
+
|
|
3513
|
+
## 2026-10-30 · 四项目模型主题
|
|
3514
|
+
|
|
3515
|
+
读取四个项目最终覆盖主题,提取蓝白/深蓝青绿 token、渐变标题与面板。新增三个隔离主题组件、显式原生表单适配和可复制示例。公共 CSS 合入 style.css;未构建、未发布。
|
|
3516
|
+
|
|
3517
|
+
|
|
3518
|
+
## 2026-10-30 · HTML / Vue 双接入文档
|
|
3519
|
+
|
|
3520
|
+
新增独立 model-workspace.css 发布出口,原生 HTML 用 CSS 和结构类,Vue 用主题组件与公共 CSS。补齐两套完整示例、主题切换、事件绑定和部署路径说明,未构建发布。
|
|
3521
|
+
|
|
3522
|
+
## 2026-11-02 · 0.1.8 发布准备
|
|
3523
|
+
|
|
3524
|
+
- 发布当前组件源码、按需入口及模型工作区主题;HTML 使用 model-workspace.css,Vue 使用组件与 style.css。清除旧消费项目锁记录。发布状态以 npm 注册表为准。
|
|
3525
|
+
|
|
3526
|
+
|
|
3527
|
+
|
|
3528
|
+
## 2026-11-03:可配置 VFit 尺寸(源码待发布)
|
|
3529
|
+
|
|
3530
|
+
数字尺寸代表设计单位,由组件转换为 `calc(var(--cp-font-1, 1px) * n)`;CSS 字符串原样使用,不额外注册 VFit 或 transform。DesignSpacing 支持单值及2/3/4项数组,遵循CSS间距顺序。0是有效值。调用方传裸字符串 `"12"` 不是合法CSS长度,应使用 `:gap="12"`;`"12px"` 是固定CSS像素。
|
|
3531
|
+
|
|
3532
|
+
所有新增参数有默认值;下表空字符串表示使用组件现有布局/样式默认值,不是0。根style可控制组件根尺寸,内部内边距通过对应props调整,无需deep覆盖。
|
|
3533
|
+
|
|
3534
|
+
| 组件 | 参数与默认值 |
|
|
3535
|
+
| --- | --- |
|
|
3536
|
+
| MapPageLayout | 新增gap=12;已有rightPanelWidth=328、leftPanelWidth=320、edge=12等参数兼容字符串并支持数字;top/bottom/toolbar/timeline偏移默认空字符串,沿用自动避让 |
|
|
3537
|
+
| DefenseMapLayout | gap=4、padding=4、toolbarGap=12、toolbarPadding=12;topOffset默认64设计单位,兼容数字/字符串 |
|
|
3538
|
+
| MapWorkspacePanel | headerPadding=16、bodyPadding=16、footerPadding=[12,16]、gap=16 |
|
|
3539
|
+
| ModelWorkspacePanel | headerPadding=[12,16]、bodyPadding=16、footerPadding=[12,16]、gap=12 |
|
|
3540
|
+
| WorkbenchPanel | width='auto'、height='auto'、padding=0、gap=0;gap只在调用方使用flex/grid时产生间距,不强改display |
|
|
3541
|
+
| ManagementResourceLayout | gap=20、padding=[0,24,20](内容区域)、introPadding=24、filterGap=20、filterPadding=[20,24]、inputWidth=260、selectWidth=160、cascaderWidth=280、responsive=false |
|
|
3542
|
+
| AppSelect | width='100%'、controlHeight=''(按size取主题小/中/大高度)、controlPadding=[0,10];多选内容可增高;浮层不再设100%最小宽度,使用底层fit-input-width等配置 |
|
|
3543
|
+
| ProjectMenu | width=''、itemHeight=''、itemPadding=''、padding=''(分别保留横/纵菜单已有默认值)、gap=2 |
|
|
3544
|
+
| MapTimeline | padding=[10,12]、gap=9、trackHeight=88、controlHeight=30;不改变播放/时次数据API |
|
|
3545
|
+
| MapBottomProcessPanel | height=320、maxHeight='42dvh'、headerPadding=[10,16]、metaPadding=[8,16,0]、gap=12 |
|
|
3546
|
+
| ProcessDataTable | cellPadding=[6,10]、paginationGap=12、paginationPadding=5 |
|
|
3547
|
+
|
|
3548
|
+
ManagementResourceLayout默认按VFit保持结构,不在700px阈值自动切换;旧调用方如需原断点布局显式传responsive=true。这是需要在升级说明中说明的行为变化。其内容区域padding与介绍区padding分开,避免改变原默认留白。
|
|
3549
|
+
|
|
3550
|
+
地图布局时间轴测量改为offsetHeight,使用布局坐标而非transform后的视口像素,防止再次乘入缩放系数。UiButton/UiSelect/UiTable等基础组件继续使用底层size、width、height及主题token,无重复同义接口。旧TemplateLayout保留兼容接口,不冒充MapPageLayout别名。
|
|
3551
|
+
|
|
3552
|
+
示例:
|
|
3553
|
+
```vue
|
|
3554
|
+
<MapWorkspacePanel title="降水统计" :header-padding="[12, 16]" :body-padding="[8, 12]" :gap="8">
|
|
3555
|
+
业务内容
|
|
3556
|
+
</MapWorkspacePanel>
|
|
3557
|
+
<MapPageLayout :right-panel-width="320" :edge="12" :gap="8" />
|
|
3558
|
+
```
|
|
3559
|
+
预览入口:MapPageLayout布局演示,点击“查看紧凑尺寸”比较右栏宽度、边距与面板内边距。其他组件参数与默认值可在生成API查询。当前未构建、打包、发布或浏览器验证,用户预览确认后自行发版。
|
|
3560
|
+
|
|
3561
|
+
## 2026-11-03 · 0.1.9 发布准备
|
|
3562
|
+
|
|
3563
|
+
- 将当前布局、面板、尺寸适配与主题调整纳入新版,重新生成 AI 文档并检查组件包。发布结果以 npm 注册表为准。
|
|
3564
|
+
|
|
3359
3565
|
|
|
3360
3566
|
# Component API reference
|
|
3361
3567
|
|
|
@@ -3386,6 +3592,9 @@ Slots: No declared content slots.
|
|
|
3386
3592
|
|
|
3387
3593
|
| Name | Type | Required | Default expression |
|
|
3388
3594
|
|---|---|---|---|
|
|
3595
|
+
| width | DesignLength | false | '100%' |
|
|
3596
|
+
| controlHeight | DesignLength | false | '' |
|
|
3597
|
+
| controlPadding | DesignSpacing | false | () => [0, 10] |
|
|
3389
3598
|
| modelValue | AppSelectValue | false | undefined |
|
|
3390
3599
|
| options | AppSelectOption[] | false | () => [] |
|
|
3391
3600
|
| emptyLabel | string | false | '暂无可选项' |
|
|
@@ -3400,6 +3609,10 @@ Slots: No declared content slots.
|
|
|
3400
3609
|
Slots: No declared content slots.
|
|
3401
3610
|
|
|
3402
3611
|
```ts
|
|
3612
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
3613
|
+
export type DesignLength = number | string
|
|
3614
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
3615
|
+
|
|
3403
3616
|
export type AppSelectValue = string | number | boolean | Record<string, unknown> | AppSelectValue[] | null | undefined
|
|
3404
3617
|
export type AppSelectOption = {
|
|
3405
3618
|
label: string
|
|
@@ -3414,6 +3627,10 @@ export type AppSelectOption = {
|
|
|
3414
3627
|
|
|
3415
3628
|
| Name | Type | Required | Default expression |
|
|
3416
3629
|
|---|---|---|---|
|
|
3630
|
+
| padding | DesignSpacing | false | () => [10, 12] |
|
|
3631
|
+
| gap | DesignLength | false | 9 |
|
|
3632
|
+
| trackHeight | DesignLength | false | 88 |
|
|
3633
|
+
| controlHeight | DesignLength | false | 30 |
|
|
3417
3634
|
| modelValue | number | false | 0 |
|
|
3418
3635
|
| startTime | TimelineTimeInput | false | () => new Date() |
|
|
3419
3636
|
| points | TimelinePoint[] | false | () => [] |
|
|
@@ -3448,6 +3665,10 @@ export type AppSelectOption = {
|
|
|
3448
3665
|
Slots: date-select
|
|
3449
3666
|
|
|
3450
3667
|
```ts
|
|
3668
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
3669
|
+
export type DesignLength = number | string
|
|
3670
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
3671
|
+
|
|
3451
3672
|
type IntervalUnit = 'minute' | 'hour' | 'day' | 'month' | 'year'
|
|
3452
3673
|
type TimelineKind = 'observed' | 'forecast'
|
|
3453
3674
|
type TimelineTimeInput = string | number | Date
|
|
@@ -3537,6 +3758,11 @@ export type TimeRangeQuickOption = {
|
|
|
3537
3758
|
|
|
3538
3759
|
| Name | Type | Required | Default expression |
|
|
3539
3760
|
|---|---|---|---|
|
|
3761
|
+
| width | DesignLength | false | '' |
|
|
3762
|
+
| itemHeight | DesignLength | false | '' |
|
|
3763
|
+
| itemPadding | DesignSpacing | false | '' |
|
|
3764
|
+
| padding | DesignSpacing | false | '' |
|
|
3765
|
+
| gap | DesignLength | false | 2 |
|
|
3540
3766
|
| direction | 'horizontal' | 'vertical' | false | 'horizontal' |
|
|
3541
3767
|
| active | string | false | '' |
|
|
3542
3768
|
| items | ProjectMenuItem[] | false | () => [] |
|
|
@@ -3550,6 +3776,10 @@ export type TimeRangeQuickOption = {
|
|
|
3550
3776
|
Slots: No declared content slots.
|
|
3551
3777
|
|
|
3552
3778
|
```ts
|
|
3779
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
3780
|
+
export type DesignLength = number | string
|
|
3781
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
3782
|
+
|
|
3553
3783
|
export interface ProjectMenuItem { key: string; label: string; disabled?: boolean; icon?: Component; children?: ProjectMenuItem[] }
|
|
3554
3784
|
export interface ProjectMenuGroup { label: string; items: ProjectMenuItem[] }
|
|
3555
3785
|
```
|
|
@@ -3657,6 +3887,9 @@ Slots: No declared content slots.
|
|
|
3657
3887
|
| times | string[] | true | undefined / no declared default |
|
|
3658
3888
|
| series | { name: string; data: (number | null)[] }[] | true | undefined / no declared default |
|
|
3659
3889
|
| loading | boolean | false | undefined / no declared default |
|
|
3890
|
+
| cellPadding | DesignSpacing | false | () => [6, 10] |
|
|
3891
|
+
| paginationGap | DesignLength | false | 12 |
|
|
3892
|
+
| paginationPadding | DesignSpacing | false | 5 |
|
|
3660
3893
|
|
|
3661
3894
|
### Events
|
|
3662
3895
|
|
|
@@ -3664,6 +3897,13 @@ No declared events.
|
|
|
3664
3897
|
|
|
3665
3898
|
Slots: No declared content slots.
|
|
3666
3899
|
|
|
3900
|
+
```ts
|
|
3901
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
3902
|
+
export type DesignLength = number | string
|
|
3903
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
3904
|
+
|
|
3905
|
+
```
|
|
3906
|
+
|
|
3667
3907
|
## WorkbenchShell
|
|
3668
3908
|
|
|
3669
3909
|
### Props
|
|
@@ -3691,6 +3931,10 @@ Slots: header, sidebar-footer, workspace, default
|
|
|
3691
3931
|
|---|---|---|---|
|
|
3692
3932
|
| as | 'section' | 'aside' | 'div' | false | 'section' |
|
|
3693
3933
|
| floating | boolean | false | true |
|
|
3934
|
+
| width | DesignLength | false | 'auto' |
|
|
3935
|
+
| height | DesignLength | false | 'auto' |
|
|
3936
|
+
| padding | DesignSpacing | false | 0 |
|
|
3937
|
+
| gap | DesignLength | false | 0 |
|
|
3694
3938
|
|
|
3695
3939
|
### Events
|
|
3696
3940
|
|
|
@@ -3698,6 +3942,13 @@ No declared events.
|
|
|
3698
3942
|
|
|
3699
3943
|
Slots: default
|
|
3700
3944
|
|
|
3945
|
+
```ts
|
|
3946
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
3947
|
+
export type DesignLength = number | string
|
|
3948
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
3949
|
+
|
|
3950
|
+
```
|
|
3951
|
+
|
|
3701
3952
|
## MetricCard
|
|
3702
3953
|
|
|
3703
3954
|
### Props
|
|
@@ -3796,6 +4047,39 @@ export interface MapLayerNode { id: string; name: string; visible?: boolean; opa
|
|
|
3796
4047
|
|
|
3797
4048
|
Slots: left, top, toolbar, right, legend, timeline, content, default
|
|
3798
4049
|
|
|
4050
|
+
## MapPageLayout
|
|
4051
|
+
|
|
4052
|
+
### Props
|
|
4053
|
+
|
|
4054
|
+
| Name | Type | Required | Default expression |
|
|
4055
|
+
|---|---|---|---|
|
|
4056
|
+
| gap | DesignLength | false | 12 |
|
|
4057
|
+
| rightOpen | boolean | false | false |
|
|
4058
|
+
| rightPanelEnabled | boolean | false | true |
|
|
4059
|
+
| rightPanelWidth | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 328)' |
|
|
4060
|
+
| leftPanelWidth | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 320)' |
|
|
4061
|
+
| edge | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 12)' |
|
|
4062
|
+
| topOffset | DesignLength | false | '' |
|
|
4063
|
+
| bottomOffset | DesignLength | false | '' |
|
|
4064
|
+
| toolbarTop | DesignLength | false | '' |
|
|
4065
|
+
| timelineLeft | DesignLength | false | '' |
|
|
4066
|
+
| timelineRight | DesignLength | false | '' |
|
|
4067
|
+
| timelineBottom | DesignLength | false | '' |
|
|
4068
|
+
|
|
4069
|
+
### Events
|
|
4070
|
+
|
|
4071
|
+
- `update:rightOpen` — `[open: boolean]`
|
|
4072
|
+
- `timeline-height` — `[height: number]`
|
|
4073
|
+
|
|
4074
|
+
Slots: left, top, toolbar, right, legend, timeline, content, default
|
|
4075
|
+
|
|
4076
|
+
```ts
|
|
4077
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
4078
|
+
export type DesignLength = number | string
|
|
4079
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
4080
|
+
|
|
4081
|
+
```
|
|
4082
|
+
|
|
3799
4083
|
## RainfallRankingTable
|
|
3800
4084
|
|
|
3801
4085
|
### Props
|
|
@@ -4134,6 +4418,15 @@ Slots: message, primary, default, footer
|
|
|
4134
4418
|
| title | string | false | undefined / no declared default |
|
|
4135
4419
|
| description | string | false | undefined / no declared default |
|
|
4136
4420
|
| showIntro | boolean | false | true |
|
|
4421
|
+
| gap | DesignLength | false | 20 |
|
|
4422
|
+
| padding | DesignSpacing | false | () => [0, 24, 20] |
|
|
4423
|
+
| introPadding | DesignSpacing | false | 24 |
|
|
4424
|
+
| filterGap | DesignLength | false | 20 |
|
|
4425
|
+
| filterPadding | DesignSpacing | false | () => [20, 24] |
|
|
4426
|
+
| inputWidth | DesignLength | false | 260 |
|
|
4427
|
+
| selectWidth | DesignLength | false | 160 |
|
|
4428
|
+
| cascaderWidth | DesignLength | false | 280 |
|
|
4429
|
+
| responsive | boolean | false | false |
|
|
4137
4430
|
|
|
4138
4431
|
### Events
|
|
4139
4432
|
|
|
@@ -4141,6 +4434,13 @@ No declared events.
|
|
|
4141
4434
|
|
|
4142
4435
|
Slots: summary, filters, heading, actions, default
|
|
4143
4436
|
|
|
4437
|
+
```ts
|
|
4438
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
4439
|
+
export type DesignLength = number | string
|
|
4440
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
4441
|
+
|
|
4442
|
+
```
|
|
4443
|
+
|
|
4144
4444
|
## GlobalMapLayerDock
|
|
4145
4445
|
|
|
4146
4446
|
### Props
|
|
@@ -4206,6 +4506,11 @@ Slots: footer
|
|
|
4206
4506
|
|
|
4207
4507
|
| Name | Type | Required | Default expression |
|
|
4208
4508
|
|---|---|---|---|
|
|
4509
|
+
| height | DesignLength | false | 320 |
|
|
4510
|
+
| maxHeight | DesignLength | false | '42dvh' |
|
|
4511
|
+
| headerPadding | DesignSpacing | false | ()=>[10,16] |
|
|
4512
|
+
| metaPadding | DesignSpacing | false | ()=>[8,16,0] |
|
|
4513
|
+
| gap | DesignLength | false | 12 |
|
|
4209
4514
|
| title | string | true | undefined / no declared default |
|
|
4210
4515
|
| subtitle | string | false | '' |
|
|
4211
4516
|
| demo | boolean | false | false |
|
|
@@ -4221,6 +4526,13 @@ Slots: footer
|
|
|
4221
4526
|
|
|
4222
4527
|
Slots: No declared content slots.
|
|
4223
4528
|
|
|
4529
|
+
```ts
|
|
4530
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
4531
|
+
export type DesignLength = number | string
|
|
4532
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
4533
|
+
|
|
4534
|
+
```
|
|
4535
|
+
|
|
4224
4536
|
## MapWorkspacePanel
|
|
4225
4537
|
|
|
4226
4538
|
### Props
|
|
@@ -4229,6 +4541,10 @@ Slots: No declared content slots.
|
|
|
4229
4541
|
|---|---|---|---|
|
|
4230
4542
|
| title | string | true | undefined / no declared default |
|
|
4231
4543
|
| subtitle | string | false | undefined / no declared default |
|
|
4544
|
+
| headerPadding | DesignSpacing | false | 16 |
|
|
4545
|
+
| bodyPadding | DesignSpacing | false | 16 |
|
|
4546
|
+
| footerPadding | DesignSpacing | false | () => [12, 16] |
|
|
4547
|
+
| gap | DesignLength | false | 16 |
|
|
4232
4548
|
|
|
4233
4549
|
### Events
|
|
4234
4550
|
|
|
@@ -4236,6 +4552,13 @@ No declared events.
|
|
|
4236
4552
|
|
|
4237
4553
|
Slots: actions, default, footer
|
|
4238
4554
|
|
|
4555
|
+
```ts
|
|
4556
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
4557
|
+
export type DesignLength = number | string
|
|
4558
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
4559
|
+
|
|
4560
|
+
```
|
|
4561
|
+
|
|
4239
4562
|
## NationalHydroSidebar
|
|
4240
4563
|
|
|
4241
4564
|
### Props
|
|
@@ -4303,12 +4626,81 @@ Slots: No declared content slots.
|
|
|
4303
4626
|
|
|
4304
4627
|
| Name | Type | Required | Default expression |
|
|
4305
4628
|
|---|---|---|---|
|
|
4629
|
+
| structured | boolean | false | false |
|
|
4630
|
+
| columns | 1 | 2 | false | 2 |
|
|
4631
|
+
| gap | DesignLength | false | 4 |
|
|
4632
|
+
| padding | DesignSpacing | false | 4 |
|
|
4633
|
+
| toolbarGap | DesignLength | false | 12 |
|
|
4634
|
+
| toolbarPadding | DesignSpacing | false | 12 |
|
|
4635
|
+
| topOffset | DesignLength | false | 'calc(var(--cp-font-1, 1px) * 64)' |
|
|
4306
4636
|
|
|
4307
4637
|
### Events
|
|
4308
4638
|
|
|
4309
4639
|
No declared events.
|
|
4310
4640
|
|
|
4311
|
-
Slots: default
|
|
4641
|
+
Slots: toolbar, default
|
|
4642
|
+
|
|
4643
|
+
```ts
|
|
4644
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
4645
|
+
export type DesignLength = number | string
|
|
4646
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
4647
|
+
|
|
4648
|
+
```
|
|
4649
|
+
|
|
4650
|
+
## ModelWorkspace
|
|
4651
|
+
|
|
4652
|
+
### Props
|
|
4653
|
+
|
|
4654
|
+
| Name | Type | Required | Default expression |
|
|
4655
|
+
|---|---|---|---|
|
|
4656
|
+
| theme | 'light' | 'dark' | false | 'light' |
|
|
4657
|
+
| nativeControls | boolean | false | false |
|
|
4658
|
+
|
|
4659
|
+
### Events
|
|
4660
|
+
|
|
4661
|
+
No declared events.
|
|
4662
|
+
|
|
4663
|
+
Slots: header, default, footer
|
|
4664
|
+
|
|
4665
|
+
## ModelWorkspaceHeader
|
|
4666
|
+
|
|
4667
|
+
### Props
|
|
4668
|
+
|
|
4669
|
+
| Name | Type | Required | Default expression |
|
|
4670
|
+
|---|---|---|---|
|
|
4671
|
+
| title | string | true | undefined / no declared default |
|
|
4672
|
+
| description | string | false | undefined / no declared default |
|
|
4673
|
+
|
|
4674
|
+
### Events
|
|
4675
|
+
|
|
4676
|
+
No declared events.
|
|
4677
|
+
|
|
4678
|
+
Slots: title, actions
|
|
4679
|
+
|
|
4680
|
+
## ModelWorkspacePanel
|
|
4681
|
+
|
|
4682
|
+
### Props
|
|
4683
|
+
|
|
4684
|
+
| Name | Type | Required | Default expression |
|
|
4685
|
+
|---|---|---|---|
|
|
4686
|
+
| title | string | false | undefined / no declared default |
|
|
4687
|
+
| headerPadding | DesignSpacing | false | () => [12, 16] |
|
|
4688
|
+
| bodyPadding | DesignSpacing | false | 16 |
|
|
4689
|
+
| footerPadding | DesignSpacing | false | () => [12, 16] |
|
|
4690
|
+
| gap | DesignLength | false | 12 |
|
|
4691
|
+
|
|
4692
|
+
### Events
|
|
4693
|
+
|
|
4694
|
+
No declared events.
|
|
4695
|
+
|
|
4696
|
+
Slots: header, actions, default, footer
|
|
4697
|
+
|
|
4698
|
+
```ts
|
|
4699
|
+
/** Numeric dimensions are VFit design units; CSS strings pass through unchanged. */
|
|
4700
|
+
export type DesignLength = number | string
|
|
4701
|
+
export type DesignSpacing = DesignLength | readonly [DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength] | readonly [DesignLength, DesignLength, DesignLength, DesignLength]
|
|
4702
|
+
|
|
4703
|
+
```
|
|
4312
4704
|
|
|
4313
4705
|
## UiAffix
|
|
4314
4706
|
|
|
@@ -5025,7 +5417,7 @@ SvgIcon 仅引用 sprite,不自动加载内置图库。自有 sprite 通过 pr
|
|
|
5025
5417
|
|
|
5026
5418
|
# Element Plus 完整组件目录
|
|
5027
5419
|
|
|
5028
|
-
基准版本:2.14.7。共 111 个主 / 子组件、4 个服务出口、3 个指令出口。另保留
|
|
5420
|
+
基准版本:2.14.7。共 111 个主 / 子组件、4 个服务出口、3 个指令出口。另保留 42 个项目特色组件。
|
|
5029
5421
|
|
|
5030
5422
|
清单覆盖官方组件注册表及服务 / 指令,不包含内部工具函数。出口覆盖不代表所有组件的交互、独立示例和视觉状态均已验证。网站每项均提供导入和官方 API 索引,新增组合示例见 AI-GUIDE.md。
|
|
5031
5423
|
|
|
@@ -5444,6 +5836,10 @@ UiContainer 展示系统顶部/侧栏/内容和地图浮动区域示例。原 Ma
|
|
|
5444
5836
|
|
|
5445
5837
|
# CSS 变量主题与样式隔离
|
|
5446
5838
|
|
|
5839
|
+
MapPageLayout 使用 --map-layout-layer-content/panel/legend/toolbar/focus/hover 统一区域层级。与原平台一致:content=1、panel=2、legend=3、toolbar=4、focus=5、hover=6,时间轴和右栏同样参与;hover 高于 focus;content 内部即使使用较大 z-index 也不跨越区域堆叠上下文。图例和底部外层允许内容溢出,避免浮层被父区域裁剪;内部滚动由业务组件负责。
|
|
5840
|
+
|
|
5841
|
+
MapPageLayout 是新增独立区域布局,读取现有主题变量及库作用域默认变量,不改写全局颜色。所有面板的 hover 层级高于 focus-within;右栏始终按固定区域关系避让。旧 TemplateLayout 的业务选择器保留以兼容已有消费者,新布局不继承这些选择器。MapPageLayout 与 DefenseMapLayout structured 模式继承 VFit 尺寸变量,不在 720px 以下切换布局;会商网格按 minmax(0, 1fr) 均分剩余高度,默认模式保留兼容。
|
|
5842
|
+
|
|
5447
5843
|
库不导出 useThemeStore,也不依赖使用方 Pinia。根入口和 /components 导出相同组件。
|
|
5448
5844
|
|
|
5449
5845
|
## 默认:隔离模式
|
|
@@ -5682,6 +6078,46 @@ import { DefenseMapLayout, UiButton } from 'sky-ui-kit'
|
|
|
5682
6078
|
|
|
5683
6079
|
|
|
5684
6080
|
按需 JS 入口不改变 CSS 约定,style.css 仍为整体公共样式,不是逐组件 CSS。
|
|
6081
|
+
|
|
6082
|
+
|
|
6083
|
+
模型工作区主题限定 .sky-model-workspace,theme 属性控制明暗,原生控件适配显式开启;变量与边界见 MODEL-WORKSPACE.md。
|
|
6084
|
+
|
|
6085
|
+
|
|
6086
|
+
独立 model-workspace.css 面向原生 HTML,无 Vue/Element Plus 样式依赖;与 style.css 的模型主题来自同一源文件,Vue 无需重复导入。
|
|
6087
|
+
|
|
6088
|
+
|
|
6089
|
+
## 2026-11-03:可配置 VFit 尺寸(源码待发布)
|
|
6090
|
+
|
|
6091
|
+
数字尺寸代表设计单位,由组件转换为 `calc(var(--cp-font-1, 1px) * n)`;CSS 字符串原样使用,不额外注册 VFit 或 transform。DesignSpacing 支持单值及2/3/4项数组,遵循CSS间距顺序。0是有效值。调用方传裸字符串 `"12"` 不是合法CSS长度,应使用 `:gap="12"`;`"12px"` 是固定CSS像素。
|
|
6092
|
+
|
|
6093
|
+
所有新增参数有默认值;下表空字符串表示使用组件现有布局/样式默认值,不是0。根style可控制组件根尺寸,内部内边距通过对应props调整,无需deep覆盖。
|
|
6094
|
+
|
|
6095
|
+
| 组件 | 参数与默认值 |
|
|
6096
|
+
| --- | --- |
|
|
6097
|
+
| MapPageLayout | 新增gap=12;已有rightPanelWidth=328、leftPanelWidth=320、edge=12等参数兼容字符串并支持数字;top/bottom/toolbar/timeline偏移默认空字符串,沿用自动避让 |
|
|
6098
|
+
| DefenseMapLayout | gap=4、padding=4、toolbarGap=12、toolbarPadding=12;topOffset默认64设计单位,兼容数字/字符串 |
|
|
6099
|
+
| MapWorkspacePanel | headerPadding=16、bodyPadding=16、footerPadding=[12,16]、gap=16 |
|
|
6100
|
+
| ModelWorkspacePanel | headerPadding=[12,16]、bodyPadding=16、footerPadding=[12,16]、gap=12 |
|
|
6101
|
+
| WorkbenchPanel | width='auto'、height='auto'、padding=0、gap=0;gap只在调用方使用flex/grid时产生间距,不强改display |
|
|
6102
|
+
| ManagementResourceLayout | gap=20、padding=[0,24,20](内容区域)、introPadding=24、filterGap=20、filterPadding=[20,24]、inputWidth=260、selectWidth=160、cascaderWidth=280、responsive=false |
|
|
6103
|
+
| AppSelect | width='100%'、controlHeight=''(按size取主题小/中/大高度)、controlPadding=[0,10];多选内容可增高;浮层不再设100%最小宽度,使用底层fit-input-width等配置 |
|
|
6104
|
+
| ProjectMenu | width=''、itemHeight=''、itemPadding=''、padding=''(分别保留横/纵菜单已有默认值)、gap=2 |
|
|
6105
|
+
| MapTimeline | padding=[10,12]、gap=9、trackHeight=88、controlHeight=30;不改变播放/时次数据API |
|
|
6106
|
+
| MapBottomProcessPanel | height=320、maxHeight='42dvh'、headerPadding=[10,16]、metaPadding=[8,16,0]、gap=12 |
|
|
6107
|
+
| ProcessDataTable | cellPadding=[6,10]、paginationGap=12、paginationPadding=5 |
|
|
6108
|
+
|
|
6109
|
+
ManagementResourceLayout默认按VFit保持结构,不在700px阈值自动切换;旧调用方如需原断点布局显式传responsive=true。这是需要在升级说明中说明的行为变化。其内容区域padding与介绍区padding分开,避免改变原默认留白。
|
|
6110
|
+
|
|
6111
|
+
地图布局时间轴测量改为offsetHeight,使用布局坐标而非transform后的视口像素,防止再次乘入缩放系数。UiButton/UiSelect/UiTable等基础组件继续使用底层size、width、height及主题token,无重复同义接口。旧TemplateLayout保留兼容接口,不冒充MapPageLayout别名。
|
|
6112
|
+
|
|
6113
|
+
示例:
|
|
6114
|
+
```vue
|
|
6115
|
+
<MapWorkspacePanel title="降水统计" :header-padding="[12, 16]" :body-padding="[8, 12]" :gap="8">
|
|
6116
|
+
业务内容
|
|
6117
|
+
</MapWorkspacePanel>
|
|
6118
|
+
<MapPageLayout :right-panel-width="320" :edge="12" :gap="8" />
|
|
6119
|
+
```
|
|
6120
|
+
预览入口:MapPageLayout布局演示,点击“查看紧凑尺寸”比较右栏宽度、边距与面板内边距。其他组件参数与默认值可在生成API查询。当前未构建、打包、发布或浏览器验证,用户预览确认后自行发版。
|
|
5685
6121
|
|
|
5686
6122
|
# 按需引入
|
|
5687
6123
|
|
|
@@ -5722,6 +6158,123 @@ import { MapSideMenu } from 'sky-ui-kit/components/MapSideMenu'
|
|
|
5722
6158
|
|
|
5723
6159
|
主入口文件从约 1161 KB 降到 178 KB,但还有共享 chunk;不能只看入口文件判断网站下载量。上表已包含各示例引用的库共享代码。可选 icons.js 约 980 KB,npm 安装包仍包含它;网站不导入即可不进入组件依赖链。
|
|
5724
6160
|
|
|
6161
|
+
# 模型工作区统一主题
|
|
6162
|
+
|
|
6163
|
+
参考四个项目实际样式:分布式水文模型 hydrogrid/frontend/src/styles/workspace-theme.css;水资源配置 app/static/workspace-theme.css;新安江 static/style.css 后段覆盖;LSTM前端预报模型Git/web_ui_prototype.html 的 light/dark token。新安江前段旧深色规则不是最终主题。
|
|
6164
|
+
|
|
6165
|
+
共同浅色:背景 #f3f7fb,面板 #fff,主色 #1677ff,文字 #172b4d,边框 #dce5ef,蓝色渐变标题。深色:背景 #0d1420,面板 #151f2e,主色 #36cbb7,文字 #e3ecf5,边框 #35485f。
|
|
6166
|
+
|
|
6167
|
+
ModelWorkspace(theme=light|dark, nativeControls=false) 提供显式主题边界及 header/default/footer 插槽;ModelWorkspaceHeader(title, description) 提供 title/actions 插槽;ModelWorkspacePanel(title) 提供 header/actions/default/footer。theme 由应用控制,不写 localStorage 或 document 根节点。未设置应用变量也有完整默认效果,应用可在容器 class/style 覆盖变量。
|
|
6168
|
+
|
|
6169
|
+
公共 CSS 仍仅在 main.ts 引入 element-plus/dist/index.css 和 sky-ui-kit/style.css 一次。组件包构建脚本把 model-workspace.css 合入 style.css。范围仅 sky-model-workspace,不修改原生 Element Plus 或容器外 body。body 自身仍由应用设置,容器高度由应用布局提供。
|
|
6170
|
+
|
|
6171
|
+
native-controls 是渐进迁移适配,仅在显式容器中覆盖原生按钮/表单外观,保留原 DOM、事件、disabled 及表单语义,不自动重写业务。优先用 UiButton/UiInput 等库组件。body 上的浮层不能继承局部主题,使用默认局部浮层或显式传递主题。地图色带、图表配色和业务阈值不在该主题替换范围。
|
|
6172
|
+
|
|
6173
|
+
四个参考项目本次只读。它们并非全部 Vue 应用:原生 HTML 项目不能直接使用 Vue 组件,使用独立 model-workspace.css 并显式添加 sky-model-workspace / data-theme 边界和对应结构类;只升级 npm 不会自动改写已有原生页面。下一版本发布后按上述方式接入。
|
|
6174
|
+
|
|
6175
|
+
|
|
6176
|
+
## 按项目技术栈选择
|
|
6177
|
+
|
|
6178
|
+
| 项目 | 使用方式 | 依赖 |
|
|
6179
|
+
|---|---|---|
|
|
6180
|
+
| 原生 HTML / 服务端模板 | model-workspace.css + 原生 HTML 结构类 | 无 Vue / Element Plus 运行时要求 |
|
|
6181
|
+
| Vue 3 | ModelWorkspace / Header / Panel 组件 + style.css | Vue 和组件包声明的 peerDependencies |
|
|
6182
|
+
|
|
6183
|
+
以下能力为当前源码新增,需等待包含该能力的新版本发布;已发布的 0.1.7 不包含独立 model-workspace.css 或三个 ModelWorkspace 组件。
|
|
6184
|
+
|
|
6185
|
+
## 原生 HTML:直接引入主题
|
|
6186
|
+
|
|
6187
|
+
从新发布包的 dist/model-workspace.css 复制到网站静态资源目录,例如 /static/vendor/sky-ui-kit/model-workspace.css,随网站一起部署。不要将 node_modules 路径或开发者磁盘路径写进线上 HTML。不需要引入组件 JS、Vue 或 Element Plus CSS。
|
|
6188
|
+
|
|
6189
|
+
```html
|
|
6190
|
+
<!doctype html>
|
|
6191
|
+
<html lang="zh-CN">
|
|
6192
|
+
<head>
|
|
6193
|
+
<meta charset="utf-8">
|
|
6194
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6195
|
+
<title>模型工作区</title>
|
|
6196
|
+
<link rel="stylesheet" href="/static/vendor/sky-ui-kit/model-workspace.css">
|
|
6197
|
+
<style>body { margin: 0; } #workspace { min-height: 100vh; }</style>
|
|
6198
|
+
</head>
|
|
6199
|
+
<body>
|
|
6200
|
+
<div id="workspace" class="sky-model-workspace" data-theme="light" data-native-controls>
|
|
6201
|
+
<header class="sky-model-header">
|
|
6202
|
+
<div>
|
|
6203
|
+
<h1 class="sky-model-header__title">模型计算工作区</h1>
|
|
6204
|
+
<p class="sky-model-header__description">统一背景、面板和原生表单主题</p>
|
|
6205
|
+
</div>
|
|
6206
|
+
<button id="toggle-theme" type="button">切换主题</button>
|
|
6207
|
+
</header>
|
|
6208
|
+
<main class="sky-model-workspace__content">
|
|
6209
|
+
<section class="sky-model-panel">
|
|
6210
|
+
<header class="sky-model-panel__header"><h2>模型配置</h2></header>
|
|
6211
|
+
<div class="sky-model-panel__body">
|
|
6212
|
+
<label>测站名称 <input id="station" value="汉口站"></label>
|
|
6213
|
+
</div>
|
|
6214
|
+
<footer class="sky-model-panel__footer">
|
|
6215
|
+
<span id="status" role="status">等待配置</span>
|
|
6216
|
+
<button id="save" type="button" class="primary">保存配置</button>
|
|
6217
|
+
</footer>
|
|
6218
|
+
</section>
|
|
6219
|
+
</main>
|
|
6220
|
+
</div>
|
|
6221
|
+
<script>
|
|
6222
|
+
const workspace = document.getElementById('workspace');
|
|
6223
|
+
document.getElementById('toggle-theme').addEventListener('click', () => {
|
|
6224
|
+
workspace.dataset.theme = workspace.dataset.theme === 'dark' ? 'light' : 'dark';
|
|
6225
|
+
});
|
|
6226
|
+
document.getElementById('save').addEventListener('click', () => {
|
|
6227
|
+
document.getElementById('status').textContent = '当前测站:' + document.getElementById('station').value;
|
|
6228
|
+
// 真实保存请求沿用应用现有逻辑。
|
|
6229
|
+
});
|
|
6230
|
+
</script>
|
|
6231
|
+
</body>
|
|
6232
|
+
</html>
|
|
6233
|
+
```
|
|
6234
|
+
|
|
6235
|
+
带 Vite 等构建工具的原生页面也可以在其唯一公共入口 `import 'sky-ui-kit/model-workspace.css'`。HTML 结构类负责外观,原有表单提交、事件和业务逻辑仍由页面维护;data-native-controls 显式开启原生控件外观。
|
|
6236
|
+
|
|
6237
|
+
## Vue 3:使用组件
|
|
6238
|
+
|
|
6239
|
+
main.ts 只引入一次公共 CSS:
|
|
6240
|
+
|
|
6241
|
+
```ts
|
|
6242
|
+
import 'element-plus/dist/index.css'
|
|
6243
|
+
import 'sky-ui-kit/style.css'
|
|
6244
|
+
```
|
|
6245
|
+
|
|
6246
|
+
不再额外引入 model-workspace.css,style.css 已包含同一主题。页面示例:
|
|
6247
|
+
|
|
6248
|
+
```vue
|
|
6249
|
+
<script setup lang="ts">
|
|
6250
|
+
import { ref } from 'vue'
|
|
6251
|
+
import { ModelWorkspace, ModelWorkspaceHeader, ModelWorkspacePanel, UiButton, UiInput } from 'sky-ui-kit'
|
|
6252
|
+
const theme = ref<'light' | 'dark'>('light')
|
|
6253
|
+
const station = ref('汉口站')
|
|
6254
|
+
const message = ref('等待配置')
|
|
6255
|
+
</script>
|
|
6256
|
+
<template>
|
|
6257
|
+
<ModelWorkspace :theme="theme" style="min-height: 100vh">
|
|
6258
|
+
<template #header>
|
|
6259
|
+
<ModelWorkspaceHeader title="模型计算工作区" description="统一模型页面主题">
|
|
6260
|
+
<template #actions>
|
|
6261
|
+
<UiButton @click="theme = theme === 'light' ? 'dark' : 'light'">切换主题</UiButton>
|
|
6262
|
+
</template>
|
|
6263
|
+
</ModelWorkspaceHeader>
|
|
6264
|
+
</template>
|
|
6265
|
+
<ModelWorkspacePanel title="模型配置">
|
|
6266
|
+
<UiInput v-model="station" placeholder="测站名称" />
|
|
6267
|
+
<template #footer>
|
|
6268
|
+
<span role="status">{{ message }}</span>
|
|
6269
|
+
<UiButton type="primary" @click="message = '当前测站:' + station">保存配置</UiButton>
|
|
6270
|
+
</template>
|
|
6271
|
+
</ModelWorkspacePanel>
|
|
6272
|
+
</ModelWorkspace>
|
|
6273
|
+
</template>
|
|
6274
|
+
```
|
|
6275
|
+
|
|
6276
|
+
HTML 与 Vue 共用同一份 token 和结构样式,切换方式分别为 data-theme 和 theme 属性;两种方式均不需要原项目本地样式文件。新增颜色和布局规则应修改组件库,使用方只绑定业务数据和事件。
|
|
6277
|
+
|
|
5725
6278
|
# 一体机组件库接入约定
|
|
5726
6279
|
|
|
5727
6280
|
用户要求:一体机 Web 的通用组件全部使用 sky-ui-kit,缺失能力先补充库,再由应用消费。
|