<template>
  <a-card
    style="width: 100%"
    :bordered="false"
    :tab-list="tabListNoTitle"
    :active-tab-key="noTitleKey"
    @tabChange="key => onTabChange(key, 'noTitleKey')"
  >
    <p v-if="noTitleKey === 'sysConfig'">
      <SysConfig />
    </p>

    <p v-if="noTitleKey === 'disclaimerConfig'">
      <DisclaimerConfig />
    </p>
  </a-card>
</template>

<script setup lang="ts">
  import { ref } from 'vue';
  import SysConfig from './sysConfig.vue';
  import DisclaimerConfig from './disclaimerConfig.vue';
  const key = ref('sysConfig');
  const noTitleKey = ref('sysConfig');

  const tabListNoTitle = [
    {
      key: 'sysConfig',
      tab: '系统配置',
    },
    {
      key: 'disclaimerConfig',
      tab: '免责声明',
    },
  ];

  const onTabChange = (value, type) => {
    if (type === 'key') {
      key.value = value;
    } else if (type === 'noTitleKey') {
      noTitleKey.value = value;
    }
  };
</script>
<style lang="less"></style>
