Commit f46ebc38dc34a1f66dc5a3ac4181c0e34d1e07d8

Authored by 梁灏
1 parent c46f385a

fixed #130

fixed #130
src/components/cascader/cascader.vue
@@ -177,6 +177,9 @@ @@ -177,6 +177,9 @@
177 this.updateSelected(); 177 this.updateSelected();
178 } 178 }
179 } 179 }
  180 + },
  181 + value () {
  182 + this.updateSelected();
180 } 183 }
181 } 184 }
182 } 185 }
test/routers/cascader.vue
1 <template> 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 </template> 3 </template>
7 <script> 4 <script>
8 export default { 5 export default {
9 data () { 6 data () {
10 return { 7 return {
11 - value1: [],  
12 data: [{ 8 data: [{
13 value: 'beijing', 9 value: 'beijing',
14 label: '北京', 10 label: '北京',