hardlounge/client/components/InlineChannel.vue

36 lines
605 B
Vue
Raw Normal View History

2019-10-17 14:17:02 +00:00
<template>
<span
class="inline-channel"
dir="auto"
role="button"
tabindex="0"
@click.prevent="openContextMenu"
@contextmenu.prevent="openContextMenu"
2019-10-17 14:17:02 +00:00
><slot></slot
></span>
</template>
<script lang="ts">
import {defineComponent} from "vue";
import eventbus from "../js/eventbus";
2019-11-12 15:51:40 +00:00
export default defineComponent({
2019-10-17 14:17:02 +00:00
name: "InlineChannel",
props: {
channel: String,
},
setup(props) {
const openContextMenu = (event) => {
eventbus.emit("contextmenu:inline-channel", {
event: event,
channel: props.channel,
2019-10-17 14:17:02 +00:00
});
};
return {
openContextMenu,
};
2019-10-17 14:17:02 +00:00
},
});
2019-10-17 14:17:02 +00:00
</script>