first commiit
This commit is contained in:
7
src/styles/dark/css-vars.css
Normal file
7
src/styles/dark/css-vars.css
Normal file
@@ -0,0 +1,7 @@
|
||||
/* 暗黑模式通过 CSS 自定义变量,官方链接:https://element-plus.org/zh-CN/guide/dark-mode.html#%E9%80%9A%E8%BF%87-css */
|
||||
html.dark {
|
||||
.el-table {
|
||||
/* 自定义表格选中高亮时当前行的背景颜色 */
|
||||
--el-table-current-row-bg-color: var(--el-fill-color-light);
|
||||
}
|
||||
}
|
||||
28
src/styles/index.scss
Normal file
28
src/styles/index.scss
Normal file
@@ -0,0 +1,28 @@
|
||||
@use "./reset";
|
||||
|
||||
.app-container {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
padding: 18px 0 0 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: var(--el-bg-color-overlay);
|
||||
border: 1px solid var(--el-border-color-light);
|
||||
border-radius: 4px;
|
||||
box-shadow: var(--el-box-shadow-light);
|
||||
}
|
||||
|
||||
.table-container > .el-card__header {
|
||||
padding: calc(var(--el-card-padding) - 8px) var(--el-card-padding);
|
||||
}
|
||||
|
||||
.link-type,
|
||||
.link-type:focus {
|
||||
color: #337ab7;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: rgb(32 160 255);
|
||||
}
|
||||
}
|
||||
76
src/styles/reset.scss
Normal file
76
src/styles/reset.scss
Normal file
@@ -0,0 +1,76 @@
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
box-sizing: border-box;
|
||||
border-color: currentcolor;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
line-height: 1.5;
|
||||
tab-size: 4;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
|
||||
"Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
line-height: inherit;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
svg {
|
||||
// 因icon大小被设置为和字体大小一致,而span等标签的下边缘会和字体的基线对齐,故需设置一个往下的偏移比例,来纠正视觉上的未对齐效果
|
||||
vertical-align: -0.15em;
|
||||
}
|
||||
|
||||
ul,
|
||||
li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
a,
|
||||
a:focus,
|
||||
a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a:focus,
|
||||
a:active,
|
||||
div:focus {
|
||||
outline: none;
|
||||
}
|
||||
12
src/styles/variables.module.scss
Normal file
12
src/styles/variables.module.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
/* stylelint-disable property-no-unknown */
|
||||
:export {
|
||||
sidebar-width: $sidebar-width;
|
||||
navbar-height: $navbar-height;
|
||||
tags-view-height: $tags-view-height;
|
||||
menu-background: $menu-background;
|
||||
menu-text: $menu-text;
|
||||
menu-active-text: $menu-active-text;
|
||||
menu-hover: $menu-hover;
|
||||
window-top: $window-top;
|
||||
}
|
||||
/* stylelint-enable property-no-unknown */
|
||||
59
src/styles/variables.scss
Normal file
59
src/styles/variables.scss
Normal file
@@ -0,0 +1,59 @@
|
||||
@forward "element-plus/theme-chalk/src/common/var.scss" with (
|
||||
$colors: (
|
||||
"primary": (
|
||||
"base": #4080ff,
|
||||
),
|
||||
"success": (
|
||||
"base": #23c343,
|
||||
),
|
||||
"warning": (
|
||||
"base": #ff9a2e,
|
||||
),
|
||||
"danger": (
|
||||
"base": #f76560,
|
||||
),
|
||||
"info": (
|
||||
"base": #a9aeb8,
|
||||
),
|
||||
),
|
||||
|
||||
$bg-color: (
|
||||
"page": #f5f8fd,
|
||||
)
|
||||
);
|
||||
|
||||
/** 全局SCSS变量 */
|
||||
|
||||
:root {
|
||||
--menu-background: #fff;
|
||||
--menu-text: #bfcbd9;
|
||||
--menu-active-text: var(--el-menu-active-color);
|
||||
--menu-hover: #263445;
|
||||
--sidebar-logo-background: #fff;
|
||||
|
||||
// 修复表格 fixed 列被选中后由于透明色导致叠字的 bug
|
||||
.el-table {
|
||||
--el-table-current-row-bg-color: rgb(235 243 250);
|
||||
}
|
||||
}
|
||||
|
||||
/** 暗黑主题 */
|
||||
html.dark {
|
||||
--menu-background: var(--el-bg-color-overlay);
|
||||
--menu-text: #fff;
|
||||
--menu-active-text: var(--el-menu-active-color);
|
||||
--menu-hover: rgb(0 0 0 / 20%);
|
||||
--sidebar-logo-background: rgb(0 0 0 / 20%);
|
||||
}
|
||||
|
||||
$menu-background: var(--menu-background); // 菜单背景色
|
||||
$menu-text: var(--menu-text); // 菜单文字颜色
|
||||
$menu-active-text: var(--menu-active-text); // 菜单激活文字颜色
|
||||
$menu-hover: var(--menu-hover); // 菜单悬停背景色
|
||||
$sidebar-logo-background: var(--sidebar-logo-background); // 侧边栏 Logo 背景色
|
||||
|
||||
$sidebar-width: 210px; // 侧边栏宽度
|
||||
$sidebar-width-collapsed: 54px; // 侧边栏收缩宽度
|
||||
$navbar-height: 50px; // 导航栏高度
|
||||
$tags-view-height: 34px; // TagsView 高度
|
||||
$window-top: 60px; // 窗口顶部高度
|
||||
Reference in New Issue
Block a user