@hzab/list-render 1.9.7-beta → 1.9.7-beta1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # @hzab/list-render@1.9.8
2
2
 
3
+ feat: 去除 schema x-display 属性 去除 labelCol wrapperCol 属性
3
4
  feat: 新增 layout 类型,card 用于卡片格式渲染,支持自定义渲染
4
5
 
5
6
  # @hzab/list-render@1.9.7
package/README.md CHANGED
@@ -130,7 +130,7 @@ const listDM = useMemo(
130
130
  | 属性名称 | 属性类型 | 必须 | 默认值 | 描述 |
131
131
  | -------------- | -------- | ---- | ------ | -------------- |
132
132
  | CardItemRender | JSX | | | 自定义渲染卡片 |
133
- | |
133
+ | columns | Number | 是 | 3 | 栅格列数 |
134
134
 
135
135
  ##### cardConf.colConf[xxx]
136
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.9.7-beta",
3
+ "version": "1.9.7-beta1",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -14,12 +14,11 @@
14
14
  }
15
15
  .item-render-card-title {
16
16
  padding: 8px 0px;
17
- margin-bottom: 10px;
18
17
  text-align: right;
19
18
  border-bottom: 1px solid #f0f0f0;
20
19
  }
21
20
  .item-render-card-content {
22
- padding: 0 12px;
21
+ padding: 12px 12px 0;
23
22
  }
24
23
  }
25
24
  }
@@ -205,7 +205,10 @@ export const getOptItByVal = function (val, options, opt) {
205
205
  export const removeInTableFalseFields = (data) => {
206
206
  // 深拷贝原始数据
207
207
  const result = _.cloneDeep(data);
208
-
208
+ if (result?.form) {
209
+ delete result.form?.labelCol;
210
+ delete result.form?.wrapperCol;
211
+ }
209
212
  // 检查是否存在 schema 和 properties
210
213
  if (result?.schema?.properties) {
211
214
  // 遍历properties中的所有属性
@@ -213,6 +216,8 @@ export const removeInTableFalseFields = (data) => {
213
216
  if (result.schema.properties[key].inTable === false) {
214
217
  // 删除整个包含inTable:false的属性
215
218
  delete result.schema.properties[key];
219
+ } else if (result.schema.properties[key]["x-display"]) {
220
+ delete result.schema.properties[key]["x-display"];
216
221
  }
217
222
  });
218
223
  }