From 1c829f9177eab675b22be4d20ef2761ed1bbb423 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 15 九月 2026 16:15:48 +0800
Subject: [PATCH] refactor(layout): 调整布局样式并优化轮播卡片组件
---
src/views/reportAnalysis/PSIDataAnalysis/components/CarouselCards.vue | 70 +++++++++++++++++-----------------
1 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/CarouselCards.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/CarouselCards.vue
index 0498824..b9c4dd4 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/CarouselCards.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/CarouselCards.vue
@@ -1,11 +1,14 @@
<template>
<div class="carousel-cards">
- <button
+ <button
v-if="canScrollLeft"
class="nav-button nav-button-left"
+ aria-label="鍚戝乏婊氬姩"
@click="scrollLeftFn"
>
- <img src="@/assets/BI/jiantou.png" alt="宸︾澶�" />
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M15 18l-6-6 6-6"/>
+ </svg>
</button>
<div
class="cards-container"
@@ -30,12 +33,15 @@
</div>
</div>
</div>
- <button
+ <button
v-if="canScrollRight"
class="nav-button nav-button-right"
+ aria-label="鍚戝彸婊氬姩"
@click="scrollRightFn"
>
- <img src="@/assets/BI/jiantou.png" alt="鍙崇澶�" />
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M9 6l6 6-6 6"/>
+ </svg>
</button>
</div>
</template>
@@ -186,42 +192,32 @@
position: absolute;
top: 50%;
transform: translateY(-50%);
- width: 32px;
- height: 32px;
- background: rgba(26, 88, 176, 0.6);
- border: 1px solid rgba(26, 88, 176, 0.8);
+ width: 28px;
+ height: 28px;
+ background: var(--bi-panel-bg, rgba(20, 32, 66, 0.55));
+ border: 1px solid var(--bi-panel-border, #1e3160);
border-radius: 50%;
+ color: var(--bi-text, #8fa3c8);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
- transition: all 0.3s ease;
+ transition: color 0.2s ease, border-color 0.2s ease;
padding: 0;
}
.nav-button:hover {
- background: rgba(26, 88, 176, 0.8);
- transform: translateY(-50%) scale(1.1);
+ color: var(--bi-text-strong, #eaf1ff);
+ border-color: var(--bi-accent-bright, #4a6cf0);
}
.nav-button-left {
- left: -16px;
-}
-
-.nav-button-left img {
- width: 16px;
- height: 16px;
- transform: rotate(180deg);
+ left: -14px;
}
.nav-button-right {
- right: -16px;
-}
-
-.nav-button-right img {
- width: 16px;
- height: 16px;
+ right: -14px;
}
.card-item {
@@ -229,14 +225,17 @@
min-width: calc((100% - (var(--visible-count) - 1) * 12px) / var(--visible-count));
display: flex;
align-items: center;
- background: linear-gradient(269deg, rgba(27,57,126,0.13) 0%, rgba(33,137,206,0.33) 98.13%, #24AFF4 100%);
- border-radius: 8px 8px 8px 8px;
+ background: var(--bi-panel-bg, rgba(20, 32, 66, 0.55));
+ border: 1px solid var(--bi-panel-border, #1e3160);
+ border-left: 2px solid var(--bi-accent-bright, #4a6cf0);
+ border-radius: 6px;
padding: 12px 16px;
- transition: all 0.3s ease;
+ transition: border-color 0.2s ease, background-color 0.2s ease;
}
.card-item:hover {
- transform: translateY(-2px);
+ background: rgba(33, 49, 96, 0.65);
+ border-color: var(--bi-accent-bright, #4a6cf0);
}
.card-icon {
@@ -259,7 +258,7 @@
.card-label {
font-weight: 400;
font-size: 14px;
- color: #FFFFFF;
+ color: var(--bi-text, #8fa3c8);
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
@@ -280,7 +279,7 @@
gap: 6px;
font-weight: 400;
font-size: 12px;
- color: rgba(255, 255, 255, 0.85);
+ color: var(--bi-text, #8fa3c8);
}
.rate-label {
@@ -292,15 +291,16 @@
}
.value-number {
- font-weight: 400;
- font-size: 14px;
- color: #FFFFFF;
+ font-weight: 500;
+ font-size: 16px;
+ color: var(--bi-text-strong, #eaf1ff);
line-height: 1;
+ font-variant-numeric: tabular-nums;
}
.value-unit {
- font-size: 14px;
- color: #FFFFFF;
+ font-size: 12px;
+ color: var(--bi-text, #8fa3c8);
font-weight: 400;
}
</style>
--
Gitblit v1.9.3