Added global search.

This commit is contained in:
2024-02-22 05:08:06 +01:00
parent fc240710f3
commit 09df134558
15 changed files with 461 additions and 272 deletions

View File

@@ -95,6 +95,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
query: {
type: String,
default: null,
},
includeQuery: {
type: Boolean,
default: true,
@@ -148,6 +152,14 @@ function go(page, event) {
}
function getPath(page) {
if (!routeParams.path && props.includeQuery) {
return `${pageContext.urlParsed.pathname}${page}${urlParsed.searchOriginal}`;
}
if (!routeParams.path) {
return `${pageContext.urlParsed.pathname}${page}`;
}
const path = parse(routeParams.path)
.map((segment) => {
if (segment.name === 'page') {