Skip to content

Commit

Permalink
Merge pull request #11443 from lqPrototype/fix-input-table-range
Browse files Browse the repository at this point in the history
fix:  input-table不能使用range extraName属性
  • Loading branch information
hsm-lv authored Jan 2, 2025
2 parents 2747fee + 5477220 commit 1882010
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/zh-CN/components/form/input-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,66 @@ order: 54
}
```

## 支持 Range extraName 属性

> 6.10.0 以上版本
```schema: scope="body"
{
"type": "page",
"body": {
"type": "form",
"debug": true,
"data": {
"table": [
{
"a": "1212",
"begin": "06:00",
"end": "07:00"
}
]
},
"api": "/api/mock2/form/saveForm",
"body": [
{
"type": "input-table",
"name": "table",
"label": "Table",
"needConfirm": false,
"columns": [
{
"label": "A",
"name": "a"
},
{
"type": "input-time-range",
"name": "begin",
"extraName": "end"
},
{
"type": "operation",
"label": "操作",
"buttons": [
{
"label": "删除",
"type": "button",
"level": "link"
}
]
}
]
},
{
"type": "button",
"label": "Table新增一行",
"target": "table",
"actionType": "add"
}
]
}
}
```

## 属性表

| 属性名 | 类型 | 默认值 | 说明 |
Expand Down
1 change: 1 addition & 0 deletions packages/amis/src/renderers/QuickEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ export const HocQuickEdit =
schema.body.length === 1 &&
!schema.body[0].unique && // 唯一模式还不支持
!schema.body[0].value && // 不能有默认值表达式什么的情况
!schema.body[0]?.extraName &&
schema.body[0].name &&
schema.body[0].name === name &&
schema.body[0].type &&
Expand Down

0 comments on commit 1882010

Please sign in to comment.