From b97c119ad9d23293d148c6aa8adf9076b39a6297 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 26 八月 2025 15:43:33 +0800
Subject: [PATCH] 更改日历样式
---
src/views/paiban/index.vue | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/views/paiban/index.vue b/src/views/paiban/index.vue
index 9a8ef92..4aa9839 100644
--- a/src/views/paiban/index.vue
+++ b/src/views/paiban/index.vue
@@ -124,9 +124,12 @@
const index= selectDate.value.findIndex(el=>{return el.y===year&&el.m===month&&el.d===date})
if (index>0){
console.log(day)
- day.type='start'
+ // 定义颜色映射
+ let color = ''
if (selectDate.value[index].透析单状态){
- day.type='end'
+ color = 'red'
+ } else {
+ color = 'blue'
}
day.text=selectDate.value[index].type
if (selectDate.value[index].timeSlot===0){
@@ -138,6 +141,7 @@
else {
day.bottomInfo='晚上'
}
+ day.className = `custom-day ${color}-text` // 添加自定义类名
}
return day
}
@@ -242,4 +246,18 @@
height: 36px;
line-height: 36px;
}
+
+/* 自定义文字颜色 */
+.red-text {
+ color: #ee0a24 !important; /* Vant 红色 */
+}
+
+.blue-text { /* 也可以换成蓝色 #0066cc */
+ color: #06c !important; /* 医疗蓝 */
+}
+
+/* 可选:让颜色更突出一点 */
+.custom-day {
+ font-weight: 500;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0