@h-ai/cli 0.1.0-alpha.45 → 0.1.0-alpha.46
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.46",
|
|
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.46"
|
|
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.46",
|
|
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}}"],
|
|
@@ -279,7 +279,7 @@ const p = usePlatform()
|
|
|
279
279
|
| `Form` | `loading`, `disabled`, `onsubmit` | 表单容器 |
|
|
280
280
|
| `FormField` | `label`, `name`, `error`, `hint`, `required` | 表单字段 |
|
|
281
281
|
| `Modal` | `open`, `title`, `size`, `closeOnBackdrop` | 模态框 |
|
|
282
|
-
| `Drawer` | `open`, `position`, `size`
|
|
282
|
+
| `Drawer` | `open`, `position`, `size`, `width`, `resizable`, `widthStorageKey` | 可选拖动并记忆宽度的抽屉 |
|
|
283
283
|
| `DataTable` | `data`, `columns`, `keyField`, `sortKey`, `sortDir`, `onsort`, snippet slots | 数据表格(列定义 `sortable` 可排序) |
|
|
284
284
|
| `Combobox` | `options`, `value`, `multiple`, `placeholder`, `error`, `onchange` | 可搜索选择 |
|
|
285
285
|
| `Calendar` | `value`, `minValue`, `maxValue` | 独立日历 |
|
|
@@ -461,7 +461,7 @@ const p = usePlatform()
|
|
|
461
461
|
| 配置项 | 说明 |
|
|
462
462
|
| --- | --- |
|
|
463
463
|
| `form.variant` | `'drawer'`(抽屉,默认)或 `'modal'`(弹出窗口) |
|
|
464
|
-
| `form.drawerSize` / `form.drawerWidth` | 抽屉尺寸预设 / 自定义 CSS
|
|
464
|
+
| `form.drawerSize` / `form.drawerWidth` / `form.drawerResizable` | 抽屉尺寸预设 / 自定义 CSS 宽度 / 是否允许拖动并按资源记忆宽度(默认允许) |
|
|
465
465
|
| `form.modalSize` / `form.modalWidth` / `form.modalHeight` | 弹窗尺寸预设 / 自定义宽高 |
|
|
466
466
|
| `pagination.showSizeChanger` | 每页条数选择器(默认开启) |
|
|
467
467
|
| `pagination.pageSizeOptions` | 每页条数候选项(默认 `[10, 20, 50, 100]`) |
|
|
@@ -472,6 +472,7 @@ const p = usePlatform()
|
|
|
472
472
|
| `showHeader` / `toolbarLeading` | 关闭默认页头并在工具栏左侧放置标题或说明 |
|
|
473
473
|
| `toolbarActions` | 工具栏业务操作 snippet |
|
|
474
474
|
| `card` | 卡片列表项渲染 snippet;仍复用分页和独立滚动容器 |
|
|
475
|
+
| `detailColumns` | 点击后打开详情抽屉的列 key,例如 `['title']` |
|
|
475
476
|
| `sortableColumns` | 可执行服务端排序的列;为空时使用全部列表列 |
|
|
476
477
|
|
|
477
478
|
注意:`CrudPage` 会占满父级可用高度;表格无论是否有数据都会撑满剩余空间,仅数据区滚动,表头和分页栏固定。
|
|
@@ -486,6 +487,7 @@ const p = usePlatform()
|
|
|
486
487
|
form={{ variant: 'modal', modalSize: 'lg' }}
|
|
487
488
|
pagination={{ showSizeChanger: true, showJumper: true, pageSizeOptions: [10, 20, 50] }}
|
|
488
489
|
density='compact'
|
|
490
|
+
detailColumns={['name']}
|
|
489
491
|
sortableColumns={[{ key: 'createdAt', label: '创建时间' }]}
|
|
490
492
|
{nav}
|
|
491
493
|
/>
|
|
@@ -497,6 +499,8 @@ const p = usePlatform()
|
|
|
497
499
|
form={{ variant: 'drawer', drawerWidth: '40rem' }}
|
|
498
500
|
```
|
|
499
501
|
|
|
502
|
+
抽屉默认可拖动左侧边缘调整宽度,并按 `crud.resource.name` 记忆;传 `drawerResizable: false` 可关闭。
|
|
503
|
+
|
|
500
504
|
---
|
|
501
505
|
|
|
502
506
|
## Design Token 系统
|