Added global search.
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user