Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 513f52fcb3 | |||
| c44d763e63 | |||
| 8d4ed8099c | |||
| b02fa37350 |
@@ -270,6 +270,8 @@ export default defineComponent({
|
|||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@sidebar-width: 1.2rem;
|
@sidebar-width: 1.2rem;
|
||||||
@cell-width: 1.8rem;
|
@cell-width: 1.8rem;
|
||||||
|
@portrait-header-height: 0.72rem;
|
||||||
|
@portrait-day-row-min-height: 1.16rem;
|
||||||
|
|
||||||
.matrix-wrapper {
|
.matrix-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -300,9 +302,12 @@ export default defineComponent({
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
pointer-events: none; /* allow click-through to cells underneath */
|
pointer-events: none; /* allow click-through to cells underneath */
|
||||||
|
|
||||||
.sidebar-corner {
|
.sidebar-corner {
|
||||||
|
height: @portrait-header-height;
|
||||||
|
box-sizing: border-box;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: #f7f8fa;
|
background: #f7f8fa;
|
||||||
border-bottom: 1px solid #e8e8e8;
|
border-bottom: 1px solid #e8e8e8;
|
||||||
@@ -312,7 +317,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-row {
|
.sidebar-row {
|
||||||
flex: 1;
|
flex: 1 0 @portrait-day-row-min-height;
|
||||||
|
min-height: @portrait-day-row-min-height;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -353,18 +359,20 @@ export default defineComponent({
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
min-width: fit-content;
|
min-width: fit-content;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ─── 行:共用 ─── */
|
/* ─── 行:共用 ─── */
|
||||||
.sr-header {
|
.sr-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
height: @portrait-header-height;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sr-row {
|
.sr-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1 0 @portrait-day-row-min-height;
|
||||||
min-height: 0;
|
min-height: @portrait-day-row-min-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ─── Spacer(占位与 sidebar 同宽) ─── */
|
/* ─── Spacer(占位与 sidebar 同宽) ─── */
|
||||||
@@ -484,6 +492,8 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-header {
|
.ml-header {
|
||||||
@@ -491,6 +501,9 @@ export default defineComponent({
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: #f7f8fa;
|
background: #f7f8fa;
|
||||||
border-bottom: 1px solid #e8e8e8;
|
border-bottom: 1px solid #e8e8e8;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-corner {
|
.ml-corner {
|
||||||
@@ -521,13 +534,18 @@ export default defineComponent({
|
|||||||
|
|
||||||
.ml-body {
|
.ml-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
min-height: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
padding-bottom: 0.08rem;
|
padding-bottom: 0.08rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml-row {
|
.ml-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 1 1 0;
|
||||||
|
min-height: 0;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,7 +564,7 @@ export default defineComponent({
|
|||||||
.ml-cell {
|
.ml-cell {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
min-height: 0.6rem;
|
min-height: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 0.02rem;
|
gap: 0.02rem;
|
||||||
|
|||||||
+19
-25
@@ -11,7 +11,7 @@
|
|||||||
<span class="view-toolbar__range" v-else>日历周视图</span>
|
<span class="view-toolbar__range" v-else>日历周视图</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="view-toolbar__actions">
|
<div class="view-toolbar__actions">
|
||||||
<div class="view-toolbar__orient">
|
<div v-if="viewMode === 'matrix'" class="view-toolbar__orient">
|
||||||
<van-button size="small" plain @click="isLandscape = !isLandscape">
|
<van-button size="small" plain @click="isLandscape = !isLandscape">
|
||||||
{{ isLandscape ? '退出横屏' : '横屏' }}
|
{{ isLandscape ? '退出横屏' : '横屏' }}
|
||||||
</van-button>
|
</van-button>
|
||||||
@@ -34,23 +34,15 @@
|
|||||||
<div v-if="isLandscape" class="landscape-shell">
|
<div v-if="isLandscape" class="landscape-shell">
|
||||||
<div class="landscape-shell__toolbar">
|
<div class="landscape-shell__toolbar">
|
||||||
<div class="landscape-shell__left">
|
<div class="landscape-shell__left">
|
||||||
<van-button size="small" plain @click="isLandscape = false">退出横屏</van-button>
|
<van-button size="small" @click="matrixGoToday">本周</van-button>
|
||||||
<van-button v-if="viewMode === 'matrix'" size="small" @click="matrixGoToday">本周</van-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="landscape-shell__title">
|
<div class="landscape-shell__title">
|
||||||
<template v-if="viewMode === 'matrix'">
|
<van-button size="small" @click="matrixGoPrev">‹</van-button>
|
||||||
<van-button size="small" @click="matrixGoPrev">‹</van-button>
|
<span>{{ matrixWeekRange }}</span>
|
||||||
<span>{{ matrixWeekRange }}</span>
|
<van-button size="small" @click="matrixGoNext">›</van-button>
|
||||||
<van-button size="small" @click="matrixGoNext">›</van-button>
|
|
||||||
</template>
|
|
||||||
<template v-else>日历周视图</template>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="landscape-shell__toggle">
|
<div class="landscape-shell__toggle">
|
||||||
<van-button
|
<van-button size="small" plain @click="isLandscape = false">退出横屏</van-button>
|
||||||
:type="viewMode === 'calendar' ? 'primary' : 'default'"
|
|
||||||
size="small" plain
|
|
||||||
@click="setViewMode('calendar')"
|
|
||||||
>日历</van-button>
|
|
||||||
<van-button
|
<van-button
|
||||||
:type="viewMode === 'matrix' ? 'primary' : 'default'"
|
:type="viewMode === 'matrix' ? 'primary' : 'default'"
|
||||||
size="small" plain
|
size="small" plain
|
||||||
@@ -59,16 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="landscape-shell__body" :class="{ 'landscape-shell__body--matrix': viewMode === 'matrix' }">
|
<div class="landscape-shell__body" :class="{ 'landscape-shell__body--matrix': viewMode === 'matrix' }">
|
||||||
<template v-if="viewMode === 'calendar'">
|
<template v-if="viewMode === 'matrix'">
|
||||||
<div class="landscape-stage-viewport">
|
|
||||||
<div class="landscape-stage">
|
|
||||||
<div class="calendar-wrapper calendar-wrapper--landscape">
|
|
||||||
<FullCalendar ref="calendar" :options="options" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div class="landscape-stage-viewport landscape-stage-viewport--matrix">
|
<div class="landscape-stage-viewport landscape-stage-viewport--matrix">
|
||||||
<div class="landscape-stage">
|
<div class="landscape-stage">
|
||||||
<div class="matrix-container matrix-container--landscape">
|
<div class="matrix-container matrix-container--landscape">
|
||||||
@@ -481,6 +464,9 @@ export default defineComponent({
|
|||||||
// 切换视图时缓存
|
// 切换视图时缓存
|
||||||
const setViewMode = (mode: 'calendar' | 'matrix') => {
|
const setViewMode = (mode: 'calendar' | 'matrix') => {
|
||||||
viewMode.value = mode;
|
viewMode.value = mode;
|
||||||
|
if (mode === 'calendar') {
|
||||||
|
isLandscape.value = false;
|
||||||
|
}
|
||||||
setKey('clazz_view_mode', mode);
|
setKey('clazz_view_mode', mode);
|
||||||
updateCalendarSize();
|
updateCalendarSize();
|
||||||
};
|
};
|
||||||
@@ -1265,7 +1251,15 @@ export default defineComponent({
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.matrix-sidebar) {
|
||||||
|
padding-bottom: calc(0.72rem + env(safe-area-inset-bottom));
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.matrix-scroll) {
|
:deep(.matrix-scroll) {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.scroll-inner) {
|
||||||
padding-bottom: calc(0.72rem + env(safe-area-inset-bottom));
|
padding-bottom: calc(0.72rem + env(safe-area-inset-bottom));
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
@@ -1473,7 +1467,7 @@ export default defineComponent({
|
|||||||
.landscape-stage-viewport--matrix {
|
.landscape-stage-viewport--matrix {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.landscape-stage {
|
.landscape-stage {
|
||||||
|
|||||||
Reference in New Issue
Block a user