this$refsthiscurrentPlayingIndexaudioPause;代码有什么问题
这段代码有两个问题:
-
在引用
$refs对象时,不需要使用方括号来引用属性。应该直接使用点操作符来引用属性。因此,应该修改为this.$refs[this.currentPlayingIndex].audioPause();。 -
audioPause()是一个自定义的方法,可能不是 Vue 实例的一个方法。如果audioPause()是一个组件的方法,需要确保该方法在组件中正确定义和实现。
原文地址: https://www.cveoy.top/t/topic/iS55 著作权归作者所有。请勿转载和采集!