呜咹王
呜咹王
  • 发布:2023-06-12 16:02
  • 更新:2023-07-27 10:20
  • 阅读:377

【报Bug】wx-open-launch-weapp 中的 slot 不显示

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Windows 11

HBuilderX类型: 正式

HBuilderX版本号: 3.8.4

浏览器平台: 微信内置浏览器

浏览器版本: 1.06.2306020

项目创建方式: HBuilderX

示例代码:
<wx-open-launch-weapp username="'xxx'" path="'/page/index/index'" >
<script type="text/wxtag-template">
<slot></slot>
</script>
</wx-open-launch-weapp>

操作步骤:
<wx-open-launch-weapp username="'xxx'" path="'/page/index/index'" >
<script type="text/wxtag-template">
<slot></slot>
</script>
</wx-open-launch-weapp>

预期结果:

显示 slot 中的内容

实际结果:

未显示 slot 中的内容

bug描述:

公众号开放标签的 wx-open-launch-weapp 中的 slot 没有效果,不显示。

2023-06-12 16:02 负责人:无 分享
已邀请:
8***@qq.com

8***@qq.com

页面模板中
<wx-open-launch-weapp id="launch-btn" username="gh_32aa593c7197" path="/pages/index/index">
<div v-html="weContent"></div>
</wx-open-launch-weapp>

js中
let weContent=ref("")
const init=()=>{
let src=window.location.href.split("#")[0]+'/static/shop_icon.png'
weContent.value=<template> <img src="${src}" style='width: 3.9375rem;height:4.25rem;'></img> </template>
}
onLoad(()=>{
init()
})

以上是在uniapp新建的vue3项目环境下,编译目标为H5.运行在微信浏览器下

要回复问题请先登录注册