Use vue's conditional classes

This commit is contained in:
Pavel Djundik 2018-07-11 10:34:11 +03:00 committed by Pavel Djundik
parent d97356e65a
commit b963fe3cf0
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<span <span
:class="['user', $options.filters.colorClass(user.nick), active ? 'active' : '']" :class="['user', $options.filters.colorClass(user.nick), { active: active }]"
:data-name="user.nick" :data-name="user.nick"
role="button" role="button"
v-on="onHover ? { mouseover: hover } : {}">{{ user.mode }}{{ user.nick }}</span> v-on="onHover ? { mouseover: hover } : {}">{{ user.mode }}{{ user.nick }}</span>

View File

@ -1,6 +1,6 @@
<template> <template>
<span <span
:class="['user', $options.filters.colorClass(user.original.nick), active ? 'active' : '']" :class="['user', $options.filters.colorClass(user.original.nick), { active: active }]"
:data-name="user.original.nick" :data-name="user.original.nick"
role="button" role="button"
@mouseover="hover" @mouseover="hover"