11<script setup lang="ts">
22import type ForumAPI from ' @/apis/forum/api'
3- import { useData , withBase } from ' vitepress'
3+ import { useData } from ' vitepress'
44import { computed } from ' vue'
55import { getLangPath } from ' @/utils'
66import ForumTopicTypeBadge from ' ./ui/ForumTopicTypeBadge.vue'
@@ -20,7 +20,7 @@ const { localeIndex } = useData()
2020
2121// Generate correct topic link with locale and base
2222function getTopicLink(topicId : string | number ): string {
23- return ` .${withBase ( ` ${getLangPath (localeIndex .value )}feedback/topic/${topicId } ` ) } `
23+ return ` .${` ${getLangPath (localeIndex .value )}feedback/topic/${topicId } ` } `
2424}
2525
2626function highlightText(text : string , keyword : string , scope : number = 20 ) {
@@ -71,21 +71,21 @@ const filteredItems = computed(() => {
7171 </script >
7272
7373<template >
74- <div class =" w-full pb-8" >
74+ <div class =" pb-8 w-full " >
7575 <h2 v-if =" filteredItems.length > 0" class =" mb-5" >
7676 Suggested Searches
7777 </h2 >
7878 <ul
79- class =" grid grid-row-auto grid-flow-col grid-flow-row grid-cols-1 gap-y-4 "
79+ class =" gap-y-4 grid grid-row-auto grid-flow-col grid-flow-row grid-cols-1"
8080 >
81- <li v-for =" item in filteredItems" :key =" item.id" class =" search-term w-full flex cursor-pointer items-center gap-4 " >
82- <span class =" vp-icon DocSearch-Search-Icon inline-block size-4 important:bg-[--vp-c-text-3]" aria-hidden =" true" />
81+ <li v-for =" item in filteredItems" :key =" item.id" class =" search-term flex gap-4 w-full cursor-pointer items-center" >
82+ <span class =" vp-icon DocSearch-Search-Icon size-4 inline-block important:bg-[--vp-c-text-3]" aria-hidden =" true" />
8383 <VPLink
84- :no-icon =" true" :href =" getTopicLink(item.id)" class =" search-term w-full overflow-hidden text-ellipsis break-all "
84+ :no-icon =" true" :href =" getTopicLink(item.id)" class =" search-term w-full break-all text-ellipsis overflow-hidden "
8585 @click =" emits('select')"
8686 >
8787 <div class =" flex items-center" >
88- <h4 class =" line-clamp-1 mr-4 " v-html =" item.type === 'BUG' ? item.highlightedContent : item.highlightedTitle" />
88+ <h4 class =" mr-4 line-clamp-1" v-html =" item.type === 'BUG' ? item.highlightedContent : item.highlightedTitle" />
8989 <ForumTopicTypeBadge :type =" item.type" />
9090 </div >
9191 </VPLink >
0 commit comments