feat: 初始化智能物联网设备管理系统前后端基础项目
完成项目整体结构搭建,包含: 1. 前端Vue3+TS+Vite+Antd项目基础配置与核心依赖 2. 后端MidwayJS+TypeORM+JWT权限认证框架 3. 完整的用户、角色、权限、日志数据库表结构 4. 核心业务模块API与基础服务实现 5. 全局样式、路由、状态管理配置
This commit is contained in:
commit
3d7eb12103
89 files changed
+16085
No files matched your search
@@ -0,0 +1,292 @@
|
||||
// 引入变量
|
||||
@import "./variables.less";
|
||||
|
||||
// ==================== 全局重置 ====================
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: @font-family;
|
||||
color: @text-primary;
|
||||
background-color: @bg-base;
|
||||
line-height: @line-height-base;
|
||||
}
|
||||
|
||||
// 链接
|
||||
a {
|
||||
color: @primary-color;
|
||||
text-decoration: none;
|
||||
transition: color @transition-fast;
|
||||
|
||||
&:hover {
|
||||
color: @primary-color-hover;
|
||||
}
|
||||
}
|
||||
|
||||
// 图片
|
||||
img {
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// 列表
|
||||
ul,
|
||||
ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
// ==================== 工具类 ====================
|
||||
// 文本工具类
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
.text-primary {
|
||||
color: @text-primary !important;
|
||||
}
|
||||
.text-secondary {
|
||||
color: @text-secondary !important;
|
||||
}
|
||||
.text-success {
|
||||
color: @success-color !important;
|
||||
}
|
||||
.text-warning {
|
||||
color: @warning-color !important;
|
||||
}
|
||||
.text-error {
|
||||
color: @error-color !important;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: @font-weight-bold;
|
||||
}
|
||||
.font-medium {
|
||||
font-weight: @font-weight-medium;
|
||||
}
|
||||
|
||||
// 间距工具类
|
||||
.mt-xs {
|
||||
margin-top: @spacing-xs;
|
||||
}
|
||||
.mt-sm {
|
||||
margin-top: @spacing-sm;
|
||||
}
|
||||
.mt-md {
|
||||
margin-top: @spacing-md;
|
||||
}
|
||||
.mt-lg {
|
||||
margin-top: @spacing-lg;
|
||||
}
|
||||
.mt-xl {
|
||||
margin-top: @spacing-xl;
|
||||
}
|
||||
|
||||
.mb-xs {
|
||||
margin-bottom: @spacing-xs;
|
||||
}
|
||||
.mb-sm {
|
||||
margin-bottom: @spacing-sm;
|
||||
}
|
||||
.mb-md {
|
||||
margin-bottom: @spacing-md;
|
||||
}
|
||||
.mb-lg {
|
||||
margin-bottom: @spacing-lg;
|
||||
}
|
||||
.mb-xl {
|
||||
margin-bottom: @spacing-xl;
|
||||
}
|
||||
|
||||
.p-xs {
|
||||
padding: @spacing-xs;
|
||||
}
|
||||
.p-sm {
|
||||
padding: @spacing-sm;
|
||||
}
|
||||
.p-md {
|
||||
padding: @spacing-md;
|
||||
}
|
||||
.p-lg {
|
||||
padding: @spacing-lg;
|
||||
}
|
||||
.p-xl {
|
||||
padding: @spacing-xl;
|
||||
}
|
||||
|
||||
// Flex工具类
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.flex-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.flex-between {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.flex-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// 显示/隐藏
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
.visible {
|
||||
visibility: visible;
|
||||
}
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
// 溢出控制
|
||||
.overflow-hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
.overflow-auto {
|
||||
overflow: auto;
|
||||
}
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// 光标
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.cursor-not-allowed {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
// ==================== 页面容器 ====================
|
||||
.page-container {
|
||||
padding: @content-padding;
|
||||
min-height: calc(100vh - @header-height - @content-padding * 2);
|
||||
}
|
||||
|
||||
.page-header {
|
||||
margin-bottom: @spacing-lg;
|
||||
|
||||
h2 {
|
||||
font-size: @font-size-xxl;
|
||||
font-weight: @font-weight-semibold;
|
||||
margin-bottom: @spacing-xs;
|
||||
}
|
||||
|
||||
p {
|
||||
color: @text-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 卡片统一样式 ====================
|
||||
.custom-card {
|
||||
background: @bg-white;
|
||||
border-radius: @border-radius-lg;
|
||||
box-shadow: @shadow-base;
|
||||
transition: box-shadow @transition-base;
|
||||
|
||||
&:hover {
|
||||
box-shadow: @shadow-lg;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 表格增强样式 ====================
|
||||
.enhanced-table {
|
||||
.ant-table-thead > tr > th {
|
||||
background: #fafafa;
|
||||
font-weight: @font-weight-semibold;
|
||||
color: @text-primary;
|
||||
}
|
||||
|
||||
.ant-table-tbody > tr:hover > td {
|
||||
background: @bg-hover;
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 表单统一样式 ====================
|
||||
.search-form {
|
||||
background: @bg-white;
|
||||
padding: @spacing-lg;
|
||||
border-radius: @border-radius-lg;
|
||||
margin-bottom: @spacing-md;
|
||||
}
|
||||
|
||||
// ==================== 动画 ====================
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideInUp {
|
||||
from {
|
||||
transform: translateY(20px);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.animate-fade-in {
|
||||
animation: fadeIn 0.3s ease-out;
|
||||
}
|
||||
|
||||
.animate-slide-up {
|
||||
animation: slideInUp 0.3s ease-out;
|
||||
}
|
||||
|
||||
// ==================== 滚动条美化 ====================
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #c1c1c1;
|
||||
border-radius: 4px;
|
||||
|
||||
&:hover {
|
||||
background: #a8a8a8;
|
||||
}
|
||||
}
|
||||
|
||||
// Firefox
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #c1c1c1 #f1f1f1;
|
||||
}
|
||||
Reference in new issue
Block a user