zxcvb
zxcvb
  • 发布:2019-11-15 12:10
  • 更新:2020-04-16 15:24
  • 阅读:3127

【报Bug】钉钉小程序有时候无法触发@click事件并报错

分类:HBuilderX

详细问题描述

钉钉小程序有时候无法触发@click事件并报错
支付宝小程序无此问题,只有钉钉小程序会报错

重现步骤

运行到支付宝开发者工具并选择钉钉第三方个人应用
模拟器上点击设置了事件的view,结果报错

Error: triggerComponentEvent error: Cannot read property '$options' of undefined - eventName: __e - type: [object Function]  
    at PageComponent.triggerComponentEvent (af-appx.worker.ide.js:1058)  
    at PageComponent.onMessage (af-appx.worker.ide.js:1739)  
    at Object.fn (bridge.js:1)  
    at HTMLDocument.document.dispatchEvent (bridge.js:1)  
    at <anonymous>:1:10  
setTimeout (async)  
g.setTimeout @ af-appx.worker.ide.js:2581  
s.(anonymous function) @ bridge.js:1  
document.dispatchEvent @ bridge.js:1  
(anonymous) @ VM142:1  
WebFrame.(anonymous function) @ VM101 D:\Program Files\支付宝小程序开发者工具\resources\electron.asar\renderer\api\web-frame.js:56  
electron.ipcRenderer.on @ VM83 D:\Program Files\支付宝小程序开发者工具\resources\electron.asar\renderer\web-frame-init.js:36  
emit @ VM18 events.js:182  
[WORKER] onerror Error: triggerComponentEvent error: Cannot read property '$options' of undefined - eventName: __e - type: [object Function]  
    at PageComponent.triggerComponentEvent (af-appx.worker.ide.js:1058)  
    at PageComponent.onMessage (af-appx.worker.ide.js:1739)  
    at Object.fn (bridge.js:1)  
    at HTMLDocument.document.dispatchEvent (bridge.js:1)  
    at <anonymous>:1:10

IDE运行环境说明

HBuilderX:2.4.1.20191114

windows版本号:10.0.18362 版本 18362

uni-app运行环境说明

钉钉小程序第三方个人应用

小程序开发者工具Version 0.70.14

HBuilderX创建的

自定义组件模式

附件

代码

<view v-for="(item,index) in list" style="width: 682rpx;margin-bottom: 28rpx;" :key="index">  

            <view @click="changeVisibleOfList(index)" class="flex-row-start" style="margin-top: 36rpx;">  
            ...  
            </view>  
                       ...  
</view>  

changeVisibleOfList(index) {  
                console.log(index)  
                var temp = this.list.slice()  
                temp[index].visible = !temp[index].visible  
                this.list = temp  
            },
2019-11-15 12:10 负责人:无 分享
已邀请:
DCloud_UNI_HT

DCloud_UNI_HT

是不是有嵌套组件 ?

  • zxcvb (作者)

    是的

    2019-11-15 17:11

  • DCloud_UNI_HT

    回复 zxcvb: 下载或更新最新版本的HBuilderX 试一下

    2019-11-15 17:13

  • zxcvb (作者)

    回复 DCloud_UNI_HT: 已经是最新版了,今天刚更新的

    2019-11-15 17:16

zxcvb

zxcvb (作者)

  • DCloud_UNI_HT

    看具体版本号

    2019-11-15 19:59

  • 8***@qq.com

    在组件和组件中使用就会有问题,只使用一层组件正常。

    2019-12-02 19:11

  • 8***@qq.com

    组件的子组件中使用。

    2019-12-02 19:12

8***@qq.com

8***@qq.com

2.4.2.20191115

也会出现

8***@qq.com

8***@qq.com

多层嵌套组件时就会发现。强烈要求解决。

a***@gmail.com

a***@gmail.com

一样出现这个问题

银魂

银魂

同样在钉钉小程序遇到这个问题。 多层嵌套组件时就会发现。强烈要求解决。

7***@qq.com

7***@qq.com - 开发钉钉小程序竟然选择了uniapp,但是支持还不够完善,团度能细化吗

同样在钉钉小程序遇到这个问题。 多层嵌套组件时就会发现。强烈要求解决。

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