amis
amis copied to clipboard
actionType 为 clear 或 clear-and-submit 时会带上数据域中的数据
描述问题:
实际场景是,clear/clear-and-submit 会带上 url 中的参数。为了便于复现,换成了 page 数据域中的数据。 clear 会自动带上数据域中的数据,而 clear-and-submit 会交替出现重置和清空的效果。
截图或视频:
视频中展示了 actionType 为 clear 和 clear-and-submit 的 bug https://user-images.githubusercontent.com/15087577/195262837-2a3ade39-f509-46af-ac35-f1309d79d6ea.mov
如何复现(请务必完整填写下面内容):
-
你是如何使用 amis 的?
npm -
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 在文档中可直接复现
-
粘贴有问题的完整
amis schema代码:
{
"type": "page",
"body": [
{
"type": "crud",
"api": "/amis/api/mock2/sample",
"syncLocation": false,
"columns": [
{
"name": "id",
"label": "ID"
},
{
"name": "grade",
"label": "CSS grade"
}
],
"perPageAvailable": [
10
],
"messages": {},
"filter": {
"title": "查询条件",
"body": [
{
"type": "input-text",
"name": "username",
"label": "关键字"
}
],
"actions": [
{
"label": "提交",
"level": "info",
"size": "md",
"type": "submit"
},
{
"actionType": "clear",
"label": "清空",
"type": "button"
}
]
}
}
],
"data": {
"username": "name"
}
}
- 操作步骤 在官网文档中可直接复现。 actionType 为 clear 会清空并带上数据域中的数据提交,此时表单项中的字段显示为空; actionType 为 clear-and-submit 会 有数据/数据为空 交替出现的情况
👍 Thanks for this! 🏷 I have applied any labels matching special text in your issue.
Please review the labels and make any necessary changes.
俺也一样,版本6.3.0,不过我这边只试了clear-and-submit,多次点击会出现有数据/数据为空 交替出现的情况