@h-ai/cli 0.1.0-alpha.40 → 0.1.0-alpha.41
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-ai/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.0-alpha.
|
|
4
|
+
"version": "0.1.0-alpha.41",
|
|
5
5
|
"description": "Hai Framework CLI for project scaffolding and code generation.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.1.0",
|
|
35
35
|
"prompts": "^2.4.2",
|
|
36
36
|
"yaml": "^2.7.0",
|
|
37
|
-
"@h-ai/core": "0.1.0-alpha.
|
|
37
|
+
"@h-ai/core": "0.1.0-alpha.41"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{projectName}}",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.41",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "{{#if_eq appType 'admin'}}Enterprise management system built with hai Agent Framework{{/if_eq}}{{#if_eq appType 'website'}}Enterprise website built with hai Agent Framework{{/if_eq}}{{#if_eq appType 'h5'}}Mobile H5 app built with hai Agent Framework{{/if_eq}}{{#if_eq appType 'api'}}REST API service built with hai Agent Framework{{/if_eq}}{{#if_eq appType 'mobile-app'}}Mobile app built with hai Agent Framework{{/if_eq}}",
|
|
6
6
|
"keywords": ["hai", {{#unless isSvelteOnlyApp}}"sveltekit", {{/unless}}"svelte5", "{{appType}}"],
|
|
@@ -179,7 +179,7 @@ const consumed = await iam.ticket.consume(ticket, { purpose: 'ai-audio' }) //
|
|
|
179
179
|
| `getUser` | `(id, options?) => Promise<HaiResult<User \| null>>` | 获取用户(可选 include: ['roles']) |
|
|
180
180
|
| `getCurrentUser` | `(token) => Promise<HaiResult<User>>` | 通过令牌获取当前用户 |
|
|
181
181
|
| `updateCurrentUser` | `(token, data: UpdateCurrentUserInput) => Promise<HaiResult<User>>` | 当前用户修改个人资料(白名单字段) |
|
|
182
|
-
| `listUsers` | `(options?: ListUsersOptions) => Promise<HaiResult<PaginatedResult<User>>>` | 用户列表(分页 + 搜索 +
|
|
182
|
+
| `listUsers` | `(options?: ListUsersOptions) => Promise<HaiResult<PaginatedResult<User>>>` | 用户列表(分页 + 搜索 + 过滤 + 白名单排序) |
|
|
183
183
|
| `updateUser` | `(id, data) => Promise<HaiResult<User>>` | 更新用户信息 |
|
|
184
184
|
| `deleteUser` | `(id) => Promise<HaiResult<void>>` | 删除用户(自动清除会话) |
|
|
185
185
|
| `changePassword` | `(id, old, new) => Promise<HaiResult<void>>` | 修改密码(自动清除会话) |
|
|
@@ -468,8 +468,13 @@ const p = usePlatform()
|
|
|
468
468
|
| `pagination.showJumper` / `pagination.showTotal` | 跳页输入 / 总数(默认开启) |
|
|
469
469
|
| `pagination.showPageInfo` / `pagination.showFirstLast` | 页码文案 / 首页末页按钮(默认开启;紧凑视图可关闭) |
|
|
470
470
|
| `density` | 列表密度:`'normal'`(默认)或 `'compact'`;仅影响列表行、行内操作、分页与创建/编辑/详情表单 |
|
|
471
|
+
| `toolbarStyle` | `'toolbar'`(图标弹层,默认)或 `'filter-bar'`(平铺筛选栏) |
|
|
472
|
+
| `showHeader` / `toolbarLeading` | 关闭默认页头并在工具栏左侧放置标题或说明 |
|
|
473
|
+
| `toolbarActions` | 工具栏业务操作 snippet |
|
|
474
|
+
| `card` | 卡片列表项渲染 snippet;仍复用分页和独立滚动容器 |
|
|
475
|
+
| `sortableColumns` | 可执行服务端排序的列;为空时使用全部列表列 |
|
|
471
476
|
|
|
472
|
-
|
|
477
|
+
注意:`CrudPage` 会占满父级可用高度;表格无论是否有数据都会撑满剩余空间,仅数据区滚动,表头和分页栏固定。
|
|
473
478
|
|
|
474
479
|
### CrudPage 推荐用法
|
|
475
480
|
|
|
@@ -481,6 +486,7 @@ const p = usePlatform()
|
|
|
481
486
|
form={{ variant: 'modal', modalSize: 'lg' }}
|
|
482
487
|
pagination={{ showSizeChanger: true, showJumper: true, pageSizeOptions: [10, 20, 50] }}
|
|
483
488
|
density='compact'
|
|
489
|
+
sortableColumns={[{ key: 'createdAt', label: '创建时间' }]}
|
|
484
490
|
{nav}
|
|
485
491
|
/>
|
|
486
492
|
```
|