From 556071e8409d7d45f354840eb975de337b698ece Mon Sep 17 00:00:00 2001 From: default Date: Sun, 24 Nov 2024 19:52:48 +0000 Subject: [PATCH] fix types --- src/models/index.ts | 2 +- src/pages/MainPage.vue | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/models/index.ts b/src/models/index.ts index 4cccd4b..dd7ec04 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -15,6 +15,6 @@ export interface Toast { description?: string; } -export type Order = ('mark_general' | 'mark_kindness' | 'mark_freebie' | 'mark_clarity' | 'last_name' | undefined)[]; +export type Order = 'mark_general' | 'mark_kindness' | 'mark_freebie' | 'mark_clarity' | 'last_name' | undefined; export type Subject = string; export type Lecturer = components['schemas']['LecturerGet']; diff --git a/src/pages/MainPage.vue b/src/pages/MainPage.vue index f47c3b1..df90764 100644 --- a/src/pages/MainPage.vue +++ b/src/pages/MainPage.vue @@ -11,7 +11,7 @@ import { getPhoto } from '@/utils'; const profileStore = useProfileStore(); -const orderValues: Ref = ref(['mark_general']); +const orderValues: Ref = ref('mark_general'); let order: Ref = ref('по общей оценке'); let offset = 0; const query = ref(''); @@ -72,19 +72,19 @@ async function orderLecturers() { page.value = 1; switch (order.value) { case 'по общей оценке': - orderValues.value[0] = 'mark_general'; + orderValues.value = 'mark_general'; break; case 'по доброте': - orderValues.value[0] = 'mark_kindness'; + orderValues.value = 'mark_kindness'; break; case 'по халявности': - orderValues.value[0] = 'mark_freebie'; + orderValues.value = 'mark_freebie'; break; case 'по понятности': - orderValues.value[0] = 'mark_clarity'; + orderValues.value = 'mark_clarity'; break; case 'по фамилии': - orderValues.value[0] = 'last_name'; + orderValues.value = 'last_name'; break; } await loadLecturers(query.value, 0, orderValues, subject);