代码改变世界
[登录 · 注册]
  • vueaplayeryer
  • 安装

    yarn add @moefe/vue-aplayer
    

    使用

         <aplayer :audio="audio" :lrcType="3" fixed />
            
    

    main

    import APlayer from '@moefe/vue-aplayer';
    Vue.use(APlayer, {
      defaultCover: 'https://github.com/u3u.png',
      productionTip: true,
    });
    

    js

      export default {
            name: "Vueaplayer",
            components: {
    
            },
            data() {
                return {
                    audio: [{
                        name: '东西(Cover:林俊呈)',
                        artist: '纳豆',
                        url: 'http://localhost:8081/mp3/0003.mp3',
                        cover: 'https://p1.music.126.net/5zs7IvmLv7KahY3BFzUmrg==/109951163635241613.jpg?param=300y300', // prettier-ignore
                        lrc: 'https://cdn.moefe.org/music/lrc/thing.lrc',
                    },
                        {
                            name: "0001",
                            artist: "0001",
                            url: 'http://localhost:8081/mp3/0001.mp3',
                            cover: "",
                            lrc: "[00:00.00]lrc here
    [00:01.00]aplayer"
                        }
                    ]
    
                }
    
            },
            
        }
    
  • 【推广】 阿里云小站-上云优惠聚集地(新老客户同享)更有每天限时秒杀!
    【推广】 云服务器低至0.95折 1核2G ECS云服务器8.1元/月
    【推广】 阿里云老用户升级四重礼遇享6.5折限时折扣!
  • 原文:https://www.cnblogs.com/ouyangkai/p/13826812.html
走看看 - 开发者的网上家园