From e0ba42df0acc2df792248e51394ac159e48c0932 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 13 Sep 2020 10:54:12 +0900 Subject: [PATCH] wip --- package.json | 2 +- src/client/components/emoji-picker.vue | 111 ++++++++++++------------- src/client/components/post-form.vue | 7 +- 3 files changed, 55 insertions(+), 65 deletions(-) diff --git a/package.json b/package.json index 6a3c70adb5..ba4d7427dd 100644 --- a/package.json +++ b/package.json @@ -262,7 +262,7 @@ "vuex": "4.0.0-beta.4", "vuex-persistedstate": "3.1.0", "web-push": "3.4.4", - "webpack": "5.0.0-beta.29", + "webpack": "5.0.0-beta.30", "webpack-cli": "3.3.12", "websocket": "1.0.31", "ws": "7.3.1", diff --git a/src/client/components/emoji-picker.vue b/src/client/components/emoji-picker.vue index ad5beab762..78c23ebee7 100644 --- a/src/client/components/emoji-picker.vue +++ b/src/client/components/emoji-picker.vue @@ -1,65 +1,63 @@ diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue index 35739082f0..e29b75ff20 100644 --- a/src/client/components/post-form.vue +++ b/src/client/components/post-form.vue @@ -606,11 +606,10 @@ export default defineComponent({ }, async insertEmoji(ev) { - const vm = os.modal(await import('./emoji-picker.vue'), { - source: ev.currentTarget || ev.target - }).$once('chosen', emoji => { + os.modal(defineAsyncComponent(() => import('@/components/emoji-picker.vue')), {}, emoji => { insertTextAtCursor(this.$refs.text, emoji); - vm.close(); + }, { + source: ev.currentTarget || ev.target }); },