baidu / baidu/amis

Condition builder disabled 后还能拖动和删除

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

Description

#### 描述问题:

设置 Condition builder 的 disabled = true 后还能操作拖动和删除,如图所示。预期是在设置 disabled 后不能对条件进行任何操作,或者提供一种【展示模式】,给用户展示已经设定好的条件,但不显示任何操作按钮。

#### 截图或视频:

image

#### 如何复现(请务必完整填写下面内容):

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

2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
2.0.0.rc14

4. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "page",
"body": {
"type": "form",
"debug": true,
"body": [
{
"type": "condition-builder",
"label": "条件组件",
"name": "conditions",
"disabled": true,
"description": "适合让用户自己拼查询条件,然后后端根据数据生成 query where",
"fields": [
{
"label": "自定义",
"type": "custom",
"name": "a",
"value": {
"type": "input-color"
},
"operators": [
{
"label": "等于(自定义)",
"value": "custom_equal"
},
{
"label": "属于",
"value": "belong",
"values": [
{
"type": "input-text",
"name": "color1"
},
{
"type": "tpl",
"tpl": "~"
},
{
"type": "input-text",
"name": "color2"
}
]
}
]
}
]
}
]
}
}
```

5. 操作步骤
官网文档中粘贴 schema 即可复现。

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue by pasting the provided schema into the AMIS documentation site and interacting with the disabled condition-builder. Then inspect the condition-builder entry point and its disabled-state handling. Done means disabled conditions cannot be dragged, deleted, or otherwise modified, with any display-mode behavior matching the agreed requirement.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.