DemoStudentAddressList.vue 892 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <!-- 列表 -->
  3. <ContentWrap>
  4. <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
  5. <el-table-column label="编号" align="center" prop="id" />
  6. <el-table-column label="手机" align="center" prop="mobile" />
  7. </el-table>
  8. </ContentWrap>
  9. </template>
  10. <script setup lang="ts">
  11. const props = defineProps<{
  12. studentId: undefined // 学生编号
  13. }>()
  14. const loading = ref(true) // 列表的加载中
  15. const list = ref([]) // 列表的数据
  16. // TODO 芋艿:暂时没改
  17. /** 查询列表 */
  18. const getList = async () => {
  19. loading.value = true
  20. try {
  21. // const data = await DemoStudentApi.getDemoStudentPage(queryParams)
  22. list.value = [
  23. {
  24. id: props.studentId,
  25. mobile: '88888'
  26. }
  27. ]
  28. } finally {
  29. loading.value = false
  30. }
  31. }
  32. /** 初始化 **/
  33. onMounted(() => {
  34. getList()
  35. })
  36. </script>