From a99e82da2b087d7019cdce015c25befc620b9d61 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 10 十一月 2026 14:14:16 +0800
Subject: [PATCH] 测试完成
---
src/components/StatisticsCards/index.vue | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/components/StatisticsCards/index.vue b/src/components/StatisticsCards/index.vue
index 1b45c11..8365c09 100644
--- a/src/components/StatisticsCards/index.vue
+++ b/src/components/StatisticsCards/index.vue
@@ -17,10 +17,14 @@
>
<el-card
shadow="hover"
- :body-style="item.router ? 'cursor: pointer' : 'cursor: default'"
+ :body-style="isClickable(item) ? 'cursor: pointer' : 'cursor: default'"
:class="getCardClass(item.name)"
+ @click.native="handleCardClick(item)"
>
- <div class="card-content" @click="handleCardClick(item)">
+ <div
+ class="card-content"
+ :style="{ cursor: isClickable(item) ? 'pointer' : 'default' }"
+ >
<div class="card-label">
<span class="label-text">{{ item.name }}</span>
</div>
@@ -67,6 +71,11 @@
type: Boolean,
default: false,
},
+ // 鏄惁鍏佽鐐瑰嚮鍗$墖锛堢偣鍑诲悗鐢辩埗缁勪欢鍐冲畾濡備綍绛涢�変笅闈㈢殑鍒楄〃锛�
+ clickable: {
+ type: Boolean,
+ default: false,
+ },
},
computed: {
mergedCardList() {
@@ -105,6 +114,7 @@
鏃犻渶闅忚: "no-follow-card",
闇�闅忚: "need-follow-card",
寰呴殢璁�: "pending-card",
+ 鍙戦�佸け璐�: "failed-card",
宸插畬鎴�: "completed-card",
浣忛櫌鎬婚噺: "total-card",
闂ㄨ瘖鎬婚噺: "total-card",
@@ -135,6 +145,9 @@
return tooltips[name] || "";
},
+ isClickable(item) {
+ return !!(item && item.router) || this.clickable;
+ },
handleCardClick(item) {
if (item.router) {
this.$router.push(item.router);
@@ -243,6 +256,15 @@
}
/* 寮傚父 - 娴呯孩鑹� */
+/* 鍙戦�佸け璐� - 娴呯孩 */
+.failed-card .el-card__body {
+ background: #ffeaea;
+ border-radius: 10px;
+}
+.failed-card .card-value {
+ color: #e04040;
+}
+
.error-card .el-card__body {
background: #fce4ec;
border-radius: 10px;
--
Gitblit v1.9.3