<div className="parent"> <button className="button">按钮</button> <div className="wrapper"> <wx-open-subscribe ref={subscription} template={template}> <script type="text/wxtag-template"> <div className="wx-stupid-component" /> </script> <script type="text/wxtag-template" slot="style"> <style>{` .wx-stupid-component { width: 10000px; height: 10000px; } `}</style> </script> </wx-open-subscribe> </div> </div> .parent { position: relative; } .button { height: 100px; width: 30px; } .wrapper { position: absolute; left:0; top: 0; width: 100%; height: 100%; opacity: 0; overflow: hidden; z-index: 1; }
react开发h5使用wx-open-subscribe标签,自定义内容无法生效?[图片] [图片] 不管如何修改内容,一直显示去订阅按钮
2021-05-02他是用shadow dom包住的这个按钮组件,外部样式完全无法影响以及继承。 对付微信这种阴间玩意儿最好的办法就是,整个透明遮罩层盖你自己按钮上。 <div class="parent"> <button class="button">按钮</button> <div class="wrapper"> <wx-open-subscribe ref={subscription} template={template}> <script type="text/wxtag-template"> <div className="wx-stupid-component" /> </script> <script type="text/wxtag-template" slot="style"> <style>{` .wx-stupid-component { width: 10000px; height: 10000px; } `}</style> </script> </wx-open-subscribe> </div> </div> .parent { position: relative; } .button { height: 100px; width: 30px; } .wrapper { position: absolute; left:0; top: 0; width: 100%; height: 100%; opacity: 0; overflow: hidden; z-index: 1; }
在react中 wx-open-subscribe包裹的组件样式没法展示?[图片]
2021-05-02最后一次分享 微信号:uutt2008 2020年9月27日00:24
分享出来的链接只有自己看得到,什么问题?我们公众号里的h5分享出来的链接只有自己看得见,别人看不见,请问是什么问题? 如:https://yun.juke.plus/?from_user_hash=AWzjAz5JBmNo&t=1600482983#/activities/be3VX6B54 已整改,申请恢复
2020-09-27