new option: listFolded; listmaxheight -> listMaxHeight
This commit is contained in:
parent
6029ce980c
commit
021df59e85
|
|
@ -102,7 +102,7 @@ const ap5 = new APlayer({
|
|||
showlrc: 3,
|
||||
mutex: true,
|
||||
theme: '#ad7a86',
|
||||
listmaxheight: '80px',
|
||||
listFolded: true,
|
||||
music: [
|
||||
{
|
||||
title: 'あっちゅ~ま青春!',
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class Controller {
|
|||
}
|
||||
|
||||
initMenuButton () {
|
||||
this.player.template.list.style.height = this.player.template.list.offsetHeight + 'px';
|
||||
this.player.template.list.style.height = 33 * this.player.options.music.length - 1 + 'px';
|
||||
this.player.template.menu.addEventListener('click', () => {
|
||||
if (!this.player.template.list.classList.contains('aplayer-list-hide')) {
|
||||
this.player.template.list.classList.add('aplayer-list-hide');
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aplayer-list"{{ if options.listmaxheight }} style="max-height: {{ options.listmaxheight }}"{{ /if }}>
|
||||
<div class="aplayer-list{{ if options.listFolded }} aplayer-list-hide{{ /if }}"{{ if options.listMaxHeight }} style="max-height: {{ options.listMaxHeight }}"{{ /if }}>
|
||||
<ol>
|
||||
{{each options.music}}
|
||||
<li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue