
功能特性: - JWT用户认证系统 - 日报CRUD管理 - 三级权限控制 - 多维度搜索过滤 - 统计分析功能 - 评论互动系统 - 响应式Cool Admin界面 - 暗色主题支持 技术栈: - 后端:Django 4.2.7 + DRF + SimpleJWT - 前端:Vue 3 + Element Plus + Pinia - 数据库:SQLite/PostgreSQL - 部署:Docker + Nginx 包含内容: - 完整的后端API代码 - 现代化前端界面 - 数据库迁移文件 - 部署脚本和文档 - 演示页面和测试工具
60 lines
1.1 KiB
Vue
60 lines
1.1 KiB
Vue
<template>
|
||
<section class="app-main">
|
||
<transition name="fade-transform" mode="out-in">
|
||
<keep-alive :include="cachedViews">
|
||
<router-view :key="key" />
|
||
</keep-alive>
|
||
</transition>
|
||
</section>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { computed } from 'vue'
|
||
import { useRoute } from 'vue-router'
|
||
import { useAppStore } from '@/stores/app'
|
||
|
||
const route = useRoute()
|
||
const appStore = useAppStore()
|
||
|
||
// 缓存的视图
|
||
const cachedViews = computed(() => appStore.cachedViews)
|
||
|
||
// 路由key,用于强制刷新组件
|
||
const key = computed(() => route.path)
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
@import '@/styles/variables.scss';
|
||
|
||
.app-main {
|
||
min-height: calc(100vh - #{$header-height} - #{$tags-height});
|
||
width: 100%;
|
||
position: relative;
|
||
overflow: hidden;
|
||
background-color: $bg-color;
|
||
}
|
||
|
||
// 暗色模式
|
||
.dark {
|
||
.app-main {
|
||
background-color: $bg-color-dark;
|
||
}
|
||
}
|
||
|
||
// 页面切换动画
|
||
.fade-transform-leave-active,
|
||
.fade-transform-enter-active {
|
||
transition: all 0.5s;
|
||
}
|
||
|
||
.fade-transform-enter-from {
|
||
opacity: 0;
|
||
transform: translateX(-30px);
|
||
}
|
||
|
||
.fade-transform-leave-to {
|
||
opacity: 0;
|
||
transform: translateX(30px);
|
||
}
|
||
</style>
|