<u-image src="@/static/img/weather/0@1x.png" width="60rpx" height="60rpx"></u-image>
<image src="@/static/img/weather/0@1x.png" style="width: 60rpx;height: 60rpx;"></image>
<image src="@/static/pay-ali.png" style="width: 60rpx;height: 60rpx;"></image>
<image :src="imageUrl" style="width: 60rpx;height: 60rpx;"></image>

- 发布:2025-03-24 11:30
- 更新:2025-03-24 17:50
- 阅读:50
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows 10 专业版
HBuilderX类型: 正式
HBuilderX版本号: 4.56
手机系统: Android
手机系统版本号: Android 14
手机厂商: 华为
手机机型: 小米
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
<u-image src="@/static/img/weather/0@1x.png" width="60rpx" height="60rpx"></u-image>
<image src="@/static/img/weather/0@1x.png" style="width: 60rpx;height: 60rpx;"></image>
<image src="@/static/pay-ali.png" style="width: 60rpx;height: 60rpx;"></image>
<image :src="imageUrl" style="width: 60rpx;height: 60rpx;"></image>
<u-image src="@/static/img/weather/0@1x.png" width="60rpx" height="60rpx"></u-image>
<image src="@/static/img/weather/0@1x.png" style="width: 60rpx;height: 60rpx;"></image>
<image src="@/static/pay-ali.png" style="width: 60rpx;height: 60rpx;"></image>
<image :src="imageUrl" style="width: 60rpx;height: 60rpx;"></image>
预期结果:
图片能正常显示
图片能正常显示
实际结果:
图片和图标等本地资源都显示不出来
图片和图标等本地资源都显示不出来
bug描述:
vue3项目app,在H5端图片和图标都能正常显示,切换到真机运行后全都显示不出来;【HX版本号4.56】
以下是我在当前项目做的测试:
第一张图片:H5浏览器运行,4个图都能出来
第二张图片:真机运行,图片显示不出来
我把HX切换到4.29,图片就能正常显示了!见第3张图片;
经过排查,发现4.56版本的unpackage输出目录里没有static文件夹,4.29是有的,这是什么原因
请官方解决一下这个问题呗,我这正要大版本更新呢,而且我的HX肯定要定时更新的,不可能一直用老版本吧


