neo-cmp-cli 1.2.12 → 1.2.15

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/src/module/main.js +4 -4
  3. package/src/plugins/AddNeoRequirePlugin.js +3 -12
  4. package/src/template/antd-custom-cmp-template/package.json +1 -1
  5. package/src/template/develop/neo-custom-cmp-template/package.json +1 -1
  6. package/src/template/echarts-custom-cmp-template/package.json +1 -1
  7. package/src/template/neo-custom-cmp-template/README.md +1 -1
  8. package/src/template/neo-custom-cmp-template/package.json +2 -2
  9. package/src/template/neo-custom-cmp-template/src/assets/img/detail.svg +1 -0
  10. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/README.md +2 -7
  11. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/index.tsx +13 -1
  12. package/src/template/neo-custom-cmp-template/src/components/contact-form/index.tsx +2 -3
  13. package/src/template/neo-custom-cmp-template/src/components/entity-detail/README.md +193 -0
  14. package/src/template/neo-custom-cmp-template/src/components/entity-detail/index.tsx +325 -0
  15. package/src/template/neo-custom-cmp-template/src/components/entity-detail/model.ts +125 -0
  16. package/src/template/neo-custom-cmp-template/src/components/entity-detail/style.scss +292 -0
  17. package/src/template/neo-custom-cmp-template/src/components/object-card-list/README.md +61 -0
  18. package/src/template/neo-custom-cmp-template/src/components/object-card-list/index.tsx +201 -0
  19. package/src/template/neo-custom-cmp-template/src/components/object-card-list/model.ts +66 -0
  20. package/src/template/neo-custom-cmp-template/src/components/object-card-list/style.scss +260 -0
  21. package/src/template/neo-custom-cmp-template/src/components/xobject-table/README.md +3 -11
  22. package/src/template/neo-custom-cmp-template/src/components/xobject-table/index.tsx +76 -58
  23. package/src/template/neo-custom-cmp-template/src/components/xobject-table/model.ts +21 -3
  24. package/src/template/react-custom-cmp-template/package.json +1 -1
  25. package/src/template/react-ts-custom-cmp-template/package.json +1 -1
  26. package/src/template/vue2-custom-cmp-template/package.json +1 -1
  27. package/src/template/neo-custom-cmp-template/src/components/xobject-table-v2/README.md +0 -108
  28. package/src/template/neo-custom-cmp-template/src/components/xobject-table-v2/index.tsx +0 -729
  29. package/src/template/neo-custom-cmp-template/src/components/xobject-table-v2/model.ts +0 -122
  30. package/src/template/neo-custom-cmp-template/src/components/xobject-table-v2/style.scss +0 -304
@@ -1,108 +0,0 @@
1
- # XObject 数据表格组件
2
- 基于 XObject 的数据表格组件,支持增删改查操作,表格列根据 `getXObjectDesc` 返回的 fields 动态生成。
3
-
4
- ## 功能特性
5
-
6
- - 📊 **动态表格列**:根据 XObject 字段描述自动生成表格列
7
- - ➕ **新增记录**:支持通过弹窗表单新增数据记录
8
- - ✏️ **编辑记录**:支持编辑现有数据记录
9
- - 🗑️ **删除记录**:支持删除数据记录,带确认提示
10
- - 🔄 **数据刷新**:支持手动刷新数据
11
- - 📄 **分页支持**:支持分页显示,可配置每页显示条数
12
- - 🎨 **响应式设计**:适配不同屏幕尺寸
13
- - ⚙️ **属性配置**:支持通过编辑器配置组件属性
14
-
15
- ## 组件属性
16
-
17
- | 属性名 | 类型 | 默认值 | 说明 |
18
- |--------|------|--------|------|
19
- | title | string | '数据表格' | 表格标题 |
20
- | xObjectApiKey | string | '' | 数据对象的 API Key |
21
- | pageSize | number | 10 | 每页显示条数 |
22
- | showPagination | boolean | true | 是否显示分页 |
23
- | showAddButton | boolean | true | 是否显示新增按钮 |
24
- | showEditButton | boolean | true | 是否显示编辑按钮 |
25
- | showDeleteButton | boolean | true | 是否显示删除按钮 |
26
-
27
- ## 使用方法
28
-
29
- ### 1. 在编辑器中使用
30
-
31
- 1. 从组件面板拖拽 "XObject 数据表格" 组件到页面
32
- 2. 在右侧属性面板中选择要操作的数据对象
33
- 3. 配置其他属性(可选)
34
- 4. 保存并预览
35
-
36
- ### 2. 代码中使用
37
-
38
- ```tsx
39
- import XObjectTable from './components/xobject-table';
40
-
41
- // 使用组件
42
- <XObjectTable
43
- title="联系人列表"
44
- xObjectApiKey="customContact__c"
45
- pageSize={20}
46
- showPagination={true}
47
- showAddButton={true}
48
- showEditButton={true}
49
- showDeleteButton={true}
50
- />
51
- ```
52
-
53
- ## 技术实现
54
-
55
- ### 核心依赖
56
-
57
- - **Ant Design**:UI 组件库
58
- - **React**:前端框架
59
- - **TypeScript**:类型支持
60
-
61
- ### 主要方法
62
-
63
- - `getXObjectDesc()`:获取 XObject 字段描述
64
- - `getEntityList()`:获取实体列表
65
- - `queryXObjectData()`:查询数据列表
66
- - `createXObject()`:创建数据记录
67
- - `updateXObject()`:更新数据记录
68
- - `deleteXObject()`:删除数据记录
69
-
70
- ### 数据流程
71
-
72
- 1. **初始化**:组件挂载时获取实体列表和字段描述
73
- 2. **列生成**:根据字段描述动态生成表格列
74
- 3. **数据加载**:使用 `queryXObjectData` 获取数据列表
75
- 4. **操作处理**:通过对应的 API 方法处理增删改操作
76
-
77
- ## 样式定制
78
-
79
- 组件提供了完整的 SCSS 样式文件,支持以下定制:
80
-
81
- - 表格样式(边框、悬停效果等)
82
- - 按钮样式(颜色、大小、间距等)
83
- - 弹窗样式(表单布局、输入框样式等)
84
- - 响应式设计(移动端适配)
85
-
86
- ## 注意事项
87
-
88
- 1. **权限要求**:确保用户有对应 XObject 的读写权限
89
- 2. **字段类型**:目前支持 text、textarea、select 等基础字段类型
90
- 3. **必填字段**:表单会根据字段的 required 属性进行验证
91
- 4. **错误处理**:组件内置了完善的错误处理和用户提示
92
-
93
- ## 扩展开发
94
-
95
- 如需扩展功能,可以:
96
-
97
- 1. **添加字段类型支持**:在 `renderForm()` 方法中添加新的字段类型
98
- 2. **自定义操作列**:修改 `generateColumns()` 方法中的操作列配置
99
- 3. **添加批量操作**:扩展表格功能支持批量删除等操作
100
- 4. **自定义样式**:修改 `style.scss` 文件定制组件外观
101
-
102
- ## 更新日志
103
-
104
- ### v1.0.0
105
- - 初始版本发布
106
- - 支持基础的增删改查功能
107
- - 支持动态列生成
108
- - 支持属性配置面板