初始提交:企业级日报系统完整代码
功能特性: - JWT用户认证系统 - 日报CRUD管理 - 三级权限控制 - 多维度搜索过滤 - 统计分析功能 - 评论互动系统 - 响应式Cool Admin界面 - 暗色主题支持 技术栈: - 后端:Django 4.2.7 + DRF + SimpleJWT - 前端:Vue 3 + Element Plus + Pinia - 数据库:SQLite/PostgreSQL - 部署:Docker + Nginx 包含内容: - 完整的后端API代码 - 现代化前端界面 - 数据库迁移文件 - 部署脚本和文档 - 演示页面和测试工具
This commit is contained in:
37
frontend/src/layout/components/Sidebar/Link.vue
Normal file
37
frontend/src/layout/components/Sidebar/Link.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<component :is="linkProps.is" v-bind="linkProps.props">
|
||||
<slot />
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
|
||||
const props = defineProps({
|
||||
to: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const linkProps = computed(() => {
|
||||
if (isExternal(props.to)) {
|
||||
return {
|
||||
is: 'a',
|
||||
props: {
|
||||
href: props.to,
|
||||
target: '_blank',
|
||||
rel: 'noopener'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
is: 'router-link',
|
||||
props: {
|
||||
to: props.to
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
Reference in New Issue
Block a user