cascadeDrop

0.1.3 • Public • Published

Nothin

install

npm install lovee -g

Usage

<cascade-drop :data="data" :handler-choose="onChoose"></cascade-drop>

数据格式

data

[
    {
        text:'请选择省份',
        data:[
            {
                text:'test1',
                value:1
            },{
                text:'test2',
                value:2
            },{
                text:'test3',
                value:3
            },{
                text:'test4',
                value:4
            }
        ]
    },{
        text:'请选择城市',
        data:[
            {
                text:'test11',
                value:11,
                pValue:1
            },{
                text:'test12',
                value:12,
                pValue:1
            },{
                text:'test21',
                value:21,
                pValue:2
            },{
                text:'test22',
                value:22,
                pValue:2
            },{
                text:'test31',
                value:31,
                pValue:3
            },{
                text:'test32',
                value:32,
                pValue:3
            },{
                text:'test41',
                value:41,
                pValue:4
            },{
                text:'test42',
                value:42,
                pValue:4
            }
        ]
    }
]

schema

可选属性,下面为该属性默认值 { text:'text', value:'value', pValue:'pValue' }

handler-choose

onChoose:function(item,index,data){
    //your code
}

Readme

Keywords

none

Package Sidebar

Install

npm i cascadeDrop

Weekly Downloads

2

Version

0.1.3

License

ISC

Last publish

Collaborators

  • sheweichun