feat: 增加 styles 样式文件
Browse files
sau_frontend/src/styles/index.scss
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// 导入重置样式
|
| 2 |
+
@use './reset.scss';
|
| 3 |
+
|
| 4 |
+
// 导入变量
|
| 5 |
+
@use './variables.scss' as *;
|
| 6 |
+
|
| 7 |
+
// 全局样式
|
| 8 |
+
body {
|
| 9 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
| 10 |
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
| 11 |
+
sans-serif;
|
| 12 |
+
color: $text-primary;
|
| 13 |
+
background-color: $bg-color-page;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
#app {
|
| 17 |
+
min-height: 100vh;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
// 通用工具类
|
| 21 |
+
.text-center {
|
| 22 |
+
text-align: center;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.text-left {
|
| 26 |
+
text-align: left;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.text-right {
|
| 30 |
+
text-align: right;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.flex {
|
| 34 |
+
display: flex;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.flex-center {
|
| 38 |
+
display: flex;
|
| 39 |
+
justify-content: center;
|
| 40 |
+
align-items: center;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.flex-between {
|
| 44 |
+
display: flex;
|
| 45 |
+
justify-content: space-between;
|
| 46 |
+
align-items: center;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.flex-column {
|
| 50 |
+
display: flex;
|
| 51 |
+
flex-direction: column;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.w-full {
|
| 55 |
+
width: 100%;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.h-full {
|
| 59 |
+
height: 100%;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
// 间距工具类
|
| 63 |
+
.m-0 { margin: 0; }
|
| 64 |
+
.mt-0 { margin-top: 0; }
|
| 65 |
+
.mr-0 { margin-right: 0; }
|
| 66 |
+
.mb-0 { margin-bottom: 0; }
|
| 67 |
+
.ml-0 { margin-left: 0; }
|
| 68 |
+
|
| 69 |
+
.m-1 { margin: $spacing-xs; }
|
| 70 |
+
.mt-1 { margin-top: $spacing-xs; }
|
| 71 |
+
.mr-1 { margin-right: $spacing-xs; }
|
| 72 |
+
.mb-1 { margin-bottom: $spacing-xs; }
|
| 73 |
+
.ml-1 { margin-left: $spacing-xs; }
|
| 74 |
+
|
| 75 |
+
.m-2 { margin: $spacing-sm; }
|
| 76 |
+
.mt-2 { margin-top: $spacing-sm; }
|
| 77 |
+
.mr-2 { margin-right: $spacing-sm; }
|
| 78 |
+
.mb-2 { margin-bottom: $spacing-sm; }
|
| 79 |
+
.ml-2 { margin-left: $spacing-sm; }
|
| 80 |
+
|
| 81 |
+
.m-3 { margin: $spacing-md; }
|
| 82 |
+
.mt-3 { margin-top: $spacing-md; }
|
| 83 |
+
.mr-3 { margin-right: $spacing-md; }
|
| 84 |
+
.mb-3 { margin-bottom: $spacing-md; }
|
| 85 |
+
.ml-3 { margin-left: $spacing-md; }
|
| 86 |
+
|
| 87 |
+
.m-4 { margin: $spacing-lg; }
|
| 88 |
+
.mt-4 { margin-top: $spacing-lg; }
|
| 89 |
+
.mr-4 { margin-right: $spacing-lg; }
|
| 90 |
+
.mb-4 { margin-bottom: $spacing-lg; }
|
| 91 |
+
.ml-4 { margin-left: $spacing-lg; }
|
| 92 |
+
|
| 93 |
+
.p-0 { padding: 0; }
|
| 94 |
+
.pt-0 { padding-top: 0; }
|
| 95 |
+
.pr-0 { padding-right: 0; }
|
| 96 |
+
.pb-0 { padding-bottom: 0; }
|
| 97 |
+
.pl-0 { padding-left: 0; }
|
| 98 |
+
|
| 99 |
+
.p-1 { padding: $spacing-xs; }
|
| 100 |
+
.pt-1 { padding-top: $spacing-xs; }
|
| 101 |
+
.pr-1 { padding-right: $spacing-xs; }
|
| 102 |
+
.pb-1 { padding-bottom: $spacing-xs; }
|
| 103 |
+
.pl-1 { padding-left: $spacing-xs; }
|
| 104 |
+
|
| 105 |
+
.p-2 { padding: $spacing-sm; }
|
| 106 |
+
.pt-2 { padding-top: $spacing-sm; }
|
| 107 |
+
.pr-2 { padding-right: $spacing-sm; }
|
| 108 |
+
.pb-2 { padding-bottom: $spacing-sm; }
|
| 109 |
+
.pl-2 { padding-left: $spacing-sm; }
|
| 110 |
+
|
| 111 |
+
.p-3 { padding: $spacing-md; }
|
| 112 |
+
.pt-3 { padding-top: $spacing-md; }
|
| 113 |
+
.pr-3 { padding-right: $spacing-md; }
|
| 114 |
+
.pb-3 { padding-bottom: $spacing-md; }
|
| 115 |
+
.pl-3 { padding-left: $spacing-md; }
|
| 116 |
+
|
| 117 |
+
.p-4 { padding: $spacing-lg; }
|
| 118 |
+
.pt-4 { padding-top: $spacing-lg; }
|
| 119 |
+
.pr-4 { padding-right: $spacing-lg; }
|
| 120 |
+
.pb-4 { padding-bottom: $spacing-lg; }
|
| 121 |
+
.pl-4 { padding-left: $spacing-lg; }
|
sau_frontend/src/styles/reset.scss
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* CSS Reset - 删除浏览器默认样式 */
|
| 2 |
+
|
| 3 |
+
/* 1. Use a more-intuitive box-sizing model */
|
| 4 |
+
*, *::before, *::after {
|
| 5 |
+
box-sizing: border-box;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
/* 2. Remove default margin and padding */
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
/* 3. Allow percentage-based heights in the application */
|
| 15 |
+
html, body {
|
| 16 |
+
height: 100%;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
/* 4. Add accessible line-height and improve text rendering */
|
| 20 |
+
body {
|
| 21 |
+
line-height: 1.5;
|
| 22 |
+
-webkit-font-smoothing: antialiased;
|
| 23 |
+
-moz-osx-font-smoothing: grayscale;
|
| 24 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
| 25 |
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
| 26 |
+
sans-serif;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
/* 5. Improve media defaults */
|
| 30 |
+
img, picture, video, canvas, svg {
|
| 31 |
+
display: block;
|
| 32 |
+
max-width: 100%;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
/* 6. Remove built-in form typography styles */
|
| 36 |
+
input, button, textarea, select {
|
| 37 |
+
font: inherit;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/* 7. Avoid text overflows */
|
| 41 |
+
p, h1, h2, h3, h4, h5, h6 {
|
| 42 |
+
overflow-wrap: break-word;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
/* 8. Create a root stacking context */
|
| 46 |
+
#root, #__next, #app {
|
| 47 |
+
isolation: isolate;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
/* 9. Remove list styles */
|
| 51 |
+
ul, ol {
|
| 52 |
+
list-style: none;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
/* 10. Remove default button styles */
|
| 56 |
+
button {
|
| 57 |
+
background: none;
|
| 58 |
+
border: none;
|
| 59 |
+
cursor: pointer;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
/* 11. Remove default link styles */
|
| 63 |
+
a {
|
| 64 |
+
text-decoration: none;
|
| 65 |
+
color: inherit;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
/* 12. Remove default table styles */
|
| 69 |
+
table {
|
| 70 |
+
border-collapse: collapse;
|
| 71 |
+
border-spacing: 0;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
/* 13. Remove default fieldset styles */
|
| 75 |
+
fieldset {
|
| 76 |
+
border: none;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
/* 14. Remove default legend styles */
|
| 80 |
+
legend {
|
| 81 |
+
display: table;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
/* 15. Remove default details/summary styles */
|
| 85 |
+
details {
|
| 86 |
+
display: block;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
summary {
|
| 90 |
+
display: list-item;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
/* 16. Remove default hr styles */
|
| 94 |
+
hr {
|
| 95 |
+
border: none;
|
| 96 |
+
height: 1px;
|
| 97 |
+
background: #ccc;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
/* 17. Remove default blockquote styles */
|
| 101 |
+
blockquote {
|
| 102 |
+
quotes: none;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
blockquote:before,
|
| 106 |
+
blockquote:after {
|
| 107 |
+
content: '';
|
| 108 |
+
content: none;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
/* 18. Remove default cite styles */
|
| 112 |
+
cite {
|
| 113 |
+
font-style: normal;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
/* 19. Remove default address styles */
|
| 117 |
+
address {
|
| 118 |
+
font-style: normal;
|
| 119 |
+
}
|
sau_frontend/src/styles/variables.scss
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// 颜色变量
|
| 2 |
+
$primary-color: #409eff;
|
| 3 |
+
$success-color: #67c23a;
|
| 4 |
+
$warning-color: #e6a23c;
|
| 5 |
+
$danger-color: #f56c6c;
|
| 6 |
+
$info-color: #909399;
|
| 7 |
+
|
| 8 |
+
// 文字颜色
|
| 9 |
+
$text-primary: #303133;
|
| 10 |
+
$text-regular: #606266;
|
| 11 |
+
$text-secondary: #909399;
|
| 12 |
+
$text-placeholder: #c0c4cc;
|
| 13 |
+
|
| 14 |
+
// 边框颜色
|
| 15 |
+
$border-base: #dcdfe6;
|
| 16 |
+
$border-light: #e4e7ed;
|
| 17 |
+
$border-lighter: #ebeef5;
|
| 18 |
+
$border-extra-light: #f2f6fc;
|
| 19 |
+
|
| 20 |
+
// 背景颜色
|
| 21 |
+
$bg-color: #ffffff;
|
| 22 |
+
$bg-color-page: #f2f3f5;
|
| 23 |
+
$bg-color-overlay: #ffffff;
|
| 24 |
+
|
| 25 |
+
// 字体大小
|
| 26 |
+
$font-size-extra-large: 20px;
|
| 27 |
+
$font-size-large: 18px;
|
| 28 |
+
$font-size-medium: 16px;
|
| 29 |
+
$font-size-base: 14px;
|
| 30 |
+
$font-size-small: 13px;
|
| 31 |
+
$font-size-extra-small: 12px;
|
| 32 |
+
|
| 33 |
+
// 间距
|
| 34 |
+
$spacing-xs: 4px;
|
| 35 |
+
$spacing-sm: 8px;
|
| 36 |
+
$spacing-md: 16px;
|
| 37 |
+
$spacing-lg: 24px;
|
| 38 |
+
$spacing-xl: 32px;
|
| 39 |
+
|
| 40 |
+
// 圆角
|
| 41 |
+
$border-radius-base: 4px;
|
| 42 |
+
$border-radius-small: 2px;
|
| 43 |
+
$border-radius-round: 20px;
|
| 44 |
+
$border-radius-circle: 50%;
|
| 45 |
+
|
| 46 |
+
// 阴影
|
| 47 |
+
$box-shadow-base: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
| 48 |
+
$box-shadow-dark: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.12);
|
| 49 |
+
$box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
| 50 |
+
|
| 51 |
+
// 层级
|
| 52 |
+
$z-index-normal: 1;
|
| 53 |
+
$z-index-top: 1000;
|
| 54 |
+
$z-index-popper: 2000;
|