fix type
This commit is contained in:
parent
18f778a335
commit
070d91e16e
@ -51,8 +51,8 @@ const emit = defineEmits<{
|
|||||||
const modal = ref<InstanceType<typeof MkModal>>();
|
const modal = ref<InstanceType<typeof MkModal>>();
|
||||||
const picker = ref<InstanceType<typeof MkEmojiPicker>>();
|
const picker = ref<InstanceType<typeof MkEmojiPicker>>();
|
||||||
|
|
||||||
function chosen(emoji: any, withRenote: boolean) {
|
function chosen(results: { reaction: string, withRenote: boolean }) {
|
||||||
emit('done', { reaction: emoji, withRenote: withRenote });
|
emit('done', results);
|
||||||
modal.value?.close();
|
modal.value?.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { popup } from '@/os';
|
|||||||
class ReactionPicker {
|
class ReactionPicker {
|
||||||
private src: Ref<HTMLElement | null> = ref(null);
|
private src: Ref<HTMLElement | null> = ref(null);
|
||||||
private manualShowing = ref(false);
|
private manualShowing = ref(false);
|
||||||
private onChosen?: (reaction: string, withRenote: boolean) => void;
|
private onChosen?: ({ reaction: string, withRenote: boolean }) => void;
|
||||||
private onClosed?: () => void;
|
private onClosed?: () => void;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -18,7 +18,7 @@ class ReactionPicker {
|
|||||||
manualShowing: this.manualShowing
|
manualShowing: this.manualShowing
|
||||||
}, {
|
}, {
|
||||||
done: results => {
|
done: results => {
|
||||||
this.onChosen!(results.reaction, results.withRenote);
|
this.onChosen!({ reaction: results.reaction, withRenote: results.withRenote });
|
||||||
},
|
},
|
||||||
close: () => {
|
close: () => {
|
||||||
this.manualShowing.value = false;
|
this.manualShowing.value = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user