feat 搭建架构骨架

This commit is contained in:
Ironsp
2026-09-24 09:09:47 +08:00
parent dd9f6b77a4
commit 7a2efa3fea
180 changed files with 18967 additions and 9 deletions

25
src/styles/common.less Normal file
View File

@@ -0,0 +1,25 @@
// 通用工具类
.container {
width: 100%;
max-width: @container-width;
margin: 0 auto;
padding: 0 @spacing-base;
}
.link {
cursor: pointer;
transition: color 0.2s;
&:hover {
color: @primary-color;
}
}
.text-ellipsis {
.ellipsis();
}
.text-secondary {
color: @text-color-secondary;
}

3
src/styles/index.less Normal file
View File

@@ -0,0 +1,3 @@
// 样式入口(main.ts 引入;variables/mixins 由 vite additionalData 自动注入)
@import './reset.less';
@import './common.less';

37
src/styles/mixins.less Normal file
View File

@@ -0,0 +1,37 @@
// 混合宏(flex、文本省略、滚动条)
.flex(@direction: row; @justify: flex-start; @align: center) {
display: flex;
flex-direction: @direction;
justify-content: @justify;
align-items: @align;
}
.ellipsis() {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.multi-ellipsis(@lines: 2) {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: @lines;
overflow: hidden;
}
.scrollbar(@width: 6px) {
&::-webkit-scrollbar {
width: @width;
height: @width;
}
&::-webkit-scrollbar-thumb {
background: @border-color-dark;
border-radius: @radius-round;
}
&::-webkit-scrollbar-track {
background: transparent;
}
}

64
src/styles/reset.less Normal file
View File

@@ -0,0 +1,64 @@
// 样式重置
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
}
body {
color: @text-color;
font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, 'Helvetica Neue', Arial, sans-serif;
font-size: @font-size-base;
line-height: 1.5;
background-color: @bg-color;
-webkit-font-smoothing: antialiased;
}
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
margin: 0;
font-weight: normal;
}
a {
color: inherit;
text-decoration: none;
}
img {
display: block;
max-width: 100%;
}
button,
input,
select,
textarea {
font: inherit;
color: inherit;
}
button {
cursor: pointer;
border: none;
background: transparent;
}

56
src/styles/variables.less Normal file
View File

@@ -0,0 +1,56 @@
// ★ less 变量唯一来源(颜色/间距/字号/圆角)
// 注:蓝湖设计稿到位前为原型近似值,到位后按标注精确校准
// 品牌色
@primary-color: #3370ff;
@primary-hover: #598bff;
@primary-light: #eaf1ff;
// 功能色
@success-color: #34c724;
@warning-color: #ff8f1f;
@danger-color: #f54a45;
@info-color: #8a94a6;
// 文字色
@heading-color: #1f2733;
@text-color: #525e71;
@text-color-secondary: #8a94a6;
@text-color-disabled: #b8c0cc;
// 背景 / 边框
@bg-color: #f5f6f8;
@bg-color-light: #fafbfc;
@border-color: #e4e7ec;
@border-color-dark: #cdd3dd;
@white: #ffffff;
// 圆角
@radius-sm: 4px;
@radius-base: 8px;
@radius-lg: 12px;
@radius-round: 999px;
// 间距
@spacing-xs: 4px;
@spacing-sm: 8px;
@spacing-base: 16px;
@spacing-lg: 24px;
@spacing-xl: 32px;
@spacing-xxl: 48px;
// 字号
@font-size-sm: 12px;
@font-size-base: 14px;
@font-size-lg: 16px;
@font-size-xl: 20px;
@font-size-xxl: 28px;
// 布局
@container-width: 1200px;
@header-height: 64px;
@footer-height: 240px;
// 阴影
@shadow-base: 0 2px 8px rgba(31, 39, 51, 0.08);
@shadow-lg: 0 4px 16px rgba(31, 39, 51, 0.12);