介绍
音乐插件
# 🎏 vuepress-plugin-bgm-player
# 📎 新增依赖
npm install vuepress-plugin-ribbon-animation -D
或者
cnpm install vuepress-plugin-ribbon-animation -D
// 只要把这个放进 config的plugins中就可以了
[
'@vuepress-reco/vuepress-plugin-bgm-player',
{
audios: [
{
name: 'LIKPLA',
artist: '夏.烟火',
url: 'https://cnd.yinglingxuan.cn/a_mp3/LIKPIA%20-%20%E5%A4%8F%C2%B7%E7%83%9F%E7%81%AB.mp3',
cover: 'https://cnd.yinglingxuan.cn/myPng/1.jpg'
},
{
name: 'LOSER',
artist: '米津玄師',
url: 'https://www.ytmp3.cn/down/73654.mp3',
cover: 'https://p1.music.126.net/qTSIZ27qiFvRoKj-P30BiA==/109951165895951287.jpg?param=200y200'
}
] ,
// 是否默认缩小
autoShrink: true ,
// 缩小时缩为哪种模式
shrinkMode: 'float',
// 悬浮窗样式
floatStyle: { top: '10px', 'z-index': '999999' },
autoplay:true,
}
],
你就可以拥有和我一样的音乐组件了啦 -> 查看效果😜