主要是设置mode="widthFix"
和width: 100%;
<!-- 新手教程 --><template><div class="center-tutorial"><img class="img" src="https://123.oss-cn-/666.jpeg" mode="widthFix"></div></template>
<style lang="less" scoped>.center-tutorial {.img {width: 100%;}}</style>
如果觉得《mpvue 微信小程序 Image 图片实现宽度100% 高度自适应》对你有帮助,请点赞、收藏,并留下你的观点哦!