- worklet动画结束回调函数中runOnJS一个方法会出现异常?
const { shared, Easing, repeat, timing, cancelAnimation,runOnUI,runOnJS} = wx.worklet Component({ /** * 组件的方法列表 */ methods: { testTriggerEvent() { try{ this.setData({ test:1 }) }catch(error){ console.error('f',error) } }, onDeleteTapEvent() { // 动画 var deleteWorkletShareValue = shared(1) this.applyAnimatedStyle('.deleteView', () => { 'worklet'; return { transform: `scale(${deleteWorkletShareValue.value})` } }) deleteWorkletShareValue.value = repeat(timing(1.5, { duration: 100, easing: Easing.linear }), 2, true, () => { 'worklet'; runOnJS(this.testTriggerEvent)() }) }, } }) runOnJS组件的this.testTriggerEvent()函数时出现错误TypeError: this.setData is not a function 应该怎么解决呢
2024-03-29 - WebAudioContext.decodeAudioData到底有没有参数啊?
文档中是支持参数的,但是我在调用的时候提示我decodeAudioData是没参数的?是版本问题吗? [图片]
2024-01-25