This commit is contained in:
六如
2024-10-04 21:48:38 +08:00
parent 00da3cc0a9
commit c08fec74c9
987 changed files with 24735 additions and 22137 deletions

View File

@@ -0,0 +1,182 @@
@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;
.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;
}
/* 标签页 */
.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;
}
}
}
}
}
/* 系统配置面板 */
.right-panel-items {
.el-divider__text {
--el-bg-color: var(--el-bg-color);
}
.el-divider--horizontal {
border-top: none;
}
}
.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,188 @@
.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;
border-radius: 4px;
outline: none;
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 {
border-radius: 4px;
outline: none;
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 {
/* Firefox */
scrollbar-width: thin; /* 可选值为 'auto', 'thin', 'none' */
scrollbar-color: rgb(221 222 224) transparent; /* 滑块颜色、轨道颜色 */
::-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,26 @@
@import "./transition";
@import "./element-plus";
@import "./sidebar";
@import "./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;
}
/* 灰色模式 */
.html-grey {
filter: grayscale(100%);
}
/* 色弱模式 */
.html-weakness {
filter: invert(80%);
}

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,257 @@
*,
::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;
}
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,729 @@
/* $sideBarWidth: vertical 模式下主体内容距离网页文档左侧的距离 */
@mixin merge-style($sideBarWidth) {
$menuActiveText: #7a80b4;
@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 {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 48px;
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: $menuBg;
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: $menuText;
background-color: transparent !important;
&:hover {
color: $menuTitleHover !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: $subMenuActiveText !important;
i {
color: $subMenuActiveText !important;
}
}
.is-active {
color: $subMenuActiveText !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;
margin: 4px 0;
clear: both;
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: $subMenuBg !important;
}
/* 有子集的激活菜单左侧小竖条 */
.el-menu--collapse
.is-active.outer-most.el-sub-menu
> .el-sub-menu__title::before {
position: absolute;
top: 0;
left: 0;
width: 2px;
height: 100%;
clear: both;
content: "";
background-color: $menuActiveBefore;
transition: all var(--pure-transition-duration) ease-in-out;
transform: translateY(0);
}
.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;
margin: 4px 0;
clear: both;
content: "";
background: var(--el-color-primary) !important;
border-radius: 3px;
}
}
/* vertical 菜单折叠 */
.el-menu--vertical {
.el-menu--popup {
background-color: $subMenuBg !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: $subMenuActiveText !important;
i {
color: $subMenuActiveText !important;
}
}
/* 子菜单中还有子菜单 */
.el-menu .el-sub-menu__title {
min-width: $sideBarWidth !important;
font-size: 14px;
background-color: $subMenuBg !important;
}
.el-menu-item,
.el-sub-menu__title {
height: 50px;
line-height: 50px;
color: $menuText;
background-color: $subMenuBg;
&:hover {
color: $menuTitleHover !important;
}
}
.is-active {
color: $subMenuActiveText !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: $subMenuBg !important;
a > .is-active.submenu-title-noDropdown {
border-bottom: none;
}
.el-menu-item {
color: $menuText;
background-color: $subMenuBg;
span {
font-size: 14px;
}
}
.el-sub-menu__title {
color: $menuText;
}
}
/* 子菜单中还有子菜单 */
.el-menu .el-sub-menu__title {
min-width: $sideBarWidth !important;
font-size: 14px;
background-color: $subMenuBg !important;
&:hover {
color: $menuTitleHover !important;
}
}
.is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown {
color: $subMenuActiveText !important;
i {
color: $subMenuActiveText !important;
}
}
.nest-menu .el-sub-menu > .el-sub-menu__title,
.el-menu-item {
&:hover {
color: $menuTitleHover !important;
}
}
.el-menu-item.is-active {
color: $subMenuActiveText !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: $menuBg;
.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;
font-size: 18px;
font-weight: 600;
line-height: 32px;
color: $subMenuActiveText;
text-overflow: ellipsis;
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: $subMenuActiveText;
/* 搜索 */
.search-container,
/* 国际化 */
.globalization,
/* 全屏 */
.fullscreen-icon,
/* 消息通知 */
.dropdown-badge,
/* 用户名 */
.el-dropdown-link,
/* 设置 */
.set-icon {
&:hover {
background: $menuHover;
}
}
.dropdown-badge {
height: 48px;
color: $subMenuActiveText;
}
.globalization {
width: 40px;
height: 48px;
padding: 11px;
color: $subMenuActiveText;
cursor: pointer;
outline: none;
}
.el-dropdown-link {
display: flex;
align-items: center;
justify-content: space-around;
height: 48px;
padding: 10px;
color: $subMenuActiveText;
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: $menuText;
&:hover {
color: $menuTitleHover !important;
}
}
.submenu-title-noDropdown,
.el-sub-menu__title {
height: 48px;
line-height: 48px;
background: $menuBg;
svg {
position: static !important;
}
}
.is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown {
color: $subMenuActiveText !important;
i {
color: $subMenuActiveText !important;
}
}
.is-active {
color: $subMenuActiveText !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;
transition-duration: 0.3s;
transform: translate3d(-$sideBarWidth, 0, 0);
}
}
}
}
body[layout="vertical"] {
$sideBarWidth: 210px;
@include merge-style($sideBarWidth);
.el-menu--collapse {
width: 54px;
}
.sidebar-logo-container {
background: $sidebarLogo;
}
.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 {
width: 100%;
height: 100%;
text-align: center;
visibility: visible;
}
}
}
.submenu-title-noDropdown {
background: transparent !important;
}
.el-sub-menu__title {
padding: 0;
}
}
.sub-menu-icon {
margin-right: 0;
}
}
/* 搜索 */
.search-container,
/* 国际化 */
.globalization,
/* 全屏 */
.fullscreen-icon,
/* 消息通知 */
.dropdown-badge,
/* 用户名 */
.el-dropdown-link,
/* 设置 */
.set-icon {
&:hover {
background: #f6f6f6;
}
}
}
body[layout="horizontal"] {
$sideBarWidth: 0;
@include merge-style($sideBarWidth);
.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;
}
.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 {
width: 100%;
height: 100%;
text-align: center;
visibility: visible;
}
}
}
}
}
}

View File

@@ -0,0 +1,21 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.flex-c {
@apply flex justify-center items-center;
}
.flex-ac {
@apply flex justify-around items-center;
}
.flex-bc {
@apply flex justify-between items-center;
}
.navbar-bg-hover {
@apply dark:text-white dark:hover:!bg-[#242424];
}
}

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;
}