You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
487 B

12 months ago
<template>
<view class="sender-container">
<button type="primary" @click="send">自定义EventBus</button>
</view>
</template>
<script>
export default {
methods: {
send() {
let num = parseInt(Math.random() * 10000)
uni.$emit('cc', {
msg: 'From event bus -> ' + num
})
}
}
}
</script>
<style>
.sender-container{
padding: 20px;
}
</style>