This repository has been archived on 2026-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
new-api-key-bench/src/app-shell.vue
T
skycurtain c690e0507e refactor: 组件顶部注释迁入 script setup 块内 + 全量 prettier 格式化
SFC 顶层(块标签外)不是 prettier 认识的注释位置,块注释会被重排拍平;迁入 <script setup> 顶部后 prettier 正确保留 JSDoc 格式。迁移 6 个 .vue 文件;顺带 prettier 格式化 4 个存量未格式化文件(gateway-client.ts、endpoint-queries.spec.ts、json-text-processor.spec.ts、bench-store.spec.ts)。
2026-09-08 11:06:47 +08:00

60 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
/**
* 应用外壳:双栏布局(左 sider 接口列表 + 右 tabs 详情区)
* 暗色默认(设计文档 §2 定案);组件拆分见实施计划阶段四
*/
import { storeToRefs } from 'pinia';
import RequestTabs from '@/components/request-tabs.vue';
import SideNav from '@/components/side-nav.vue';
import { useBenchStore } from '@/stores/bench-store';
const benchStore = useBenchStore();
const { activeTab } = storeToRefs(benchStore);
</script>
<template>
<div class="app-shell">
<SideNav />
<main class="main-area">
<RequestTabs v-if="activeTab" />
<div v-else class="empty-state">
<p>从左侧选择一个接口开始调试</p>
<p class="empty-hint">sk-key 仅存于当前页面会话,刷新即重置</p>
</div>
</main>
</div>
</template>
<style scoped>
.app-shell {
display: flex;
height: 100vh;
overflow: hidden;
}
.main-area {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.empty-state {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--td-text-color-placeholder);
}
.empty-hint {
font-size: 12px;
opacity: 0.6;
}
</style>