diff --git a/src/renderer/views/student-department/student/Student.vue b/src/renderer/views/student-department/student/Student.vue index fa9245a..fa2627f 100644 --- a/src/renderer/views/student-department/student/Student.vue +++ b/src/renderer/views/student-department/student/Student.vue @@ -2,13 +2,19 @@ import Table from './components/Table.vue'; import FunctionBar from './components/FunctionBar.vue'; import EditModal from './components/EditModal.vue'; +import SkeletonTable from './components/SkeletonTable.vue'; import { Suspense } from 'vue'; diff --git a/src/renderer/views/student-department/student/components/FunctionBar.vue b/src/renderer/views/student-department/student/components/FunctionBar.vue index 506b4f8..e131d68 100644 --- a/src/renderer/views/student-department/student/components/FunctionBar.vue +++ b/src/renderer/views/student-department/student/components/FunctionBar.vue @@ -12,9 +12,9 @@ class="bg-base-silver pl-4 rounded-l" /> @@ -37,19 +37,18 @@ function debounce(fn, delay) { }; } -const searchQuery = ref(studentStore.search.query); - const debouncedSearch = debounce(async (query) => { - await studentStore.fetchStudents(query); + await studentStore.fetchStudents(query, true); }, 500); watchEffect(() => { - debouncedSearch(searchQuery.value); + debouncedSearch(studentStore.search.query); + console.log(studentStore.search.query); }); watch( () => studentStore.search.typeQuery, () => { - searchQuery.value = ''; + studentStore.search.query = ''; } ); diff --git a/src/renderer/views/student-department/student/components/Row.vue b/src/renderer/views/student-department/student/components/Row.vue new file mode 100644 index 0000000..9278fc7 --- /dev/null +++ b/src/renderer/views/student-department/student/components/Row.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/renderer/views/student-department/student/components/SkeletonTable.vue b/src/renderer/views/student-department/student/components/SkeletonTable.vue new file mode 100644 index 0000000..5948a0b --- /dev/null +++ b/src/renderer/views/student-department/student/components/SkeletonTable.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/renderer/views/student-department/student/components/Table.vue b/src/renderer/views/student-department/student/components/Table.vue index f8656c9..f831e12 100644 --- a/src/renderer/views/student-department/student/components/Table.vue +++ b/src/renderer/views/student-department/student/components/Table.vue @@ -1,6 +1,6 @@