找到问题了, 是由于base64字符太长了, 导致image组件被拆分, 从而编译失败, 解决办法如下: 把需要渲染的base64字符串用模板字符串包起来(``), 就是这个es6的东西, 然后将字符串replace(/[\r\n]/g, "")一下. 这样动态绑定到image标签上就可以渲染出来了
小程序中正确的base64在image组件中显示白色, 求解决方法?base64如下 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAqCAYAAADbCvnoAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ bWFnZVJlYWR5ccllPAAAA+ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdp bj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6 eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2 MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJo dHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlw dGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAv IiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1N PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25z LmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJB ZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMS0wMi0wM1Qx ODowNzoyMiswODowMCIgeG1wOk1vZGlmeURhdGU9IjIwMj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cAKkxGdtGwTb22k1RUSH7zboo/GC/04 00qNFZmMJh9I7oLj38aqfRSnsT0oIRAZhP5BID0MulQBZIHUUyWhpQWVc9CWAD3DmPZQOrISpM6r nPp4mMkYz81RaRb9kPCPksO+QLTqlL0Cxnfhg78Dd4FKoIWJUOR3Y8taVYSKu4hQEydlhUYehC2K Qb8t6LGHUyexgNlplEuv5kjv4cyR6rhY4BeLbRmFGhD0qo79Gw6UdlgOHpKNOeexppE4NvNWyYUA FQh7gAO4xy+GjmKbyNyhkAEy6ZySEJl7fHBeCuNuclbawHHyLFc5fwiV2kDmB5AJjAXOCXPP5ESf VqyWs4VFwAZgCI+hbc3+K3SA4TthgI6dwLKvwzwP0J+u2J6FvEofgX3AVsVpTBCDa7HBUteRKWeS yJBzf+I+fSG5D0xk/cnjVczgXIrEOVMkVGqBEL3dc6n26uAo0Cgk/a0gXY9urlD9TgPG8PV8Ubof sZPpWB0eRgSSpJzoCVAvwMEVsXFdLZAhS3IJ7DstOLexLW7Ffxd5e/L4uoj7x4CvchosJ2hUNmdp EHIL6izbKeC9cF3EPhQFzAJGCf81y4RIMz4DfUwSGsYluErxy6VslLZsRoB5qlxSpelj0TJrVO1O Aa5b1LIyVZJfojkZJVwVvMo6RpnAGVcA+W/VmHAZtm042o0cQM0aVb5NLsUHgjaWd7NGmlJAfsBi 164oq2LFjxmCneZTF7Au2wI81CCVQvkPn6S5gvYY5mWlFgWVxHitEe2dwT6c443ihW9FZqwWD/iG +6O4yEzloDuAtaeGD0C+/IHitwADANYtMqKhwU/XAAAAAElFTkSuQmCC
2021-04-30可以使用wxs做类名过滤, 把不同类名的样式写好, 通过wxs过滤后就可以添加不同的类名, 就会更换样式了
如何在js界面中动态修改wxml界面标签中的样式还有内容?选择器SelectorQuery不行吗?主要是想动态修改界面样式,实现一键换肤,想改动page,但是page是wxml自动生成的,无法通过行内样式style控制,不想每个标签都用style样式通过data控制,感觉十分麻烦,有简便方法吗? 有大神来回答不
2020-08-03可以使用iframe标签
安卓微信7.0.9内H5登录后跳转无响应网址:https://m.letsguang.cn/web/shopper#/mall/67 新用户按下登录按钮后以 [代码]window.location.href = url;[代码]或 [代码]window.location.replace(url);[代码] 发起跳转到后端进行oauth登后,微信浏览器并不能吧响应重导向回H5内 以inspector观察跳转连结存在,但响应为cancelled或302 以上问题只在安卓7.0.9版本出现,把发生问题的手机重新安装7.0.8后所有行为回复正常
2019-12-11