select selectMode 为 chained\tree 时,设置labelField无效
- Dominant language
- TypeScript
- Stars
- 18.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
#### 描述问题:
select selectMode 为 chained\tree 时,设置labelField无效
#### 截图或视频:
可以的话,尽可能提供截图或视频来补充描述你的问题...
#### 如何复现(请务必完整填写下面内容):
1. 你是如何使用 amis 的?
SDK
2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
V1.7.0
3. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "page",
"body": {
"type": "form",
"api": "/amis/api/mock2/form/saveForm",
"body": [
{
"label": "级联选择",
"type": "select",
"name": "a",
"selectMode": "chained",
"labelField":"name",
"options": [
{
"name": "法师",
"children": [
{
"name": "诸葛亮",
"value": "zhugeliang"
}
]
},
{
"name": "战士",
"children": [
{
"name": "曹操",
"value": "caocao"
},
{
"name": "钟无艳",
"value": "zhongwuyan"
}
]
},
{
"name": "打野",
"children": [
{
"name": "李白",
"value": "libai"
},
{
"name": "韩信",
"value": "hanxin"
},
{
"name": "云中君",
"value": "yunzhongjun"
}
]
}
]
}
]
}
}
```
4. 操作步骤
请简单描述一下复现的操作步骤...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the provided amis SDK schema with selectMode set to chained and labelField set to name, using the reported V1.7.0 setup. Trace the select component's handling of labelField for chained and tree modes, then verify that the configured name field controls displayed labels without changing the option values.
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