new option: listFolded; listmaxheight -> listMaxHeight

This commit is contained in:
DIYgod 2018-03-08 00:34:01 +08:00
parent 6029ce980c
commit 021df59e85
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
3 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ const ap5 = new APlayer({
showlrc: 3,
mutex: true,
theme: '#ad7a86',
listmaxheight: '80px',
listFolded: true,
music: [
{
title: 'あっちゅ~ま青春!',

View File

@ -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');

View File

@ -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>