Close equalizer if clicked outside

This commit is contained in:
An Phan 2016-09-18 12:33:52 +08:00
parent aa3260aff4
commit 8fb5031dc3
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -35,7 +35,7 @@
</div>
<div class="other-controls" :class="{ 'with-gradient': prefs.showExtraPanel }">
<div class="wrapper">
<div class="wrapper" v-koel-clickaway="closeEqualizer">
<equalizer v-if="useEqualizer" v-show="showEqualizer"></equalizer>
<sound-bar v-show="song.playbackState === 'playing'"></sound-bar>
<i class="like control fa fa-heart" :class="{ liked: song.liked }"
@ -207,6 +207,10 @@ export default {
toggleExtraPanel() {
preferenceStore.set('showExtraPanel', !this.prefs.showExtraPanel);
},
closeEqualizer() {
this.showEqualizer = false;
},
},
created() {