Use v-once

This commit is contained in:
An Phan 2016-06-27 00:31:32 +08:00
parent 68a12be5c4
commit 06303c4852
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2
3 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@
<td class="title">{{ song.title }}</td>
<td class="artist">{{ song.artist.name }}</td>
<td class="album">{{ song.album.name }}</td>
<td class="time">{{ song.fmtLength }}</td>
<td class="time" v-once>{{ song.fmtLength }}</td>
<td class="play" @click.stop="doPlayback">
<i class="fa fa-pause-circle" v-if="song.playbackState === 'playing'"></i>
<i class="fa fa-play-circle" v-else></i>

View file

@ -1,6 +1,6 @@
<template>
<header id="mainHeader">
<h1 class="brand">{{ appTitle }}</h1>
<h1 class="brand" v-once>{{ appTitle }}</h1>
<span class="hamburger" @click="toggleSidebar">
<i class="fa fa-bars"></i>
</span>

View file

@ -15,8 +15,8 @@ export function orderBy (arr, sortKey, reverse) {
return aKey === bKey ? 0 : aKey > bKey;
}
aKey = aKey === undefined ? aKey : aKey.toLowerCase();
bKey = bKey === undefined ? bKey : bKey.toLowerCase();
aKey = aKey === undefined ? aKey : `${aKey}`.toLowerCase();
bKey = bKey === undefined ? bKey : `${bKey}`.toLowerCase();
return aKey === bKey ? 0 : aKey > bKey;
}