描述问题:
inputTree组件设置数据来自外部接口或上下文变量,虽然设置了"heightAuto: true",但是在展开某一层级后依旧是固定高度(不显示root时为266px)
截图或视频:
不展开层级
展开层级
如何复现(请务必完整填写下面内容):
- 你是如何使用 amis 的?
sdk
- amis 版本是什么?请先在最新 beta 版本测试问题是否存在
6.0.0
- 粘贴有问题的完整
amis schema
代码:
"aside": [
{
"type": "input-tree",
"name": "host_tree",
"inputClassName": "no-padder",
"heightAuto": true,
"submitOnChange": true,
"selectFirst": false,
"inputOnly": true,
"id": "u:d3bae38125a9",
"multiple": false,
"enableNodePath": false,
"hideRoot": true,
"showIcon": true,
"initiallyOpen": true,
"size": "full",
"treeContainerClassName": "",
"onEvent": {
"change": {
"weight": 500,
"actions": [
{
"componentId": "u:96b6923a086a",
"ignoreError": false,
"actionType": "reload",
"args": {
"resetPage": true
},
"data": {
"select_tree": "${host_tree}"
},
"dataMergeMode": "merge"
}
]
}
},
"clearable": false,
"editable": false,
"creatable": false,
"removable": false,
"source": {
"url": "http://127.0.0.1:8000/backend/assets/hosts/iplist/",
"method": "get",
"requestAdaptor": "",
"adaptor": "",
"messages": {
},
"dataType": "json"
},
"static": false,
"hidden": false
}
],
- 操作步骤
存在children,并且children较多时展开该层级就能复现
4条答案
按热度按时间llew8vvj1#
疑似内嵌模式与浮层模式的展开样式冲突?
内嵌:
浮层:
可以看到展示的数据内容是相同的,多出的11pt应该是下拉框的框padding
6jygbczu2#
这个问题确实存在
up9lanfz3#
确实一直没解决
6gpjuf904#
可以通过 css 变量改变 Tree-max-height (默认300px)