angular-miniprogram
angular-miniprogram copied to clipboard
图片加载问题
你好,{{user}},这是使用angular开发小程序的一个模板项目
<lib-first></lib-first>
<img class="img" src="https://images.unsplash.com/photo-1441742917377-57f78ee0e582?h=1024" />
.img {
width: 375px;
height: 375px;
}
无法加载出图片,源码是直接编译成了img
标签
<block wx:if="{{hasLoad}}">{{nodeList[0].value}}<lib-first nodePath="{{nodePath}}" nodeIndex="1" class="{{nodeList[1].class}}" style="{{nodeList[1].style}}" ></lib-first><img src="https://images.unsplash.com/photo-1441742917377-57f78ee0e582?h=1024" class="{{nodeList[2].class}}" style="{{nodeList[2].style}}" /></block>
不好意思,刚看到.img应该是浏览器标签.如果要使用小程序可以使用 image https://developers.weixin.qq.com/miniprogram/dev/component/image.html 不过这种兼容未来可能会单独增加接口,抽象出来供转换实现,目前的话应该不会把img变为image