赞
踩
写这篇文章为了解决现在没有⼀个合集 ,所以我参考其他文档, 及自己的测试最后得出完整的方案
重点是 v-is="'script'"
<div> <wx-open-launch-weapp id="launch-btn" appid="xxxxx" path="pages/xxx/xxx" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" > <div v-is="'script'" type="text/wxtag-template"> <div style=" width: 100%; height: 100%; " ></div> </div> </wx-open-launch-weapp> </div>
‘wx-open-launch-weapp’标签中的dom样式, 如果是在vue3中, 建议写成内联样式
<div style="position: relative"> <div style="position: relative"> 这⾥写⻚⾯样式,下⾯的wx-open-launch-weapp⽤来做这个的遮罩,透明度改成零就好 </div> <wx-open-launch-weapp id="launch-btn" appid="xxxxx" path="pages/xxx/xxx" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" > <div v-is="'script'" type="text/wxtag-template"> <div style=" width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; padding-top: 50px; " ></div> </div> </wx-open-launch-weapp> </div>
作者:白马不是马
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。