1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-20 09:38:29 +09:00

Improve performance

This commit is contained in:
syuilo 2020-11-03 15:49:31 +09:00
parent ab692cfa3d
commit ab166959a4
2 changed files with 5 additions and 6 deletions

View File

@ -28,7 +28,7 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { defineComponent, markRaw } from 'vue';
import { emojilist } from '../../misc/emojilist';
import contains from '@/scripts/contains';
import { twemojiSvgBase } from '../../misc/twemoji-base';
@ -124,7 +124,6 @@ export default defineComponent({
emojis: [],
items: [],
select: -1,
emojilist,
emojiDb: [] as EmojiDef[]
}
},
@ -178,7 +177,7 @@ export default defineComponent({
emojiDefinitions.sort((a, b) => a.name.length - b.name.length);
this.emojiDb = emojiDefinitions.concat(emjdb);
this.emojiDb = markRaw(emojiDefinitions.concat(emjdb));
//#endregion
this.textarea.addEventListener('keydown', this.onKeydown);

View File

@ -63,7 +63,7 @@
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { defineComponent, markRaw } from 'vue';
import { emojilist } from '../../misc/emojilist';
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
import { faAsterisk, faLeaf, faUtensils, faFutbol, faCity, faDice, faGlobe, faHistory, faUser } from '@fortawesome/free-solid-svg-icons';
@ -86,7 +86,7 @@ export default defineComponent({
data() {
return {
emojilist,
emojilist: markRaw(emojilist),
getStaticImageUrl,
customEmojis: {},
faGlobe, faHistory,
@ -137,7 +137,7 @@ export default defineComponent({
created() {
let local = this.$store.state.instance.meta.emojis;
local = groupByX(local, (x: any) => x.category || '');
this.customEmojis = local;
this.customEmojis = markRaw(local);
},
methods: {