Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2025-06-05 11:04:12 +08:00
parent 9b63e88da8
commit 9d3eb0cea9
1675 changed files with 357271 additions and 1 deletions
@@ -0,0 +1,23 @@
<template>
<view>
<button type="primary" @click="sendMsg">给父组件传值</button>
</view>
</template>
<script>
export default {
data () {
return {
status: 'hello uni-app'
}
},
mounted() {
//this.$emit('myEvent',this.status) // 通过$emit触发事件,第二个参数就是传递的参数
},
methods: {
sendMsg () {
//this.$emit('myEvent',this.status) // 通过$emit触发事件,第二个参数就是传递的参数
}
}
}
</script>