fix: 修正搜索条目无法完全显示的问题
- 为查询/搜索添加更大的limit
This commit is contained in:
@ -51,9 +51,19 @@
|
|||||||
// 展开目标项
|
// 展开目标项
|
||||||
activeNames.value = [target.id];
|
activeNames.value = [target.id];
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 100)); // 等待动画完成
|
||||||
|
|
||||||
// 平滑滚动到对应位置
|
// 平滑滚动到对应位置
|
||||||
|
// const el = document.querySelector(`#q-${target.id}`);
|
||||||
|
// el?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||||
|
setTimeout(() => {
|
||||||
const el = document.querySelector(`#q-${target.id}`);
|
const el = document.querySelector(`#q-${target.id}`);
|
||||||
el?.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
el?.scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'start',
|
||||||
|
});
|
||||||
|
}, 200); // 与 el-collapse 的 transition 时间匹配
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|||||||
@ -11,7 +11,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
if (!q) return [];
|
if (!q) return [];
|
||||||
|
|
||||||
const meili = getMeiliService();
|
const meili = getMeiliService();
|
||||||
const sections = await meili.search(q, { limit: 12 }, locale);
|
const sections = await meili.search(q, { limit: 500 }, locale);
|
||||||
|
|
||||||
// 空Section过滤
|
// 空Section过滤
|
||||||
const filteredSections = sections.filter(
|
const filteredSections = sections.filter(
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
query GetDocumentList($locale: String!) {
|
query GetDocumentList($locale: String!) {
|
||||||
product_documents(filter: { status: { _eq: "published" } }) {
|
product_documents(filter: { status: { _eq: "published" } }, limit: 500) {
|
||||||
id
|
id
|
||||||
file {
|
file {
|
||||||
id
|
id
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
query GetProductList($locale: String!) {
|
query GetProductList($locale: String!) {
|
||||||
products(filter: { status: { _eq: "in-production" } }) {
|
products(filter: { status: { _eq: "in-production" } }, limit: 200) {
|
||||||
id
|
id
|
||||||
status
|
status
|
||||||
translations(filter: { languages_code: { code: { _eq: $locale } } }) {
|
translations(filter: { languages_code: { code: { _eq: $locale } } }) {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
query GetQuestionList($locale: String!) {
|
query GetQuestionList($locale: String!) {
|
||||||
questions(filter: { status: { _eq: "published" } }) {
|
questions(filter: { status: { _eq: "published" } }, limit: 500) {
|
||||||
id
|
id
|
||||||
type {
|
type {
|
||||||
id
|
id
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
query GetSolutionList($locale: String!) {
|
query GetSolutionList($locale: String!) {
|
||||||
solutions(filter: { status: { _eq: "published" } }) {
|
solutions(filter: { status: { _eq: "published" } }, limit: 200) {
|
||||||
id
|
id
|
||||||
cover {
|
cover {
|
||||||
id
|
id
|
||||||
|
|||||||
Reference in New Issue
Block a user