From 021df59e850449cf06b60017be76772201f19cef Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 8 Mar 2018 00:34:01 +0800 Subject: [PATCH] new option: listFolded; listmaxheight -> listMaxHeight --- demo/demo.js | 2 +- src/js/controller.js | 2 +- src/template/player.art | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/demo.js b/demo/demo.js index 487f4b9..5445591 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -102,7 +102,7 @@ const ap5 = new APlayer({ showlrc: 3, mutex: true, theme: '#ad7a86', - listmaxheight: '80px', + listFolded: true, music: [ { title: 'あっちゅ~ま青春!', diff --git a/src/js/controller.js b/src/js/controller.js index 6bd02f7..482b09d 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -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'); diff --git a/src/template/player.art b/src/template/player.art index a02a805..a2b2c5f 100644 --- a/src/template/player.art +++ b/src/template/player.art @@ -46,7 +46,7 @@ -
+
    {{each options.music}}