fixed Cascader style error

This commit is contained in:
梁灏 2018-03-12 16:09:28 +08:00
parent b45a0e685b
commit 47dc36c58b
2 changed files with 16 additions and 22 deletions

View file

@ -1,66 +1,59 @@
<template>
<div style="margin: 100px;width: 300px;">
<Cascader v-model="value" :data="data" change-on-select></Cascader>
</div>
<Cascader v-model="value3" :data="data" filterable style="width: 400px"></Cascader>
</template>
<script>
export default {
data () {
return {
value: ['beijing', 'gugong'],
data: []
}
},
mounted () {
setTimeout(() => {
this.data = [{
value: 'beijing',
data: [{
value: 1,
label: '北京',
children: [
{
value: 'gugong',
value: 11,
label: '故宫'
},
{
value: 'tiantan',
value: 12,
label: '天坛'
},
{
value: 'wangfujing',
value: 13,
label: '王府井'
}
]
}, {
value: 'jiangsu',
value: 2,
label: '江苏',
children: [
{
value: 'nanjing',
value: 21,
label: '南京',
children: [
{
value: 'fuzimiao',
value: 211,
label: '夫子庙',
}
]
},
{
value: 'suzhou',
value: 22,
label: '苏州',
children: [
{
value: 'zhuozhengyuan',
value: 221,
label: '拙政园',
},
{
value: 'shizilin',
value: 222,
label: '狮子林',
}
]
}
],
}];
}, 100)
}],
value3: []
}
}
}
</script>

View file

@ -93,6 +93,7 @@
text-align: center;
color: @btn-disable-color;
li:not([class^=ivu-]){
list-style: none;
margin-bottom: 0;
}
}