1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-18 15:59:16 +08:00

feat: Dealing with Sass version compatibility issues and removing debugger from build (#7669)

This commit is contained in:
2025-01-08 15:21:38 +08:00 committed by GitHub
parent 6c08a3114a
commit 3650ff27b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 13 deletions

View File

@ -39,5 +39,5 @@ defineProps<{ menuList: RouteRecordRaw[] }>();
</script>
<style scoped lang="scss">
@import '../index.scss';
@use '../index';
</style>

View File

@ -13,16 +13,16 @@
&:hover {
.el-icon {
color: $primary-color;
color: var(--el-color-primary);
}
span {
color: $primary-color;
color: var(--el-color-primary);
}
}
&.is-active {
background-color: var(--el-menu-item-bg-color-active);
border: 2px solid $primary-color;
border: 2px solid var(--el-color-primary);
&::before {
position: absolute;
@ -31,7 +31,7 @@
width: 4px;
height: 14px;
content: '';
background: $primary-color;
background: var(--el-color-primary);
}
}
}
@ -39,26 +39,26 @@
&.is-active {
.el-sub-menu__title {
span {
color: $primary-color;
color: var(--el-color-primary);
}
.el-icon {
color: $primary-color;
color: var(--el-color-primary);
}
}
}
.el-sub-menu__title {
background-color: var(--el-menu-item-bg-color);
box-shadow: 0px 0px 4px rgba(0, 94, 235, 0.1);
box-shadow: 0 0 4px rgba(0, 94, 235, 0.1);
height: 46px;
border-radius: 4px;
&:hover {
.el-icon {
color: $primary-color;
color: var(--el-color-primary);
}
span {
color: $primary-color;
color: var(--el-color-primary);
}
}
}

View File

@ -36,7 +36,7 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted, defineEmits } from 'vue';
import { ref, computed, onMounted } from 'vue';
import { RouteRecordRaw, useRoute } from 'vue-router';
import { loadingSvg } from '@/utils/svg';
import Logo from './components/Logo.vue';
@ -192,7 +192,14 @@ onMounted(() => {
</script>
<style lang="scss">
@import './index.scss';
@use 'index';
.custom-menu .el-menu-item {
white-space: normal !important;
word-break: break-word;
overflow-wrap: break-word;
line-height: normal;
}
.custom-menu .el-menu-item {
white-space: normal !important;

View File

@ -630,7 +630,7 @@ onUnmounted(() => {
</script>
<style scoped lang="scss">
@import '../index.scss';
@use '../index';
@media only screen and (max-width: 1400px) {
.install-card-col-12 {
max-width: 100%;

View File

@ -32,6 +32,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
preprocessorOptions: {
scss: {
additionalData: `@use "@/styles/var.scss" as *;`,
api: 'modern',
},
},
},
@ -84,6 +85,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
],
esbuild: {
pure: viteEnv.VITE_DROP_CONSOLE ? ['console.log'] : [],
drop: viteEnv.VITE_DROP_CONSOLE ? ['debugger'] : [],
},
build: {
outDir: '../cmd/server/web',