dxq613 / bui

基于jQuery,兼容KISSY 的富客户端控件库
646 stars 359 forks source link

bui-form-group-select bug #193

Open binfeiruci opened 10 years ago

binfeiruci commented 10 years ago

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",就正常了。

data = [
    {"id":123,
     "text":"湖北",
     "leaf":false,
     "children":
        [
            {"id":"wh","text":"武汉","leaf":true},
            {"id":"dy","text":"大冶","leaf":true}
        ]
    }
]

这样也是正常的