修改首页快捷入口

This commit is contained in:
jacky 2024-04-22 13:02:08 +08:00
parent 1d8b06b863
commit ac53d63b78
1 changed files with 78 additions and 72 deletions

View File

@ -12,24 +12,12 @@
<div class="gva-card quick-entrance"> <div class="gva-card quick-entrance">
<div class="gva-card-title">快捷入口</div> <div class="gva-card-title">快捷入口</div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col <el-col v-for="(card, key) in toolCards" :key="key" :span="4" :xs="8" class="quick-entrance-items"
v-for="(card, key) in toolCards" @click="toTarget(card.name)">
:key="key"
:span="4"
:xs="8"
class="quick-entrance-items"
@click="toTarget(card.name)"
>
<div class="quick-entrance-item"> <div class="quick-entrance-item">
<div <div class="quick-entrance-item-icon" :style="{ backgroundColor: card.bg }">
class="quick-entrance-item-icon"
:style="{ backgroundColor: card.bg }"
>
<el-icon> <el-icon>
<component <component :is="card.icon" :style="{ color: card.color }" />
:is="card.icon"
:style="{ color: card.color }"
/>
</el-icon> </el-icon>
</div> </div>
<p>{{ card.label }}</p> <p>{{ card.label }}</p>
@ -89,9 +77,9 @@ const toolCards = ref([
bg: 'rgba(255, 133, 192,.3)' bg: 'rgba(255, 133, 192,.3)'
}, },
{ {
label: '用户管理', label: '部门管理',
icon: 'monitor', icon: 'monitor',
name: 'user', name: 'organize',
color: '#ff9c6e', color: '#ff9c6e',
bg: 'rgba(255, 156, 110,.3)' bg: 'rgba(255, 156, 110,.3)'
}, },
@ -108,65 +96,83 @@ const toTarget = (name) => {
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
@apply p-0; @apply p-0;
.gva-card-box { .gva-card-box {
@apply p-4; @apply p-4;
&+.gva-card-box { &+.gva-card-box {
@apply pt-0; @apply pt-0;
} }
} }
.gva-card { .gva-card {
@apply box-border bg-white rounded h-auto px-6 py-8 overflow-hidden shadow-sm; @apply box-border bg-white rounded h-auto px-6 py-8 overflow-hidden shadow-sm;
.gva-card-title { .gva-card-title {
@apply pb-5 border-t-0 border-l-0 border-r-0 border-b border-solid border-gray-100; @apply pb-5 border-t-0 border-l-0 border-r-0 border-b border-solid border-gray-100;
} }
} }
.gva-top-card { .gva-top-card {
@apply h-48 flex items-center justify-between text-gray-500; @apply h-48 flex items-center justify-between text-gray-500;
&-left { &-left {
@apply h-full flex flex-col w-auto; @apply h-full flex flex-col w-auto;
&-title { &-title {
@apply text-3xl text-gray-600; @apply text-3xl text-gray-600;
} }
&-dot { &-dot {
@apply mt-4 text-gray-600 text-lg; @apply mt-4 text-gray-600 text-lg;
} }
&-item { &-item {
+.gva-top-card-left-item { +.gva-top-card-left-item {
margin-top: 24px; margin-top: 24px;
} }
margin-top: 14px; margin-top: 14px;
} }
} }
&-right { &-right {
height: 600px; height: 600px;
width: 600px; width: 600px;
margin-top: 28px; margin-top: 28px;
} }
} }
::v-deep(.el-card__header) { ::v-deep(.el-card__header) {
@apply p-0 border-gray-200; @apply p-0 border-gray-200;
} }
.card-header { .card-header {
@apply pb-5 border-b border-solid border-gray-200 border-t-0 border-l-0 border-r-0; @apply pb-5 border-b border-solid border-gray-200 border-t-0 border-l-0 border-r-0;
} }
.quick-entrance-items { .quick-entrance-items {
@apply flex items-center justify-center text-center text-gray-800; @apply flex items-center justify-center text-center text-gray-800;
.quick-entrance-item { .quick-entrance-item {
@apply px-8 py-6 flex items-center flex-col transition-all duration-100 ease-in-out rounded-lg cursor-pointer; @apply px-8 py-6 flex items-center flex-col transition-all duration-100 ease-in-out rounded-lg cursor-pointer;
&:hover { &:hover {
@apply shadow-lg; @apply shadow-lg;
} }
&-icon { &-icon {
@apply flex items-center h-16 w-16 rounded-lg justify-center mx-0 my-auto text-2xl; @apply flex items-center h-16 w-16 rounded-lg justify-center mx-0 my-auto text-2xl;
} }
p { p {
@apply mt-2.5; @apply mt-2.5;
} }
} }
} }
} }
.dashboard-icon { .dashboard-icon {
@apply flex items-center text-xl mr-2 text-blue-400; @apply flex items-center text-xl mr-2 text-blue-400;
} }
</style> </style>