baidu / baidu/amis

Crud 轮询参数设置为变量,会触发持续持续持续持续持续持续持续持续持续.....请求

Open
#7,609 4 comments 0 reactions 0 assignees View on GitHub
confirmed
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

```
{
"type": "page",
"body": {
"type": "crud",
"api": "/amis/api/mock2/sample",
"syncLocation": false,
// ----- 如下
"data": {
"interval": "3000"
},
"interval": "${interval}",
// ----- 如上
"columns": [
{
"name": "id",
"label": "ID"
},
{
"name": "engine",
"label": "Rendering engine"
},
{
"name": "browser",
"label": "Browser"
},
{
"name": "platform",
"label": "Platform(s)"
},
{
"name": "version",
"label": "Engine version"
},
{
"name": "grade",
"label": "CSS grade"
},
{
"type": "operation",
"label": "操作",
"buttons": [
{
"label": "详情",
"type": "button",
"level": "link",
"actionType": "dialog",
"dialog": {
"title": "查看详情",
"body": {
"type": "form",
"body": [
{
"type": "input-text",
"name": "engine",
"label": "Engine"
},
{
"type": "input-text",
"name": "browser",
"label": "Browser"
},
{
"type": "input-text",
"name": "platform",
"label": "platform"
},
{
"type": "input-text",
"name": "version",
"label": "version"
},
{
"type": "control",
"label": "grade",
"body": {
"type": "tag",
"label": "${grade}",
"displayMode": "normal",
"color": "active"
}
}
]
}
}
},
{
"label": "删除",
"type": "button",
"level": "link",
"className": "text-danger",
"disabledOn": "this.grade === 'A'"
}
]
}
]
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Use the provided CRUD configuration as the reproduction case, especially the data.interval value and the interval: "${interval}" setting. Trace how the CRUD component evaluates the variable and starts polling. Done means the configured interval produces requests at the intended cadence rather than a continuous request loop.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.