diff --git a/src/layouts/GlobalLayout.vue b/src/layouts/GlobalLayout.vue index 7f5924de..e00d1b89 100644 --- a/src/layouts/GlobalLayout.vue +++ b/src/layouts/GlobalLayout.vue @@ -204,10 +204,26 @@ export default { margin: 24px; padding: 24px; background: #fff; - height: 100vh; + min-height: calc(100vh - 128px); // 移除固定height border-radius: 8px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05); - min-height: calc(100vh - 128px); + display: flex; // 添加flex布局 + flex-direction: column; // 垂直方向排列 + flex: 1; // 占用剩余空间 + overflow: auto; // 内容过多时显示滚动条 +} + +// 添加布局容器样式 +.ant-pro-basicLayout { + min-height: 100vh; + display: flex; + flex-direction: column; +} + +.ant-pro-basicLayout-content-wrapper { + flex: 1; + display: flex; + flex-direction: column; } .footer-container { diff --git a/src/views/communtiy/Article.vue b/src/views/communtiy/Article.vue index 1c74f06c..99bf7cd8 100644 --- a/src/views/communtiy/Article.vue +++ b/src/views/communtiy/Article.vue @@ -111,7 +111,7 @@ export default { userData: [], imageUrlRegex: /(http[s]?:\/\/[^(\s|")]+\.(png|jpg|jpeg|gif|webp))/gi, current: 1, - pageSize: 8, + pageSize: 4, loading: true, loadingMore: false, data: [], @@ -146,7 +146,7 @@ export default { pageSize: this.pageSize, total: this.total, showSizeChanger: true, - pageSizeOptions: ["8", "9", "10", "20"], + pageSizeOptions: ["4", "8", "10", "20"], showQuickJumper: true, showTotal: (total) => `Total ${total} items`, onChange: this.changePage,