From c115a8486c6107de95f2001412207310a9cd9e00 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 26 八月 2025 20:45:43 +0800
Subject: [PATCH] 更新日历选择样式

---
 src/views/paiban/index.vue |   40 +++++++++++++---------------------------
 1 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/src/views/paiban/index.vue b/src/views/paiban/index.vue
index 4aa9839..3ded060 100644
--- a/src/views/paiban/index.vue
+++ b/src/views/paiban/index.vue
@@ -8,7 +8,6 @@
         />
         <div>
             <van-calendar
-                color="#769AFF"
                 :min-date="minDate"
                 @month-show="monthShow"
                 :poppable="false"
@@ -124,12 +123,10 @@
         const index= selectDate.value.findIndex(el=>{return el.y===year&&el.m===month&&el.d===date})
         if (index>0){
             console.log(day)
-            // 定义颜色映射
-            let color = ''
             if (selectDate.value[index].透析单状态){
-                color = 'red'
+                day.type='end'
             } else {
-                color = 'blue'
+                day.type='start'
             }
             day.text=selectDate.value[index].type
             if (selectDate.value[index].timeSlot===0){
@@ -141,8 +138,9 @@
             else {
                 day.bottomInfo='晚上'
             }
-            day.className = `custom-day ${color}-text` // 添加自定义类名
+            console.log(day,'有排班' )
         }
+
         return day
     }
     onMounted(()=>{
@@ -236,28 +234,16 @@
     }
 }
 
-.fanhui {
-    // padding-top: 20px;
-    width: 100%;
+/* eslint-disable selector-class-pattern */
+
+/* eslint-disable selector-pseudo-element-no-unknown */
+
+/* eslint-disable color-named */
+/* stylelint-disable selector-pseudo-class-no-unknown */
+
+:deep(.van-calendar__day--end) {
+    border-radius: 0 var(--van-border-radius-md) var(--van-border-radius-md) 0;
     background: #4696f9;
-    text-align: center;
-    border-radius: 5px;
-    color: #fff;
-    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