流云决
流云决
  • 发布:2020-08-13 17:53
  • 更新:2020-09-07 20:14
  • 阅读:825

【报Bug】20200805版HBX alpha报错is not defined on the instance but referenced......

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: Alpha

HBuilderX版本号: 2.8.4

第三方开发者工具版本号: 1.03.2006090

基础库版本号: 2.12.1

项目创建方式: HBuilderX

操作步骤:

运行到微信小程序/发行

预期结果:

正常运行

实际结果:

报错is not defined on the instance but referenced

bug描述:

最新版2.8.4.20200805-alpha的微信小程序运行会报错is not defined on the instance but referenced......(如附件图,category/home是自定义组件),然后图片不显示,发行的话不报这些红,但是图片也是不显示,切换为2.8.3.20200727-alpha版本运行发行都正常

2020-08-13 17:53 负责人:DCloud_UNI_GSQ 分享
已邀请:
DCloud_UNI_GSQ

DCloud_UNI_GSQ

这些 v-if 是嵌套在 v-for 中的吗

流云决

流云决 (作者)

我下载了正式版2.8.5.20200812,它的报错是这样的
代码的写法为:
<view v-if="item.images&&item.images.length==1"></view>
<view v-if="item.type=='video'" class="video-tag"></view>
<image :src="item.image" mode="aspectFill" v-if="item.type=='image'" style="width: 100%;height: 100%;"></image>

在2.8.3.20200727-alpha版本运行到小程序完全正常
(如果写为v-if="item&&item.type=='image'"会不报错,但是图片不会显示出来)

流云决

流云决 (作者)

<view v-if="item.images&&item.images.length==1"></view>  
<view v-if="item.type=='video'" class="video-tag"></view>  
<image :src="item.image" mode="aspectFill" v-if="item.type=='image'" style="width: 100%;height: 100%;"></image>

上面代码补上

DCloud_UNI_GSQ

DCloud_UNI_GSQ

HBuilderX 2.8.6+ 已修复

该问题目前已经被锁定, 无法添加新回复