优化底部操作栏样式,调整布局和背景色,并在分类编辑页面添加安全距离
This commit is contained in:
@@ -163,6 +163,13 @@ public class TransactionPeriodicService(
|
|||||||
.Where(d => d >= 1 && d <= 31)
|
.Where(d => d >= 1 && d <= 31)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
// 如果当前为月末,且配置中有大于当月天数的日期,则也执行
|
||||||
|
var daysInMonth = DateTime.DaysInMonth(today.Year, today.Month);
|
||||||
|
if (today.Day == daysInMonth && executeDays.Any(d => d > daysInMonth))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return executeDays.Contains(today.Day);
|
return executeDays.Contains(today.Day);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,7 +182,7 @@ public class TransactionPeriodicService(
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// 计算当前是本季度的第几天
|
// 计算当前是本季度的第几天
|
||||||
var quarterStartMonth = ((today.Month - 1) / 3) * 3 + 1;
|
var quarterStartMonth = (today.Month - 1) / 3 * 3 + 1;
|
||||||
var quarterStart = new DateTime(today.Year, quarterStartMonth, 1);
|
var quarterStart = new DateTime(today.Year, quarterStartMonth, 1);
|
||||||
var daysSinceQuarterStart = (today - quarterStart).Days + 1;
|
var daysSinceQuarterStart = (today - quarterStart).Days + 1;
|
||||||
|
|
||||||
|
|||||||
@@ -247,14 +247,27 @@
|
|||||||
color: #51cf66;
|
color: #51cf66;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 底部操作栏 */
|
||||||
.bottom-button {
|
.bottom-button {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(16px + env(safe-area-inset-bottom, 0px));
|
bottom: 0;
|
||||||
left: 16px;
|
left: 0;
|
||||||
right: 16px;
|
right: 0;
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
background-color: var(--van-background-2, #fff);
|
||||||
|
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.bottom-button {
|
||||||
|
background-color: var(--van-background-2, #2c2c2c);
|
||||||
|
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ===== 统一弹窗样式 ===== */
|
/* ===== 统一弹窗样式 ===== */
|
||||||
/* 弹窗容器 - 使用 flex 布局,确保标题固定,内容可滚动 */
|
/* 弹窗容器 - 使用 flex 布局,确保标题固定,内容可滚动 */
|
||||||
.popup-container {
|
.popup-container {
|
||||||
|
|||||||
@@ -58,12 +58,14 @@
|
|||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 底部安全距离 -->
|
||||||
|
<div style="height: calc(80px + env(safe-area-inset-bottom, 0px))"></div>
|
||||||
|
|
||||||
<div class="bottom-button">
|
<div class="bottom-button">
|
||||||
<!-- 新增分类按钮 -->
|
<!-- 新增分类按钮 -->
|
||||||
<van-button
|
<van-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="large"
|
size="large"
|
||||||
round
|
|
||||||
icon="plus"
|
icon="plus"
|
||||||
@click="handleAddCategory"
|
@click="handleAddCategory"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 底部操作按钮 -->
|
<!-- 底部操作按钮 -->
|
||||||
<div class="action-bar">
|
<div class="bottom-button">
|
||||||
<van-button
|
<van-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="classifying"
|
:loading="classifying"
|
||||||
@@ -351,27 +351,6 @@ onMounted(async () => {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 底部操作栏 */
|
|
||||||
.action-bar {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
display: flex;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 12px;
|
|
||||||
background-color: var(--van-background-2, #fff);
|
|
||||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
|
|
||||||
z-index: 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
.action-bar {
|
|
||||||
background-color: var(--van-background-2, #2c2c2c);
|
|
||||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
cd Web; pnpm i ;pnpm dev;
|
start cd ./Web/; pnpm i ;pnpm dev;
|
||||||
|
start cd ./WebApi/; dotnet watch run;
|
||||||
cd ../WebApi; dotnet watch run;
|
|
||||||
Reference in New Issue
Block a user