mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-08-25 12:27:14 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 140d33d024 |
@@ -7,6 +7,11 @@
|
|||||||
@click="item.iconClick && item.iconClick()"
|
@click="item.iconClick && item.iconClick()"
|
||||||
>
|
>
|
||||||
<BaseImage v-if="item.src" :src="item.src" class="timeline-img" alt="timeline item" />
|
<BaseImage v-if="item.src" :src="item.src" class="timeline-img" alt="timeline item" />
|
||||||
|
<component
|
||||||
|
v-else-if="item.icon && (typeof item.icon !== 'string' || !item.icon.includes(' '))"
|
||||||
|
:is="item.icon"
|
||||||
|
:size="20"
|
||||||
|
/>
|
||||||
<i v-else-if="item.icon" :class="item.icon"></i>
|
<i v-else-if="item.icon" :class="item.icon"></i>
|
||||||
<BaseImage v-else-if="item.emoji" :src="item.emoji" class="timeline-emoji" alt="emoji" />
|
<BaseImage v-else-if="item.emoji" :src="item.emoji" class="timeline-emoji" alt="emoji" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #option="{ option }">
|
<template #option="{ option }">
|
||||||
<div class="search-option-item">
|
<div class="search-option-item">
|
||||||
<component :is="iconMap[option.type]" class="result-icon" />
|
<i :class="['result-icon', iconMap[option.type]]"></i>
|
||||||
<div class="result-body">
|
<div class="result-body">
|
||||||
<div class="result-main" v-html="highlight(option.text)"></div>
|
<div class="result-main" v-html="highlight(option.text)"></div>
|
||||||
<div v-if="option.subText" class="result-sub" v-html="highlight(option.subText)"></div>
|
<div v-if="option.subText" class="result-sub" v-html="highlight(option.subText)"></div>
|
||||||
@@ -83,12 +83,11 @@ const highlight = (text) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const iconMap = {
|
const iconMap = {
|
||||||
user: 'UserIcon',
|
user: 'fas fa-user',
|
||||||
post: 'FileText',
|
post: 'fas fa-file-alt',
|
||||||
post_title: 'FileText',
|
comment: 'fas fa-comment',
|
||||||
comment: 'CommentIcon',
|
category: 'fas fa-folder',
|
||||||
category: 'Inbox',
|
tag: 'fas fa-hashtag',
|
||||||
tag: 'TagOne',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(selected, (val) => {
|
watch(selected, (val) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user