init monorepo

This commit is contained in:
aric jean
2026-03-23 07:09:31 +08:00
parent 9f0c2e7c61
commit 16219ec7f1
657 changed files with 124939 additions and 1 deletions

View File

@@ -0,0 +1,267 @@
@use "sass:color";
@use "element-plus/theme-chalk/src/dark/css-vars.scss" as *;
/* 整体暗色风格适配 */
html.dark {
$border-style: #303030;
$color-white: #fff;
/* 自定义深色背景颜色 */
// --el-bg-color: #020409;
/* 常用border-color 需要时可取用 */
--pure-border-color: rgb(253 253 253 / 12%);
/* switch关闭状态下的color 需要时可取用 */
--pure-switch-off-color: #ffffff3f;
/* vxe-table */
--vxe-form-background-color: #151515;
--vxe-toolbar-background-color: #151515;
--vxe-pager-background-color: #151515;
--vxe-button-default-background-color: color.adjust(#151515, $lightness: 15%);
--vxe-table-header-background-color: color.adjust(#151515, $lightness: 5%);
--vxe-font-color: color.adjust(#c9d1d9, $lightness: -12%);
--vxe-table-header-font-color: #c9d1d9;
--vxe-table-footer-font-color: #c9d1d9;
--vxe-table-body-background-color: #151515;
--vxe-table-footer-background-color: #151515;
--vxe-table-row-striped-background-color: #1e1e1e;
--vxe-table-border-color: #303030;
--vxe-table-row-hover-background-color: #1e1e1e;
--vxe-table-row-hover-striped-background-color: color.adjust(
#1e1e1e,
$lightness: -10%
);
--vxe-table-row-current-background-color: fade(#1e1e1e, 20%);
--vxe-table-row-hover-current-background-color: fade(#1e1e1e, 20%);
--vxe-table-column-hover-background-color: fade(#1e1e1e, 20%);
--vxe-table-column-current-background-color: fade(#1e1e1e, 20%);
--vxe-table-row-checkbox-checked-background-color: fade(#1e1e1e, 15%);
--vxe-table-row-hover-checkbox-checked-background-color: fade(#1e1e1e, 20%);
--vxe-table-menu-background-color: color.adjust(#303133, $lightness: 10%);
--vxe-table-filter-panel-background-color: color.adjust(
#151515,
$lightness: 5%
);
--vxe-grid-maximize-background-color: #151515;
--vxe-pager-perfect-background-color: #151515;
--vxe-pager-perfect-button-background-color: color.adjust(
#151515,
$lightness: 15%
);
--vxe-input-background-color: #151515;
--vxe-input-border-color: #303030;
--vxe-select-panel-background-color: #151515;
--vxe-table-popup-border-color: #303030;
--vxe-select-option-hover-background-color: color.adjust(
#1e1e1e,
$lightness: 15%
);
--vxe-pulldown-panel-background-color: #151515;
--vxe-table-fixed-left-scrolling-box-shadow: 8px 0px 10px -5px #43464c;
--vxe-table-fixed-right-scrolling-box-shadow: -8px 0px 10px -5px #43464c;
--vxe-loading-background-color: rgb(0 0 0 / 50%);
--vxe-tooltip-dark-background-color: color.adjust(#303133, $lightness: 25%);
--vxe-modal-header-background-color: #1e1e1e;
--vxe-modal-body-background-color: #303133;
--vxe-modal-border-color: #303030;
--vxe-toolbar-panel-background-color: #151515;
--vxe-input-disabled-color: color.adjust(#1e1e1e, $lightness: 20%);
--vxe-input-disabled-background-color: color.adjust(#1e1e1e, $lightness: 25%);
--vxe-checkbox-icon-background-color: color.adjust(#1e1e1e, $lightness: 15%);
--vxe-checkbox-checked-icon-border-color: #303030;
--vxe-checkbox-indeterminate-icon-background-color: color.adjust(
#1e1e1e,
$lightness: 15%
);
.navbar,
.tags-view,
.contextmenu,
.sidebar-container,
.horizontal-header,
.sidebar-logo-container,
.horizontal-header .el-sub-menu__title,
.horizontal-header .submenu-title-noDropdown {
background: var(--el-bg-color) !important;
}
.app-main,
.app-main-nofixed-header {
background: #020409 !important;
}
.logic-flow-view,
.wangeditor {
filter: invert(0.9) hue-rotate(180deg);
}
/* 标签页 */
.tags-view {
.arrow-left,
.arrow-right {
border-right: 1px solid $border-style;
box-shadow: none;
}
.arrow-right {
border-left: 1px solid $border-style;
}
.scroll-item {
.el-icon-close {
&:hover {
color: rgb(255 255 255 / 85%) !important;
background-color: rgb(255 255 255 / 12%);
}
}
.chrome-tab {
.tag-title {
color: #666;
}
&:hover {
.chrome-tab__bg {
color: #333;
}
.tag-title {
color: #adadad;
}
}
}
}
}
/* 表单设计器 */
.design-form {
.el-main.config-content,
.el-header,
.el-main.widget-empty,
.widget-form-list,
.el-aside,
.widget-view {
background: var(--el-bg-color) !important;
}
.form-edit-widget-label a {
color: $color-white;
background: var(--el-color-primary);
border: none;
border-radius: 5px;
}
.el-aside {
color: $color-white;
}
}
/* intro.js */
.introjs-tooltip-title,
.introjs-tooltiptext {
color: var(--el-color-primary);
}
.el-card {
--el-card-bg-color: var(--el-bg-color);
}
.el-backtop {
--el-backtop-bg-color: rgb(72 72 78);
--el-backtop-hover-bg-color: var(--el-color-primary);
transition: background-color 0.25s cubic-bezier(0.7, 0.3, 0.1, 1);
}
.el-dropdown-menu__item:not(.is-disabled):hover {
background: transparent;
}
/* 全局覆盖element-plus的el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标的样式表现更鲜明 */
.el-icon {
&.el-dialog__close,
&.el-drawer__close,
&.el-message-box__close,
&.el-notification__closeBtn {
&:hover {
color: rgb(255 255 255 / 85%) !important;
background-color: rgb(255 255 255 / 12%);
.pure-dialog-svg {
color: rgb(255 255 255 / 85%) !important;
}
}
}
}
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,整体浅色风格在 src/style/element-plus.scss 文件进行了适配 */
.pure-message {
background-color: rgb(36 37 37) !important;
background-image: initial !important;
box-shadow:
rgb(13 13 13 / 12%) 0 3px 6px -4px,
rgb(13 13 13 / 8%) 0 6px 16px 0,
rgb(13 13 13 / 5%) 0 9px 28px 8px !important;
& .el-message__content {
color: $color-white !important;
pointer-events: all !important;
background-image: initial !important;
}
& .el-message__closeBtn {
&:hover {
color: rgb(255 255 255 / 85%);
background-color: rgb(255 255 255 / 12%);
}
}
}
/* 自定义菜单搜索样式 */
.pure-search-dialog {
.el-dialog__footer {
box-shadow:
0 -1px 0 0 #555a64,
0 -3px 6px 0 rgb(69 98 155 / 12%);
}
.search-footer {
.search-footer-item {
color: rgb(235 235 235 / 60%);
.icon {
box-shadow: none;
}
}
}
}
/* ReSegmented 组件 */
.pure-segmented {
color: rgb(255 255 255 / 65%);
background-color: #000;
.pure-segmented-item-selected {
background-color: #1f1f1f;
}
.pure-segmented-item-disabled {
color: rgb(255 255 255 / 25%);
}
}
/* 仿 el-scrollbar 滚动条样式 支持大多数浏览器如Chrome、Edge、Firefox、Safari等 */
.pure-scrollbar {
scrollbar-color: rgb(63 64 66) transparent;
::-webkit-scrollbar-thumb {
background-color: rgb(63 64 66);
}
::-webkit-scrollbar-thumb:hover {
background: rgb(92 93 96);
}
}
}

View File

@@ -0,0 +1,189 @@
.el-form-item__label {
font-weight: 700;
}
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
font-weight: 400 !important;
}
.el-dropdown-menu {
padding: 0 !important;
}
.is-dark {
z-index: 9999 !important;
}
/* 重置 el-button 中 icon 的 margin */
.reset-margin [class*="el-icon"] + span {
margin-left: 2px !important;
}
/* 自定义 popover 的类名 */
.pure-popper {
padding: 0 !important;
}
/* nprogress 适配 element-plus 的主题色 */
#nprogress {
& .bar {
background-color: var(--el-color-primary) !important;
}
& .peg {
box-shadow:
0 0 10px var(--el-color-primary),
0 0 5px var(--el-color-primary) !important;
}
& .spinner-icon {
border-top-color: var(--el-color-primary);
border-left-color: var(--el-color-primary);
}
}
.pure-dialog {
.el-dialog__header.show-close {
padding-right: 16px;
}
.el-dialog__headerbtn {
top: 16px;
right: 12px;
width: 24px;
height: 24px;
}
.pure-dialog-svg {
color: var(--el-color-info);
}
.el-dialog__footer {
padding-top: 0;
}
}
/* 全局覆盖element-plus的el-tour、el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标和el-upload上传文件列表右侧关闭图标的样式表现更鲜明 */
.el-dialog__headerbtn,
.el-message-box__headerbtn {
&:hover {
.el-dialog__close {
color: var(--el-color-info) !important;
}
}
}
.el-icon {
&.el-tour__close,
&.el-dialog__close,
&.el-drawer__close,
&.el-message-box__close,
&.el-notification__closeBtn,
.el-upload-list__item.is-ready &.el-icon--close {
width: 24px;
height: 24px;
outline: none;
border-radius: 4px;
transition:
background-color 0.2s,
color 0.2s;
&:hover {
color: rgb(0 0 0 / 88%) !important;
text-decoration: none;
background-color: rgb(0 0 0 / 6%);
.pure-dialog-svg {
color: rgb(0 0 0 / 88%) !important;
}
}
}
}
/* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,整体暗色风格在 src/style/dark.scss 文件进行了适配 */
.pure-message {
background: #fff !important;
border-width: 0 !important;
box-shadow:
0 3px 6px -4px #0000001f,
0 6px 16px #00000014,
0 9px 28px 8px #0000000d !important;
& .el-message__content {
color: #000000d9 !important;
pointer-events: all !important;
background-image: initial !important;
}
& .el-message__closeBtn {
outline: none;
border-radius: 4px;
transition:
background-color 0.2s,
color 0.2s;
&:hover {
background-color: rgb(0 0 0 / 6%);
}
}
}
/* 自定义菜单搜索样式 */
.pure-search-dialog {
@media screen and (width > 760px) and (width <= 940px) {
.el-input__inner {
font-size: 12px;
}
}
@media screen and (width <= 470px) {
.el-input__inner {
font-size: 12px;
}
}
.el-dialog__header {
display: none;
}
.el-input__inner {
font-size: 1.2em;
}
.el-dialog__footer {
width: calc(100% + 32px);
padding: 10px 20px;
margin: auto -16px -16px;
box-shadow:
0 -1px 0 0 #e0e3e8,
0 -3px 6px 0 rgb(69 98 155 / 12%);
}
}
/* 仿 el-scrollbar 滚动条样式支持大多数浏览器如Chrome、Edge、Firefox、Safari等。整体暗色风格在 src/style/dark.scss 文件进行了适配 */
.pure-scrollbar {
scrollbar-color: rgb(221 222 224) transparent; /* 滑块颜色、轨道颜色 */
/* Firefox */
scrollbar-width: thin; /* 可选值为 'auto', 'thin', 'none' */
::-webkit-scrollbar {
width: 6px; /* 滚动条宽度 */
}
/* 滚动条轨道 */
::-webkit-scrollbar-track {
background: transparent; /* 轨道颜色 */
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
background-color: rgb(221 222 224);
border-radius: 4px;
}
/* 滚动条滑块hover状态 */
::-webkit-scrollbar-thumb:hover {
background: rgb(199 201 203); /* 滑块hover颜色 */
}
}

View File

@@ -0,0 +1,52 @@
@use "theme";
@use "transition";
@use "element-plus";
@use "sidebar";
@use "dark";
/* 自定义全局 CssVar */
:root {
/* 左侧菜单展开、收起动画时长 */
--pure-transition-duration: 0.3s;
/* 常用border-color 需要时可取用 */
--pure-border-color: rgb(5 5 5 / 6%);
/* switch关闭状态下的color 需要时可取用 */
--pure-switch-off-color: #a6a6a6;
/** 主题色 */
--pure-theme-sub-menu-active-text: initial;
--pure-theme-menu-bg: none;
--pure-theme-menu-hover: none;
--pure-theme-sub-menu-bg: transparent;
--pure-theme-menu-text: initial;
--pure-theme-sidebar-logo: none;
--pure-theme-menu-title-hover: initial;
--pure-theme-menu-active-before: transparent;
}
/* 灰色模式 */
.html-grey {
filter: grayscale(100%);
}
/* 色弱模式 */
.html-weakness {
filter: invert(80%);
}
/* 轻微缩小,再恢复原状的平滑缩放动画 */
@keyframes pure-scale-bounce {
0% {
transform: scale(1);
}
50% {
transform: scale(0.9);
}
100% {
transform: scale(1);
}
}

View File

@@ -0,0 +1,96 @@
.wave {
position: fixed;
height: 100%;
width: 80%;
left: 0;
bottom: 0;
z-index: -1;
}
.login-container {
width: 100vw;
height: 100vh;
max-width: 100%;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 18rem;
padding: 0 2rem;
}
.img {
display: flex;
justify-content: flex-end;
align-items: center;
}
.img img {
width: 500px;
}
.login-box {
display: flex;
align-items: center;
text-align: center;
overflow: hidden;
}
.login-form {
width: 360px;
}
.avatar {
width: 350px;
height: 80px;
}
.login-form h2 {
text-transform: uppercase;
margin: 15px 0;
color: #999;
font:
bold 200% Consolas,
Monaco,
monospace;
}
@media screen and (max-width: 1180px) {
.login-container {
grid-gap: 9rem;
}
.login-form {
width: 290px;
}
.login-form h2 {
font-size: 2.4rem;
margin: 8px 0;
}
.img img {
width: 360px;
}
.avatar {
width: 280px;
height: 80px;
}
}
@media screen and (max-width: 968px) {
.wave {
display: none;
}
.img {
display: none;
}
.login-container {
grid-template-columns: 1fr;
}
.login-box {
justify-content: center;
}
}

View File

@@ -0,0 +1,250 @@
#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;
}
hr {
height: 0;
color: inherit;
border-top-width: 1px;
}
abbr:where([title]) {
text-decoration: underline dotted;
}
a {
color: inherit;
text-decoration: inherit;
}
b,
strong {
font-weight: bolder;
}
code,
kbd,
samp,
pre {
font-family:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
font-size: 1em;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
table {
text-indent: 0;
border-collapse: collapse;
border-color: inherit;
}
button,
input,
optgroup,
select,
textarea {
padding: 0;
margin: 0;
font-family: inherit;
font-size: 100%;
line-height: inherit;
color: inherit;
}
button,
select {
text-transform: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
background-image: none;
}
:-moz-focusring {
outline: auto;
}
:-moz-ui-invalid {
box-shadow: none;
}
progress {
vertical-align: baseline;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
}
::-webkit-file-upload-button {
font: inherit;
}
summary {
display: list-item;
}
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
padding: 0;
margin: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
padding: 0;
margin: 0;
list-style: none;
}
textarea {
resize: vertical;
}
input::placeholder,
textarea::placeholder {
color: #9ca3af;
opacity: 1;
}
button,
[role="button"] {
cursor: pointer;
}
:disabled {
cursor: default;
}
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
}
img,
video {
max-width: 100%;
height: auto;
}
[hidden] {
display: none;
}
.dark {
color-scheme: dark;
}
label {
font-weight: 700;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
color: inherit;
text-decoration: none;
cursor: pointer;
}
div:focus {
outline: none;
}
.clearfix {
&::after {
display: block;
height: 0;
clear: both;
font-size: 0;
visibility: hidden;
content: " ";
}
}

View File

@@ -0,0 +1,714 @@
/* $sideBarWidth: vertical 模式下主体内容距离网页文档左侧的距离 */
@mixin merge-style($sideBarWidth) {
@media screen and (width >= 150px) and (width <= 420px) {
.app-main-nofixed-header {
overflow-y: hidden;
}
}
@media screen and (width >= 420px) {
.app-main-nofixed-header {
overflow: hidden;
}
}
/* 修复 windows 下双滚动条问题 https://github.com/pure-admin/vue-pure-admin/pull/936#issuecomment-1968125992 */
.el-popper.pure-scrollbar {
overflow: hidden;
}
/* popper menu 超出内容区可滚动 */
.pure-scrollbar {
max-height: calc(100vh - calc(50px * 2.5));
overflow: hidden auto;
}
.sub-menu-icon {
margin-right: 5px;
font-size: 18px;
svg {
width: 18px;
height: 18px;
}
}
.set-icon,
.fullscreen-icon,
.globalization-icon {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 48px;
font-size: 16px;
cursor: pointer;
}
.main-container {
position: relative;
height: 100vh;
min-height: 100%;
margin-left: $sideBarWidth;
background: #f0f2f5;
/* main-content 属性动画 */
transition: margin-left var(--pure-transition-duration);
.el-scrollbar__wrap {
height: 100%;
overflow: auto;
}
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 998;
width: calc(100% - #{$sideBarWidth});
/* fixed-header 属性左上角动画 */
transition: width var(--pure-transition-duration);
}
.main-hidden {
margin-left: 0 !important;
.fixed-header {
width: 100% !important;
+ .app-main {
padding-top: 37px !important;
}
}
}
.sidebar-container {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 1001;
width: $sideBarWidth !important;
height: 100%;
overflow: visible;
font-size: 0;
background: var(--pure-theme-menu-bg) !important;
border-right: 1px solid var(--pure-border-color);
/* 展开动画 */
transition: width var(--pure-transition-duration);
.scrollbar-wrapper {
overflow-x: hidden !important;
}
.el-scrollbar__bar.is-vertical {
right: 0;
}
&.has-logo {
.el-scrollbar.pc {
/* logo: 48px、leftCollapse: 40px、leftCollapse-shadow: 4px */
height: calc(100% - 92px);
}
/* logo: 48px */
.el-scrollbar.mobile {
height: calc(100% - 48px);
}
}
&.no-logo {
.el-scrollbar.pc {
/* leftCollapse: 40px、leftCollapse-shadow: 4px */
height: calc(100% - 44px);
}
.el-scrollbar.mobile {
height: 100%;
}
}
.is-horizontal {
display: none;
}
a {
display: flex;
flex-wrap: wrap;
width: 100%;
}
.el-menu {
height: 100%;
background-color: transparent !important;
border: none;
}
.el-menu-item,
.el-sub-menu__title {
height: 50px;
color: var(--pure-theme-menu-text);
background-color: transparent !important;
&:hover {
color: var(--pure-theme-menu-title-hover) !important;
}
div,
span {
height: 50px;
line-height: 50px;
}
}
.submenu-title-noDropdown,
.el-sub-menu__title {
&:hover {
background-color: transparent;
}
}
.is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important;
}
.is-active {
color: var(--pure-theme-sub-menu-active-text) !important;
transition: color 0.3s;
}
.el-menu-item.is-active.nest-menu > * {
z-index: 1;
color: #fff;
}
.el-menu-item.is-active.nest-menu::before {
position: absolute;
inset: 0 8px;
clear: both;
margin: 4px 0;
content: "";
background: var(--el-color-primary) !important;
border-radius: 3px;
}
.el-menu .el-menu--inline .el-sub-menu__title,
& .el-sub-menu .el-menu-item {
min-width: $sideBarWidth !important;
font-size: 14px;
background-color: var(--pure-theme-sub-menu-bg) !important;
}
/* 有子集的激活菜单左侧小竖条 */
.el-menu--collapse
.is-active.outer-most.el-sub-menu
> .el-sub-menu__title::before {
position: absolute;
top: 0;
left: 0;
clear: both;
width: 2px;
height: 100%;
content: "";
background-color: var(--pure-theme-menu-active-before);
transform: translateY(0);
transition: all var(--pure-transition-duration) ease-in-out;
}
.el-menu--collapse .outer-most.el-sub-menu > .el-sub-menu__title::before {
position: absolute;
top: 50%;
display: block;
width: 3px;
height: 0;
content: "";
transform: translateY(-50%);
}
/* 无子集的激活菜单背景 */
.is-active.submenu-title-noDropdown.outer-most > * {
z-index: 1;
color: #fff;
}
.is-active.submenu-title-noDropdown.outer-most::before {
position: absolute;
inset: 0 8px;
clear: both;
margin: 4px 0;
content: "";
background: var(--el-color-primary) !important;
border-radius: 3px;
}
}
/* vertical 菜单折叠 */
.el-menu--vertical {
.el-menu--popup {
background-color: var(--pure-theme-sub-menu-bg) !important;
.el-menu-item {
span {
font-size: 14px;
}
}
}
& > .el-menu {
i,
svg {
margin-right: 5px;
}
}
.is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important;
}
/* 子菜单中还有子菜单 */
.el-menu .el-sub-menu__title {
min-width: $sideBarWidth !important;
font-size: 14px;
background-color: var(--pure-theme-sub-menu-bg) !important;
}
.el-menu-item,
.el-sub-menu__title {
height: 50px;
line-height: 50px;
color: var(--pure-theme-menu-text);
background-color: var(--pure-theme-sub-menu-bg);
&:hover {
color: var(--pure-theme-menu-title-hover) !important;
}
}
.is-active {
color: var(--pure-theme-sub-menu-active-text) !important;
transition: color 0.3s;
}
.el-menu-item.is-active.nest-menu > * {
z-index: 1;
color: #fff;
}
.el-menu-item.is-active.nest-menu::before {
position: absolute;
inset: 0 8px;
clear: both;
content: "";
background: var(--el-color-primary) !important;
border-radius: 3px;
}
.el-menu-item,
.el-sub-menu {
.iconfont {
font-size: 18px;
}
.el-menu-tooltip__trigger {
width: 54px;
padding: 0;
}
}
}
/* horizontal 菜单 */
.el-menu--horizontal {
& > .el-sub-menu .el-sub-menu__icon-arrow {
position: static !important;
margin-top: 0;
}
/* 无子菜单时激活 border-bottom */
a > .is-active.submenu-title-noDropdown {
border-bottom: 2px solid var(--el-menu-active-color);
}
.el-menu--popup {
background-color: var(--pure-theme-sub-menu-bg) !important;
a > .is-active.submenu-title-noDropdown {
border-bottom: none;
}
.el-menu-item {
color: var(--pure-theme-menu-text);
background-color: var(--pure-theme-sub-menu-bg);
span {
font-size: 14px;
}
}
.el-sub-menu__title {
color: var(--pure-theme-menu-text);
}
}
/* 子菜单中还有子菜单 */
.el-menu .el-sub-menu__title {
min-width: $sideBarWidth !important;
font-size: 14px;
background-color: var(--pure-theme-sub-menu-bg) !important;
&:hover {
color: var(--pure-theme-menu-title-hover) !important;
}
}
.is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important;
}
.nest-menu .el-sub-menu > .el-sub-menu__title,
.el-menu-item {
&:hover {
color: var(--pure-theme-menu-title-hover) !important;
}
}
.el-menu-item.is-active {
color: var(--pure-theme-sub-menu-active-text) !important;
transition: color 0.3s;
}
.el-menu-item.is-active.nest-menu > * {
z-index: 1;
color: #fff;
}
.el-menu-item.is-active.nest-menu::before {
position: absolute;
inset: 0 5px;
clear: both;
content: "";
background: var(--el-color-primary) !important;
border-radius: 3px;
}
}
.horizontal-header {
display: flex;
align-items: center;
justify-content: space-around;
width: 100%;
height: 48px;
background: var(--pure-theme-menu-bg) !important;
.horizontal-header-left {
display: flex;
align-items: center;
width: auto;
min-width: 200px;
height: 100%;
padding-left: 10px;
cursor: pointer;
transition: all var(--pure-transition-duration) ease;
img {
display: inline-block;
height: 32px;
}
span {
display: inline-block;
height: 32px;
margin: 2px 0 0 12px;
overflow: hidden;
text-overflow: ellipsis;
font-size: 18px;
font-weight: 600;
line-height: 32px;
color: var(--pure-theme-sub-menu-active-text);
white-space: nowrap;
}
}
.horizontal-header-menu {
flex: 1;
align-items: center;
min-width: 0;
height: 100%;
}
.horizontal-header-right {
display: flex;
align-items: center;
justify-content: flex-end;
min-width: 340px;
color: var(--pure-theme-sub-menu-active-text);
/* 搜索 */
.search-container,
/* 国际化 */
.globalization-icon,
/* 全屏 */
.fullscreen-icon,
/* 消息通知 */
.dropdown-badge,
/* 用户名 */
.el-dropdown-link,
/* 设置 */
.set-icon {
&:hover {
background: var(--pure-theme-menu-hover);
}
}
.dropdown-badge {
height: 48px;
color: var(--pure-theme-sub-menu-active-text);
}
.globalization-icon {
color: var(--pure-theme-sub-menu-active-text);
outline: none;
}
.el-dropdown-link {
display: flex;
align-items: center;
justify-content: space-around;
height: 48px;
padding: 10px;
color: var(--pure-theme-sub-menu-active-text);
cursor: pointer;
p {
font-size: 14px;
}
img {
width: 22px;
height: 22px;
border-radius: 50%;
}
}
}
.el-menu {
width: 100% !important;
height: 100%;
background-color: transparent;
border: none;
}
.el-menu-item,
.el-sub-menu__title {
padding-right: var(--el-menu-base-level-padding);
color: var(--pure-theme-menu-text);
&:hover {
color: var(--pure-theme-menu-title-hover) !important;
}
}
.submenu-title-noDropdown,
.el-sub-menu__title {
height: 48px;
line-height: 48px;
background: var(--pure-theme-menu-bg) !important;
svg {
position: static !important;
}
}
.is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important;
}
.is-active {
color: var(--pure-theme-sub-menu-active-text) !important;
transition: color 0.3s;
}
}
.el-menu--collapse .el-menu .el-sub-menu {
min-width: $sideBarWidth !important;
}
/* 手机端 */
.mobile {
.fixed-header {
width: 100% !important;
transition: width var(--pure-transition-duration);
}
.main-container {
margin-left: 0 !important;
}
.sidebar-container {
z-index: 2001;
width: $sideBarWidth;
transition: transform var(--pure-transition-duration);
}
&.hideSidebar {
.sidebar-container {
pointer-events: none;
transform: translate3d(-$sideBarWidth, 0, 0);
transition-duration: 0.3s;
}
}
}
}
body[layout="vertical"] {
$sideBarWidth: 210px;
@include merge-style($sideBarWidth);
.el-menu--collapse {
width: 54px;
}
.sidebar-logo-container {
background: var(--pure-theme-sidebar-logo);
}
.hideSidebar {
.fixed-header {
width: calc(100% - 54px);
transition: width var(--pure-transition-duration);
}
.sidebar-container {
width: 54px !important;
transition: width var(--pure-transition-duration);
.is-active.submenu-title-noDropdown.outer-most {
background: transparent !important;
}
}
.main-container {
margin-left: 54px;
}
/* 菜单折叠 */
.el-menu--collapse {
.el-sub-menu {
& > .el-sub-menu__title {
& > span {
visibility: visible;
width: 100%;
height: 100%;
text-align: center;
}
}
}
.submenu-title-noDropdown {
background: transparent !important;
}
.el-sub-menu__title {
padding: 0;
}
}
.sub-menu-icon {
margin-right: 0;
}
}
/* 搜索 */
.search-container,
/* 国际化 */
.globalization-icon,
/* 全屏 */
.fullscreen-icon,
/* 消息通知 */
.dropdown-badge,
/* 用户名 */
.el-dropdown-link,
/* 设置 */
.set-icon {
&:hover {
background: #f6f6f6;
}
}
}
body[layout="horizontal"] {
$sideBarWidth: 0;
@include merge-style($sideBarWidth);
.el-menu {
--el-menu-hover-text-color: var(--pure-theme-menu-text) !important;
}
.fixed-header,
.main-container {
transition: none !important;
}
.fixed-header {
width: 100%;
}
}
body[layout="mix"] {
$sideBarWidth: 210px;
@include merge-style($sideBarWidth);
.el-menu--collapse {
width: 54px;
}
.el-menu {
--el-menu-hover-bg-color: transparent !important;
--el-menu-hover-text-color: var(--pure-theme-menu-text) !important;
}
.hideSidebar {
.fixed-header {
width: calc(100% - 54px);
transition: width var(--pure-transition-duration);
}
.sidebar-container {
width: 54px !important;
transition: width var(--pure-transition-duration);
.is-active.submenu-title-noDropdown.outer-most {
background: transparent !important;
}
}
.main-container {
margin-left: 54px;
}
/* 菜单折叠 */
.el-menu--collapse {
.el-sub-menu {
& > .el-sub-menu__title {
padding: 0;
& > span {
visibility: visible;
width: 100%;
height: 100%;
text-align: center;
}
}
}
}
}
}

View File

@@ -0,0 +1,50 @@
@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);
@custom-variant dark (&:is(.dark *));
@theme {
--color-bg_color: var(--el-bg-color);
--color-primary: var(--el-color-primary);
--color-text_color_primary: var(--el-text-color-primary);
--color-text_color_regular: var(--el-text-color-regular);
}
/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}
@utility flex-c {
@apply flex justify-center items-center;
}
@utility flex-ac {
@apply flex justify-around items-center;
}
@utility flex-bc {
@apply flex justify-between items-center;
}
@utility navbar-bg-hover {
@apply select-none dark:text-white dark:hover:bg-[#242424]!;
}
@utility animate-scale-bounce {
animation: pure-scale-bounce 0.3s ease-in-out;
}

View File

@@ -0,0 +1,95 @@
/* 亮白色 */
html[data-theme="light"] {
--pure-theme-sub-menu-active-text: #000000d9;
--pure-theme-menu-bg: #fff;
--pure-theme-menu-hover: #f6f6f6;
--pure-theme-sub-menu-bg: #fff;
--pure-theme-menu-text: rgb(0 0 0 / 60%);
--pure-theme-sidebar-logo: #fff;
--pure-theme-menu-title-hover: #000;
--pure-theme-menu-active-before: #4091f7;
}
/* 道奇蓝 */
html[data-theme="default"] {
--pure-theme-sub-menu-active-text: #fff;
--pure-theme-menu-bg: #001529;
--pure-theme-menu-hover: rgb(64 145 247 / 15%);
--pure-theme-sub-menu-bg: #0f0303;
--pure-theme-menu-text: rgb(254 254 254 / 65%);
--pure-theme-sidebar-logo: #002140;
--pure-theme-menu-title-hover: #fff;
--pure-theme-menu-active-before: #4091f7;
}
/* 深紫罗兰色 */
html[data-theme="saucePurple"] {
--pure-theme-sub-menu-active-text: #fff;
--pure-theme-menu-bg: #130824;
--pure-theme-menu-hover: rgb(105 58 201 / 15%);
--pure-theme-sub-menu-bg: #000;
--pure-theme-menu-text: #7a80b4;
--pure-theme-sidebar-logo: #1f0c38;
--pure-theme-menu-title-hover: #fff;
--pure-theme-menu-active-before: #693ac9;
}
/* 深粉色 */
html[data-theme="pink"] {
--pure-theme-sub-menu-active-text: #fff;
--pure-theme-menu-bg: #28081a;
--pure-theme-menu-hover: rgb(216 68 147 / 15%);
--pure-theme-sub-menu-bg: #000;
--pure-theme-menu-text: #7a80b4;
--pure-theme-sidebar-logo: #3f0d29;
--pure-theme-menu-title-hover: #fff;
--pure-theme-menu-active-before: #d84493;
}
/* 猩红色 */
html[data-theme="dusk"] {
--pure-theme-sub-menu-active-text: #fff;
--pure-theme-menu-bg: #2a0608;
--pure-theme-menu-hover: rgb(225 60 57 / 15%);
--pure-theme-sub-menu-bg: #000;
--pure-theme-menu-text: rgb(254 254 254 / 65.1%);
--pure-theme-sidebar-logo: #42090c;
--pure-theme-menu-title-hover: #fff;
--pure-theme-menu-active-before: #e13c39;
}
/* 橙红色 */
html[data-theme="volcano"] {
--pure-theme-sub-menu-active-text: #fff;
--pure-theme-menu-bg: #2b0e05;
--pure-theme-menu-hover: rgb(232 95 51 / 15%);
--pure-theme-sub-menu-bg: #0f0603;
--pure-theme-menu-text: rgb(254 254 254 / 65%);
--pure-theme-sidebar-logo: #441708;
--pure-theme-menu-title-hover: #fff;
--pure-theme-menu-active-before: #e85f33;
}
/* 绿宝石 */
html[data-theme="mingQing"] {
--pure-theme-sub-menu-active-text: #fff;
--pure-theme-menu-bg: #032121;
--pure-theme-menu-hover: rgb(89 191 193 / 15%);
--pure-theme-sub-menu-bg: #000;
--pure-theme-menu-text: #7a80b4;
--pure-theme-sidebar-logo: #053434;
--pure-theme-menu-title-hover: #fff;
--pure-theme-menu-active-before: #59bfc1;
}
/* 酸橙绿 */
html[data-theme="auroraGreen"] {
--pure-theme-sub-menu-active-text: #fff;
--pure-theme-menu-bg: #0b1e15;
--pure-theme-menu-hover: rgb(96 172 128 / 15%);
--pure-theme-sub-menu-bg: #000;
--pure-theme-menu-text: #7a80b4;
--pure-theme-sidebar-logo: #112f21;
--pure-theme-menu-title-hover: #fff;
--pure-theme-menu-active-before: #60ac80;
}

View File

@@ -0,0 +1,54 @@
/* fade */
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.28s;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
transition: all 0.5s;
}
.fade-transform-enter-from {
opacity: 0;
transform: translateX(-30px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateX(30px);
}
/* breadcrumb transition */
.breadcrumb-enter-active {
transition: all 0.4s;
}
.breadcrumb-leave-active {
position: absolute;
transition: all 0.3s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
opacity: 0;
transform: translateX(20px);
}
/**
* @description 重置el-menu的展开收起动画时长
*/
.outer-most .el-collapse-transition-leave-active,
.outer-most .el-collapse-transition-enter-active {
transition: 0.2s all ease-in-out !important;
}
.horizontal-collapse-transition {
transition: var(--pure-transition-duration) all !important;
}