@agent-xy/admin-vue3 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +43 -2
- package/dist/index.js +1404 -0
- package/dist/style.css +1 -0
- package/dist/types/components/BaseCard/index.vue.d.ts +26 -0
- package/dist/types/components/DataTable/TableCell.vue.d.ts +14 -0
- package/dist/types/components/DataTable/index.vue.d.ts +53 -0
- package/dist/types/components/DataTable/types.d.ts +81 -0
- package/dist/types/components/Dialog/BaseDialog.vue.d.ts +141 -0
- package/dist/types/components/Dialog/index.d.ts +43 -0
- package/dist/types/components/Drawer/BaseDrawer.vue.d.ts +130 -0
- package/dist/types/components/Drawer/index.d.ts +1 -0
- package/dist/types/components/SearchForm/components/FormItem.vue.d.ts +35 -0
- package/dist/types/components/SearchForm/index.vue.d.ts +45 -0
- package/dist/types/components/SearchForm/types.d.ts +97 -0
- package/dist/types/components/SearchForm/values.d.ts +4 -0
- package/dist/types/hooks/useAsyncListAction.d.ts +7 -0
- package/dist/types/hooks/usePageList.d.ts +30 -0
- package/dist/types/hooks/useSelectOptions.d.ts +16 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/types/admin.d.ts +3 -0
- package/dist/types/utils/adminCore.d.ts +74 -0
- package/dist/types/utils/data.d.ts +2 -0
- package/dist/types/utils/formRender.d.ts +2 -0
- package/dist/types/utils/tableRender.d.ts +7 -0
- package/docs/DataTable.md +23 -0
- package/docs/SearchForm.md +21 -0
- package/docs/usage.md +33 -0
- package/package.json +39 -4
- package/templates/manifest.json +23 -0
- package/templates/users/README.md +12 -0
- package/templates/users/UsersList.vue +73 -0
- package/templates/users/config.ts +12 -0
- package/templates/users/data-source.ts +5 -0
- package/templates/users/index.vue +21 -0
- package/templates/users/style.css +5 -0
- package/templates/users/types.ts +13 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AI Code contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @agent-xy/admin-vue3
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Vue 3 后台公共组件,可独立于 `ai-code` 安装和使用。首批验证版本为 Vue 3.5.25、Element Plus 2.11.5,组件库和规则工具独立发布。
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @agent-xy/admin-vue3
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
项目需要提供兼容的 Vue 与 Element Plus。声明精确版本或版本范围均可,按团队策略提交锁文件,在 CI 使用冻结锁文件安装;CLI 不固定组件版本。
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<DataTable row-key="id" :table-data="rows" :table-columns="columns" />
|
|
14
|
+
</template>
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import { DataTable, type TableColumn } from '@agent-xy/admin-vue3';
|
|
17
|
+
import 'element-plus/dist/index.css';
|
|
18
|
+
import '@agent-xy/admin-vue3/style.css';
|
|
19
|
+
interface Row { id: string; name: string }
|
|
20
|
+
defineProps<{ rows: Row[] }>();
|
|
21
|
+
const columns: TableColumn<Row>[] = [{ prop: 'name', label: '姓名' }];
|
|
22
|
+
</script>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
公共导出包含 BaseCard、SearchForm、DataTable、BaseDialog、BaseDrawer、AdminDialog、createDialogService、Dialog、showDialog,三个列表组合式函数,以及配置辅助函数和相关类型。
|
|
26
|
+
|
|
27
|
+
- [搜索组件](docs/SearchForm.md)
|
|
28
|
+
- [表格组件](docs/DataTable.md)
|
|
29
|
+
- [弹层与列表逻辑](docs/usage.md)
|
|
30
|
+
- [用户管理页面接入](templates/users/README.md)
|
|
31
|
+
|
|
32
|
+
`AdminDialog` 是可选的 Vue 插件,提供全局函数式弹窗;声明式 BaseDialog 不需要安装插件。需要多个应用隔离时使用 `createDialogService(appContext)`。
|
|
33
|
+
|
|
34
|
+
页面模板跟随当前包版本分发,通过公开的 `templates/manifest.json` 入口发现。模板生成后归项目维护;用户自行注册路由、接入请求和权限。组件实现不复制到业务目录。
|
|
35
|
+
|
|
36
|
+
开发维护在本仓库的 `packages/admin-vue3/src`,共享纯逻辑维护在 `content/templates/admin/shared/adminCore.ts`。旧复制资源由 `scripts/build-admin.mjs` 派生,不能反向修改。先构建组件包,再启动或构建示例;示例通过包导入消费构建产物,不使用源码别名。
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
npm run build:admin
|
|
40
|
+
npm run dev --workspace @agent-xy/admin-vue3
|
|
41
|
+
npm run build:demo --workspace @agent-xy/admin-vue3
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
当前交付以本地打包验收,尚未公开发布,也没有配置线上演示地址。
|