From a261170567648a5b425077049835ce8b7fb0c466 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期二, 18 二月 2025 09:15:43 +0800
Subject: [PATCH] feat: 签约

---
 packages/components/src/Calendar/Calendar.vue |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/packages/components/src/Calendar/Calendar.vue b/packages/components/src/Calendar/Calendar.vue
index 251bdbb..c973d70 100644
--- a/packages/components/src/Calendar/Calendar.vue
+++ b/packages/components/src/Calendar/Calendar.vue
@@ -1,16 +1,17 @@
 <template>
   <div class="bole-calendar-wrapper">
-    <div class="bole-calendar-inner">
+    <div :class="['bole-calendar-inner', { isCollapse }]">
       <nut-calendar-card v-model="model" class="bole-calendar"></nut-calendar-card>
     </div>
-    <div class="bole-calendar-arrow">
-      <DownArrow :size="12" />
+    <div :class="['bole-calendar-arrow', { active: !isCollapse }]" @click="toggle">
+      <DownArrow :size="12" :class="['bole-calendar-arrow-icon']" />
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
 import { DownArrow } from '@nutui/icons-vue-taro';
+import { useToggle } from 'senin-mini/hooks';
 
 defineOptions({
   name: 'Calendar',
@@ -20,6 +21,8 @@
 
 // const props = withDefaults(defineProps<Props>(), {});
 const model = defineModel<Date | Date[]>();
+
+const { isCollapse, toggle } = useToggle(true);
 </script>
 
 <style lang="scss">
@@ -31,13 +34,28 @@
   }
 
   .bole-calendar-inner {
-    height: 500px;
-    overflow: hidden;
+    overflow: auto;
+    transition: all 1s ease;
+    max-height: 2000px;
+
+    &.isCollapse {
+      max-height: 500px;
+    }
   }
 
   .bole-calendar-arrow {
     display: flex;
     justify-content: center;
+
+    .bole-calendar-arrow-icon {
+      transition: all 0.2s linear;
+    }
+
+    &.active {
+      .bole-calendar-arrow-icon {
+        transform: rotate(180deg);
+      }
+    }
   }
 }
 </style>

--
Gitblit v1.9.1