From 3a5201747b061a5e811493e0dff89ff4018fb87d Mon Sep 17 00:00:00 2001 From: syuilo <Syuilotan@yahoo.co.jp> Date: Fri, 21 Feb 2020 09:17:33 +0900 Subject: [PATCH] :art: --- src/client/components/reaction-picker.vue | 33 +++-------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/src/client/components/reaction-picker.vue b/src/client/components/reaction-picker.vue index 9380e6a78..3a17a522c 100644 --- a/src/client/components/reaction-picker.vue +++ b/src/client/components/reaction-picker.vue @@ -1,20 +1,9 @@ <template> <x-popup :source="source" ref="popup" @closed="() => { $emit('closed'); destroyDom(); }" v-hotkey.global="keymap"> <div class="rdfaahpb"> - <transition-group - name="reaction-fade" - tag="div" - class="buttons" - ref="buttons" - :class="{ showFocus }" - :css="false" - @before-enter="beforeEnter" - @enter="enter" - mode="out-in" - appear - > + <div class="buttons" ref="buttons" :class="{ showFocus }"> <button class="_button" v-for="(reaction, i) in rs" :key="reaction" @click="react(reaction)" :tabindex="i + 1" :title="reaction"><x-reaction-icon :reaction="reaction"/></button> - </transition-group> + </div> <input class="text" v-model="text" :placeholder="$t('enterEmoji')" @keyup.enter="reactText" @input="tryReactText" v-autocomplete="{ model: 'text' }"> </div> </x-popup> @@ -84,7 +73,7 @@ export default Vue.extend({ watch: { focus(i) { - this.$refs.buttons.children[i].elm.focus(); + this.$refs.buttons.children[i].focus(); } }, @@ -129,21 +118,7 @@ export default Vue.extend({ }, choose() { - this.$refs.buttons.children[this.focus].elm.click(); - }, - - beforeEnter(el) { - el.style.opacity = 0; - el.style.transform = 'scale(0.7)'; - }, - - enter(el, done) { - el.style.transition = [getComputedStyle(el).transition, 'transform 1s cubic-bezier(0.23, 1, 0.32, 1)', 'opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1)'].filter(x => x != '').join(','); - setTimeout(() => { - el.style.opacity = 1; - el.style.transform = 'scale(1)'; - setTimeout(done, 1000); - }, 0 * el.dataset.index) + this.$refs.buttons.children[this.focus].click(); }, } });