2 Commits

Author SHA1 Message Date
ZhuRui cc5ca261c6 fix: 处理报错 2026-07-27 17:08:21 +08:00
ZhuRui b6e91bfbac fix: 处理冲突 2026-07-27 17:02:25 +08:00
10 changed files with 102 additions and 36 deletions
+52
View File
@@ -56,6 +56,58 @@ a {
background: transparent; background: transparent;
} }
// ===== 页面布局公共类 =====
// 页面容器:纵向 flex,占满高度;筛选区与表格区作为直接子元素
.page-container {
display: flex;
flex-direction: column;
height: 100%;
}
// 页面筛选区域:横向 flex,可换行
.page-filter {
display: flex;
flex-wrap: wrap;
align-items: center;
column-gap: 16px;
row-gap: 12px;
flex-shrink: 0;
padding: 16px;
background-color: #fff;
border-radius: 10px;
}
// 筛选区域操作按钮组:横向 flex
.page-filter-actions {
display: flex;
align-items: center;
gap: 10px;
margin-left: 0;
}
// 表格显示区域:纵向 flex,占据剩余高度。
// overflow: hidden 防止子元素撑开容器,滚动由 Table 的 scroll.x/y 接管。
// 分页组件作为独立子元素置于 Table 下方,不占用 Table 的 scroll 空间。
.page-table {
display: flex;
flex-direction: column;
flex: 1;
background-color: #fff;
min-height: 0;
min-width: 0;
margin-top: 16px;
overflow: hidden;
border-radius: 10px;
}
.page-pagination {
flex-shrink: 0;
display: flex;
justify-content: flex-end;
padding: 14px;
}
// ===== antd 组件覆盖 ===== // ===== antd 组件覆盖 =====
// Tag 默认 margin-right: 8px,会挤开表格列或卡片内间距,统一去掉 // Tag 默认 margin-right: 8px,会挤开表格列或卡片内间距,统一去掉
+3 -3
View File
@@ -38,7 +38,7 @@
} }
// ── hover 态(非激活) ── // ── hover 态(非激活) ──
&:not(.active) { &:not(.tabItemActive) {
&:hover { &:hover {
// 自身分隔线消失 // 自身分隔线消失
> .divider { > .divider {
@@ -54,7 +54,7 @@
} }
// ── 激活态 ── // ── 激活态 ──
&.active { &.tabItemActive {
z-index: 2; z-index: 2;
// 右侧邻居的分隔线消失 // 右侧邻居的分隔线消失
& + .tabItem { & + .tabItem {
@@ -164,7 +164,7 @@
} }
// hover 只在非激活标签时生效 // hover 只在非激活标签时生效
.tabItem:not(.active) { .tabItem:not(.tabItemActive) {
.tabTitleCon:hover { .tabTitleCon:hover {
background-color: rgba(0, 0, 0, 0.06); background-color: rgba(0, 0, 0, 0.06);
} }
+6 -4
View File
@@ -1,6 +1,6 @@
import { defineComponent, type PropType } from 'vue'; import { defineComponent, type PropType } from 'vue';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import type { TabView } from '@/stores/tabsStore'; import type { TabView } from '@/types';
import styles from './PageTabs.module.less'; import styles from './PageTabs.module.less';
/** /**
@@ -12,7 +12,7 @@ import styles from './PageTabs.module.less';
* - 标签间分隔线 * - 标签间分隔线
* - 关闭按钮 * - 关闭按钮
*/ */
export default defineComponent({ const PageTabs = defineComponent({
name: 'PageTabs', name: 'PageTabs',
props: { props: {
/** 标签列表 */ /** 标签列表 */
@@ -49,7 +49,7 @@ export default defineComponent({
return ( return (
<div <div
key={tab.path} key={tab.path}
class={[styles.tabItem, isActive ? styles.active : '', styles.draggable].join(' ')} class={[styles.tabItem, isActive && styles.tabItemActive].filter(Boolean).join(' ')}
onClick={() => handleClick(tab.path)} onClick={() => handleClick(tab.path)}
> >
{/* 分隔线:第一个标签 / 激活标签 / 上一个就是激活的 → 不显示 */} {/* 分隔线:第一个标签 / 激活标签 / 上一个就是激活的 → 不显示 */}
@@ -59,7 +59,7 @@ export default defineComponent({
/> />
{/* Chrome 风格背景:激活态 */} {/* Chrome 风格背景:激活态 */}
<div class={[styles.tabBg, isActive ? styles.tabBgActive : ''].join(' ')}> <div class={[styles.tabBg, isActive && styles.tabBgActive].filter(Boolean).join(' ')}>
<div class={styles.tabBgInner} /> <div class={styles.tabBgInner} />
{/* 左下曲线 */} {/* 左下曲线 */}
<svg class={styles.tabBgCurveBefore} height="7" width="7"> <svg class={styles.tabBgCurveBefore} height="7" width="7">
@@ -87,3 +87,5 @@ export default defineComponent({
); );
}, },
}); });
export default PageTabs;
+4 -5
View File
@@ -3,7 +3,6 @@ import { Button, Input, Table, Form, Space, Pagination, Select, DatePicker } fro
import { usePaymentsModel } from './model/usePaymentsModel'; import { usePaymentsModel } from './model/usePaymentsModel';
import { useContainerSize } from '@/hooks'; import { useContainerSize } from '@/hooks';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
@@ -29,9 +28,9 @@ export default defineComponent({
const { containerRef, height } = useContainerSize({ headerOffset: 55 }); const { containerRef, height } = useContainerSize({ headerOffset: 55 });
return () => ( return () => (
<div class={pageStyles.container}> <div class="page-container">
{/* ===== 筛选区 ===== */} {/* ===== 筛选区 ===== */}
<div class={pageStyles.filter}> <div class="page-filter">
<Form style={{ rowGap: '10px' }} layout="inline" model={filterForm}> <Form style={{ rowGap: '10px' }} layout="inline" model={filterForm}>
<Form.Item label="时间" name="timeRange"> <Form.Item label="时间" name="timeRange">
<RangePicker <RangePicker
@@ -78,7 +77,7 @@ export default defineComponent({
</div> </div>
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class="page-table">
{/* ===== 汇总区(按图片样式:左对齐的两段加粗数字) ===== */} {/* ===== 汇总区(按图片样式:左对齐的两段加粗数字) ===== */}
<div class={styles.summary}> <div class={styles.summary}>
<span class={styles.summaryItem}> <span class={styles.summaryItem}>
@@ -102,7 +101,7 @@ export default defineComponent({
</div> </div>
{/* 独立分页,右下方 */} {/* 独立分页,右下方 */}
<div class={pageStyles.pagination}> <div class="page-pagination">
<Pagination <Pagination
current={pagination.value.current} current={pagination.value.current}
pageSize={pagination.value.pageSize} pageSize={pagination.value.pageSize}
+1 -2
View File
@@ -3,7 +3,6 @@ import { Select, Table } from 'ant-design-vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { useReportsModel } from './model/useReportsModel'; import { useReportsModel } from './model/useReportsModel';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less';
/** /**
* 账务报表 * 账务报表
@@ -158,7 +157,7 @@ export default defineComponent({
]; ];
return ( return (
<div class={[pageStyles.container, styles.pageWrap]}> <div class={['page-container', styles.pageWrap]}>
{/* ===== 顶部标题 + 时间范围 ===== */} {/* ===== 顶部标题 + 时间范围 ===== */}
<div class={styles.reportHeader}> <div class={styles.reportHeader}>
<div class={styles.headerLeft}> <div class={styles.headerLeft}>
@@ -86,3 +86,22 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
// ===== 下方白卡片:包裹筛选区 + 表格区 =====
.tableSection {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
padding: 16px 20px;
background: #fff;
border: 1px solid #f0f0f0;
border-radius: 10px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
overflow: hidden;
// 表格区紧贴筛选区下方,控制间距
:global(.page-table) {
margin-top: 16px;
}
}
+4 -5
View File
@@ -5,7 +5,6 @@ import { useWalletModel } from './model/useWalletModel';
import { useContainerSize } from '@/hooks'; import { useContainerSize } from '@/hooks';
import WalletDetailModal from './components/WalletDetailModal'; import WalletDetailModal from './components/WalletDetailModal';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less';
interface StatCardItem { interface StatCardItem {
key: string; key: string;
@@ -106,7 +105,7 @@ export default defineComponent({
]; ];
return ( return (
<div class={pageStyles.container}> <div class="page-container">
{/* ===== 顶部统计卡 ===== */} {/* ===== 顶部统计卡 ===== */}
<div class={styles.statCards}> <div class={styles.statCards}>
{statCards.map((item) => ( {statCards.map((item) => (
@@ -134,7 +133,7 @@ export default defineComponent({
</div> </div>
{/* ===== 筛选区 ===== */} {/* ===== 筛选区 ===== */}
<div class={pageStyles.filter}> <div class="page-filter">
<Form style={{ rowGap: '10px' }} layout="inline" model={filterForm}> <Form style={{ rowGap: '10px' }} layout="inline" model={filterForm}>
<Form.Item label="用户昵称" name="searchUserName"> <Form.Item label="用户昵称" name="searchUserName">
<Input <Input
@@ -197,7 +196,7 @@ export default defineComponent({
{/* ===== 下方区域:筛选 + 表格(独立白卡片) ===== */} {/* ===== 下方区域:筛选 + 表格(独立白卡片) ===== */}
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class="page-table">
<div ref={containerRef} class={styles.tableBody}> <div ref={containerRef} class={styles.tableBody}>
<Table <Table
columns={tableColumns} columns={tableColumns}
@@ -217,7 +216,7 @@ export default defineComponent({
</div> </div>
{/* 独立分页,右下方 */} {/* 独立分页,右下方 */}
<div class={pageStyles.pagination}> <div class="page-pagination">
<Pagination <Pagination
current={pagination.value.current} current={pagination.value.current}
pageSize={pagination.value.pageSize} pageSize={pagination.value.pageSize}
+4 -5
View File
@@ -4,7 +4,6 @@ import { useWithdrawModel } from './model/useWithdrawModel';
import { useContainerSize } from '@/hooks'; import { useContainerSize } from '@/hooks';
import WithdrawAuditModal from './components/WithdrawAuditModal'; import WithdrawAuditModal from './components/WithdrawAuditModal';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less';
/** /**
* bodyCell 渲染函数(操作列:根据审核状态切换"审核 / 查看"按钮) * bodyCell 渲染函数(操作列:根据审核状态切换"审核 / 查看"按钮)
@@ -79,9 +78,9 @@ export default defineComponent({
]; ];
return () => ( return () => (
<div class={pageStyles.container}> <div class="page-container">
{/* ===== 筛选区 ===== */} {/* ===== 筛选区 ===== */}
<div class={pageStyles.filter}> <div class="page-filter">
<Form style={{ rowGap: '10px' }} layout="inline" model={filterForm}> <Form style={{ rowGap: '10px' }} layout="inline" model={filterForm}>
<Form.Item label="申请人昵称" name="searchUserName"> <Form.Item label="申请人昵称" name="searchUserName">
<Input <Input
@@ -137,7 +136,7 @@ export default defineComponent({
</div> </div>
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class="page-table">
<div ref={containerRef} class={styles.tableBody}> <div ref={containerRef} class={styles.tableBody}>
<Table <Table
columns={tableColumns} columns={tableColumns}
@@ -158,7 +157,7 @@ export default defineComponent({
</div> </div>
{/* 独立分页,右下方 */} {/* 独立分页,右下方 */}
<div class={pageStyles.pagination}> <div class="page-pagination">
<Pagination <Pagination
current={pagination.value.current} current={pagination.value.current}
pageSize={pagination.value.pageSize} pageSize={pagination.value.pageSize}
+2 -12
View File
@@ -1,18 +1,8 @@
import { reactive, computed, toRefs } from 'vue'; import { reactive, computed, toRefs } from 'vue';
import router from '@/router'; import router from '@/router';
import type { TabView } from '@/types';
/** export type { TabView };
* 单个页面标签的数据结构(标签 = 已经访问过的页面)
*
* path 唯一标识,用于路由激活态判断
* name 路由组件 name,用于 <keep-alive :include="cachedViews">
* title 展示在 tab 上的文字
*/
export interface TabView {
path: string;
name: string;
title: string;
}
interface TabsState { interface TabsState {
/** 已打开的页面标签列表,按访问顺序累加 */ /** 已打开的页面标签列表,按访问顺序累加 */
+7
View File
@@ -23,6 +23,13 @@ export interface SelectOption {
disabled?: boolean; disabled?: boolean;
} }
/** 页面标签栏单个 tab 的数据结构 */
export interface TabView {
path: string;
name: string;
title: string;
}
// ── 菜单 & 权限 ── // ── 菜单 & 权限 ──
/** /**