Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图片加载问题 #33

Open
lanxuexing opened this issue Apr 5, 2022 · 1 comment
Open

图片加载问题 #33

lanxuexing opened this issue Apr 5, 2022 · 1 comment

Comments

@lanxuexing
Copy link

你好,{{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>
@wszgrcy
Copy link
Owner

wszgrcy commented May 9, 2022

不好意思,刚看到.img应该是浏览器标签.如果要使用小程序可以使用 image https://developers.weixin.qq.com/miniprogram/dev/component/image.html
不过这种兼容未来可能会单独增加接口,抽象出来供转换实现,目前的话应该不会把img变为image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants