This commit is contained in:
syuilo 2020-09-21 13:11:38 +09:00
parent 1345ee1b2c
commit 8762387935
3 changed files with 8 additions and 8 deletions

View File

@ -612,10 +612,11 @@ export default defineComponent({
},
async insertEmoji(ev) {
os.modal(defineAsyncComponent(() => import('@/components/emoji-picker.vue')), {}, emoji => {
insertTextAtCursor(this.$refs.text, emoji);
}, {
os.modal(defineAsyncComponent(() => import('@/components/emoji-picker.vue')), {}, {}, {
source: ev.currentTarget || ev.target
}).then(emoji => {
if (emoji == null) return;
insertTextAtCursor(this.$refs.text, emoji);
});
},

View File

@ -222,11 +222,11 @@ export default defineComponent({
},
async insertEmoji(ev) {
const vm = os.modal(await import('@/components/emoji-picker.vue'), {
os.modal(await import('@/components/emoji-picker.vue'), {}, {}, {
source: ev.currentTarget || ev.target
}).$once('chosen', emoji => {
}).then(emoji => {
if (emoji == null) return;
insertTextAtCursor(this.$refs.text, emoji);
vm.close();
});
}
}

View File

@ -70,8 +70,7 @@ export default defineComponent({
},
async chooseEmoji(ev) {
os.modal(await import('@/components/emoji-picker.vue'), {
}, {}, {
os.modal(await import('@/components/emoji-picker.vue'), {}, {}, {
source: ev.currentTarget || ev.target
}).then(emoji => {
if (emoji == null) return;