hardlounge/client/components/Username.vue

25 lines
429 B
Vue
Raw Normal View History

<template>
<span
:class="['user', $options.filters.colorClass(user.nick), active ? 'active' : '']"
:data-name="user.nick"
2018-07-10 23:25:21 +00:00
role="button">{{ user.mode }}{{ user.nick }}
@mouseover="hover"
></span>
</template>
<script>
export default {
name: "Username",
props: {
user: Object,
active: Boolean,
2018-07-10 23:25:21 +00:00
onHover: Function,
},
methods: {
hover() {
this.onHover ? this.onHover(this.user) : null;
},
},
};
</script>