https://blog.csdn.net/yuhao309/article/details/83383773
错误原因:
由于这是因为初始化的时候,变量还没渲染进去导致的。
解决方法:
在src前面加个:
wx:if<image wx:if='{{customerLevel.value}}' class="iconLevel" src='{{customerLevel.value?tools.getLevel(customerLevel.value):"请选择"}}'></image>
或者直接写 /static/img/xx.png,比如:把图片放在根目录下的static文件下
<img src="/static/img/bg.png" >
————————————————
版权声明:本文为CSDN博主「yuhao309」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yuhao309/article/details/83383773