baidu / baidu/amis

tabs设置的disabled优先级没有form的高

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

Description

#### 描述问题:

form设置了属性disabled
但是我不想让form下面的tabs禁用,给tabs设置了disabled,结果无效,tabs仍然是禁用。
希望是tabs设置的disabled属性优先级更高

#### 截图或视频:

![image](https://github.com/baidu/amis/assets/37805363/27ba0e84-1351-4c8e-8831-e988d060d635)

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

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

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

3. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "form",
"body": [
{
"type": "tabs",
"tabs": [
{
"title": "Tab 1",
"disabled": false,
"body": [
{
"type": "tpl",
"tpl": "Content",
"id": "u:6b421b486ddf"
}
],
"id": "u:f65b32ad9ef6"
},
{
"title": "Tab 2",
"body": [
{
"type": "tpl",
"tpl": "Content"
}
],
"disabled": false
}
],
"disabled": false,
"id": "u:d3fbf1dd5f29"
}
],
"disabled": true,
"id": "u:70d586f0d433",
"actions": [
{
"type": "submit",
"label": "提交",
"primary": true,
"id": "u:54c611c65732"
}
],
"feat": "Insert"
}
```

4. 操作步骤
1. 复制code
2. 打开官方编辑器
3. 粘贴到code里面
4. 查看tab是否禁用

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the provided amis schema in the official editor and inspect how the form and tabs disabled settings are resolved. Reproduce the case with the form disabled and the nested tabs explicitly enabled; done means the tabs remain usable despite the parent form setting.

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.