baidu / baidu/amis

nav组件数据很多时样式会错乱,多出两个div元素

Open
#8,540 0 comments 0 reactions 0 assignees View on GitHub
need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

#### 描述问题:

若不展开,显示项较少时,结构正常;若展开,显示项较多时,会多出两个div元素

#### 截图或视频:
展开前
![image](https://github.com/baidu/amis/assets/127007861/fbb8ac13-9ed4-454e-ab8b-fc0a06d68e11)

展开后
![image](https://github.com/baidu/amis/assets/127007861/1e2404e2-cd67-4cde-8f17-d81f060a5764)

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

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

2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
3.4(官网上目前还能重现)
3. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "page",
"title": "标题",
"data": {
"options": []
},
"body": [
{
"type": "input-tree",
"name": "tree",
"treeContainerClassName": "h-full",
"className": "instance-box-tree bg-white h-full w-full p-0",
"id": "u:9f3dd961ca12",
"stacked": true,
"multiple": false,
"enableNodePath": false,
"hideRoot": true,
"showIcon": true,
"initiallyOpen": false,
"size": "md",
"unfoldedLevel": 2,
"source": "${options}"
}
]
}
```

4. 操作步骤
在options中替换上可用数据(数据量需要大一些)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue in the AMIS SDK with the provided input-tree schema and a large options dataset, using the latest beta or the current website. Compare the DOM and styling before and after expanding the tree, then trace the input-tree/nav rendering entry point to identify the extra div elements. Done means large expanded datasets render with the expected structure and styles without the two additional divs.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.