初始化(包含登录模块)
This commit is contained in:
24
pages/template/component-communication/sender.vue
Normal file
24
pages/template/component-communication/sender.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<view class="sender-container">
|
||||
<button type="primary" @click="send">点击发送消息</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
send() {
|
||||
let num = parseInt(Math.random() * 10000)
|
||||
uni.$emit('cc', {
|
||||
msg: 'From uni.$emit -> ' + num
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.sender-container{
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user