combo删除按钮二次确认,未点击确认就已经删除
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 18.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
描述问题:
combo给删除按钮设置了二次确认是否删除,未点击确认数据已经删除
如何复现(请务必完整填写下面内容):
-
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
6.8.0 -
粘贴有问题的完整
amis schema代码:
{
"type": "fieldset",
"title": "非计划停机时间(分钟)",
"collapsable": true,
"body": [
{
"type": "group",
"body": [
{
"type": "input-group",
"name": "input-group",
"label": "故障明细",
"body": [
{
"type": "input-text",
"inputClassName": "b-r-none p-r-none",
"name": "input-group",
"id": "u:482eefdebd58"
},
{
"type": "button",
"label": "${show?'收起明细':'展开明细'}",
"level": "primary",
"id": "u:eb2b768ce79e",
"onEvent": {
"click": {
"weight": 0,
"actions": [
{
"componentId": "show",
"ignoreError": true,
"actionType": "setValue",
"args": {
"value": "${!show}"
}
}
]
}
}
}
],
"id": "u:5cc1eb7fcf72",
"coluncRatio": 4,
"size": "sm",
"mode": "horizontal"
},
{
"type": "input-text",
"id": "u:11ddae2c88ea",
"name": "test",
"label": "其它"
},
{
"type": "input-text",
"id": "u:bfd8ea6916cc",
"name": "test1",
"label": "备注"
}
],
"id": "u:441a4b1fe1ad"
},
{
"type": "container",
"body": [
{
"type": "flex",
"items": [
{
"type": "container",
"body": [
{
"type": "tpl",
"id": "u:55db5d05dd2a",
"tpl": "类别",
"inline": true,
"wrapperComponent": ""
}
],
"id": "u:5aa377926d5d",
"size": "none",
"style": {
"position": "static",
"display": "block",
"flex": "1 1 auto",
"flexGrow": 1,
"flexBasis": "0px"
},
"wrapperBody": false,
"isFixedHeight": false,
"isFixedWidth": false,
"wrapperCustomStyle": {
"text-align": "center"
}
},
{
"type": "container",
"id": "u:e886b78118a2",
"body": [
{
"type": "tpl",
"id": "u:88ecb41f078a",
"tpl": "时长(分钟)",
"inline": true,
"wrapperComponent": ""
}
],
"size": "none",
"style": {
"position": "static",
"display": "block",
"flex": "1 1 auto",
"flexGrow": 1,
"flexBasis": "0px"
},
"wrapperBody": false,
"isFixedHeight": false,
"isFixedWidth": false,
"wrapperCustomStyle": {
"text-align": "center"
}
},
{
"type": "container",
"body": [
{
"type": "tpl",
"tpl": "备注(类别为“其他”时必填)",
"inline": true,
"wrapperComponent": "",
"id": "u:0825a69e0a80"
}
],
"size": "none",
"style": {
"position": "static",
"display": "block",
"flex": "1 1 auto",
"flexGrow": 1,
"flexBasis": "0px"
},
"wrapperBody": false,
"isFixedHeight": false,
"isFixedWidth": false,
"id": "u:68e53f9bf81d",
"wrapperCustomStyle": {
"text-align": "center"
}
}
],
"id": "u:656d7be49be2",
"style": {
"position": "relative",
"rowGap": "10px",
"columnGap": "6px",
"flexWrap": "nowrap",
"inset": "auto",
"alignItems": "center",
"justifyContent": "center",
"overflowX": "visible",
"minWidth": "90%",
"maxWidth": "94%",
"flex": "0 0 auto"
},
"isFixedHeight": false,
"isFixedWidth": false,
"themeCss": {
"baseControlClassName": {
"padding-and-margin:default": {
"margin": "0.3125rem 0"
}
}
}
},
{
"type": "combo",
"label": "",
"name": "combo",
"multiple": true,
"addable": true,
"removable": true,
"removableMode": "button",
"addBtn": {
"label": "新增",
"icon": "fa fa-plus",
"level": "primary",
"size": "sm",
"id": "u:50f349f38513"
},
"items": [
{
"type": "input-text",
"id": "u:901df590a8d7",
"name": "text",
"required": true,
"columnRatio": 4,
"placeholder": "文本",
"labelAlign": "inherit"
},
{
"type": "select",
"id": "u:5b37be24eec5",
"name": "select",
"placeholder": "选项",
"options": [
{
"label": "A",
"value": "a"
},
{
"label": "B",
"value": "b"
}
],
"multiple": false,
"required": true,
"labelAlign": "inherit",
"columnRatio": 4
},
{
"type": "input-text",
"name": "text",
"placeholder": "文本",
"id": "u:901df590a8d7",
"disabled": false,
"labelAlign": "inherit",
"columnRatio": 4
}
],
"id": "u:f09159d0e718",
"syncFields": [],
"deleteBtn": {
"label": "删除",
"level": "danger",
"id": "u:f2c441c938d5",
"wrapperCustomStyle": {},
"confirmText": "请确认是否删除"
},
"value": [
{}
],
"strictMode": false,
"tabsMode": false,
"mode": "normal"
}
],
"id": "u:c788e16a271c",
"visibleOn": "${show===true}",
"style": {
"display": "block",
"position": "static"
},
"isFixedHeight": false,
"isFixedWidth": false
}
],
"id": "u:eaa65fa74d90"
} -
操作步骤
请简单描述一下复现的操作步骤...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported behavior with the provided amis schema, focusing on the combo's delete button and its confirmText in amis 6.8.0 or the latest beta. Check whether cancelling the confirmation preserves the item and confirming removes it; the issue is done when both actions behave correctly.
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