SettingsPanel.vue 2.43 KB
<!--
 * @Author: 赵丽婷
 * @Date: 2025-11-10 10:30:43
 * @LastEditors: 赵丽婷
 * @LastEditTime: 2025-12-02 15:08:43
 * @FilePath: \LinkMed\linkmed-vue3\src\components\Settings\SettingsPanel.vue
 * @Description: 
 * Copyright (c) 2025 by 北京连心医疗科技有限公司, All Rights Reserved. 
-->
<template>
  <div class="settings-panel">
    <GeneralPanel v-if="activeKey === 'general'" />
    <ShortcutPanel v-else-if="activeKey === 'shortcut'" />
    <KnowledgePanel v-else-if="activeKey === 'knowledge'" />
    <AIAssistantPanel v-else-if="activeKey === 'ai'" />
    <ProfilePanel v-else-if="activeKey === 'profile'" />
    <AuthenticationPanel v-else-if="activeKey === 'authentication'" />
    <MembersRecordsPanel v-else-if="activeKey === 'membersRecords'" />
    <MemberReferralPanel v-else-if="activeKey === 'memberReferral'" />
    <AccountBindPanel v-else-if="activeKey === 'accountBind'" />
    <ApiKeyPanel v-else-if="activeKey === 'apikey'" />
    <div v-else class="settings-placeholder">即将支持更多设置项...</div>
  </div>
</template>

<script setup lang="ts">
import { defineAsyncComponent } from "vue";
const GeneralPanel = defineAsyncComponent(() => import("./GeneralPanel.vue"));
const ShortcutPanel = defineAsyncComponent(() => import("./ShortcutPanel.vue"));
const KnowledgePanel = defineAsyncComponent(() => import("./KnowledgePanel.vue"));
const AIAssistantPanel = defineAsyncComponent(() => import("./AIAssistantPanel.vue"));
const ProfilePanel = defineAsyncComponent(() => import("./ProfilePanel.vue"));
const AuthenticationPanel = defineAsyncComponent(() => import("./AuthenticationPanel.vue"));
const MembersRecordsPanel = defineAsyncComponent(() => import("./MembersRecordsPanel.vue"));
const MemberReferralPanel = defineAsyncComponent(() => import("./MemberReferralPanel.vue"));
const ApiKeyPanel = defineAsyncComponent(() => import("./ApiKeyPanel.vue"));
const AccountBindPanel = defineAsyncComponent(() => import("./AccountBindPanel.vue"));

defineProps<{
  activeKey: string;
}>();
</script>

<style scoped lang="scss">
.settings-panel {
  padding: 48px 48px 20px 48px;
  width: 100%;
  margin-left: 0;
  margin-right: auto;
  color: var(--color-text);
  background: var(--color-bg);
  text-align: left;
}

.settings-placeholder {
  color: var(--color-secondary);
  font-size: 16px;
  text-align: center;
  margin-top: 80px;
}

@media (max-width: 1024px) {
  .settings-panel {
    padding: 16px 6px;
    max-width: 100%;
  }
}
</style>