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

小程序中使用Cascader级联选择器的chooseTitle不显示 #207

Closed
shiyibode opened this issue Feb 12, 2019 · 2 comments
Closed

小程序中使用Cascader级联选择器的chooseTitle不显示 #207

shiyibode opened this issue Feb 12, 2019 · 2 comments
Labels

Comments

@shiyibode
Copy link

当数据格式为以下情况时:
[{ 'label': '北京', 'value': '110000', 'children': [{ 'label': '北京市', 'value': '110000', 'children': [{ 'label': '东城区', 'value': '110101', }], }], }, { 'label': '上海', 'value': '310000', 'children': [{ 'label': '上海市', 'value': '310000', 'children': [{ 'label': '黄浦区', 'value': '310101', }] }], }]
会出现如下的效果:
default

但是,当我的数据格式如下的时候:
[{ 'label': '北京', 'value': '110000', 'children': [{ 'label': '北京市', 'value': '110100', 'children': [{ 'label': '东城区', 'value': '110101', }, { 'label': '西城区', 'value': '110102', }], }], }, { 'label': '上海', 'value': '310000', 'children': [{ 'label': '上海市', 'value': '310000', 'children': [{ 'label': '黄浦区', 'value': '310101', }] }], }, { "label": "内蒙古", "value": "2", "children": [{ "label": "鄂尔多斯", "value": "3", "children": null }, { "label": "包头", "value": "10", "children": null }] }]
会出现如下效果:

所以我的猜测是:当第一层级的个数为2的时候,chooseTitle只会出现2次,即数据里有北京、上海时,“请选择”只出现了2次,选择第三层级的“区”的时候没有出现“请选择”;当第一层级的个数为3或大于3的时候,chooseTitle会出现3次,即数据里有北京、上海、内蒙古时,“请选择”出现了3次,选择第三层级的“区”的时候出现了“请选择”。

@shiyibode
Copy link
Author

default

@shiyibode shiyibode changed the title Cascader级联选择器的chooseTitle不显示 小程序中使用Cascader级联选择器的chooseTitle不显示 Feb 12, 2019
@yoage
Copy link

yoage commented Feb 23, 2019

我也遇到同样的问题

@skyvow skyvow added the bug label Feb 24, 2019
@skyvow skyvow closed this as completed in 8cc9c52 Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants