Open binfeiruci opened 10 years ago
当data-type="custom"时, 例如:
data-type="custom"
data = [ {"id":"zj", "text":"浙江", "leaf":false, "children": [ {"id":"hz","text":"杭州","leaf":true}, {"id":"nb","text":"宁波","leaf":true} ] }, {"id":123, "text":"湖北", "leaf":false, "children": [ {"id":"wh","text":"武汉","leaf":true}, {"id":"dy","text":"大冶","leaf":true} ] } ]
则湖北的2个二级选项生成失败。问题出在第二项的id是数字。如果改为 "id":"123",就正常了。
"id":"123"
data = [ {"id":123, "text":"湖北", "leaf":false, "children": [ {"id":"wh","text":"武汉","leaf":true}, {"id":"dy","text":"大冶","leaf":true} ] } ]
这样也是正常的
当
data-type="custom"
时, 例如:则湖北的2个二级选项生成失败。问题出在第二项的id是数字。如果改为
"id":"123"
,就正常了。这样也是正常的