<template>
  <div class="h-full box-border bg-white m-4 p-4 rounded-6px">
    <el-tabs v-model="activeName" class="demo-tabs" @tab-change="linkTo">
      <el-tab-pane v-for="(item, index) in tabData" :key="index" :label="item.label" :name="item.name"></el-tab-pane>
    </el-tabs>

    <router-view />
  </div>
</template>
  
<script lang="ts" setup>
import { useRouter } from "vue-router";
const router = useRouter();

const activeName = ref(router.currentRoute.value.name);

const tabData = ref([
  {
    name: "grzx_jbzl",
    label: "基本资料",
  },
  {
    name: "grzx_zhxx",
    label: "账号信息",
  },
]);

const linkTo = (name: string) => {
  router.push({ name });
};
</script>

<style>
</style>