diff --git a/Web/src/main.js b/Web/src/main.js index 6888638..845d4b7 100644 --- a/Web/src/main.js +++ b/Web/src/main.js @@ -1,4 +1,5 @@ import './assets/main.css' +import './styles/common.css' import { createApp } from 'vue' import { createPinia } from 'pinia' diff --git a/Web/src/styles/common.css b/Web/src/styles/common.css index 4b346fb..2f2dee1 100644 --- a/Web/src/styles/common.css +++ b/Web/src/styles/common.css @@ -161,3 +161,71 @@ -webkit-overflow-scrolling: touch; } +/* ===== 页面容器布局(Flex布局) ===== */ +.page-container-flex { + display: flex; + flex-direction: column; + height: 100vh; + overflow: hidden; +} + +.page-container-flex :deep(.van-nav-bar) { + flex-shrink: 0; +} + +.page-container-flex > .van-pull-refresh { + flex: 1; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +/* ===== 可滚动内容区域 ===== */ +.scroll-content { + flex: 1; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + padding: 16px 0 0 0; +} + +/* ===== 粘性顶部元素样式 ===== */ +.sticky-header { + position: sticky; + top: 0; + z-index: 10; + display: flex; + align-items: center; + justify-content: space-between; + padding: 12px 16px; + margin: 0 12px; + margin-top: 12px; + background: #ffffff; + border-radius: 12px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); +} + +@media (prefers-color-scheme: dark) { + .sticky-header { + background: #1f1f1f; + } +} + +.sticky-header-text { + font-size: 16px; + font-weight: 600; + color: var(--van-text-color); + display: flex; + align-items: center; + gap: 4px; + cursor: pointer; + user-select: none; +} + +/* ===== 颜色工具类 ===== */ +.text-expense { + color: #ff6b6b; +} + +.text-income { + color: #51cf66; +} + diff --git a/Web/src/views/BillAnalysisView.vue b/Web/src/views/BillAnalysisView.vue index a475a6e..3605f10 100644 --- a/Web/src/views/BillAnalysisView.vue +++ b/Web/src/views/BillAnalysisView.vue @@ -1,5 +1,5 @@  diff --git a/Web/src/views/ClassificationEdit.vue b/Web/src/views/ClassificationEdit.vue index b9cd996..6ac1015 100644 --- a/Web/src/views/ClassificationEdit.vue +++ b/Web/src/views/ClassificationEdit.vue @@ -1,5 +1,5 @@  diff --git a/Web/src/views/ClassificationNLP.vue b/Web/src/views/ClassificationNLP.vue index 45000b9..ac7c5ed 100644 --- a/Web/src/views/ClassificationNLP.vue +++ b/Web/src/views/ClassificationNLP.vue @@ -1,13 +1,13 @@