Skip to content

Commit

Permalink
fixed doc default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Jan 8, 2018
1 parent ef0bc46 commit 8514eae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/md/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -993,21 +993,21 @@ props = {
   
   twoWayTitle: {
type: Number,
default: 50,
default: 'nothing',
twoWay: true
}
};
onLoad () {
console.log(this.title); // p-title
console.log(this.syncTitle); // p-title
console.log(this.twoWayTitle); // 50
console.log(this.twoWayTitle); // p-title
this.title = 'c-title';
console.log(this.$parent.parentTitle); // p-title.
this.twoWayTitle = 60;
this.twoWayTitle = 'two-way-title';
this.$apply();
   console.log(this.$parent.parentTitle); // 60. --- twoWay为true时,子组件props中的属性值改变时,会同时改变父组件对应的值
   console.log(this.$parent.parentTitle); // two-way-title. --- twoWay为true时,子组件props中的属性值改变时,会同时改变父组件对应的值
this.$parent.parentTitle = 'p-title-changed';
this.$parent.$apply();
   console.log(this.title); // 'c-title';
Expand Down

0 comments on commit 8514eae

Please sign in to comment.