baidu / baidu/amis

1.9版本crud组件内提交请求刷新crud行为失效,需要与crud组件同级下才会生效

Open
#4,475 1 comment 0 reactions 0 assignees View on GitHub
fix need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

#### 描述问题:

1.9版本crud组件内提交请求刷新crud行为失效,需要与crud组件同级下才会生效

#### 截图或视频:
![image](https://user-images.githubusercontent.com/43903751/170675496-27df6914-16a3-4b6f-8a76-f4421538f3b3.png)

可以的话,尽可能提供截图或视频来补充描述你的问题...

#### 如何复现(请务必完整填写下面内容):
官网中的例子就可复现https://aisuda.bce.baidu.com/amis/zh-CN/components/action?page=1#%E8%AF%B7%E6%B1%82%E6%88%90%E5%8A%9F%E5%90%8E-%E5%88%B7%E6%96%B0%E7%9B%AE%E6%A0%87%E7%BB%84%E4%BB%B6

点击外层的ajax请求,会在调用saveForm之后刷新crud组件,而在操作栏的ajax请求则不会刷新

1. 你是如何使用 amis 的?
npm

2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
最新版本的1.9.1-beta17都存在这问题

3. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "page",
"body": [
{
"type": "button",
"label": "ajax 请求(这里的可以reload crud)",
"actionType": "ajax",
"api": "/amis/api/mock2/form/saveForm",
"reload": "crud"
},
{
"type": "divider"
},
{
"type": "crud",
"name": "crud",
"api": "/amis/api/mock2/sample?waitSeconds=1",
"columns": [
{
"name": "id",
"label": "ID"
},
{
"name": "engine",
"label": "Rendering engine"
},
{
"name": "browser",
"label": "Browser"
},
{
"name": "action",
"label": "操作",
"type": "wrapper",
"fixed": "right",
"body": [
{
"type": "button",
"label": "ajax 请求(放在crud里就不行)",
"actionType": "ajax",
"api": "/amis/api/mock2/form/saveForm",
"reload": "crud"
}
]
}
]
}
]
}
```

4. 操作步骤
分别点击两个ajax请求按钮

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the official action example linked in the issue and compare the outer AJAX button with the AJAX button nested in the CRUD column using the supplied schema. Done means both buttons reload the CRUD component after the request succeeds, with the behavior verified against the reproduction steps.

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
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.