From 0afd460a101d11f567cd50e5ad6ef456ed995acd Mon Sep 17 00:00:00 2001
From: lzq <2495532633@qq.com>
Date: Thu, 15 Jan 2026 12:04:47 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4sass?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package-lock.json | 1 -
package.json | 1 -
src/App.vue | 44 +-
src/assets/scss/el-dark.scss | 2 -
src/assets/scss/el-light.scss | 34 --
src/assets/scss/index.scss | 1 -
src/assets/scss/mixin.scss | 153 ------
src/assets/scss/reset.scss | 50 --
src/assets/stylus/index.styl | 498 ------------------
.../{scss/el-ui.scss => stylus/temp.styl} | 174 +-----
src/components/page/FormPage.vue | 14 +-
src/dts/components.d.ts | 9 +-
src/pages/a-frame/AAside.tsx | 4 +-
src/pages/a-frame/AFrame.vue | 2 +-
src/pages/a-frame/aaside.module.styl | 63 +++
vite.config.ts | 22 +-
16 files changed, 91 insertions(+), 981 deletions(-)
delete mode 100644 src/assets/scss/el-dark.scss
delete mode 100644 src/assets/scss/el-light.scss
delete mode 100644 src/assets/scss/index.scss
delete mode 100644 src/assets/scss/mixin.scss
delete mode 100644 src/assets/scss/reset.scss
rename src/assets/{scss/el-ui.scss => stylus/temp.styl} (65%)
diff --git a/package-lock.json b/package-lock.json
index db8d594..ed4a07c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -31,7 +31,6 @@
"colorette": "^2.0.20",
"fflate": "^0.8.2",
"filesize": "^11.0.2",
- "sass": "^1.97.2",
"stylus": "^0.64.0",
"typescript": "~5.8.3",
"typescript-plugin-css-modules": "^5.2.0",
diff --git a/package.json b/package.json
index b1def08..0a5326f 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,6 @@
"colorette": "^2.0.20",
"fflate": "^0.8.2",
"filesize": "^11.0.2",
- "sass": "^1.97.2",
"stylus": "^0.64.0",
"typescript": "~5.8.3",
"typescript-plugin-css-modules": "^5.2.0",
diff --git a/src/App.vue b/src/App.vue
index 3cc2853..c4495c7 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,7 +7,7 @@
diff --git a/src/assets/scss/el-dark.scss b/src/assets/scss/el-dark.scss
deleted file mode 100644
index 8f81cdf..0000000
--- a/src/assets/scss/el-dark.scss
+++ /dev/null
@@ -1,2 +0,0 @@
-// 导入暗黑主题
-@use 'element-plus/theme-chalk/src/dark/css-vars.scss' as *;
diff --git a/src/assets/scss/el-light.scss b/src/assets/scss/el-light.scss
deleted file mode 100644
index ea06e9e..0000000
--- a/src/assets/scss/el-light.scss
+++ /dev/null
@@ -1,34 +0,0 @@
-// https://github.com/element-plus/element-plus/blob/dev/packages/theme-chalk/src/common/var.scss
-// 自定义Element 亮色主题
-
-@forward 'element-plus/theme-chalk/src/common/var.scss' with (
- $colors: (
- 'white': #FFFFFF,
- 'black': #000000,
- 'success': (
- 'base': #13DEB9
- ),
- 'warning': (
- 'base': #FFAE1F
- ),
- 'danger': (
- 'base': #FF4D4F
- ),
- 'error': (
- 'base': #CF171D
- )
- ),
- $button: (
- 'hover-bg-color': var(--el-color-primary-light-9),
- 'hover-border-color': var(--el-color-primary),
- 'border-color': var(--el-color-primary),
- 'text-color': var(--el-color-primary)
- ),
- $messagebox: (
- 'border-radius': '12px'
- ),
- $popover: (
- 'padding': '14px',
- 'border-radius': '10px'
- )
-);
diff --git a/src/assets/scss/index.scss b/src/assets/scss/index.scss
deleted file mode 100644
index 788ae5b..0000000
--- a/src/assets/scss/index.scss
+++ /dev/null
@@ -1 +0,0 @@
-@use './reset.scss';
diff --git a/src/assets/scss/mixin.scss b/src/assets/scss/mixin.scss
deleted file mode 100644
index 24e14a1..0000000
--- a/src/assets/scss/mixin.scss
+++ /dev/null
@@ -1,153 +0,0 @@
-// sass 混合宏(函数)
-
-/**
-* 溢出省略号
-* @param {Number} 行数
-*/
-@mixin ellipsis($rowCount: 1) {
- @if $rowCount <=1 {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- } @else {
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: $rowCount;
- -webkit-box-orient: vertical;
- }
-}
-
-/**
-* 控制用户能否选中文本
-* @param {String} 类型
-*/
-@mixin userSelect($value: none) {
- user-select: $value;
- -moz-user-select: $value;
- -ms-user-select: $value;
- -webkit-user-select: $value;
-}
-
-// 绝对定位居中
-@mixin absoluteCenter() {
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- margin: auto;
-}
-
-/**
-* css3动画
-*
-*/
-@mixin animation(
- $from: (
- width: 0px
- ),
- $to: (
- width: 100px
- ),
- $name: mymove,
- $animate: mymove 2s 1 linear infinite
-) {
- -webkit-animation: $animate;
- -o-animation: $animate;
- animation: $animate;
-
- @keyframes #{$name} {
- from {
- @each $key, $value in $from {
- #{$key}: #{$value};
- }
- }
-
- to {
- @each $key, $value in $to {
- #{$key}: #{$value};
- }
- }
- }
-
- @-webkit-keyframes #{$name} {
- from {
- @each $key, $value in $from {
- $key: $value;
- }
- }
-
- to {
- @each $key, $value in $to {
- $key: $value;
- }
- }
- }
-}
-
-// 圆形盒子
-@mixin circle($size: 11px, $bg: #FFFFFF) {
- border-radius: 50%;
- width: $size;
- height: $size;
- line-height: $size;
- text-align: center;
- background: $bg;
-}
-
-// placeholder
-@mixin placeholder($color: #BBBBBB) {
- // Firefox
- &::-moz-placeholder {
- color: $color;
- opacity: 1;
- }
-
- // Internet Explorer 10+
- &:-ms-input-placeholder {
- color: $color;
- }
-
- // Safari and Chrome
- &::-webkit-input-placeholder {
- color: $color;
- }
-
- &:placeholder-shown {
- text-overflow: ellipsis;
- }
-}
-
-//背景透明,文字不透明。兼容IE8
-@mixin betterTransparentize($color, $alpha) {
- $c: rgba($color, $alpha);
- $ie_c: ie_hex_str($c);
- background: rgba($color, 1);
- background: $c;
- background: transparent \9
-;
- zoom: 1;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie_c}, endColorstr=#{$ie_c});
- -ms-filter: 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie_c}, endColorstr=#{$ie_c})';
-}
-
-//添加浏览器前缀
-@mixin browserPrefix($propertyName, $value) {
- @each $prefix in -webkit-, -moz-, -ms-, -o-, '' {
- #{$prefix}#{$propertyName}: $value;
- }
-}
-
-// 边框
-@mixin border($color: red) {
- border: 1px solid $color;
-}
-
-// 背景滤镜
-@mixin backdropBlur() {
- --tw-backdrop-blur: blur(30px);
- -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
- backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
-}
diff --git a/src/assets/scss/reset.scss b/src/assets/scss/reset.scss
deleted file mode 100644
index da66ed2..0000000
--- a/src/assets/scss/reset.scss
+++ /dev/null
@@ -1,50 +0,0 @@
-@charset "UTF-8";
-html, :host {
- -webkit-text-size-adjust: 100%;
- tab-size: 4;
- line-height: 1.5;
- font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
- font-feature-settings: var(--default-font-feature-settings, normal);
- font-variation-settings: var(--default-font-variation-settings, normal);
- -webkit-tap-highlight-color: transparent;
-}
-
-/*滚动条*/
-/*滚动条整体部分,必须要设置*/
-::-webkit-scrollbar {
- width: 5px !important;
- height: 0 !important;
-}
-
-/*滚动条的轨道*/
-::-webkit-scrollbar-track {
- background-color: #F2F4F5;
-}
-
-/*滚动条的滑块按钮*/
-::-webkit-scrollbar-thumb {
- border-radius: 5px;
- background-color: #CCCCCC !important;
- transition: all 0.2s;
- -webkit-transition: all 0.2s;
-}
-
-::-webkit-scrollbar-thumb:hover {
- background-color: #B0ABAB !important;
-}
-
-/*滚动条的上下两端的按钮*/
-::-webkit-scrollbar-button {
- height: 0;
- width: 0;
-}
-
-.dark {
- ::-webkit-scrollbar-track {
- background-color: #070707;
- }
-
- ::-webkit-scrollbar-thumb {
- background-color: #E6EAEB !important;
- }
-}
diff --git a/src/assets/stylus/index.styl b/src/assets/stylus/index.styl
index 8564b19..b15a207 100644
--- a/src/assets/stylus/index.styl
+++ b/src/assets/stylus/index.styl
@@ -32,99 +32,6 @@
}
}
-// 优化 el-form-item 标签高度
-.el-form-item__label {
- height: var(--el-component-custom-height) !important;
- line-height: var(--el-component-custom-height) !important;
-}
-
-// 日期选择器
-.el-date-range-picker {
- --el-datepicker-inrange-bg-color: var(--art-gray-200) !important;
-}
-
-// el-card 背景色跟系统背景色保持一致
-html.dark .el-card {
- --el-card-bg-color: var(--default-box-color) !important;
-}
-
-.el-pagination {
- justify-content: center;
-
- .el-pager {
- li {
- box-sizing: border-box;
- font-weight: 400 !important;
- border: 1px solid #E6EAEB;
- transition: border-color 0.15s;
- padding: 0 10px !important;
-
- &:not(.is-active) {
- background-color: transparent !important;
- }
-
- &:hover {
- border-color: var(--main-color) !important;
- }
- }
- }
-
- .el-pagination__jump {
- .el-input {
- height: 32px;
- }
- }
-}
-
-
-// 优化菜单折叠展开动画(提升动画流畅度)
-.el-menu.el-menu--inline {
- transition: max-height 0.26s cubic-bezier(0.4, 0, 0.2, 1) !important;
-}
-
-.el-sub-menu {
- position: relative !important;
-}
-
-.el-sub-menu .el-sub-menu__icon-arrow {
- position: absolute !important;
- top: 50% !important;
- right: var(--el-menu-base-level-padding) !important;
- margin-top: -6px !important;
- transition: transform var(--el-transition-duration) !important;
- font-size: 12px !important;
- margin-right: 0 !important;
- display: block !important;
- width: auto !important;
-}
-
-// 优化菜单 item hover 动画(提升鼠标跟手感)
-.el-sub-menu__title,
-.el-menu-item {
- height: 42px !important;
- margin-bottom: 4px;
- line-height: 42px !important;
- transition: background-color 0s !important;
- width: calc(100% - 16px) !important;
- margin-left: 8px !important;
- border-radius: 6px !important;
-
- &:hover {
- background-color: #F2F4F5 !important;
- }
-}
-
-.menus:not(.el-menu--collapse) {
- width: 230px !important;
-}
-
-.el-menu--collapse {
- width: calc(16px + var(--el-menu-icon-width) + var(--el-menu-base-level-padding) * 2) !important;
-}
-
-.el-menu-item.is-active {
- background-color: rgb(238, 243, 255) !important;
-}
// -------------------------------- 修改 el-size=default 组件默认高度 start --------------------------------
// 修改 el-button 高度
@@ -157,416 +64,11 @@ html.dark .el-card {
// -------------------------------- 修改 el-size=default 组件默认高度 end --------------------------------
-.el-pagination.is-background .btn-next,
-.el-pagination.is-background .btn-prev,
-.el-pagination.is-background .el-pager li {
- border-radius: 6px;
-}
-
-.el-popover {
- min-width: 80px;
- border-radius: var(--el-border-radius-small) !important;
-}
-
-.el-dialog {
- border-radius: 100px !important;
- border-radius: calc(var(--custom-radius) / 1.2 + 2px) !important;
- overflow: hidden;
-}
-
-.el-dialog__header {
- .el-dialog__title {
- font-size: 16px;
- }
-}
-
.el-dialog__body {
padding: 25px 0 !important;
position: relative; // 为了兼容 el-pagination 样式,需要设置 relative,不然会影响 el-pagination 的样式,比如 el-pagination__jump--small 会被影响,导致 el-pagination__jump--small 按钮无法点击,详见 URL_ADDRESS.com/element-plus/element-plus/issues/5684#issuecomment-1176299275;
}
-.el-dialog.el-dialog-border {
- .el-dialog__body {
- // 上边框
- &::before,
- // 下边框
- &::after {
- content: '';
- position: absolute;
- left: -16px;
- width: calc(100% + 32px);
- height: 1px;
- background-color: var(--art-gray-300);
- }
- &::before {
- top: 0;
- }
- &::after {
- bottom: 0;
- }
- }
-}
-
-// el-message 样式优化
-.el-message {
- background-color: var(--default-box-color) !important;
- border: 0 !important;
- box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08),
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
- 0 9px 28px 8px rgba(0, 0, 0, 0.05) !important;
-
- p {
- font-size: 13px;
- }
-}
-
-// 修改 el-dropdown 样式
-.el-dropdown-menu {
- padding: 6px !important;
- border-radius: 10px !important;
- border: none !important;
-
- .el-dropdown-menu__item {
- padding: 6px 16px !important;
- border-radius: 6px !important;
-
- &:hover:not(.is-disabled) {
- color: var(--art-gray-900) !important;
- background-color: var(--art-el-active-color) !important;
- }
-
- &:focus:not(.is-disabled) {
- color: var(--art-gray-900) !important;
- background-color: var(--art-gray-200) !important;
- }
- }
-}
-
-// 隐藏 select、dropdown 的三角
-.el-select__popper,
-.el-dropdown__popper {
- margin-top: -6px !important;
-
- .el-popper__arrow {
- display: none;
- }
-}
-
-.el-dropdown-selfdefine:focus {
- outline: none !important;
-}
-
-// 处理移动端组件兼容性
-@media screen and (max-width: 640px) {
- .el-message-box,
- .el-dialog {
- width: calc(100% - 24px) !important;
- }
-
- .el-date-picker.has-sidebar.has-time {
- width: calc(100% - 24px);
- left: 12px !important;
- }
-
- .el-picker-panel *[slot='sidebar'],
- .el-picker-panel__sidebar {
- display: none;
- }
-
- .el-picker-panel *[slot='sidebar'] + .el-picker-panel__body,
- .el-picker-panel__sidebar + .el-picker-panel__body {
- margin-left: 0;
- }
-}
-
-// 修改el-button样式
-.el-button {
- &.el-button--text {
- background-color: transparent !important;
- padding: 0 !important;
-
- span {
- margin-left: 0 !important;
- }
- }
-}
-
-// 修改el-tag样式
-.el-tag {
- font-weight: 500;
- transition: all 0s !important;
-
- &.el-tag--default {
- height: 26px !important;
- }
-}
-
-.el-checkbox-group {
- &.el-table-filter__checkbox-group label.el-checkbox {
- height: 17px !important;
-
- .el-checkbox__label {
- font-weight: 400 !important;
- }
- }
-}
-
-.el-radio--default {
- // 优化单选按钮大小
-
- .el-radio__input {
- .el-radio__inner {
- width: 16px;
- height: 16px;
-
- &::after {
- width: 6px;
- height: 6px;
- }
- }
- }
-}
-
-.el-checkbox {
- .el-checkbox__inner {
- border-radius: 2px !important;
- }
-}
-
-// 优化复选框样式
-.el-checkbox--default {
- .el-checkbox__inner {
- width: 16px !important;
- height: 16px !important;
- border-radius: 4px !important;
-
- &::before {
- content: '';
- height: 4px !important;
- top: 5px !important;
- background-color: #FFFFFF !important;
- transform: scale(0.6) !important;
- }
- }
-
- .is-checked {
- .el-checkbox__inner {
- &::after {
- width: 3px;
- height: 8px;
- margin: auto;
- border: 2px solid var(--el-checkbox-checked-icon-color);
- border-left: 0;
- border-top: 0;
- transform: translate(-45%, -60%) rotate(45deg) scale(0.86) !important;
- transform-origin: center;
- }
- }
- }
-}
-
-.el-notification .el-notification__icon {
- font-size: 22px !important;
-}
-
-// 修改 el-message-box 样式
-.el-message-box__headerbtn .el-message-box__close,
-.el-dialog__headerbtn .el-dialog__close {
- top: 7px;
- right: 7px;
- width: 30px;
- height: 30px;
- border-radius: 5px;
- transition: all 0.3s;
-
- &:hover {
- background-color: var(--art-hover-color) !important;
- color: var(--art-gray-900) !important;
- }
-}
-
-.el-message-box {
- padding: 25px 20px !important;
-}
-
-.el-message-box__title {
- font-weight: 500 !important;
-}
-
-.el-table__column-filter-trigger i {
- color: var(--theme-color) !important;
- margin: -3px 0 0 2px;
-}
-
-// 去除 el-dropdown 鼠标放上去出现的边框
-.el-tooltip__trigger:focus-visible {
- outline: unset;
-}
-
-// ipad 表单右侧按钮优化
-@media screen and (max-width: 1180px) {
- .el-table-fixed-column--right {
- padding-right: 0 !important;
- }
-}
-
-.login-out-dialog {
- padding: 30px 20px !important;
- border-radius: 10px !important;
-}
-
-// 修改 dialog 动画
-.dialog-fade-enter-active {
- .el-dialog:not(.is-draggable) {
- animation: dialog-open 0.3s cubic-bezier(0.32, 0.14, 0.15, 0.86);
-
- // 修复 el-dialog 动画后宽度不自适应问题
-
- .el-select__selected-item {
- display: inline-block;
- }
- }
-}
-
-.dialog-fade-leave-active {
- animation: fade-out 0.2s linear;
-
- .el-dialog:not(.is-draggable) {
- animation: dialog-close 0.5s !important;
- }
-}
-
-@keyframes dialog-open {
- 0% {
- opacity: 0;
- transform: scale(0.2);
- }
-
- 100% {
- opacity: 1;
- transform: scale(1);
- }
-}
-
-@keyframes dialog-close {
- 0% {
- opacity: 1;
- transform: scale(1);
- }
-
- 100% {
- opacity: 0;
- transform: scale(0.2);
- }
-}
-
-// 遮罩层动画
-@keyframes fade-out {
- 0% {
- opacity: 1;
- }
-
- 100% {
- opacity: 0;
- }
-}
-
-// 修改 el-select 样式
-/* .el-select__popper:not(.el-tree-select__popper) {
- .el-select-dropdown__list {
- padding: 5px !important;
-
- .el-select-dropdown__item {
- height: 34px !important;
- line-height: 34px !important;
- border-radius: 6px !important;
-
- &.is-selected {
- color: var(--art-gray-900) !important;
- font-weight: 400 !important;
- background-color: var(--art-el-active-color) !important;
- margin-bottom: 4px !important;
- }
-
- &:hover {
- background-color: var(--art-hover-color) !important;
- }
- }
-
- .el-select-dropdown__item:hover ~ .is-selected,
- .el-select-dropdown__item.is-selected:has(~ .el-select-dropdown__item:hover) {
- background-color: transparent !important;
- }
- }
-} */
-
-// 修改 el-tree-select 样式
-.el-tree-select__popper {
- .el-select-dropdown__list {
- padding: 5px !important;
-
- .el-tree-node {
- .el-tree-node__content {
- height: 36px !important;
- border-radius: 6px !important;
-
- &:hover {
- background-color: var(--art-gray-200) !important;
- }
- }
- }
- }
-}
-
-// 实现水波纹在文字下面效果
-.el-button > span {
- position: relative;
- z-index: 10;
-}
-
-// 优化颜色选择器圆角
-.el-color-picker__color {
- border-radius: 2px !important;
-}
-
-// 优化日期时间选择器底部圆角
-.el-picker-panel {
- .el-picker-panel__footer {
- border-radius: 0 0 var(--el-border-radius-base) var(--el-border-radius-base);
- }
-}
-
-// 优化树型菜单样式
-.el-tree-node__content {
- border-radius: 4px;
- margin-bottom: 4px;
- padding: 1px 0;
-
- &:hover {
- background-color: var(--art-hover-color) !important;
- }
-}
-
-.dark {
- .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
- background-color: var(--art-gray-300) !important;
- }
-}
-
-// 隐藏折叠菜单弹窗 hover 出现的边框
-.menu-left-popper:focus-within,
-.horizontal-menu-popper:focus-within {
- box-shadow: none !important;
- outline: none !important;
-}
-
-// 数字输入组件右侧按钮高度跟随自定义组件高度
-.el-input-number--default.is-controls-right {
- .el-input-number__decrease,
- .el-input-number__increase {
- height: calc((var(--el-component-size) / 2)) !important;
- }
-}
diff --git a/src/assets/scss/el-ui.scss b/src/assets/stylus/temp.styl
similarity index 65%
rename from src/assets/scss/el-ui.scss
rename to src/assets/stylus/temp.styl
index 7758dfd..416b31e 100644
--- a/src/assets/scss/el-ui.scss
+++ b/src/assets/stylus/temp.styl
@@ -1,167 +1,3 @@
-// 优化 Element Plus 组件库默认样式
-
-:root {
- --custom-radius: 5px;
- // 系统主色
- --main-color: #1C6EFF;
- --el-color-white: white !important;
- --el-color-black: white !important;
- --el-color-primary: #1C6EFF;
- --el-button-hover-bg-color: #458FFF;
- --el-button-hover-border-color: #458FFF;
- --el-color-primary-light-3: #458FFF;
- --el-color-danger: #CF171D;
- // 输入框边框颜色
- // --el-border-color: #E4E4E7 !important; // DCDFE6
- // 按钮粗度
- --el-font-weight-primary: 400 !important;
-
- --el-component-custom-height: 32px !important;
-
- --el-component-size: var(--el-component-custom-height) !important;
-
- // 边框、按钮圆角...
- --el-border-radius-base: calc(var(--custom-radius) / 3 + 2px) !important;
-
- --el-border-radius-small: calc(var(--custom-radius) / 3 + 4px) !important;
- --el-messagebox-border-radius: calc(var(--custom-radius) / 3 + 4px) !important;
- --el-popover-border-radius: calc(var(--custom-radius) / 3 + 4px) !important;
-
- .region .el-radio-button__original-radio:checked + .el-radio-button__inner {
- color: var(--theme-color);
- }
-}
-
-// 优化 el-form-item 标签高度
-.el-form-item__label {
- height: var(--el-component-custom-height) !important;
- line-height: var(--el-component-custom-height) !important;
-}
-
-// 日期选择器
-.el-date-range-picker {
- --el-datepicker-inrange-bg-color: var(--art-gray-200) !important;
-}
-
-// el-card 背景色跟系统背景色保持一致
-html.dark .el-card {
- --el-card-bg-color: var(--default-box-color) !important;
-}
-
-.el-pagination {
- justify-content: center;
-
- .el-pager {
- li {
- box-sizing: border-box;
- font-weight: 400 !important;
- border: 1px solid #E6EAEB;
- transition: border-color 0.15s;
- padding: 0 10px !important;
-
- &:not(.is-active) {
- background-color: transparent !important;
- }
-
- &:hover {
- border-color: var(--main-color) !important;
- }
- }
- }
-
- .el-pagination__jump {
- .el-input {
- height: 32px;
- }
- }
-}
-
-
-// 优化菜单折叠展开动画(提升动画流畅度)
-.el-menu.el-menu--inline {
- transition: max-height 0.26s cubic-bezier(0.4, 0, 0.2, 1) !important;
-}
-
-.el-sub-menu {
- position: relative;
-}
-
-.el-sub-menu .el-sub-menu__icon-arrow {
- position: absolute;
- top: 50%;
- right: var(--el-menu-base-level-padding);
- margin-top: -6px;
- transition: transform var(--el-transition-duration);
- font-size: 12px;
- margin-right: 0;
- display: block;
- width: auto;
-}
-
-// 优化菜单 item hover 动画(提升鼠标跟手感)
-.el-sub-menu__title,
-.el-menu-item {
- height: 42px !important;
- margin-bottom: 4px;
- line-height: 42px !important;
- transition: background-color 0s !important;
- width: calc(100% - 16px);
- margin-left: 8px;
- border-radius: 6px;
-
- &:hover {
- background-color: #F2F4F5 !important;
- }
-}
-
-.menus:not(.el-menu--collapse) {
- width: 230px;
-}
-
-.el-menu--collapse {
- width: calc(16px + var(--el-menu-icon-width) + var(--el-menu-base-level-padding) * 2);
-}
-
-.el-menu-item.is-active {
- background-color: rgb(238, 243, 255);
-}
-
-// -------------------------------- 修改 el-size=default 组件默认高度 start --------------------------------
-// 修改 el-button 高度
-.el-button--default {
- height: var(--el-component-custom-height) !important;
-}
-
-// circle 按钮宽度优化
-.el-button--default.is-circle {
- width: var(--el-component-custom-height) !important;
-}
-
-// 修改 el-select 高度
-.el-select--default {
- .el-select__wrapper {
- min-height: var(--el-component-custom-height) !important;
- }
-}
-
-// 修改 el-checkbox-button 高度
-.el-checkbox-button--default .el-checkbox-button__inner,
- // 修改 el-radio-button 高度
-.el-radio-button--default .el-radio-button__inner {
- padding: 10px 15px !important;
-}
-
-.el-scrollbar__bar.is-vertical {
- width: 4px;
-}
-
-// -------------------------------- 修改 el-size=default 组件默认高度 end --------------------------------
-
-.el-pagination.is-background .btn-next,
-.el-pagination.is-background .btn-prev,
-.el-pagination.is-background .el-pager li {
- border-radius: 6px;
-}
.el-popover {
min-width: 80px;
@@ -188,6 +24,7 @@ html.dark .el-card {
.el-dialog.el-dialog-border {
.el-dialog__body {
// 上边框
+
&::before,
// 下边框
&::after {
@@ -209,13 +46,14 @@ html.dark .el-card {
}
}
+
// el-message 样式优化
.el-message {
background-color: var(--default-box-color) !important;
border: 0 !important;
box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08),
- 0 3px 6px -4px rgba(0, 0, 0, 0.12),
- 0 9px 28px 8px rgba(0, 0, 0, 0.05) !important;
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05) !important;
p {
font-size: 13px;
@@ -315,6 +153,7 @@ html.dark .el-card {
.el-radio--default {
// 优化单选按钮大小
+
.el-radio__input {
.el-radio__inner {
width: 16px;
@@ -422,6 +261,7 @@ html.dark .el-card {
animation: dialog-open 0.3s cubic-bezier(0.32, 0.14, 0.15, 0.86);
// 修复 el-dialog 动画后宽度不自适应问题
+
.el-select__selected-item {
display: inline-block;
}
@@ -432,7 +272,7 @@ html.dark .el-card {
animation: fade-out 0.2s linear;
.el-dialog:not(.is-draggable) {
- animation: dialog-close 0.5s;
+ animation: dialog-close 0.5s !important;
}
}
diff --git a/src/components/page/FormPage.vue b/src/components/page/FormPage.vue
index 01b4717..0f62445 100644
--- a/src/components/page/FormPage.vue
+++ b/src/components/page/FormPage.vue
@@ -300,6 +300,7 @@ onMounted(doSearch)
-
@@ -331,7 +331,6 @@ onMounted(doSearch)
width 100%;
}
-
.border-form {
:deep(.el-form-item) {
&:not(.form-action-btn) {
@@ -379,6 +378,7 @@ onMounted(doSearch)
.el-form-item.form-action-btn {
grid-column: 1 / -1;
+
.el-form-item__content {
justify-content end
}
@@ -491,6 +491,16 @@ onMounted(doSearch)
}
}
+
+ .pagination {
+ justify-content center
+
+ :deep(.btn-next),
+ :deep(.btn-prev),
+ :deep(.el-pager) li {
+ border-radius: 6px !important;
+ }
+ }
}
}
diff --git a/src/dts/components.d.ts b/src/dts/components.d.ts
index 0083a8f..7baa19c 100644
--- a/src/dts/components.d.ts
+++ b/src/dts/components.d.ts
@@ -5,6 +5,7 @@
// ------
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
+import { GlobalComponents } from 'vue'
export {}
@@ -14,10 +15,8 @@ declare module 'vue' {
ElAside: typeof import('element-plus/es')['ElAside']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElButton: typeof import('element-plus/es')['ElButton']
- ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
- ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
@@ -44,7 +43,6 @@ declare module 'vue' {
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
- ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
@@ -71,10 +69,8 @@ declare global {
const ElAside: typeof import('element-plus/es')['ElAside']
const ElAvatar: typeof import('element-plus/es')['ElAvatar']
const ElButton: typeof import('element-plus/es')['ElButton']
- const ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
const ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
const ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
- const ElCol: typeof import('element-plus/es')['ElCol']
const ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
const ElContainer: typeof import('element-plus/es')['ElContainer']
const ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
@@ -101,7 +97,6 @@ declare global {
const ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
const ElRadio: typeof import('element-plus/es')['ElRadio']
const ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
- const ElRow: typeof import('element-plus/es')['ElRow']
const ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
const ElSelect: typeof import('element-plus/es')['ElSelect']
const ElSwitch: typeof import('element-plus/es')['ElSwitch']
@@ -117,4 +112,4 @@ declare global {
const ElUpload: typeof import('element-plus/es')['ElUpload']
const RouterLink: typeof import('vue-router')['RouterLink']
const RouterView: typeof import('vue-router')['RouterView']
-}
+}
\ No newline at end of file
diff --git a/src/pages/a-frame/AAside.tsx b/src/pages/a-frame/AAside.tsx
index dfe4c4a..245a2c5 100644
--- a/src/pages/a-frame/AAside.tsx
+++ b/src/pages/a-frame/AAside.tsx
@@ -118,13 +118,13 @@ export default defineComponent(
return () => (
<>
-
+
{{
default: () => menuTree.value.map(renderMenu),
}}
{
isCollapse.value = !isCollapse.value
}}
diff --git a/src/pages/a-frame/AFrame.vue b/src/pages/a-frame/AFrame.vue
index 6f7dfc7..1da22fc 100644
--- a/src/pages/a-frame/AFrame.vue
+++ b/src/pages/a-frame/AFrame.vue
@@ -35,7 +35,7 @@ onUnmounted(() => {
-
+
diff --git a/src/pages/a-frame/aaside.module.styl b/src/pages/a-frame/aaside.module.styl
index 4f50796..bc3859f 100644
--- a/src/pages/a-frame/aaside.module.styl
+++ b/src/pages/a-frame/aaside.module.styl
@@ -1,4 +1,52 @@
.a-menus {
+ height: 100%;
+ --el-menu-base-level-padding: 10px;
+ border: none;
+
+ &:not(:global(.el-menu--collapse)) {
+ width: 230px;
+ }
+
+ &:global(.el-menu--collapse) {
+ width: 60px;
+ }
+
+ :global(.el-menu-item):global(.is-active) {
+ background-color #e8f4ff
+
+ &::after {
+ height: 100%;
+ }
+ }
+
+ :global(.el-menu-item) {
+ position relative
+ transition: background-color, color .3s ease-in-out;
+ border-radius 4px
+
+ &::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 4px;
+ height: 0;
+ background-color: #1c6eff;
+ transition height 0.3s ease-in-out
+ }
+ }
+
+ :global(.el-sub-menu__title),
+ :global(.el-menu-item) {
+ height: 42px !important;
+ line-height: 42px !important;
+ margin-left: 8px;
+ margin-right: 8px;
+
+ &:hover {
+ background-color: #F2F4F5 !important;
+ }
+ }
}
.a-icon {
@@ -9,3 +57,18 @@
font-size: 18px;
flex-shrink: 0;
}
+
+
+.a-collapse-btn {
+ position: absolute;
+ right: 6px;
+ bottom: 6px;
+ width: 32px;
+ height: 32px;
+ transition right 0.3s ease-in-out;
+
+ &.a-collapse-btn-collapse {
+ right: calc(50% - 16px);
+ }
+}
+
diff --git a/vite.config.ts b/vite.config.ts
index 1861ec3..c60e453 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -16,16 +16,9 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import { fileWatcher } from './plugin/file-watcher.ts'
import IconfontProcess from './plugin/iconfont-process.ts'
-// import * as https from "node:https";
-
// https://vite.dev/config/
export default defineConfig((configEnv) => {
const env = loadEnv(configEnv.mode, process.cwd(), '')
- // const Agent = https.Agent;
- // const agent = new Agent({
- // keepAlive: true,
- // // host: 'https://supervisory.njzscloud.com' // 显式指定请求的主机名为目标域名
- // });
return {
base: env.VITE_APP_BASE_URL,
build: {
@@ -37,15 +30,6 @@ export default defineConfig((configEnv) => {
modules: {
localsConvention: 'camelCase',
},
- /* preprocessorOptions: {
- scss: {
- additionalData: `
- @use "@/assets/scss/el-ui.scss" as *;
- @use "@/assets/scss/el-light.scss" as *;
- @use "@/assets/scss/mixin.scss" as *;
- `,
- },
- }, */
},
plugins: [
vue(),
@@ -86,14 +70,14 @@ export default defineConfig((configEnv) => {
proxyTimeout: 10000,
target: env.VITE_HTTP_PROXY_TARGET,
secure: false,
-
- // agent,
-
changeOrigin: true,
rewrite: (path) => (env.VITE_HTTP_SERVER_BASE_URL == null || env.VITE_HTTP_SERVER_BASE_URL == '/' ? path : path.replace(new RegExp(env.VITE_HTTP_SERVER_BASE_URL), '')),
} as ProxyOptions,
[env.VITE_WS_SERVER_BASE_URL]: {
+ proxyTimeout: 10000,
ws: true,
+ secure: false,
+ changeOrigin: true,
target: env.VITE_WS_PROXY_TARGET,
rewrite: (path) => (env.VITE_WS_SERVER_BASE_URL == null || env.VITE_WS_SERVER_BASE_URL == '/' ? path : path.replace(new RegExp(env.VITE_WS_SERVER_BASE_URL), '')),
} as ProxyOptions,