参数在 NativeScript Vue 上的复选框上


<Checkbox v-model="chkbox" @tap="onTap($event)"></Checkbox>

我在我的 HTML 上得到了这个,而我的方法看起来像这样:

onTap(args){
console.log(args)
}

但是我得到了这样的错误

System.err: Calling js method onSingleTapUp failed
System.err: Error: java.lang.NoSuchFieldError: no "I" field "AXIS_RELATIVE_X" 
in class "Landroid/view/MotionEvent;" or its superclasses

有人可以帮助我解决这个问题吗?谢谢

首先,更改代码:

@tap="onTap($event)"

@tap="onTap"

其次,如果您尝试记录事件,则会得到爆炸:) 所以,继续你的代码,做任何你想做的事情,但不要记录事件。

最新更新