We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当数据格式为以下情况时: [{ 'label': '北京', 'value': '110000', 'children': [{ 'label': '北京市', 'value': '110000', 'children': [{ 'label': '东城区', 'value': '110101', }], }], }, { 'label': '上海', 'value': '310000', 'children': [{ 'label': '上海市', 'value': '310000', 'children': [{ 'label': '黄浦区', 'value': '310101', }] }], }] 会出现如下的效果:
[{ 'label': '北京', 'value': '110000', 'children': [{ 'label': '北京市', 'value': '110000', 'children': [{ 'label': '东城区', 'value': '110101', }], }], }, { 'label': '上海', 'value': '310000', 'children': [{ 'label': '上海市', 'value': '310000', 'children': [{ 'label': '黄浦区', 'value': '310101', }] }], }]
但是,当我的数据格式如下的时候: [{ '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 }] }] 会出现如下效果:
[{ '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次,选择第三层级的“区”的时候出现了“请选择”。
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
我也遇到同样的问题
8cc9c52
No branches or pull requests
当数据格式为以下情况时:
[{ 'label': '北京', 'value': '110000', 'children': [{ 'label': '北京市', 'value': '110000', 'children': [{ 'label': '东城区', 'value': '110101', }], }], }, { 'label': '上海', 'value': '310000', 'children': [{ 'label': '上海市', 'value': '310000', 'children': [{ 'label': '黄浦区', 'value': '310101', }] }], }]
会出现如下的效果:
但是,当我的数据格式如下的时候:
[{ '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次,选择第三层级的“区”的时候出现了“请选择”。
The text was updated successfully, but these errors were encountered: