2019-10-17 14:17:02 +00:00
|
|
|
<template>
|
2021-11-29 23:35:26 +00:00
|
|
|
<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>
|
|
|
|
|
2022-06-19 00:25:21 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import {defineComponent} from "vue";
|
2021-11-29 23:35:26 +00:00
|
|
|
import eventbus from "../js/eventbus";
|
2019-11-12 15:51:40 +00:00
|
|
|
|
2022-06-19 00:25:21 +00:00
|
|
|
export default defineComponent({
|
2019-10-17 14:17:02 +00:00
|
|
|
name: "InlineChannel",
|
|
|
|
props: {
|
|
|
|
channel: String,
|
|
|
|
},
|
2022-06-19 00:25:21 +00:00
|
|
|
setup(props) {
|
|
|
|
const openContextMenu = (event) => {
|
2021-11-29 23:35:26 +00:00
|
|
|
eventbus.emit("contextmenu:inline-channel", {
|
|
|
|
event: event,
|
2022-06-19 00:25:21 +00:00
|
|
|
channel: props.channel,
|
2019-10-17 14:17:02 +00:00
|
|
|
});
|
2022-06-19 00:25:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
openContextMenu,
|
|
|
|
};
|
2019-10-17 14:17:02 +00:00
|
|
|
},
|
2022-06-19 00:25:21 +00:00
|
|
|
});
|
2019-10-17 14:17:02 +00:00
|
|
|
</script>
|