fix
This commit is contained in:
parent
8a3dbc1c99
commit
c73ec73920
|
@ -12,11 +12,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:transparentBg="true"
|
:transparentBg="true"
|
||||||
:manualShowing="manualShowing"
|
:manualShowing="manualShowing"
|
||||||
:src="src"
|
:src="src"
|
||||||
@click="click"
|
@click="modal?.close()"
|
||||||
@opening="opening"
|
@opening="opening"
|
||||||
@close="emit('close')"
|
@close="emit('close')"
|
||||||
@closed="emit('closed')"
|
@closed="emit('closed')"
|
||||||
@hide="emit('hide')"
|
|
||||||
>
|
>
|
||||||
<MkEmojiPicker
|
<MkEmojiPicker
|
||||||
ref="picker"
|
ref="picker"
|
||||||
|
@ -37,7 +36,7 @@ import MkModal from '@/components/MkModal.vue';
|
||||||
import MkEmojiPicker from '@/components/MkEmojiPicker.vue';
|
import MkEmojiPicker from '@/components/MkEmojiPicker.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
manualShowing?: boolean | null;
|
manualShowing?: boolean | null;
|
||||||
src?: HTMLElement;
|
src?: HTMLElement;
|
||||||
showPinned?: boolean;
|
showPinned?: boolean;
|
||||||
|
@ -52,8 +51,6 @@ const emit = defineEmits<{
|
||||||
(ev: 'done', v: any): void;
|
(ev: 'done', v: any): void;
|
||||||
(ev: 'close'): void;
|
(ev: 'close'): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
(ev: 'bgclick'): void;
|
|
||||||
(ev: 'hide'): void;
|
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
|
@ -61,7 +58,7 @@ const picker = shallowRef<InstanceType<typeof MkEmojiPicker>>();
|
||||||
|
|
||||||
function chosen(emoji: any) {
|
function chosen(emoji: any) {
|
||||||
emit('done', emoji);
|
emit('done', emoji);
|
||||||
if (props.manualShowing === null) modal.value?.close();
|
modal.value?.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function opening() {
|
function opening() {
|
||||||
|
@ -73,11 +70,6 @@ function opening() {
|
||||||
picker.value?.focus();
|
picker.value?.focus();
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
function click() {
|
|
||||||
emit('bgclick');
|
|
||||||
if (props.manualShowing === null) modal.value?.close();
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
|
|
Loading…
Reference in New Issue