一个灵活的级联选择器
生命不息,轮子不止
哇塞悲哀的博客
这里是文档
npm install d_cascader --save
Register component
Registe global component:
import d_cascader from 'd_cascader'
Vue.component('d_cascader', d_cascader)
Registe component:
import d_cascader from 'd_cascader'
export default {
components: { d_cascader }
}
How to use
Basic:
<d_cascader :cdate="citylist" >
</d_cascader>
var citylist=[
{
id:"0",
name:"名字-0",
unid:"0"
},{
id:"1",
name:"名字-1",
unid:"0"
},
{
id:"2",
name:"名字-2",
unid:"1"
}
,
{
id:"3",
name:"名字-3",
unid:"1"
}
];
Default Value:
<v-distpicker :cdate="citylist" :de_value="devalue">
</v-distpicker>
var citylist=[
{
id:"0",
name:"名字-0",
unid:"0"
},{
id:"1",
name:"名字-1",
unid:"0"
},
{
id:"2",
name:"名字-2",
unid:"1"
}
,
{
id:"3",
name:"名字-3",
unid:"1"
}
];
var de_value=[
0,3
];