This commit is contained in:
梁灏 2018-01-23 11:38:02 +08:00
parent a73ae72b35
commit 5dc44ccf9b
2 changed files with 16 additions and 13 deletions

View file

@ -1,11 +1,19 @@
<template>
<Cascader v-model="value3" :data="data" filterable @on-change="hc"></Cascader>
<div style="margin: 100px;width: 300px;">
<Cascader v-model="value" :data="data" change-on-select></Cascader>
</div>
</template>
<script>
export default {
data () {
return {
data: [{
value: ['beijing', 'gugong'],
data: []
}
},
mounted () {
setTimeout(() => {
this.data = [{
value: 'beijing',
label: '北京',
children: [
@ -51,14 +59,8 @@
]
}
],
}],
value3: []
}
},
methods: {
hc (a,b) {
console.log(a,b)
}
}];
}, 100)
}
}
</script>