Commit f46ebc38dc34a1f66dc5a3ac4181c0e34d1e07d8

Authored by 梁灏
1 parent c46f385a

fixed #130

fixed #130
src/components/cascader/cascader.vue
... ... @@ -177,6 +177,9 @@
177 177 this.updateSelected();
178 178 }
179 179 }
  180 + },
  181 + value () {
  182 + this.updateSelected();
180 183 }
181 184 }
182 185 }
... ...
test/routers/cascader.vue
1 1 <template>
2   - <div style="width: 150px;margin:100px">
3   - <Cascader :data="data" :value.sync="value1"></Cascader>
4   - </div>
5   -
  2 + <Cascader :data="data" change-on-select></Cascader>
6 3 </template>
7 4 <script>
8 5 export default {
9 6 data () {
10 7 return {
11   - value1: [],
12 8 data: [{
13 9 value: 'beijing',
14 10 label: '北京',
... ...