<div class="hktshare">
<div>会客厅</div>
</div>
<div class="del_mask" id="hktshare_pop" style="display: none;">
<div class="del_block">
<div class="del_content">即将打开"智能会客厅"小程序</div>
<div>
<div class="del_cancel" onclick="delhkt()">取消</div>
<div class="wx_open_box">
<wx-open-launch-weapp id="launch-btn" username="gh_4b4a3e566703" path="pages/index/index?">
<script type="text/wxtag-template">
<button class="btn">确定</button>
</script>
</wx-open-launch-weapp>
</div>
</div>
</div>
</div>
为什么这么写确定按钮不显示呢
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- |__WhoAmI__| 2022-12-26 21:59关注
在你这代码中使用了一个微信小程序的标签
<wx-open-launch-weapp>
这个标签内部,使用了一个
<script>
标签,并使用了type属性设置了它的类型为"text/wxtag-template"。这个<script>
标签内部的内容(即<button class="btn">确定</button>
)是一个模板,它用于指定微信小程序打开按钮的显示样式。但是在代码中,这个模板并没有被正确的使用。在
<wx-open-launch-weapp>
标签内部,可以通过使用<template>
标签(而不是<script>
标签)来使用模板。例如:<wx-open-launch-weapp id="launch-btn" username="gh_4b4a3e566703" path="pages/index/index?"> <template> <button class="btn">确定</button> </template> </wx-open-launch-weapp>
这样确定按钮就应该能正常显示了。
望采纳。本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 编辑记录
悬赏问题
- ¥20 软件测试决策法疑问求解答
- ¥15 win11 23H2删除推荐的项目,支持注册表等
- ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
- ¥15 qt6.6.3 基于百度云的语音识别 不会改
- ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
- ¥15 神经网络怎么把隐含层变量融合到损失函数中?
- ¥15 lingo18勾选global solver求解使用的算法
- ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
- ¥20 测距传感器数据手册i2c
- ¥15 RPA正常跑,cmd输入cookies跑不出来