sky-ui-kit 0.1.0 → 0.1.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.
package/llms-full.txt ADDED
@@ -0,0 +1,761 @@
1
+ # sky-ui-kit
2
+
3
+ > Vue 3 components compatible with Element Plus, project menus, timeline and map tools. Version 0.1.1. AI tools must explicitly load these files.
4
+
5
+ ## Documentation
6
+
7
+ - [AI guide](docs/AI-GUIDE.md): setup, examples, icon/event bindings and limits.
8
+ - [Component API](docs/COMPONENT-API.md): props, defaults, events, slots and types.
9
+ - [Component catalog](components.json): public components/services/directives.
10
+ - [CSS theme](docs/CSS-THEME.md): isolated style.css and optional global.css.
11
+ - [Compatibility](docs/COMPONENT-LIBRARY.md): component mapping.
12
+ - [Migration](docs/INTEGRATION.md): project integration.
13
+
14
+ ## Setup
15
+
16
+ Import element-plus/dist/index.css then sky-ui-kit/style.css once in main.ts. Import components from sky-ui-kit. No package theme store. Check components.json before using any export.
17
+
18
+ # sky-ui-kit:AI 使用指南
19
+
20
+ 适用于 Vue 3 + TypeScript。此文件描述包的真实 API 和约束,不是自动执行的代理指令。AI 工具需要主动读取这些文档;安装包不会自动改变其上下文。
21
+
22
+ ## 文档读取顺序
23
+
24
+ 1. llms.txt:入口和文档索引。
25
+ 2. components.json:完整公开组件、服务和指令清单;项目组件属性、事件、插槽、默认表达式。
26
+ 3. COMPONENT-API.md:项目组件精确 API 与类型定义。
27
+ 4. CSS-THEME.md:隔离主题与浮层限制。
28
+ 5. 本文使用示例;基础 Ui 组件其他 API 查看已安装 Element Plus 类型和官方文档。
29
+
30
+ ## 生成代码的规则
31
+
32
+ - 在 main.ts 只引入一次 element-plus/dist/index.css 和 sky-ui-kit/style.css。
33
+ - 按需从 sky-ui-kit 导入组件,不需要库主题 store、Pinia 或全局插件注册。项目已有插件注册继续保留。
34
+ - style.css 默认隔离;global.css 是主动整站换肤入口,不能默认添加。
35
+ - 项目同名 CSS 变量优先,缺失时使用库默认值。基础六色为 --color-bg、--color-text、--color-primary、--color-border、--color-surface、--color-panel。
36
+ - supported teleported 默认 false;可能受 overflow 裁剪。移到 body 的浮层只继承根主题,不能自动继承局部容器变量。
37
+ - UiSelect 使用 UiOption 插槽;AppSelect 使用 options 属性,不要混用两套 API。
38
+ - 图标从 @element-plus/icons-vue 导入 Vue 组件;菜单 item.icon 和 MapTools.icons 绑定组件对象,不能使用图标名称字符串。
39
+ - ProjectMenu / MapSideMenu 的 select 接路由;MapTools 的 tool-click 接真实刷新、定位、GIS 操作。组件库不提供地图实例、接口请求或业务权限。
40
+ - MapTools 的 context-change 返回布尔值;当前没有外部受控右键状态 prop,不要虚构 v-model:contextEnabled。
41
+ - AtlasRightToggleButton 使用 open + toggle;不是 v-model:open。TreeSelectPanel 的 select 参数为 node, category,change 参数为 { node, category }。
42
+ - MapTimeline 的 modelValue 是索引;change 返回 TimelinePoint。不要把日期字符串传给 modelValue。
43
+ - 本包并不覆盖 Element Plus 全部组件。components.json 不存在的 Ui 名称不能假定可导入,例如链接和面包屑可直接导入 Element Plus。
44
+ - 保留项目现有业务代码和注释,先局部迁移核对,不能用组件示例替换整个业务页面。
45
+
46
+ ## 默认样式
47
+
48
+ 明亮六色:#ffffff / #1f2937 / #1677ff / #dbe3ef99 / #ffffffd9 / #ffffff。
49
+ 暗色六色:#08111f / #e6edf7 / #4da3ff / #39506f99 / #101b2dee / #0c1525。
50
+ 控件高度 small/medium/large:28/32/36px;字号正文14px;圆角4/8/12px;默认缩放1。
51
+ 默认暗色通过根节点 theme-dark 类启用;已定义的项目主题变量仍优先。
52
+
53
+ ## 实例方法与包装边界
54
+
55
+ 基础组件包装转发 attrs、事件、slots 与 ref 方法,增加 display:contents 容器。依赖直属子元素的布局 CSS 需要核对。ConfigProvider、Option、TableColumn、TabPane 保留原实现,以所属控件作为主题范围。命令式 UiMessage / UiMessageBox / UiNotification 自动合并专用浮层类。
56
+
57
+ ## 主题与业务示例
58
+
59
+ 以下完整代码由预览站示例生成;公共入口完成后,各页面不重复引入 CSS。
60
+
61
+ <!-- GENERATED EXAMPLES -->
62
+
63
+ ### componentsExample
64
+
65
+ ```vue
66
+ <script setup lang="ts">
67
+ import { ref } from 'vue'
68
+ import {
69
+ AppSelect, TreeSelectPanel, TimeRangeQuickSelect, MapTimeline
70
+ } from 'sky-ui-kit'
71
+
72
+ const station = ref('hankou')
73
+ const region = ref<string | number | null>(null)
74
+ const range = ref('24h')
75
+ const frame = ref(6)
76
+ const playing = ref(false)
77
+ const options = [{ label: '汉口站', value: 'hankou' }, { label: '宜昌站', value: 'yichang' }]
78
+ const categories = [{ type: 'region', label: '行政区', children: [{ id: 'hubei', label: '湖北省' }] }]
79
+ const ranges = [{ key: '1h', label: '近1小时' }, { key: '24h', label: '近24小时' }]
80
+ </script>
81
+
82
+ <template>
83
+ <AppSelect v-model="station" :options="options" filterable clearable />
84
+ <TreeSelectPanel v-model="region" :categories="categories" close-on-select />
85
+ <TimeRangeQuickSelect v-model="range" :options="ranges" />
86
+ <MapTimeline v-model="frame" v-model:playing="playing"
87
+ start-time="2026-10-08T08:00:00+08:00" time-zone="Asia/Shanghai"
88
+ :past-steps="6" :future-steps="12" />
89
+ </template>
90
+
91
+ <!-- 这些组件保留 v-model 交互;可通过 @change 接收值变化。 -->
92
+ ```
93
+
94
+ ### mapToolsExample
95
+
96
+ ```vue
97
+ <script setup lang="ts">
98
+ import { ref } from 'vue'
99
+ import { Grid, Operation, RefreshRight, Aim, Setting, DataAnalysis, Mouse } from '@element-plus/icons-vue'
100
+ import { MapTools, UiCheckboxGroup, UiCheckbox, UiInput, UiButton } from 'sky-ui-kit'
101
+
102
+ const activeTool = ref('layers')
103
+ const contextEnabled = ref(false)
104
+ const message = ref('')
105
+ const layers = ref(['行政区划', '水系'])
106
+ // icons 的键对应工具 key;可只传需要替换的图标。
107
+ const icons = {
108
+ layers: Grid, module: Operation, refresh: RefreshRight, locate: Aim,
109
+ settings: Setting, analysis: DataAnalysis, context: Mouse
110
+ }
111
+ function onToolClick(key: string) {
112
+ message.value = '触发工具:' + key
113
+ if (key === 'refresh') {
114
+ // 在这里调用你的地图数据刷新函数。
115
+ } else if (key === 'locate') {
116
+ // 在这里调用 map.flyTo(...) 等地图定位 API。
117
+ }
118
+ }
119
+ function onContextChange(enabled: boolean) {
120
+ contextEnabled.value = enabled
121
+ // 在这里启用或关闭地图右键菜单。
122
+ }
123
+ </script>
124
+
125
+ <template>
126
+ <MapTools v-model:active="activeTool" :icons="icons"
127
+ @tool-click="onToolClick" @context-change="onContextChange" />
128
+ <p>{{ message }} · 右键菜单:{{ contextEnabled ? '开启' : '关闭' }}</p>
129
+ <section v-if="activeTool">
130
+ <h3>{{ activeTool }} 工具面板</h3>
131
+ <UiCheckboxGroup v-if="activeTool === 'layers'" v-model="layers">
132
+ <UiCheckbox label="行政区划" />
133
+ <UiCheckbox label="水系" />
134
+ </UiCheckboxGroup>
135
+ <UiInput v-else placeholder="工具参数" />
136
+ <UiButton @click="activeTool = ''">关闭面板</UiButton>
137
+ </section>
138
+ </template>
139
+
140
+ <!-- 同一个面板工具再次点击会关闭;刷新与定位只触发事件,不改变面板。 -->
141
+ <!-- MapTools 内部图标绑定:<component :is="icons[tool.key] || tool.icon" /> -->
142
+ ```
143
+
144
+ ### menuExample
145
+
146
+ ```vue
147
+ <script setup lang="ts">
148
+ import { ref } from 'vue'
149
+ import { House, DataAnalysis, Setting, Pouring, List } from '@element-plus/icons-vue'
150
+ import { ProjectMenu, MapSideMenu } from 'sky-ui-kit'
151
+
152
+ const active = ref('overview')
153
+ const mapActive = ref('rain')
154
+ const compact = ref(false)
155
+ const message = ref('')
156
+ // icon 字段绑定导入的 Vue 图标组件,不是图标名称字符串。
157
+ const items = [
158
+ { key: 'overview', label: '概览', icon: House },
159
+ { key: 'data', label: '数据管理', icon: DataAnalysis },
160
+ { key: 'settings', label: '设置', icon: Setting, disabled: true }
161
+ ]
162
+ const groups = [{ label: '工作空间', items }]
163
+ const mapItems = [
164
+ { key: 'rain', label: '降水', icon: Pouring },
165
+ { key: 'water', label: '水库水位', icon: List }
166
+ ]
167
+ function onSelect(item: { key: string; label: string }) {
168
+ message.value = '选中了:' + item.label
169
+ // 在这里接入 router.push(...) 或你的数据加载函数。
170
+ }
171
+ </script>
172
+
173
+ <template>
174
+ <ProjectMenu v-model:active="active" :items="items" @select="onSelect" />
175
+ <ProjectMenu direction="vertical" v-model:active="active"
176
+ :groups="groups" @select="onSelect" />
177
+ <MapSideMenu title="实况(测站)" :items="mapItems"
178
+ v-model:active="mapActive" v-model:compact="compact" @select="onSelect" />
179
+ <p>{{ message }}</p>
180
+ </template>
181
+
182
+ <!-- 纵向菜单在每个菜单项的 icon 位置渲染图标;横向菜单为文字样式。 -->
183
+ <!-- MapSideMenu 的搜索、分组收起和图标模式切换由组件内部完成。 -->
184
+ ```
185
+
186
+ # Component API reference
187
+
188
+ Generated from Vue/TypeScript source; defaultExpression is source text, not evaluated JSON. Types refer to declarations below. Unlisted props must not be invented. For Element Plus components use upstream documentation and shipped typings.
189
+
190
+ ## AppSelect
191
+
192
+ ### Props
193
+
194
+ | Name | Type | Required | Default expression |
195
+ |---|---|---|---|
196
+ | modelValue | AppSelectValue | false | undefined |
197
+ | options | AppSelectOption[] | false | () => [] |
198
+ | emptyLabel | string | false | '暂无可选项' |
199
+ | popperClass | string | false | '' |
200
+ | teleported | boolean | false | false |
201
+
202
+ ### Events
203
+
204
+ - `update:modelValue` — `[value: AppSelectValue]`
205
+ - `change` — `[value: AppSelectValue]`
206
+
207
+ Slots: No declared content slots.
208
+
209
+ ```ts
210
+ export type AppSelectValue = string | number | boolean | Record<string, unknown> | AppSelectValue[] | null | undefined
211
+ export type AppSelectOption = {
212
+ label: string
213
+ value: AppSelectValue
214
+ disabled?: boolean
215
+ } | string | number
216
+ ```
217
+
218
+ ## MapTimeline
219
+
220
+ ### Props
221
+
222
+ | Name | Type | Required | Default expression |
223
+ |---|---|---|---|
224
+ | modelValue | number | false | 0 |
225
+ | startTime | TimelineTimeInput | false | () => new Date() |
226
+ | points | TimelinePoint[] | false | () => [] |
227
+ | steps | number | false | 24 |
228
+ | pastSteps | number | false | undefined / no declared default |
229
+ | futureSteps | number | false | undefined / no declared default |
230
+ | interval | number | false | 1 |
231
+ | unit | IntervalUnit | false | 'hour' |
232
+ | playing | boolean | false | false |
233
+ | speed | number | false | 1 |
234
+ | speeds | number[] | false | () => [0.5, 1, 2, 4] |
235
+ | internalPlayback | boolean | false | true |
236
+ | pageSize | number | false | 24 |
237
+ | loop | boolean | false | true |
238
+ | minTime | TimelineTimeInput | false | undefined / no declared default |
239
+ | maxTime | TimelineTimeInput | false | undefined / no declared default |
240
+ | forecastCount | number | false | undefined / no declared default |
241
+ | showScale | boolean | false | true |
242
+ | showCurrentMarker | boolean | false | true |
243
+ | timeZone | string | false | undefined / no declared default |
244
+
245
+ ### Events
246
+
247
+ - `update:modelValue` — `[value: number]`
248
+ - `update:startTime` — `[value: TimelineTimeInput]`
249
+ - `update:playing` — `[value: boolean]`
250
+ - `update:speed` — `[value: number]`
251
+ - `change` — `[point: TimelinePoint]`
252
+ - `play` — `[]`
253
+ - `pause` — `[]`
254
+
255
+ Slots: date-select
256
+
257
+ ```ts
258
+ type IntervalUnit = 'minute' | 'hour' | 'day' | 'month' | 'year'
259
+ type TimelineKind = 'observed' | 'forecast'
260
+ type TimelineTimeInput = string | number | Date
261
+ export interface TimelinePoint {
262
+ index: number
263
+ offset: number
264
+ time: Date
265
+ value: string
266
+ label: string
267
+ kind: TimelineKind
268
+ disabled?: boolean
269
+ }
270
+ ```
271
+
272
+ ## TreeSelectPanel
273
+
274
+ ### Props
275
+
276
+ | Name | Type | Required | Default expression |
277
+ |---|---|---|---|
278
+ | modelValue | string &#124; number &#124; null | false | null |
279
+ | categories | TreeSelectCategory[] | false | () => [] |
280
+ | placeholder | string | false | '请选择行政区或流域' |
281
+ | searchPlaceholder | string | false | '搜索名称' |
282
+ | emptyText | string | false | '暂无树数据' |
283
+ | fallbackTypeLabel | string | false | '行政区' |
284
+ | popoverWidth | string &#124; number | false | 'calc(var(--cp-font-1) * 328)' |
285
+ | defaultActiveType | string | false | '' |
286
+ | defaultExpandAll | boolean | false | true |
287
+ | closeOnSelect | boolean | false | false |
288
+ | closeOnMouseLeave | boolean | false | false |
289
+ | dark | boolean | false | false |
290
+
291
+ ### Events
292
+
293
+ - `update:modelValue` — `[value: string | number | null]`
294
+ - `change` — `[payload: { node: TreeSelectNode, category: TreeSelectCategory }]`
295
+ - `select` — `[node: TreeSelectNode, category: TreeSelectCategory]`
296
+
297
+ Slots: No declared content slots.
298
+
299
+ ```ts
300
+ export interface TreeSelectNode {
301
+ id: string | number
302
+ label: string
303
+ tag?: string
304
+ disabled?: boolean
305
+ children?: TreeSelectNode[]
306
+ [key: string]: unknown
307
+ }
308
+ export interface TreeSelectCategory {
309
+ type: string
310
+ label: string
311
+ children: TreeSelectNode[]
312
+ }
313
+ ```
314
+
315
+ ## TimeRangeQuickSelect
316
+
317
+ ### Props
318
+
319
+ | Name | Type | Required | Default expression |
320
+ |---|---|---|---|
321
+ | modelValue | string | true | undefined / no declared default |
322
+ | options | TimeRangeQuickOption[] | true | undefined / no declared default |
323
+ | ariaLabel | string | false | '时间范围快捷选择' |
324
+
325
+ ### Events
326
+
327
+ - `update:modelValue` — `[value: string]`
328
+ - `change` — `[option: TimeRangeQuickOption]`
329
+
330
+ Slots: No declared content slots.
331
+
332
+ ```ts
333
+ export type TimeRangeQuickOption = {
334
+ key: string
335
+ label: string
336
+ amount?: number
337
+ unit?: 'hour' | 'day'
338
+ }
339
+ ```
340
+
341
+ ## ProjectMenu
342
+
343
+ ### Props
344
+
345
+ | Name | Type | Required | Default expression |
346
+ |---|---|---|---|
347
+ | direction | 'horizontal' &#124; 'vertical' | false | 'horizontal' |
348
+ | active | string | false | '' |
349
+ | items | ProjectMenuItem[] | false | () => [] |
350
+ | groups | ProjectMenuGroup[] | false | () => [] |
351
+
352
+ ### Events
353
+
354
+ - `update:active` — `[key: string]`
355
+ - `select` — `[item: ProjectMenuItem]`
356
+
357
+ Slots: No declared content slots.
358
+
359
+ ```ts
360
+ export interface ProjectMenuItem { key: string; label: string; disabled?: boolean; icon?: Component }
361
+ export interface ProjectMenuGroup { label: string; items: ProjectMenuItem[] }
362
+ ```
363
+
364
+ ## MapSideMenu
365
+
366
+ ### Props
367
+
368
+ | Name | Type | Required | Default expression |
369
+ |---|---|---|---|
370
+ | title | string | false | '实况(测站)' |
371
+ | active | string | false | 'rain' |
372
+ | dark | boolean | false | false |
373
+ | compact | boolean | false | false |
374
+ | items | MapMenuItem[] | false | () => [
375
+ { key: 'rain', label: '降水', icon: Pouring },
376
+ { key: 'reservoir-level', label: '水库水位', icon: List },
377
+ { key: 'reservoir-flow', label: '水库径流', icon: TrendCharts },
378
+ { key: 'river-level', label: '河道水位', icon: List },
379
+ { key: 'river-flow', label: '河道径流', icon: TrendCharts },
380
+ { key: 'temperature', label: '气温', icon: Sunny },
381
+ { key: 'wind', label: '风速', icon: WindPower }
382
+ ] |
383
+
384
+ ### Events
385
+
386
+ - `update:active` — `[key: string]`
387
+ - `update:compact` — `[value: boolean]`
388
+ - `select` — `[item: MapMenuItem]`
389
+
390
+ Slots: No declared content slots.
391
+
392
+ ```ts
393
+ export interface MapMenuItem { key: string; label: string; icon?: Component }
394
+ ```
395
+
396
+ ## MapTools
397
+
398
+ ### Props
399
+
400
+ | Name | Type | Required | Default expression |
401
+ |---|---|---|---|
402
+ | active | string | false | 'layers' |
403
+ | horizontal | boolean | false | false |
404
+ | icons | Record<string, Component> | false | () => ({}) |
405
+
406
+ ### Events
407
+
408
+ - `update:active` — `[key: string]`
409
+ - `tool-click` — `[key: string]`
410
+ - `context-change` — `[enabled: boolean]`
411
+
412
+ Slots: No declared content slots.
413
+
414
+ ## AtlasMapTitle
415
+
416
+ ### Props
417
+
418
+ | Name | Type | Required | Default expression |
419
+ |---|---|---|---|
420
+ | title | string | true | undefined / no declared default |
421
+ | subtitle | string | false | '' |
422
+ | rightOpen | boolean | false | false |
423
+
424
+ ### Events
425
+
426
+ No declared events.
427
+
428
+ Slots: No declared content slots.
429
+
430
+ ## AtlasRightToggleButton
431
+
432
+ ### Props
433
+
434
+ | Name | Type | Required | Default expression |
435
+ |---|---|---|---|
436
+ | open | boolean | false | false |
437
+ | openTitle | string | false | '展开右侧面板' |
438
+ | closeTitle | string | false | '收起右侧面板' |
439
+
440
+ ### Events
441
+
442
+ - `toggle` — `[]`
443
+
444
+ Slots: No declared content slots.
445
+
446
+ ## ProcessDataTable
447
+
448
+ ### Props
449
+
450
+ | Name | Type | Required | Default expression |
451
+ |---|---|---|---|
452
+ | times | string[] | true | undefined / no declared default |
453
+ | series | { name: string; data: (number &#124; null)[] }[] | true | undefined / no declared default |
454
+ | loading | boolean | false | undefined / no declared default |
455
+
456
+ ### Events
457
+
458
+ No declared events.
459
+
460
+ Slots: No declared content slots.
461
+
462
+ ## UiAlert
463
+
464
+ Original: ElAlert. [API](https://element-plus.org/en-US/component/alert.html). See dist/components/element-plus.d.ts.
465
+
466
+ ## UiBadge
467
+
468
+ Original: ElBadge. [API](https://element-plus.org/en-US/component/badge.html). See dist/components/element-plus.d.ts.
469
+
470
+ ## UiButton
471
+
472
+ Original: ElButton. [API](https://element-plus.org/en-US/component/button.html). See dist/components/element-plus.d.ts.
473
+
474
+ ## UiButtonGroup
475
+
476
+ Original: ElButtonGroup. [API](https://element-plus.org/en-US/component/button-group.html). See dist/components/element-plus.d.ts.
477
+
478
+ ## UiCard
479
+
480
+ Original: ElCard. [API](https://element-plus.org/en-US/component/card.html). See dist/components/element-plus.d.ts.
481
+
482
+ ## UiCarousel
483
+
484
+ Original: ElCarousel. [API](https://element-plus.org/en-US/component/carousel.html). See dist/components/element-plus.d.ts.
485
+
486
+ ## UiCarouselItem
487
+
488
+ Original: ElCarouselItem. [API](https://element-plus.org/en-US/component/carousel-item.html). See dist/components/element-plus.d.ts.
489
+
490
+ ## UiCascader
491
+
492
+ Original: ElCascader. [API](https://element-plus.org/en-US/component/cascader.html). See dist/components/element-plus.d.ts.
493
+
494
+ ## UiCheckbox
495
+
496
+ Original: ElCheckbox. [API](https://element-plus.org/en-US/component/checkbox.html). See dist/components/element-plus.d.ts.
497
+
498
+ ## UiCol
499
+
500
+ Original: ElCol. [API](https://element-plus.org/en-US/component/col.html). See dist/components/element-plus.d.ts.
501
+
502
+ ## UiCollapse
503
+
504
+ Original: ElCollapse. [API](https://element-plus.org/en-US/component/collapse.html). See dist/components/element-plus.d.ts.
505
+
506
+ ## UiCollapseItem
507
+
508
+ Original: ElCollapseItem. [API](https://element-plus.org/en-US/component/collapse-item.html). See dist/components/element-plus.d.ts.
509
+
510
+ ## UiColorPicker
511
+
512
+ Original: ElColorPicker. [API](https://element-plus.org/en-US/component/color-picker.html). See dist/components/element-plus.d.ts.
513
+
514
+ ## UiConfigProvider
515
+
516
+ Original: ElConfigProvider. [API](https://element-plus.org/en-US/component/config-provider.html). See dist/components/element-plus.d.ts.
517
+
518
+ ## UiDatePicker
519
+
520
+ Original: ElDatePicker. [API](https://element-plus.org/en-US/component/date-picker.html). See dist/components/element-plus.d.ts.
521
+
522
+ ## UiDescriptions
523
+
524
+ Original: ElDescriptions. [API](https://element-plus.org/en-US/component/descriptions.html). See dist/components/element-plus.d.ts.
525
+
526
+ ## UiDescriptionsItem
527
+
528
+ Original: ElDescriptionsItem. [API](https://element-plus.org/en-US/component/descriptions-item.html). See dist/components/element-plus.d.ts.
529
+
530
+ ## UiDialog
531
+
532
+ Original: ElDialog. [API](https://element-plus.org/en-US/component/dialog.html). See dist/components/element-plus.d.ts.
533
+
534
+ ## UiDrawer
535
+
536
+ Original: ElDrawer. [API](https://element-plus.org/en-US/component/drawer.html). See dist/components/element-plus.d.ts.
537
+
538
+ ## UiDropdown
539
+
540
+ Original: ElDropdown. [API](https://element-plus.org/en-US/component/dropdown.html). See dist/components/element-plus.d.ts.
541
+
542
+ ## UiDropdownItem
543
+
544
+ Original: ElDropdownItem. [API](https://element-plus.org/en-US/component/dropdown-item.html). See dist/components/element-plus.d.ts.
545
+
546
+ ## UiDropdownMenu
547
+
548
+ Original: ElDropdownMenu. [API](https://element-plus.org/en-US/component/dropdown-menu.html). See dist/components/element-plus.d.ts.
549
+
550
+ ## UiEmpty
551
+
552
+ Original: ElEmpty. [API](https://element-plus.org/en-US/component/empty.html). See dist/components/element-plus.d.ts.
553
+
554
+ ## UiFooter
555
+
556
+ Original: ElFooter. [API](https://element-plus.org/en-US/component/footer.html). See dist/components/element-plus.d.ts.
557
+
558
+ ## UiForm
559
+
560
+ Original: ElForm. [API](https://element-plus.org/en-US/component/form.html). See dist/components/element-plus.d.ts.
561
+
562
+ ## UiFormItem
563
+
564
+ Original: ElFormItem. [API](https://element-plus.org/en-US/component/form-item.html). See dist/components/element-plus.d.ts.
565
+
566
+ ## UiIcon
567
+
568
+ Original: ElIcon. [API](https://element-plus.org/en-US/component/icon.html). See dist/components/element-plus.d.ts.
569
+
570
+ ## UiImage
571
+
572
+ Original: ElImage. [API](https://element-plus.org/en-US/component/image.html). See dist/components/element-plus.d.ts.
573
+
574
+ ## UiInput
575
+
576
+ Original: ElInput. [API](https://element-plus.org/en-US/component/input.html). See dist/components/element-plus.d.ts.
577
+
578
+ ## UiInputNumber
579
+
580
+ Original: ElInputNumber. [API](https://element-plus.org/en-US/component/input-number.html). See dist/components/element-plus.d.ts.
581
+
582
+ ## UiMessage
583
+
584
+ Original: ElMessage. [API](https://element-plus.org/en-US/component/message.html). See dist/components/element-plus.d.ts.
585
+
586
+ ## UiMessageBox
587
+
588
+ Original: ElMessageBox. [API](https://element-plus.org/en-US/component/message-box.html). See dist/components/element-plus.d.ts.
589
+
590
+ ## UiNotification
591
+
592
+ Original: ElNotification. [API](https://element-plus.org/en-US/component/notification.html). See dist/components/element-plus.d.ts.
593
+
594
+ ## UiOption
595
+
596
+ Original: ElOption. [API](https://element-plus.org/en-US/component/option.html). See dist/components/element-plus.d.ts.
597
+
598
+ ## UiPagination
599
+
600
+ Original: ElPagination. [API](https://element-plus.org/en-US/component/pagination.html). See dist/components/element-plus.d.ts.
601
+
602
+ ## UiPopconfirm
603
+
604
+ Original: ElPopconfirm. [API](https://element-plus.org/en-US/component/popconfirm.html). See dist/components/element-plus.d.ts.
605
+
606
+ ## UiPopover
607
+
608
+ Original: ElPopover. [API](https://element-plus.org/en-US/component/popover.html). See dist/components/element-plus.d.ts.
609
+
610
+ ## UiProgress
611
+
612
+ Original: ElProgress. [API](https://element-plus.org/en-US/component/progress.html). See dist/components/element-plus.d.ts.
613
+
614
+ ## UiRadio
615
+
616
+ Original: ElRadio. [API](https://element-plus.org/en-US/component/radio.html). See dist/components/element-plus.d.ts.
617
+
618
+ ## UiRadioGroup
619
+
620
+ Original: ElRadioGroup. [API](https://element-plus.org/en-US/component/radio-group.html). See dist/components/element-plus.d.ts.
621
+
622
+ ## UiRate
623
+
624
+ Original: ElRate. [API](https://element-plus.org/en-US/component/rate.html). See dist/components/element-plus.d.ts.
625
+
626
+ ## UiRow
627
+
628
+ Original: ElRow. [API](https://element-plus.org/en-US/component/row.html). See dist/components/element-plus.d.ts.
629
+
630
+ ## UiScrollbar
631
+
632
+ Original: ElScrollbar. [API](https://element-plus.org/en-US/component/scrollbar.html). See dist/components/element-plus.d.ts.
633
+
634
+ ## UiSelect
635
+
636
+ Original: ElSelect. [API](https://element-plus.org/en-US/component/select.html). See dist/components/element-plus.d.ts.
637
+
638
+ ## UiSelectV2
639
+
640
+ Original: ElSelectV2. [API](https://element-plus.org/en-US/component/select-v2.html). See dist/components/element-plus.d.ts.
641
+
642
+ ## UiSlider
643
+
644
+ Original: ElSlider. [API](https://element-plus.org/en-US/component/slider.html). See dist/components/element-plus.d.ts.
645
+
646
+ ## UiSwitch
647
+
648
+ Original: ElSwitch. [API](https://element-plus.org/en-US/component/switch.html). See dist/components/element-plus.d.ts.
649
+
650
+ ## UiTabPane
651
+
652
+ Original: ElTabPane. [API](https://element-plus.org/en-US/component/tab-pane.html). See dist/components/element-plus.d.ts.
653
+
654
+ ## UiTable
655
+
656
+ Original: ElTable. [API](https://element-plus.org/en-US/component/table.html). See dist/components/element-plus.d.ts.
657
+
658
+ ## UiTableColumn
659
+
660
+ Original: ElTableColumn. [API](https://element-plus.org/en-US/component/table-column.html). See dist/components/element-plus.d.ts.
661
+
662
+ ## UiTabs
663
+
664
+ Original: ElTabs. [API](https://element-plus.org/en-US/component/tabs.html). See dist/components/element-plus.d.ts.
665
+
666
+ ## UiTag
667
+
668
+ Original: ElTag. [API](https://element-plus.org/en-US/component/tag.html). See dist/components/element-plus.d.ts.
669
+
670
+ ## UiTooltip
671
+
672
+ Original: ElTooltip. [API](https://element-plus.org/en-US/component/tooltip.html). See dist/components/element-plus.d.ts.
673
+
674
+ ## UiTree
675
+
676
+ Original: ElTree. [API](https://element-plus.org/en-US/component/tree.html). See dist/components/element-plus.d.ts.
677
+
678
+ ## UiTreeSelect
679
+
680
+ Original: ElTreeSelect. [API](https://element-plus.org/en-US/component/tree-select.html). See dist/components/element-plus.d.ts.
681
+
682
+ ## UiUpload
683
+
684
+ Original: ElUpload. [API](https://element-plus.org/en-US/component/upload.html). See dist/components/element-plus.d.ts.
685
+
686
+ ## UiCheckboxGroup
687
+
688
+ Original: ElCheckboxGroup. [API](https://element-plus.org/en-US/component/checkbox-group.html). See dist/components/element-plus.d.ts.
689
+
690
+ ## UiRadioButton
691
+
692
+ Original: ElRadioButton. [API](https://element-plus.org/en-US/component/radio-button.html). See dist/components/element-plus.d.ts.
693
+
694
+ ## UiDivider
695
+
696
+ Original: ElDivider. [API](https://element-plus.org/en-US/component/divider.html). See dist/components/element-plus.d.ts.
697
+
698
+ ## vUiLoading
699
+
700
+ Original: ElLoadingDirective. [API](https://element-plus.org/en-US/component/loading.html). See dist/components/element-plus.d.ts.
701
+
702
+
703
+ # CSS 变量主题与样式隔离
704
+
705
+ 库不导出 useThemeStore,也不依赖使用方 Pinia。根入口和 /components 导出相同组件。
706
+
707
+ ## 默认:隔离模式
708
+
709
+ ```ts
710
+ import 'element-plus/dist/index.css'
711
+ import 'sky-ui-kit/style.css'
712
+ import { UiButton, UiSelect, AppSelect } from 'sky-ui-kit'
713
+ ```
714
+
715
+ style.css 不向 :root 写入主题或尺寸变量,不包含裸 .el-* 覆盖规则。组件自动创建 userssite-theme 作用域,Element Plus 适配规则只在这个范围内生效。原生 ElButton 等放在库组件作用域之外时保留原来的外观;放在库组件插槽内部时,会继承这个范围的主题,这是预期行为。
716
+
717
+ 库内部使用 --userssite-* 私有变量,以 var(--color-primary, 默认值) 等形式读取项目已有变量,不回写公共变量。项目只定义部分变量时,其余使用库默认值。无需主题 store。
718
+
719
+ ```css
720
+ :root {
721
+ --color-primary: #1677ff;
722
+ --color-bg: #ffffff;
723
+ --color-text: #1f2937;
724
+ --color-panel: #ffffff;
725
+ }
726
+ ```
727
+
728
+ 已有项目全局 CSS 若自行覆盖 --el-* 或 .el-*,其自身仍会影响原生 Element Plus;隔离模式不会撤销项目已有规则。尺寸读取项目 --cp-vfit-scale,未定义时为 1。
729
+
730
+ ## 浮层与兼容边界
731
+
732
+ - UiSelect、日期选择、Popover 等支持 teleported 的组件默认 false,使浮层保留祖先主题;需要时可以显式设置 true。这样可能受祖先 overflow 裁剪,使用方需按布局选择。
733
+ - 支持 popperClass、modalClass 的组件自动合并 userssite-theme,保留用户类名。弹窗、抽屉移到 body 时仍拥有隔离默认主题。
734
+ - UiMessage、UiMessageBox、UiNotification 以及 vUiLoading 给其浮层加专用类;原生 ElMessage 和 v-loading 不自动套用库主题。
735
+ - 挂到 body 的浮层读取 html / :root 的项目变量。只在局部容器定义的变量不会跨 Teleport 继承;需将共享主题放在根节点,或通过 Element Plus 的 append-to 指定有主题变量的目标容器。消息服务无局部容器主题上下文。
736
+ - ConfigProvider、Option、TableColumn、TabPane 保留原组件,依靠所属控件的主题作用域,避免破坏配置注入和父子组件关系。
737
+ - 包装层转发 attrs、事件、slots 和实例 ref;UiSelect 默认浮层行为与原生有上述差别,DOM 中增加 display: contents 主题容器。依赖直属子节点的 CSS 和复杂布局迁移仍需核对。
738
+
739
+ ## 可选:整站主题
740
+
741
+ ```ts
742
+ import 'element-plus/dist/index.css'
743
+ import 'sky-ui-kit/style.css'
744
+ import 'sky-ui-kit/global.css'
745
+ ```
746
+
747
+ 只有主动导入 global.css 才会写入全局公共变量和 --el-*,以及覆盖整站 .el-* 外观。此模式用于明确需要统一替换原项目主题的场景。
748
+
749
+ ## 默认暗色
750
+
751
+ 在 html 添加 theme-dark 类即可让库组件使用暗色默认值。若项目自己定义了同名颜色变量,项目变量优先,暗色也应由项目更新这些变量。预览站使用自己的 Pinia 调色面板并显式加载全局主题,不代表使用方需要 Pinia。
752
+
753
+ ## 验证与发布
754
+
755
+ 开发验证页 /isolation.html 将原生组件和库组件并排展示:局部紫色主题只作用于库组件。页面包含按钮事件、下拉框 v-model、弹窗和消息服务。
756
+
757
+ 本次不运行构建、不发布;dist 为旧产物。后续发布时构建脚本分别生成隔离 style.css 和可选 global.css。
758
+
759
+ ## 示例代码组织
760
+
761
+ 公共 CSS 只在项目 main.ts 引入一次。预览站的公共接入代码单独维护在 src/setup-examples.ts,各组件的查看代码只列组件 import、状态、事件与模板。查看代码中的接入链接指向公共配置;复制组件代码不会附带重复 CSS。已有 Element Plus CSS 引入时无需再添加。