59 lines
1.1 KiB
Vue
59 lines
1.1 KiB
Vue
<template>
|
||
<div class="page-container">
|
||
<!-- 统计卡片 -->
|
||
<StatCards />
|
||
|
||
<!-- 主体:目录树 + 列表 + 详情 -->
|
||
<div class="main-layout">
|
||
<div class="left-panel">
|
||
<CategoryTree @select-category="onSelectCategory" />
|
||
</div>
|
||
<div class="right-panel">
|
||
<CorpusList @view-detail="onViewDetail" />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<script setup>
|
||
import StatCards from './components/StatCards.vue'
|
||
import CategoryTree from './components/CategoryTree.vue'
|
||
import CorpusList from './components/CorpusList.vue'
|
||
|
||
</script>
|
||
<style lang="scss" scoped>
|
||
.page-container {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 20px;
|
||
width: 100%;
|
||
height: 100%;
|
||
overflow: auto;
|
||
}
|
||
|
||
.main-layout {
|
||
display: grid;
|
||
grid-template-columns: 260px 1fr;
|
||
gap: 20px;
|
||
align-items: start;
|
||
}
|
||
.left-panel {
|
||
position: sticky;
|
||
top: 20px;
|
||
}
|
||
.right-panel {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 20px;
|
||
}
|
||
.detail-wrapper {
|
||
min-height: 200px;
|
||
}
|
||
@media (max-width: 1200px) {
|
||
.main-layout {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
.left-panel {
|
||
position: static;
|
||
}
|
||
}
|
||
</style> |