feat(teachers): update teachers list

This commit is contained in:
thehrz 2023-07-06 19:53:20 +08:00
parent cf7986ba5a
commit 5bccdab01b
No known key found for this signature in database
GPG Key ID: 683658B4CAC43158

View File

@ -1,9 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import _teachers from '~/assets/jsons/teachers.json' import _teachers from '~/assets/jsons/teachers.json'
import type { Teacher } from '~/common/interfaces/Teacher'
// import type { Teacher } from '~/common/interfaces/Teacher' const teachers = _teachers as Teachers
// const teachers = _teachers as Teacher[] interface Teachers {
[key: string]: Teacher[]
}
</script> </script>
<template> <template>
@ -11,16 +14,16 @@ import _teachers from '~/assets/jsons/teachers.json'
<h1>在19预科2班任教的老师</h1> <h1>在19预科2班任教的老师</h1>
<v-list lines="three"> <v-list lines="three">
<v-list-item v-for="item, index in Object.keys(_teachers)" :key="index" :title="item"> <v-list-item v-for="item in Object.keys(_teachers)" :key="item" :title="item">
<v-expansion-panels> <v-expansion-panels multiple variant="popout">
<v-expansion-panel <v-expansion-panel
title="Title" v-for="teacher in teachers[item]"
text="Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi, ratione debitis quis est labore voluptatibus! Eaque cupiditate minima" :key="teacher.name"
:title="teacher.name"
:text="teacher.description"
/> />
</v-expansion-panels> </v-expansion-panels>
</v-list-item> </v-list-item>
</v-list> </v-list>
</article> </article>
</template> </template>
<style scoped></style>