Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用TreeSelect时碰到的一些友好性问题 #81

Closed
1 task
wjsq0705 opened this issue Jul 25, 2018 · 3 comments
Closed
1 task

使用TreeSelect时碰到的一些友好性问题 #81

wjsq0705 opened this issue Jul 25, 2018 · 3 comments

Comments

@wjsq0705
Copy link

wjsq0705 commented Jul 25, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

1、使用treeData构成树节点时。如果存在children这个属性,但是值为null就会报错。这点在使用时比较尴尬。因为树结构是在后端生成的,后端要把每个树节点的children至少赋值一个空的数组。
2、新功能描述:目前树节点支持了key、value、name等常用属性。但是在使用时很难满足实际需求。如果我给树节点多弄个属性,在change事件或者select事件拿到的参数中,不是组件内置的参数,都会被舍弃。还有,如果能用 param:{key:userId,value:userId,name:userName} 这种方式去指定参数的名称会更友好些。否则树节点属性被写死也件很尴尬的事情。

What does the proposed API look like?

按照以前的API描述就可以了

@wjsq0705 wjsq0705 changed the title TreeSelect 使用TreeSelect时碰到的一些友好性问题 Jul 25, 2018
@tangjinzhou
Copy link
Member

第一点:下个版本会兼容 children为null的情况,目前可自行处理为undefined 或 删除该属性
第二点:暂不考虑去改动api,一来保持api稳定,二来新增的param也需要业务代码处理,并没有质的改变
多谢建议

@tangjinzhou
Copy link
Member

@lock
Copy link

lock bot commented Jul 27, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants