mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
parent
1b379690dd
commit
177363ac60
1 changed files with 10 additions and 23 deletions
|
@ -198,15 +198,11 @@ export default {
|
|||
return this.$route.query.searchText || "";
|
||||
},
|
||||
set(value) {
|
||||
const newQuery = {
|
||||
...this.$route.query,
|
||||
searchText: value,
|
||||
};
|
||||
if (!value) {
|
||||
delete newQuery.searchText;
|
||||
}
|
||||
this.$router.replace({
|
||||
query: newQuery,
|
||||
query: {
|
||||
...this.$route.query,
|
||||
searchText: value,
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -290,22 +286,13 @@ export default {
|
|||
* @returns {void}
|
||||
*/
|
||||
updateFilter(newFilter) {
|
||||
let newQuery = {
|
||||
...this.$route.query,
|
||||
...newFilter,
|
||||
};
|
||||
if (!newFilter.status || newFilter.status.length === 0) {
|
||||
delete newQuery.status;
|
||||
}
|
||||
if (!newFilter.active || newFilter.active.length === 0) {
|
||||
delete newQuery.active;
|
||||
}
|
||||
if (!newFilter.tags || newFilter.tags.length === 0) {
|
||||
delete newQuery.tags;
|
||||
}
|
||||
|
||||
this.$router.replace({
|
||||
query: newQuery,
|
||||
query: {
|
||||
...this.$route.query,
|
||||
status: newFilter.status,
|
||||
active: newFilter.active,
|
||||
tags: newFilter.tags,
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue