mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 13:09:40 +08:00
扩展<mew-music>组件,可用于自定义侧边栏播放器
This commit is contained in:
parent
4a3759c27c
commit
49431c2470
@ -71,7 +71,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
theme: this.getAttribute('theme') || 'var(--theme)',
|
||||
loop: this.getAttribute('loop') || 'all',
|
||||
autoplay: this.hasAttribute('autoplay') && this.getAttribute('autoplay') !== 'false',
|
||||
lrcType: 3,
|
||||
lrcType: this.getAttribute('lrcType') || 3,
|
||||
listFolded: this.getAttribute('listFolded') || false,
|
||||
volume: this.getAttribute('volume') || 0.7,
|
||||
listMaxHeight: this.getAttribute('listMaxHeight') || 450,
|
||||
}
|
||||
if (!('APlayer' in window)) {
|
||||
if (!MewMusic.prototype.load) {
|
||||
@ -122,6 +125,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
cover: this.getAttribute('cover'),
|
||||
lrc: this.getAttribute('lrc') || (this.options.lrcType = undefined),
|
||||
}]
|
||||
} else if (this.hasAttribute('music-list')) {
|
||||
this.options.audio = JSON.parse(this.getAttribute('music-list'))
|
||||
} else {
|
||||
this.innerHTML = '未指定播放的音乐!'
|
||||
return resolve()
|
||||
|
2
templates/assets/js/mew-custom.min.js
vendored
2
templates/assets/js/mew-custom.min.js
vendored
File diff suppressed because one or more lines are too long
@ -30,7 +30,7 @@ spec:
|
||||
settingName: theme-dream2-plus-setting
|
||||
configMapName: theme-dream2-plus-configMap
|
||||
# 版本号
|
||||
version: 1.3.3.beta5
|
||||
version: 1.3.3.beta6
|
||||
# 最低支持的 Halo 版本
|
||||
require: ">=2.20.0"
|
||||
# 许可
|
||||
|
Loading…
x
Reference in New Issue
Block a user