alibaba / alibaba/lowcode-engine

出码结果存在冗余props

Open
#1,112 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

# 复现

https://lowcode-engine.cn/demo/basic-antd.html

导入Schema

```
{
"componentName": "Page",
"id": "node_ocl7hb14o41",
"props": {},
"fileName": "sample",
"hidden": false,
"title": "",
"isLocked": false,
"condition": true,
"conditionGroup": "",
"dataSource": {
"list": [
{
"type": "fetch",
"isInit": true,
"options": {
"params": {},
"method": "GET",
"isCors": true,
"timeout": 5000,
"headers": {},
"uri": "http://192.168.3.110:40001/mock/23/demo1"
},
"id": "demo1"
},
{
"type": "fetch",
"isInit": true,
"options": {
"params": {},
"method": "GET",
"isCors": true,
"timeout": 5000,
"headers": {},
"uri": "http://192.168.3.110:40001/mock/23/list1"
},
"id": "list1"
}
]
},
"originCode": "",
"css": "div {}",
"state": {},
"methods": {},
"lifeCycles": {},
"children": [
{
"componentName": "Table",
"id": "node_ocl8zm5end3",
"props": {
"dataSource": [
{
"id": "1",
"name": "胡彦斌2",
"age": 32,
"address": "西湖区湖底公园1号"
},
{
"id": "2",
"name": "王一博",
"age": 28,
"address": "滨江区网商路699号"
}
],
"columns": [
{
"title": "姓名2",
"dataIndex": "name",
"key": "name"
},
{
"title": "年龄",
"dataIndex": "age",
"key": "age",
"align": "left",
"fixed": "",
"render": {
"type": "JSSlot",
"params": [
"text",
"record",
"index"
],
"value": [
{
"componentName": "Button",
"id": "node_ocl92814qe2",
"props": {
"type": "primary",
"children": {
"type": "JSExpression",
"value": "this.record.age",
"mock": "主按钮"
},
"icon": {
"type": "JSSlot",
"value": [
{
"componentName": "Icon",
"id": "node_ocl92814qe4",
"props": {
"type": "SmileOutlined"
},
"hidden": false,
"title": "",
"isLocked": false,
"condition": true,
"conditionGroup": ""
}
]
},
"_unsafe_MixedSetter_children_select": "VariableSetter",
"htmlType": "button",
"size": "middle",
"shape": "default",
"block": false,
"danger": false,
"ghost": false,
"disabled": false
},
"hidden": false,
"title": "",
"isLocked": false,
"condition": true,
"conditionGroup": ""
}
]
}
}
],
"pagination": {
"pageSize": 10,
"total": 15,
"current": 1,
"showSizeChanger": false,
"showQuickJumper": false,
"simple": false,
"size": "default"
},
"scroll": {
"scrollToFirstRowOnChange": true
},
"loading": {
"type": "JSExpression",
"value": "this.state.hello",
"mock": false
},
"rowKey": "id",
"showHeader": true,
"size": "default",
"tableLayout": "",
"rowSelection": false
},
"hidden": false,
"title": "",
"isLocked": false,
"condition": true,
"conditionGroup": ""
}
]
}
```
![image](https://user-images.githubusercontent.com/112670419/194796895-184d77f9-bba0-4312-80ac-9af86c0cae57.png)

这个字段在自定义渲染下会出现

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the basic Ant Design demo at https://lowcode-engine.cn/demo/basic-antd.html and import the schema from the issue. Inspect the generated output for redundant props in the custom-rendering case, then compare the result with the schema to determine which props should be omitted. Done means custom-rendered output no longer contains the reported redundant fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.