Emitted events not passed to child
Issue #665. So make sure wrapper messages don't emit MessageEmits. More info here: https://github.com/vuejs/rfcs/discussions/397.
This commit is contained in:
parent
33c6e7cb64
commit
0194339102
8 changed files with 27 additions and 28 deletions
|
|
@ -57,7 +57,7 @@
|
|||
<script setup lang="ts">
|
||||
import MessageIncoming from "./MessageIncoming.vue";
|
||||
import MessageOutgoing from "./MessageOutgoing.vue";
|
||||
import { MessageEmits, MessageProps, useMessage } from "./useMessage";
|
||||
import { MessageProps, useMessage } from "./useMessage";
|
||||
import util, { ROOM_TYPE_CHANNEL, ROOM_TYPE_FILE_MODE } from "@/plugins/utils";
|
||||
import GalleryItemsView from "../../file_mode/GalleryItemsView.vue";
|
||||
import ThumbnailView from "../../file_mode/ThumbnailView.vue";
|
||||
|
|
@ -75,7 +75,7 @@ const $$sanitize: any = inject('globalSanitize');
|
|||
type RootType = InstanceType<typeof MessageOutgoing | typeof MessageIncoming>
|
||||
const rootRef = useTemplateRef<RootType>("root");
|
||||
|
||||
const emits = defineEmits<MessageEmits & {(event: "layout-change", value: {element: Element | undefined, action: () => void}): void}>();
|
||||
const emits = defineEmits<{(event: "layout-change", value: {element: Element | undefined, action: () => void}): void}>();
|
||||
|
||||
const items: Ref<EventAttachment[]> = ref([]);
|
||||
const showItem: Ref<EventAttachment | undefined> = ref(undefined);
|
||||
|
|
@ -105,7 +105,7 @@ const {
|
|||
messageText,
|
||||
redactedBySomeoneElse,
|
||||
linkify,
|
||||
} = useMessage($matrix, t, props, emits, processThread);
|
||||
} = useMessage($matrix, t, props, undefined, processThread);
|
||||
|
||||
const rootComponent = computed(() => {
|
||||
return isIncoming.value ? MessageIncoming : MessageOutgoing;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue