<script lang="ts" setup>
import { onMounted, ref } from "vue";
import { getFile } from "@/utils/http";

const tableData = ref([]);

onMounted(() => {
  getFile("static/code.json").then(resp => {
    console.log(resp.data);
    tableData.value = resp.data;
  });
});
</script>
<template>
  <div class="app-container">
    <h3>公共错误码</h3>
    <div class="isp-info">
      <el-table :data="tableData" row-key="id" default-expand-all border>
        <el-table-column label="code" prop="code" width="200" />
        <el-table-column label="msg" prop="msg" width="200" />
        <el-table-column
          label="sub_code（详细错误码）"
          prop="sub_code"
          width="250"
        />
        <el-table-column label="sub_msg（详细错误信息）" prop="sub_msg" />
        <el-table-column label="解决方案" prop="solution" />
      </el-table>
    </div>
  </div>
</template>
