input-table 在执行 addItem 动作的时候 会触发 显示空的"操作"列
- Dominant language
- TypeScript
- Stars
- 18.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
我用 sdk 的方式使用 amis,版本是 v6.3.0
利用 amisScoped 对象执行 addItem 的动作,会导致多出来一个空的 操作 列


请参照如下代码
```
let pageSchema = {
"type": "page",
"data": {
"table": [
{"a": "a1", "b": "b1" },
{ "a": "a2", "b": "b2"}
]
},
body: [
{
"type": "form",
"title": "",
"actions": [],
"body": [
{
"type": "input-table",
"name": "table",
"id": "addItem-input-table",
"columns": [
{
"label": "",
"type": "tpl",
"tpl": "hello $a, let me try $b!"
}
]
}
]
}
]
}
let amis = amisRequire('amis/embed');
window.__amisScoped = amis.embed('#root', pageSchema);
function test1() {
__amisScoped.doAction(
[
{
actionType: 'addItem',
componentId: 'addItem-input-table',
args: {
"item": [
{
"a": "a-noIndex",
"b": "b-noIndex"
}
]
}
}
]
)
}
添加条目
add item
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the provided amis embed example with the input-table and the amisScoped doAction addItem call. Trace how addItem updates input-table columns and identify why an empty 操作 column appears. Done means adding an item no longer creates that empty column, while existing table columns remain unchanged.
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
- Mostly clear
- Newbie friendliness
- 35/100