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
|
|
@ -2,7 +2,8 @@
|
|||
<component
|
||||
:is="rootComponent"
|
||||
ref="root"
|
||||
v-bind="{ ...$props, ...$attrs }">
|
||||
v-bind="{ ...$props, ...$attrs }"
|
||||
>
|
||||
<div class="bubble image-bubble" ref="imageRef">
|
||||
<ImageWithProgress v-if="attachment"
|
||||
:aspect-ratio="16 / 9"
|
||||
|
|
@ -26,7 +27,7 @@ import MessageOutgoing from "./MessageOutgoing.vue";
|
|||
import ImageWithProgress from "../../ImageWithProgress.vue";
|
||||
import { useLazyLoad } from "./useLazyLoad";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { MessageEmits, MessageProps, useMessage } from "./useMessage";
|
||||
import { MessageProps, useMessage } from "./useMessage";
|
||||
import { EventAttachment } from "../../../models/eventAttachment";
|
||||
import { useDisplay } from "vuetify";
|
||||
import utils from "@/plugins/utils";
|
||||
|
|
@ -39,7 +40,6 @@ type RootType = InstanceType<typeof MessageOutgoing | typeof MessageIncoming>
|
|||
const rootRef = useTemplateRef<RootType>("root");
|
||||
const imageRef = useTemplateRef("imageRef");
|
||||
|
||||
const emits = defineEmits<MessageEmits>();
|
||||
const props = defineProps<MessageProps>();
|
||||
|
||||
const cover = ref(true);
|
||||
|
|
@ -56,7 +56,7 @@ const {
|
|||
event,
|
||||
isIncoming,
|
||||
attachment,
|
||||
} = useMessage($matrix, t, props, emits, undefined);
|
||||
} = useMessage($matrix, t, props, undefined, undefined);
|
||||
|
||||
const rootComponent = computed(() => {
|
||||
return isIncoming.value ? MessageIncoming : MessageOutgoing;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue