Skip to content

Instantly share code, notes, and snippets.

@chenillen
Created March 25, 2020 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chenillen/ecfd9e049af58f8a90cad4bcbe63cc86 to your computer and use it in GitHub Desktop.
Save chenillen/ecfd9e049af58f8a90cad4bcbe63cc86 to your computer and use it in GitHub Desktop.
<!-- 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