This commit is contained in:
梁灏 2017-03-27 09:41:08 +08:00
parent 53754a3185
commit 3bbb6b5f7d
2 changed files with 4 additions and 3 deletions

View file

@ -70,9 +70,9 @@
<template>
<div>
<Cascader :data="data" v-model="value2" change-on-select></Cascader>
<Cascader :data="data" v-model="value2"></Cascader>
{{ value2 }}
<div @click="c">change</div>
<Button @click="c">clear</Button>
</div>
</template>
<script>
@ -131,7 +131,7 @@
},
methods: {
c () {
this.value2 = ['jiangsu', 'suzhou', 'zhuozhengyuan']
this.value2 = []
}
}
}

View file

@ -208,6 +208,7 @@
},
value (val) {
this.currentValue = val;
if (!val.length) this.selected = [];
},
currentValue () {
this.$emit('input', this.currentValue);