2021-02-27 04:08:34 +00:00
|
|
|
<template>
|
2021-11-19 10:36:12 +00:00
|
|
|
<MkPopup ref="popup" #default="{point}" :manual-showing="manualShowing" :src="src" :front="true" @click="$refs.popup.close()" @opening="opening" @close="$emit('close')" @closed="$emit('closed')">
|
|
|
|
<MkEmojiPicker ref="picker" class="ryghynhb _popup _shadow" :class="{ pointer: point === 'top' }" :show-pinned="showPinned" :as-reaction-picker="asReactionPicker" @chosen="chosen"/>
|
2021-08-08 03:19:10 +00:00
|
|
|
</MkPopup>
|
2021-02-27 04:08:34 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent, markRaw } from 'vue';
|
2021-11-11 17:02:25 +00:00
|
|
|
import MkPopup from '@/components/ui/popup.vue';
|
|
|
|
import MkEmojiPicker from '@/components/emoji-picker.vue';
|
2021-02-27 04:08:34 +00:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
2021-08-08 03:19:10 +00:00
|
|
|
MkPopup,
|
2021-02-27 04:08:34 +00:00
|
|
|
MkEmojiPicker,
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
2021-02-27 16:09:59 +00:00
|
|
|
manualShowing: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: null,
|
|
|
|
},
|
2021-02-27 04:08:34 +00:00
|
|
|
src: {
|
|
|
|
required: false
|
|
|
|
},
|
|
|
|
showPinned: {
|
|
|
|
required: false,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
asReactionPicker: {
|
|
|
|
required: false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2021-08-08 03:19:10 +00:00
|
|
|
emits: ['done', 'close', 'closed'],
|
2021-02-27 04:08:34 +00:00
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
chosen(emoji: any) {
|
|
|
|
this.$emit('done', emoji);
|
2021-08-08 03:19:10 +00:00
|
|
|
this.$refs.popup.close();
|
2021-02-27 04:08:34 +00:00
|
|
|
},
|
2021-02-28 01:03:52 +00:00
|
|
|
|
|
|
|
opening() {
|
|
|
|
this.$refs.picker.reset();
|
|
|
|
this.$refs.picker.focus();
|
|
|
|
}
|
2021-02-27 04:08:34 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2021-08-09 09:01:12 +00:00
|
|
|
.ryghynhb {
|
|
|
|
&.pointer {
|
|
|
|
&:before {
|
|
|
|
--size: 8px;
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: calc(0px - (var(--size) * 2));
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
width: 0;
|
|
|
|
margin: auto;
|
|
|
|
border: solid var(--size) transparent;
|
|
|
|
border-bottom-color: var(--popup);
|
2021-02-27 04:08:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|