Fix: lint error 2
This commit is contained in:
parent
808602cac8
commit
e88c0ed26a
|
@ -42,7 +42,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkEmoji v-else class="emoji" :emoji="emoji" :normal="true"/>
|
<MkEmoji v-else class="emoji" :emoji="emoji" :normal="true"/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="shown" v-for="child in customEmojiTree" style="padding-left: 18px;">
|
<div v-for="child in customEmojiTree" v-if="shown" style="padding-left: 18px;">
|
||||||
<!-- TODO: 再帰へのイベントの渡し方が微妙なのか反応はするがエフェクトが出ない -->
|
<!-- TODO: 再帰へのイベントの渡し方が微妙なのか反応はするがエフェクトが出ない -->
|
||||||
<MkEmojiPickerSection
|
<MkEmojiPickerSection
|
||||||
:key="`custom:${child.value}`"
|
:key="`custom:${child.value}`"
|
||||||
|
@ -50,7 +50,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:emojis="computed(() => customEmojis.filter(e => e.category === child.category).map(e => `:${e.name}:`))"
|
:emojis="computed(() => customEmojis.filter(e => e.category === child.category).map(e => `:${e.name}:`))"
|
||||||
:isChildrenExits="child.children.length!==0"
|
:isChildrenExits="child.children.length!==0"
|
||||||
:customEmojiTree="child.children"
|
:customEmojiTree="child.children"
|
||||||
@chosen="emit('chosen', $event)"
|
@chosen="emit('chosen', $event, $event)"
|
||||||
>
|
>
|
||||||
{{ child.value }}
|
{{ child.value }}
|
||||||
</MkEmojiPickerSection>
|
</MkEmojiPickerSection>
|
||||||
|
|
|
@ -157,7 +157,7 @@ const customEmojiFolderRoot: CustomEmojiFolderTree = { value: "", category: "",
|
||||||
|
|
||||||
function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): CustomEmojiFolderTree {
|
function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): CustomEmojiFolderTree {
|
||||||
const parts = input.split('/');
|
const parts = input.split('/');
|
||||||
let category = ""
|
let category = "";
|
||||||
let currentNode: CustomEmojiFolderTree = root;
|
let currentNode: CustomEmojiFolderTree = root;
|
||||||
|
|
||||||
for (const part of parts) {
|
for (const part of parts) {
|
||||||
|
@ -179,16 +179,14 @@ function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): Cu
|
||||||
return currentNode;
|
return currentNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
customEmojiCategories.value.forEach(e => {
|
customEmojiCategories.value.forEach(ec => {
|
||||||
if (e !== null){
|
if (ec !== null) {
|
||||||
parseAndMergeCategories(e, customEmojiFolderRoot);
|
parseAndMergeCategories(ec, customEmojiFolderRoot);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
parseAndMergeCategories(i18n.ts.other, customEmojiFolderRoot);
|
parseAndMergeCategories(i18n.ts.other, customEmojiFolderRoot);
|
||||||
|
|
||||||
console.log(customEmojiFolderRoot)
|
|
||||||
|
|
||||||
watch(q, () => {
|
watch(q, () => {
|
||||||
if (emojisEl.value) emojisEl.value.scrollTop = 0;
|
if (emojisEl.value) emojisEl.value.scrollTop = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue