https://github.com/SevenOutman/vue-aplayer/blob/develop/docs/README.zh-CN.md

1、安装音频组件包vue-aplayer

yarn add vue-aplayer 或 npm install vue-aplayer --save

2、引入

import Aplayer from 'vue-aplayer'

new Vue({
    components: {
        Aplayer
    },
    data(){
        return{
            audioPlayerData: {
                title: '歌曲名',
                artist: '歌手',
                src: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.mp3',
                pic: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.jpg'
            }
        }
    }
})

3、使用

<aplayer class="audio-player" :music="audioPlayerData"></aplayer>

vue使用音频组件

相关文章:

  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-07
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2022-01-05
相关资源
相似解决方案