fix event search
This commit is contained in:
parent
30f43e771e
commit
603ed1a779
|
@ -59,12 +59,14 @@ import * as os from '@/os';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
|
import { $ref } from 'vue/macros';
|
||||||
|
|
||||||
const XNote = defineAsyncComponent(() => import('./search.note.vue'));
|
const XNote = defineAsyncComponent(() => import('./search.note.vue'));
|
||||||
const XUser = defineAsyncComponent(() => import('./search.user.vue'));
|
const XUser = defineAsyncComponent(() => import('./search.user.vue'));
|
||||||
|
|
||||||
let tab = $ref('note');
|
let tab = $ref('note');
|
||||||
let searchQuery = $ref('');
|
let searchQuery = $ref('');
|
||||||
|
let key = $ref('');
|
||||||
let searchOrigin = $ref('combined');
|
let searchOrigin = $ref('combined');
|
||||||
let eventSort = $ref('startDate');
|
let eventSort = $ref('startDate');
|
||||||
let notePagination = $ref();
|
let notePagination = $ref();
|
||||||
|
@ -75,12 +77,6 @@ let endDate = $ref(null);
|
||||||
|
|
||||||
const notesSearchAvailable = (($i == null && instance.policies.canSearchNotes) || ($i != null && $i.policies.canSearchNotes));
|
const notesSearchAvailable = (($i == null && instance.policies.canSearchNotes) || ($i != null && $i.policies.canSearchNotes));
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
tab = props.type ?? 'note';
|
|
||||||
searchQuery = props.query ?? '';
|
|
||||||
searchOrigin = props.origin ?? 'combined';
|
|
||||||
});
|
|
||||||
|
|
||||||
async function search() {
|
async function search() {
|
||||||
const query = searchQuery.toString().trim();
|
const query = searchQuery.toString().trim();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue