Merge class and :class

This commit is contained in:
An Phan 2016-10-31 11:41:08 +07:00
parent 6abc8431a4
commit 4f93879e1c
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -5,27 +5,26 @@
<ul class="menu">
<li>
<a class="home" :class="[currentView == 'home' ? 'active' : '']" href="/#!/home">Home</a>
<a :class="['home', currentView == 'home' ? 'active' : '']" href="/#!/home">Home</a>
</li>
<li>
<a class="queue"
:class="[currentView == 'queue' ? 'active' : '']"
<a :class="['queue', currentView == 'queue' ? 'active' : '']"
href="/#!/queue"
@dragleave="removeDroppableState"
@dragover.prevent="allowDrop"
@drop.stop.prevent="handleDrop">Current Queue</a>
</li>
<li>
<a class="songs" :class="[currentView == 'songs' ? 'active' : '']" href="/#!/songs">All Songs</a>
<a :class="['songs', currentView == 'songs' ? 'active' : '']" href="/#!/songs">All Songs</a>
</li>
<li>
<a class="albums" :class="[currentView == 'albums' ? 'active' : '']" href="/#!/albums">Albums</a>
<a :class="['albums', currentView == 'albums' ? 'active' : '']" href="/#!/albums">Albums</a>
</li>
<li>
<a class="artists" :class="[currentView == 'artists' ? 'active' : '']" href="/#!/artists">Artists</a>
<a :class="['artists', currentView == 'artists' ? 'active' : '']" href="/#!/artists">Artists</a>
</li>
<li v-if="sharedState.useYouTube">
<a class="youtube" :class="[currentView == 'youtubePlayer' ? 'active' : '']" href="/#!/youtube">YouTube Video</a>
<a :class="['youtube', currentView == 'youtubePlayer' ? 'active' : '']" href="/#!/youtube">YouTube Video</a>
</li>
</ul>
</section>
@ -37,10 +36,10 @@
<ul class="menu">
<li>
<a class="settings" :class="[currentView == 'settings' ? 'active' : '']" href="/#!/settings">Settings</a>
<a :class="['settings', currentView == 'settings' ? 'active' : '']" href="/#!/settings">Settings</a>
</li>
<li>
<a class="users" :class="[currentView == 'users' ? 'active' : '']" href="/#!/users">Users</a>
<a :class="['users', currentView == 'users' ? 'active' : '']" href="/#!/users">Users</a>
</li>
</ul>
</section>