Created
March 19, 2018 13:25
-
-
Save chenillen/f5f2e0b9474a79391f3d28fa460e67fa to your computer and use it in GitHub Desktop.
Wepy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import wepy from 'wepy' | |
export default class Child1 extends wepy.page { | |
props = { | |
childId: { | |
type: String, | |
default: null | |
} | |
} | |
onLoad() { | |
console.log(this.childId) | |
} | |
} | |
</script> | |
<template> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import wepy from 'wepy' | |
export default class Child2 extends wepy.page { | |
props = { | |
childId: { | |
type: String, | |
default: null | |
} | |
} | |
onLoad() { | |
console.log(this.childId) | |
} | |
} | |
</script> | |
<template> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import wepy from 'wepy' | |
export default class Parent extends wepy.page { | |
data = { | |
parentId: '2131231231' | |
} | |
} | |
</script> | |
<template> | |
<child1 :childId.sync="parentId" /> | |
<child2 :childId.sync="parentId" /> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment