fix calendar popup height

This commit is contained in:
Timi
2026-08-02 00:50:45 +08:00
parent 60fb23e9e0
commit 2f9442e4a2
@@ -49,7 +49,13 @@
<div v-else-if="!currentMonthFilteredRecords.length" class="empty-block" v-text="emptyText" /> <div v-else-if="!currentMonthFilteredRecords.length" class="empty-block" v-text="emptyText" />
<t-popup v-model="dayRecordVisible" placement="bottom"> <t-popup v-model="dayRecordVisible" placement="bottom">
<div class="day-record-panel"> <div class="day-record-panel">
<div class="popup-head">
<h3 v-text="selectedDayTitle" /> <h3 v-text="selectedDayTitle" />
<t-button theme="default" variant="text" size="small" @click="dayRecordVisible = false">
关闭
</t-button>
</div>
<div class="popup-body">
<t-cell-group v-if="selectedDayRecords.length" theme="card"> <t-cell-group v-if="selectedDayRecords.length" theme="card">
<t-cell <t-cell
v-for="item in selectedDayRecords" v-for="item in selectedDayRecords"
@@ -61,10 +67,17 @@
</t-cell-group> </t-cell-group>
<div v-else class="empty-block">该日暂无登记事件记录</div> <div v-else class="empty-block">该日暂无登记事件记录</div>
</div> </div>
</div>
</t-popup> </t-popup>
<t-popup v-model="registrationEventFilterVisible" placement="bottom"> <t-popup v-model="registrationEventFilterVisible" placement="bottom">
<div class="filter-popup"> <div class="filter-popup">
<div class="popup-head">
<div class="title">登记事件筛选</div> <div class="title">登记事件筛选</div>
<t-button theme="default" variant="text" size="small" @click="registrationEventFilterVisible = false">
关闭
</t-button>
</div>
<div class="popup-body">
<t-checkbox-group v-model="selectedRegistrationEventIdListProxy" class="items"> <t-checkbox-group v-model="selectedRegistrationEventIdListProxy" class="items">
<t-checkbox <t-checkbox
class="item" class="item"
@@ -77,6 +90,7 @@
/> />
</t-checkbox-group> </t-checkbox-group>
</div> </div>
</div>
</t-popup> </t-popup>
</section> </section>
</template> </template>
@@ -346,6 +360,7 @@ function addMonths(date: Date, months: number): Date {
background: #f5f5f8; background: #f5f5f8;
border-radius: 1rem 1rem 0 0; border-radius: 1rem 1rem 0 0;
flex-direction: column; flex-direction: column;
max-height: min(80vh, 40rem);
h3, h3,
.title { .title {
@@ -355,11 +370,29 @@ function addMonths(date: Date, months: number): Date {
text-align: center; text-align: center;
font-weight: 700; font-weight: 700;
} }
.popup-head {
gap: .5rem;
display: flex;
padding: 0 1rem;
align-items: center;
justify-content: space-between;
}
.popup-body {
flex: 1;
overflow-y: auto;
}
} }
.filter-popup { .filter-popup {
padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0)) 1rem; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0)) 1rem;
.popup-head,
.popup-body {
padding: 0;
}
.items { .items {
gap: .5rem; gap: .5rem;
display: grid; display: grid;
@@ -413,7 +446,7 @@ function addMonths(date: Date, months: number): Date {
} }
.day-record-panel, .day-record-panel,
.registration-event-filter-panel { .filter-popup {
background: #10161f; background: #10161f;
h3, h3,