Created
March 25, 2020 07:46
-
-
Save chenillen/ecfd9e049af58f8a90cad4bcbe63cc86 to your computer and use it in GitHub Desktop.
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
<!-- parent --> | |
<template> | |
<div class="page-container"> | |
<custom-text @custom-click="customClick" /> | |
</div> | |
</template> | |
<script> | |
import wepy from '@wepy/core' | |
wepy.page({ | |
methods: { | |
customClick() { | |
console.log('change, change, change') | |
} | |
} | |
}) | |
</script> | |
<!-- child --> | |
<template> | |
<div @tap="click"> | |
點我點我 | |
</div> | |
</template> | |
<script> | |
import wepy from '@wepy/core' | |
wepy.component({ | |
methods: { | |
click(e) { | |
console.log('text component click: ', e); | |
this.$emit('custom-click', 1, 2, 3) | |
} | |
} | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment