0
点赞
收藏
分享

微信扫一扫

audio muted属性绑定无效 vue

zhongjh 2022-03-12 阅读 83

watch: {
    muted(val) {
      if (Array.isArray(this.$refs.audioPlayer)) {
        this.$refs.audioPlayer.forEach((a) => {
          a.muted = val;
        });
      } else {
        this.$refs.audioPlayer.muted = val;
      }
    }
}

监听数据变化手动更改 audio muted值

举报

相关推荐

0 条评论