添加 IntelliJ IDEA 项目配置文件

This commit is contained in:
ylweng
2025-09-02 21:59:27 +08:00
parent 59cfe620fe
commit 501c218a83
56 changed files with 11886 additions and 126 deletions

View File

@@ -0,0 +1,191 @@
// 全局样式文件
@import './variables.scss';
@import './mixins.scss';
// 全局重置样式
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', SimSun, sans-serif;
font-size: 14px;
color: #333;
background-color: #f0f2f5;
}
// 清除默认样式
ul, ol {
list-style: none;
}
a {
text-decoration: none;
color: inherit;
}
// 通用工具类
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.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 {
display: flex;
flex-direction: column;
}
.w-full { width: 100%; }
.h-full { height: 100%; }
// 间距工具类
@for $i from 0 through 40 {
.mt-#{$i} { margin-top: #{$i}px; }
.mb-#{$i} { margin-bottom: #{$i}px; }
.ml-#{$i} { margin-left: #{$i}px; }
.mr-#{$i} { margin-right: #{$i}px; }
.pt-#{$i} { padding-top: #{$i}px; }
.pb-#{$i} { padding-bottom: #{$i}px; }
.pl-#{$i} { padding-left: #{$i}px; }
.pr-#{$i} { padding-right: #{$i}px; }
}
// Element Plus 自定义样式
.el-card {
border-radius: 8px;
border: none;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.el-button {
border-radius: 6px;
}
.el-input__wrapper {
border-radius: 6px;
}
.el-select .el-input__wrapper {
border-radius: 6px;
}
.el-table {
border-radius: 8px;
overflow: hidden;
.el-table__header-wrapper {
th {
background-color: #fafafa;
color: #333;
font-weight: 600;
}
}
.el-table__row {
&:hover > td {
background-color: #f5f7fa;
}
}
}
.el-pagination {
margin-top: 20px;
justify-content: center;
}
.el-dialog {
border-radius: 12px;
.el-dialog__header {
padding: 20px 20px 10px;
border-bottom: 1px solid #e6e6e6;
}
.el-dialog__body {
padding: 20px;
}
}
.el-form {
.el-form-item__label {
color: #333;
font-weight: 500;
}
}
// 自定义滚动条
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
&:hover {
background: #a8a8a8;
}
}
// 动画效果
.fade-enter-active, .fade-leave-active {
transition: opacity 0.3s ease;
}
.fade-enter-from, .fade-leave-to {
opacity: 0;
}
.slide-fade-enter-active {
transition: all 0.3s ease-out;
}
.slide-fade-leave-active {
transition: all 0.8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.slide-fade-enter-from,
.slide-fade-leave-to {
transform: translateX(20px);
opacity: 0;
}
// 响应式设计
@media (max-width: 768px) {
.mobile-hidden {
display: none !important;
}
.el-table {
font-size: 12px;
}
.el-dialog {
width: 90% !important;
margin: 5vh auto !important;
}
}

View File

@@ -0,0 +1,184 @@
// SCSS Mixins
// 清除浮动
@mixin clearfix {
&::after {
content: "";
display: table;
clear: both;
}
}
// 文本省略
@mixin ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// 多行文本省略
@mixin ellipsis-multiline($lines: 2) {
display: -webkit-box;
-webkit-line-clamp: $lines;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
// 绝对居中
@mixin absolute-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
// Flex 居中
@mixin flex-center {
display: flex;
align-items: center;
justify-content: center;
}
// 响应式断点
@mixin mobile {
@media (max-width: 767px) {
@content;
}
}
@mixin tablet {
@media (min-width: 768px) and (max-width: 1023px) {
@content;
}
}
@mixin desktop {
@media (min-width: 1024px) {
@content;
}
}
// 卡片样式
@mixin card-style {
background: white;
border-radius: $border-radius-large;
box-shadow: $box-shadow-light;
padding: $spacing-lg;
}
// 按钮基础样式
@mixin button-base {
display: inline-flex;
align-items: center;
justify-content: center;
padding: $spacing-sm $spacing-md;
border: none;
border-radius: $border-radius-base;
font-size: $font-size-small;
font-weight: 500;
cursor: pointer;
transition: $transition-base;
text-decoration: none;
outline: none;
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
// 主要按钮样式
@mixin button-primary {
@include button-base;
background-color: $primary-color;
color: white;
&:hover:not(:disabled) {
background-color: $primary-light;
}
&:active {
background-color: $primary-dark;
}
}
// 次要按钮样式
@mixin button-secondary {
@include button-base;
background-color: transparent;
color: $primary-color;
border: 1px solid $primary-color;
&:hover:not(:disabled) {
background-color: $primary-color;
color: white;
}
}
// 表格样式
@mixin table-style {
width: 100%;
border-collapse: collapse;
border-radius: $border-radius-large;
overflow: hidden;
box-shadow: $box-shadow-light;
th, td {
padding: $spacing-md;
text-align: left;
border-bottom: 1px solid $border-lighter;
}
th {
background-color: $background-base;
font-weight: 600;
color: $text-primary;
}
tr:hover {
background-color: $background-light;
}
}
// 输入框样式
@mixin input-style {
width: 100%;
padding: $spacing-sm $spacing-md;
border: 1px solid $border-base;
border-radius: $border-radius-base;
font-size: $font-size-small;
color: $text-primary;
background-color: white;
transition: $transition-border;
&:focus {
outline: none;
border-color: $primary-color;
box-shadow: 0 0 0 2px rgba($primary-color, 0.2);
}
&::placeholder {
color: $text-placeholder;
}
&:disabled {
background-color: $background-base;
cursor: not-allowed;
}
}
// 加载动画
@mixin loading-spin {
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
animation: spin 1s linear infinite;
}
// 渐变背景
@mixin gradient-background($start-color, $end-color, $direction: to right) {
background: linear-gradient($direction, $start-color, $end-color);
}

View File

@@ -0,0 +1,65 @@
// SCSS 变量定义
// 颜色变量
$primary-color: #4CAF50;
$primary-light: #81C784;
$primary-dark: #388E3C;
$success-color: #67C23A;
$warning-color: #E6A23C;
$danger-color: #F56C6C;
$info-color: #409EFF;
$text-primary: #303133;
$text-regular: #606266;
$text-secondary: #909399;
$text-placeholder: #C0C4CC;
$border-base: #DCDFE6;
$border-light: #E4E7ED;
$border-lighter: #EBEEF5;
$border-extra-light: #F2F6FC;
$background-base: #F5F7FA;
$background-light: #FAFCFF;
// 尺寸变量
$header-height: 60px;
$sidebar-width: 240px;
$sidebar-collapsed-width: 64px;
// 字体大小
$font-size-extra-small: 12px;
$font-size-small: 14px;
$font-size-base: 16px;
$font-size-medium: 18px;
$font-size-large: 20px;
$font-size-extra-large: 24px;
// 间距
$spacing-xs: 4px;
$spacing-sm: 8px;
$spacing-md: 16px;
$spacing-lg: 24px;
$spacing-xl: 32px;
// 圆角
$border-radius-small: 4px;
$border-radius-base: 6px;
$border-radius-large: 8px;
$border-radius-round: 20px;
// 阴影
$box-shadow-base: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
$box-shadow-dark: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.12);
$box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
// 过渡动画
$transition-base: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
$transition-fade: opacity 0.3s cubic-bezier(0.55, 0, 0.1, 1);
$transition-border: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
// Z-index 层级
$z-index-normal: 1;
$z-index-top: 1000;
$z-index-popper: 2000;