qcp QCP pad
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.
 
 
 
 
 

26 lines
423 B

<template>
<u-button type="primary" hover-class="button-hover" @click="send">
发消息
</u-button>
</template>
<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app'
onLoad(() => {
document.addEventListener('UniAppJSBridgeReady', () => {
console.log(uni);
}, false)
})
function send() {
window.postMessage('hello', '*')
// uni.postMessage({
// data: { action: "msg ok" }
// })
}
</script>