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