yd-admin 0.1.5 → 0.1.8
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 +98 -23
- package/dist/index.js +3943 -533
- package/dist/style.css +2056 -337
- package/package.json +10 -7
- package/dist/index.d.ts +0 -4036
package/README.md
CHANGED
|
@@ -18,11 +18,7 @@
|
|
|
18
18
|
## 📦 安装
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
22
|
-
# 或
|
|
23
|
-
npm install yd-admin
|
|
24
|
-
# 或
|
|
25
|
-
yarn add yd-admin
|
|
21
|
+
vp add yd-admin
|
|
26
22
|
```
|
|
27
23
|
|
|
28
24
|
## 🚀 快速开始
|
|
@@ -97,6 +93,23 @@ export default {
|
|
|
97
93
|
| `YdLoginCentered` | 居中登录框 |
|
|
98
94
|
| `YdCaptcha` | 验证码 |
|
|
99
95
|
| `YdPinInput` | PIN 输入 |
|
|
96
|
+
| `YdCalendar` | 日历 |
|
|
97
|
+
|
|
98
|
+
### AI 组件 (AI Components)
|
|
99
|
+
|
|
100
|
+
| 组件 | 说明 |
|
|
101
|
+
| ----------------- | ---------------- |
|
|
102
|
+
| `YdChatBubble` | 聊天消息气泡 |
|
|
103
|
+
| `YdConversation` | 会话容器 |
|
|
104
|
+
| `YdPromptInput` | AI提示词输入框 |
|
|
105
|
+
| `YdReasoning` | AI推理过程展示 |
|
|
106
|
+
| `YdCodeBlock` | 代码块(带高亮) |
|
|
107
|
+
| `YdStreamingText` | 流式文本展示 |
|
|
108
|
+
| `YdAiLoader` | AI加载动画 |
|
|
109
|
+
| `YdSuggestion` | AI建议按钮 |
|
|
110
|
+
| `YdSources` | 引用来源展示 |
|
|
111
|
+
| `YdModelSelector` | AI模型选择器 |
|
|
112
|
+
| `YdChatPage` | AI聊天页面 |
|
|
100
113
|
|
|
101
114
|
### 表单组件 (Form)
|
|
102
115
|
|
|
@@ -107,11 +120,16 @@ export default {
|
|
|
107
120
|
|
|
108
121
|
### 布局组件 (Layout)
|
|
109
122
|
|
|
110
|
-
| 组件
|
|
111
|
-
|
|
|
112
|
-
| `YdLayout`
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
123
|
+
| 组件 | 说明 |
|
|
124
|
+
| ----------------- | ------------ |
|
|
125
|
+
| `YdLayout` | 后台管理布局 |
|
|
126
|
+
| `YdLayoutSidebar` | 侧边栏 |
|
|
127
|
+
| `YdLayoutHeader` | 顶部 header |
|
|
128
|
+
| `YdLayoutContent` | 内容区域 |
|
|
129
|
+
| `YdCrudPage` | 增删改查页面 |
|
|
130
|
+
| `YdSpace` | 间距 |
|
|
131
|
+
| `YdDivider` | 分割线 |
|
|
132
|
+
| `YdStepper` | 步骤条 |
|
|
115
133
|
|
|
116
134
|
### 数据存储 (Stores)
|
|
117
135
|
|
|
@@ -148,6 +166,8 @@ await initSecureStorage();
|
|
|
148
166
|
| `YdEmpty` | 空状态 |
|
|
149
167
|
| `YdImage` | 图片 |
|
|
150
168
|
| `YdImagePreviewGroup` | 图片预览组 |
|
|
169
|
+
| `YdFlowChart` | 流程图 |
|
|
170
|
+
| `YdWatermark` | 水印 |
|
|
151
171
|
|
|
152
172
|
### 导航组件 (Navigation)
|
|
153
173
|
|
|
@@ -159,6 +179,7 @@ await initSecureStorage();
|
|
|
159
179
|
| `YdPagination` | 分页 |
|
|
160
180
|
| `YdDropdown` | 下拉菜单 |
|
|
161
181
|
| `YdSteps` | 步骤条 |
|
|
182
|
+
| `YdStepper` | 步骤器 |
|
|
162
183
|
| `YdAnchor` | 锚点 |
|
|
163
184
|
|
|
164
185
|
### 反馈组件 (Feedback)
|
|
@@ -175,6 +196,7 @@ await initSecureStorage();
|
|
|
175
196
|
| `YdPopconfirm` | 气泡确认框 |
|
|
176
197
|
| `YdResult` | 结果页 |
|
|
177
198
|
| `YdContextMenu` | 右键菜单 |
|
|
199
|
+
| `YdLoadingBar` | 加载进度条 |
|
|
178
200
|
|
|
179
201
|
### 配置组件 (Config)
|
|
180
202
|
|
|
@@ -182,6 +204,15 @@ await initSecureStorage();
|
|
|
182
204
|
| ------------------ | -------- |
|
|
183
205
|
| `YdConfigProvider` | 全局配置 |
|
|
184
206
|
|
|
207
|
+
### 路由 (Router)
|
|
208
|
+
|
|
209
|
+
| 导出 | 说明 |
|
|
210
|
+
| ----------------------- | ---------------- |
|
|
211
|
+
| `createAppRouter` | 创建路由实例 |
|
|
212
|
+
| `createAuthGuard` | 创建认证守卫 |
|
|
213
|
+
| `createPermissionGuard` | 创建权限守卫 |
|
|
214
|
+
| `YdRouter` | 路由命名空间导出 |
|
|
215
|
+
|
|
185
216
|
## 🎨 主题定制
|
|
186
217
|
|
|
187
218
|
组件库使用 CSS 变量构建,支持全局主题覆盖:
|
|
@@ -242,49 +273,93 @@ const cloned = deepClone(obj);
|
|
|
242
273
|
### 环境要求
|
|
243
274
|
|
|
244
275
|
- Node.js >= 18
|
|
245
|
-
-
|
|
276
|
+
- Vite+ (vp)
|
|
246
277
|
|
|
247
278
|
### 安装依赖
|
|
248
279
|
|
|
249
280
|
```bash
|
|
250
|
-
|
|
281
|
+
vp install
|
|
251
282
|
```
|
|
252
283
|
|
|
253
284
|
### 开发预览
|
|
254
285
|
|
|
255
286
|
```bash
|
|
256
287
|
# 启动 Demo
|
|
257
|
-
|
|
288
|
+
vp dev
|
|
258
289
|
|
|
259
|
-
#
|
|
260
|
-
|
|
290
|
+
# 监视模式构建
|
|
291
|
+
vp build --watch
|
|
261
292
|
```
|
|
262
293
|
|
|
263
294
|
### 代码检查
|
|
264
295
|
|
|
265
296
|
```bash
|
|
266
|
-
|
|
297
|
+
# 类型检查和格式化检查
|
|
298
|
+
vp check
|
|
299
|
+
|
|
300
|
+
# 格式化修复
|
|
301
|
+
vp fmt
|
|
267
302
|
```
|
|
268
303
|
|
|
269
304
|
### 构建发布
|
|
270
305
|
|
|
271
306
|
```bash
|
|
272
|
-
|
|
307
|
+
vp build
|
|
273
308
|
```
|
|
274
309
|
|
|
275
310
|
### 运行测试
|
|
276
311
|
|
|
277
312
|
```bash
|
|
278
|
-
|
|
313
|
+
vp test
|
|
279
314
|
```
|
|
280
315
|
|
|
316
|
+
## ✅ 代码质量状态
|
|
317
|
+
|
|
318
|
+
项目已通过以下检查:
|
|
319
|
+
|
|
320
|
+
- ✅ TypeScript 类型检查
|
|
321
|
+
- ✅ ESLint 代码检查
|
|
322
|
+
- ✅ 格式化检查
|
|
323
|
+
- ✅ 100 个单元测试全部通过
|
|
324
|
+
|
|
281
325
|
## 📊 Bundle 信息
|
|
282
326
|
|
|
283
|
-
| 文件 | 大小 | Gzip
|
|
284
|
-
| -------------- | ----------- |
|
|
285
|
-
| dist/index.js | ~
|
|
286
|
-
| dist/style.css | ~
|
|
287
|
-
| **总计** | **~
|
|
327
|
+
| 文件 | 大小 | Gzip |
|
|
328
|
+
| -------------- | ----------- | ----------- |
|
|
329
|
+
| dist/index.js | ~472 KB | ~89 KB |
|
|
330
|
+
| dist/style.css | ~182 KB | ~23 KB |
|
|
331
|
+
| **总计** | **~800 KB** | **~136 KB** |
|
|
332
|
+
|
|
333
|
+
## 📋 更新日志
|
|
334
|
+
|
|
335
|
+
### v0.1.8
|
|
336
|
+
|
|
337
|
+
- **feat(secureStorage)**: 支持 localStorage 和 sessionStorage 分别设置不同密钥
|
|
338
|
+
- **fix**: 修复报错问题
|
|
339
|
+
- **enhancement**: 优化说明文档
|
|
340
|
+
- **feat**: 登录控件优化,增强用户体验
|
|
341
|
+
- **feat**: 增加侧边栏控件,支持更灵活的布局配置
|
|
342
|
+
- **feat**: 增加懒加载和优化轮询机制,提升性能
|
|
343
|
+
- **enhancement**: 优化整体介绍和文档
|
|
344
|
+
- **feat**: 增加整体效果展示组件
|
|
345
|
+
- **feat**: 虚拟滚动等性能优化
|
|
346
|
+
- **enhancement**: 暂存优化,改进数据缓存
|
|
347
|
+
|
|
348
|
+
### v0.1.7
|
|
349
|
+
|
|
350
|
+
- **feat**: 安全存储插件 (AES-GCM) 支持敏感数据加密存储
|
|
351
|
+
|
|
352
|
+
### v0.1.6
|
|
353
|
+
|
|
354
|
+
- **feat**: 多语言支持 (i18n)
|
|
355
|
+
|
|
356
|
+
### v0.1.5
|
|
357
|
+
|
|
358
|
+
- **feat**: 虚拟滚动表格组件
|
|
359
|
+
|
|
360
|
+
### v0.1.4
|
|
361
|
+
|
|
362
|
+
- **feat**: 初始版本发布
|
|
288
363
|
|
|
289
364
|
## 🔗 相关链接
|
|
290
365
|
|