diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 54a09e59..1ca71933 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -30,6 +30,7 @@ "vue-demi": "^0.14.6", "vue-i18n": "^11.1.12", "vue-router": "^4.5.0", + "vue-virtual-scroller": "^2.0.0-beta.8", "webpack": "^5.94.0", "xlsx": "file:./packages/xlsx-0.20.2.tgz" }, @@ -5186,6 +5187,24 @@ "typescript": ">=5.0.0" } }, + "node_modules/vue-virtual-scroller": { + "version": "2.0.1", + "resolved": "https://mirrors.tencent.com/npm/vue-virtual-scroller/-/vue-virtual-scroller-2.0.1.tgz", + "integrity": "sha512-3Drq8C61C4B3reSaZJr5nXBf/B7Beq1+h5/kYZB25MLYljTy97ISeUufRX9z6ZSZlFDXyafAOLK9XwajOWJY1A==", + "license": "MIT", + "dependencies": { + "mitt": "^2.1.0" + }, + "peerDependencies": { + "vue": "^3.3.0" + } + }, + "node_modules/vue-virtual-scroller/node_modules/mitt": { + "version": "2.1.0", + "resolved": "https://mirrors.tencent.com/npm/mitt/-/mitt-2.1.0.tgz", + "integrity": "sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==", + "license": "MIT" + }, "node_modules/watchpack": { "version": "2.5.1", "resolved": "https://mirrors.tencent.com/npm/watchpack/-/watchpack-2.5.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index 34e2bc6c..a7bd9af3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -34,6 +34,7 @@ "vue-demi": "^0.14.6", "vue-i18n": "^11.1.12", "vue-router": "^4.5.0", + "vue-virtual-scroller": "^2.0.0-beta.8", "webpack": "^5.94.0", "xlsx": "file:./packages/xlsx-0.20.2.tgz" }, diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index faa3db37..9e531151 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -1684,6 +1684,8 @@ export default { tabWiki: 'Wiki', tabGraph: 'Graph', searchPlaceholder: 'Search wiki pages...', + searchNoResults: 'No matching pages found', + loadMore: 'Load more ({remaining} remaining)', filterAll: 'All Types', filterSummary: 'Summaries', filterEntity: 'Entities', diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index 8a9a2498..1bac023d 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -2296,6 +2296,8 @@ export default { tabWiki: "Wiki", tabGraph: "그래프", searchPlaceholder: "Wiki 페이지 검색...", + searchNoResults: "일치하는 페이지가 없습니다", + loadMore: "더 불러오기 ({remaining}개 남음)", filterAll: "전체 유형", filterSummary: "요약", filterEntity: "엔티티", diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index c615c9f7..41b27e8e 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -1906,6 +1906,8 @@ export default { tabWiki: 'Wiki', tabGraph: 'Граф', searchPlaceholder: 'Поиск Wiki-страниц...', + searchNoResults: 'Страницы не найдены', + loadMore: 'Загрузить ещё (осталось {remaining})', filterAll: 'Все типы', filterSummary: 'Резюме', filterEntity: 'Сущности', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index 262d08a5..306ae160 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -2267,6 +2267,8 @@ export default { tabWiki: "Wiki", tabGraph: "图谱", searchPlaceholder: "搜索 Wiki 页面...", + searchNoResults: "没有找到匹配的页面", + loadMore: "加载更多(还剩 {remaining} 条)", filterAll: "全部类型", filterSummary: "摘要", filterEntity: "实体", diff --git a/frontend/src/main.ts b/frontend/src/main.ts index d797d3a0..075131de 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -8,6 +8,10 @@ import TDesign from "tdesign-vue-next"; import "tdesign-vue-next/es/style/index.css"; import "@/assets/theme/theme.css"; import "@/assets/dropdown-menu.less"; +// vue-virtual-scroller ships its own tiny stylesheet — required for +// RecycleScroller/DynamicScroller to size their viewport correctly. +// Without it the scroller computes 0 height and renders no items. +import "vue-virtual-scroller/dist/vue-virtual-scroller.css"; import i18n from "./i18n"; import { initTheme } from "@/composables/useTheme"; import { initFont } from "@/composables/useFont"; diff --git a/frontend/src/views/knowledge/wiki/WikiBrowser.vue b/frontend/src/views/knowledge/wiki/WikiBrowser.vue index 7ad9e790..6eb13951 100644 --- a/frontend/src/views/knowledge/wiki/WikiBrowser.vue +++ b/frontend/src/views/knowledge/wiki/WikiBrowser.vue @@ -213,73 +213,121 @@ :placeholder="$t('knowledgeEditor.wikiBrowser.searchPlaceholder')" clearable @enter="doSearch" - @clear="loadPages" + @clear="searchResults = null" > -
- -
- - {{ $t('knowledgeEditor.wikiBrowser.indexTitle') }} -
- - -
- - {{ $t('knowledgeEditor.wikiBrowser.logTitle') }} -
- -
- - -