uni-app icon indicating copy to clipboard operation
uni-app copied to clipboard

百度小程序 web-view @message 事件BUG

Open chasonma opened this issue 1 year ago • 0 comments

问题描述 H5 使用 uni.postMessage 传递数据,百度小程序返回页面时触发错误,无法正常接收数据。

系统信息:

  • 发行平台:百度小程序
  • uni-app版本:3.0.0-alpha-4000020231218001

参考代码

uni.postMessage({ data: { url: '链接'} });
<template>
  <web-view :src="url" @message="onPostMessage"></web-view>
</template>

<script setup lang="ts">
function onPostMessage(e: any) {
  console.log(e)
}
</script>

pF9b9Vx.jpg

chasonma avatar Jan 11 '24 06:01 chasonma