@apform-ui/core 1.10.38 → 1.11.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/README.md +42 -6
- package/dist/apform-ui.css +1 -1
- package/dist/apform-ui.js +5040 -5234
- package/dist/apform-ui.umd.cjs +55 -55
- package/dist/bpmn.css +1 -0
- package/dist/bpmn.d.ts +7 -0
- package/dist/bpmn.js +202 -0
- package/dist/bpmn.umd.cjs +1 -0
- package/dist/chat.d.ts +1 -1
- package/dist/components/Chat/BpmnFlowPreviewCanvas/BpmnFlowPreviewCanvas.vue.d.ts +2 -2
- package/dist/components/Chat/BpmnFlowPreviewCanvas/doc.d.ts +3 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/index.d.ts +1 -4
- package/package.json +9 -2
- package/src/docs/index.ts +3 -0
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@apform-ui/core)
|
|
6
6
|
[](https://github.com/nan1010082085/apform-ui/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
+
当前版本:**1.11.1**(多入口 `core` / `chat` / `bpmn`)。交互文档站为仓库内 **playground**(`pnpm docs:dev`)。
|
|
9
|
+
|
|
8
10
|
## 安装
|
|
9
11
|
|
|
10
12
|
```bash
|
|
@@ -20,11 +22,28 @@ npm install element-plus@2.14.2 vue@^3.5.0
|
|
|
20
22
|
可选 peer(按需):
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
npm install echarts
|
|
24
|
-
npm install pdfjs-dist
|
|
25
|
-
npm install xlsx
|
|
25
|
+
npm install echarts # MetricChart
|
|
26
|
+
npm install pdfjs-dist # PdfPreviewCard 富预览
|
|
27
|
+
npm install xlsx # ExcelPreviewCard 富预览
|
|
28
|
+
npm install vue-virtual-scroller # VirtualMessageScroller
|
|
29
|
+
npm install @vue-flow/core @vue-flow/background @vue-flow/controls # 仅 @apform-ui/core/bpmn
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 入口
|
|
33
|
+
|
|
34
|
+
| 入口 | 用途 | vue-flow | 推荐样式 |
|
|
35
|
+
|------|------|----------|----------|
|
|
36
|
+
| `@apform-ui/core` | 通用组件(布局 / 表格 / 监控等) | 否 | `style.css` |
|
|
37
|
+
| `@apform-ui/core/chat` | 对话组件轻量入口(不含 BPMN / vue-flow) | 否 | `chat.css` 或 `style.css` |
|
|
38
|
+
| `@apform-ui/core/bpmn` | `BpmnFlowPreviewCanvas` | 是(peer) | `bpmn.css`(另需 vue-flow 自带 CSS) |
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { MessageBubble, Composer } from '@apform-ui/core/chat'
|
|
42
|
+
import { BpmnFlowPreviewCanvas } from '@apform-ui/core/bpmn'
|
|
26
43
|
```
|
|
27
44
|
|
|
45
|
+
更多说明见仓库 `docs/guide/getting-started.md` 与 `docs/guide/migration.md`。
|
|
46
|
+
|
|
28
47
|
## 快速开始
|
|
29
48
|
|
|
30
49
|
```typescript
|
|
@@ -39,9 +58,18 @@ import {
|
|
|
39
58
|
// 样式(按需引入)
|
|
40
59
|
import '@apform-ui/core/tokens.css'
|
|
41
60
|
import '@apform-ui/core/design-tokens.css'
|
|
61
|
+
import '@apform-ui/core/style.css'
|
|
42
62
|
import '@apform-ui/core/styles/element-override.css'
|
|
43
63
|
```
|
|
44
64
|
|
|
65
|
+
对话场景(避免把 vue-flow 打进包):
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { MessageBubble, Composer, MessageList } from '@apform-ui/core/chat'
|
|
69
|
+
import '@apform-ui/core/tokens.css'
|
|
70
|
+
import '@apform-ui/core/chat.css'
|
|
71
|
+
```
|
|
72
|
+
|
|
45
73
|
```vue
|
|
46
74
|
<template>
|
|
47
75
|
<PageShell>
|
|
@@ -108,7 +136,7 @@ import '@apform-ui/core/styles/element-override.css'
|
|
|
108
136
|
| `LoadingDots` | 加载动画 |
|
|
109
137
|
| `Skeleton` | 骨架屏 |
|
|
110
138
|
|
|
111
|
-
### AI /
|
|
139
|
+
### AI / 对话(`@apform-ui/core/chat`)
|
|
112
140
|
|
|
113
141
|
| 组件 | 说明 |
|
|
114
142
|
|------|------|
|
|
@@ -124,6 +152,12 @@ import '@apform-ui/core/styles/element-override.css'
|
|
|
124
152
|
| `Chat/ProcessingDrawer` | 处理抽屉 |
|
|
125
153
|
| `Chat/ApprovalCard` | 审批卡片 |
|
|
126
154
|
|
|
155
|
+
### BPMN(`@apform-ui/core/bpmn`)
|
|
156
|
+
|
|
157
|
+
| 组件 | 说明 |
|
|
158
|
+
|------|------|
|
|
159
|
+
| `BpmnFlowPreviewCanvas` | BPMN 流程预览画布(需 `@vue-flow/*` peer) |
|
|
160
|
+
|
|
127
161
|
### 文件预览
|
|
128
162
|
|
|
129
163
|
| 组件 | 说明 |
|
|
@@ -178,7 +212,7 @@ import {
|
|
|
178
212
|
|
|
179
213
|
## 主题与令牌
|
|
180
214
|
|
|
181
|
-
规范名使用 `--apf-*`;`--color-*` / `--text-color-*` 等为兼容别名(对齐平台基建)。
|
|
215
|
+
规范名使用 `--apf-*`;`--color-*` / `--text-color-*` 等为兼容别名(对齐平台基建)。Chat 语义别名使用 `--c-*`(默认跟随 `--apf-*` / `--color-*`)。
|
|
182
216
|
|
|
183
217
|
```css
|
|
184
218
|
:root {
|
|
@@ -207,7 +241,9 @@ import '@apform-ui/core/theme/dark.css'
|
|
|
207
241
|
|
|
208
242
|
| 路径 | 说明 |
|
|
209
243
|
|------|------|
|
|
210
|
-
| `@apform-ui/core/style.css` |
|
|
244
|
+
| `@apform-ui/core/style.css` | 主入口组件样式(全量) |
|
|
245
|
+
| `@apform-ui/core/chat.css` | `/chat` 入口配套样式(无 vue-flow) |
|
|
246
|
+
| `@apform-ui/core/bpmn.css` | `/bpmn` 入口配套样式(需另引 vue-flow CSS) |
|
|
211
247
|
| `@apform-ui/core/tokens.css` | 设计 Token |
|
|
212
248
|
| `@apform-ui/core/design-tokens.css` | 设计系统 Token |
|
|
213
249
|
| `@apform-ui/core/styles/element-override.css` | Element Plus 样式覆盖 |
|