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

View file

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