This commit is contained in:
syuilo 2019-06-10 23:09:36 +09:00
parent e83200f79a
commit 9cf834d478

View file

@ -19,7 +19,7 @@
<span class="emoji" v-if="emoji.isCustomEmoji"><img :src="emoji.url" :alt="emoji.emoji"/></span> <span class="emoji" v-if="emoji.isCustomEmoji"><img :src="emoji.url" :alt="emoji.emoji"/></span>
<span class="emoji" v-else-if="!useOsDefaultEmojis"><img :src="emoji.url" :alt="emoji.emoji"/></span> <span class="emoji" v-else-if="!useOsDefaultEmojis"><img :src="emoji.url" :alt="emoji.emoji"/></span>
<span class="emoji" v-else>{{ emoji.emoji }}</span> <span class="emoji" v-else>{{ emoji.emoji }}</span>
<span class="name">{{ beforeQ }}<b>{{ q }}</b>{{ afterQ }}</span> <span class="name" v-html="emoji.name.replace(q, `<b>${q}</b>`)"></span>
<span class="alias" v-if="emoji.aliasOf">({{ emoji.aliasOf }})</span> <span class="alias" v-if="emoji.aliasOf">({{ emoji.aliasOf }})</span>
</li> </li>
</ol> </ol>
@ -89,14 +89,6 @@ export default Vue.extend({
}, },
computed: { computed: {
beforeQ(): string {
return this.emoji.name.split(this.q)[0];
},
afterQ(): string {
return this.emoji.name.split(this.q)[1] || '';
},
items(): HTMLCollection { items(): HTMLCollection {
return (this.$refs.suggests as Element).children; return (this.$refs.suggests as Element).children;
}, },