Improve Subject Vue list and pagination

This commit is contained in:
jieun committed 2026-10-20 20:02:36 +09:00
1 parent ed30cf85dc
commit 3da5840e8b
2 files changed
+7 -3

No files matched your search

@@ -13,7 +13,7 @@ export default defineComponent({
const subjectService = inject('subjectService', () => new SubjectService()); const subjectService = inject('subjectService', () => new SubjectService());
const alertService = inject('alertService', () => useAlertService(), true); const alertService = inject('alertService', () => useAlertService(), true);
const itemsPerPage = ref(20); const itemsPerPage = ref(10);
const queryCount: Ref<number> = ref(null); const queryCount: Ref<number> = ref(null);
const page: Ref<number> = ref(1); const page: Ref<number> = ref(1);
const propOrder = ref('id'); const propOrder = ref('id');
@@ -52,7 +52,7 @@
<td> <td>
<router-link :to="{ name: 'SubjectView', params: { subjectId: subject.id } }">{{ subject.id }}</router-link> <router-link :to="{ name: 'SubjectView', params: { subjectId: subject.id } }">{{ subject.id }}</router-link>
</td> </td>
<td>{{ subject.name }}</td> <td>📘{{ subject.name }}</td>
<td>{{ subject.description }}</td> <td>{{ subject.description }}</td>
<td>{{ subject.active }}</td> <td>{{ subject.active }}</td>
<td class="text-end"> <td class="text-end">
@@ -106,7 +106,11 @@
<jhi-item-count :page="page" :total="queryCount" :items-per-page="itemsPerPage"></jhi-item-count> <jhi-item-count :page="page" :total="queryCount" :items-per-page="itemsPerPage"></jhi-item-count>
</div> </div>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<b-pagination size="md" :total-rows="totalItems" v-model="page" :per-page="itemsPerPage"></b-pagination> <p>전체 과목 수: {{ totalItems }}개</p>
</div>
<div class="d-flex justify-content-center">
<b-pagination :total-rows="totalItems" v-model="page" :per-page="itemsPerPage"></b-pagination>
</div> </div>
</div> </div>
</div> </div>