Merge pull request #899 from nagisa77/codex/adapt-searchdropdown-to-iconpark

refactor: replace font awesome with iconpark in search dropdown
This commit is contained in:
Tim
2025-09-06 11:48:40 +08:00
committed by GitHub

View File

@@ -24,7 +24,7 @@
</template>
<template #option="{ option }">
<div class="search-option-item">
<i :class="['result-icon', iconMap[option.type]]"></i>
<component :is="iconMap[option.type]" class="result-icon" />
<div class="result-body">
<div class="result-main" v-html="highlight(option.text)"></div>
<div v-if="option.subText" class="result-sub" v-html="highlight(option.subText)"></div>
@@ -83,11 +83,12 @@ const highlight = (text) => {
}
const iconMap = {
user: 'fas fa-user',
post: 'fas fa-file-alt',
comment: 'fas fa-comment',
category: 'fas fa-folder',
tag: 'fas fa-hashtag',
user: 'UserIcon',
post: 'FileText',
post_title: 'FileText',
comment: 'CommentIcon',
category: 'Inbox',
tag: 'TagOne',
}
watch(selected, (val) => {