mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 00:02:51 +08:00
perf: 优化顶部展示
This commit is contained in:
parent
3bd87d7b25
commit
d6f15b48c7
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<n-layout-header bordered class="go-header">
|
<n-layout-header bordered class="go-header">
|
||||||
<header class="go-header-box">
|
<header class="go-header-box" :class="{ 'is-project': isProject }">
|
||||||
<div class="header-item left">
|
<div class="header-item left">
|
||||||
<n-space>
|
<n-space>
|
||||||
<slot name="left"></slot>
|
<slot name="left"></slot>
|
||||||
@ -23,9 +23,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
import { GoThemeSelect } from '@/components/GoThemeSelect'
|
import { GoThemeSelect } from '@/components/GoThemeSelect'
|
||||||
import { GoLangSelect } from '@/components/GoLangSelect'
|
import { GoLangSelect } from '@/components/GoLangSelect'
|
||||||
import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
import { ThemeColorSelect } from '@/components/Pages/ThemeColorSelect'
|
||||||
|
import { PageEnum } from '@/enums/pageEnum'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
const isProject = computed(() => {
|
||||||
|
return route.fullPath === PageEnum.BASE_HOME_ITEMS
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -33,7 +42,10 @@ $min-width: 520px;
|
|||||||
@include go(header) {
|
@include go(header) {
|
||||||
&-box {
|
&-box {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 33.33%);
|
grid-template-columns: repeat(3, 33%);
|
||||||
|
&.is-project {
|
||||||
|
grid-template-columns: none;
|
||||||
|
}
|
||||||
.header-item {
|
.header-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -49,7 +61,7 @@ $min-width: 520px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
height: $--header-height;
|
height: $--header-height;
|
||||||
padding: 0 60px;
|
padding: 0 20px 0 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user