feat: less规范化

This commit is contained in:
ZhuRui
2026-07-28 10:54:36 +08:00
parent cffe8de6b0
commit 743549600a
45 changed files with 1953 additions and 2011 deletions
@@ -61,6 +61,7 @@ export default defineComponent({
destroyOnClose destroyOnClose
footer={null} footer={null}
centered centered
wrapClassName={styles.changePasswordModalMain}
class={styles.modal} class={styles.modal}
> >
<Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark> <Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark>
@@ -1,4 +1,13 @@
.form { .changePasswordModalMain {
.modal {
:global {
.ant-modal-body {
padding: 16px 24px 0;
}
}
}
.form {
:global { :global {
.ant-form-item { .ant-form-item {
margin-bottom: 16px; margin-bottom: 16px;
@@ -7,31 +16,21 @@
font-size: 12px; font-size: 12px;
} }
} }
} }
/* 底部提示文案 */ .tip {
.tip {
margin-top: -4px; margin-top: -4px;
margin-bottom: 24px; margin-bottom: 24px;
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
font-size: 12px; font-size: 12px;
line-height: 1.5; line-height: 1.5;
} }
/* 底部按钮 */ .footer {
.footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 8px; gap: 8px;
padding-top: 16px; padding-top: 16px;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
}
/* 微调 Modal 内部样式 */
.modal {
:global {
.ant-modal-body {
padding: 16px 24px 0;
}
} }
} }
+5 -5
View File
@@ -1,16 +1,16 @@
.container { .helloWorldMain {
text-align: center; text-align: center;
padding: 16px; padding: 16px;
}
.title { .title {
color: #1677ff; color: #1677ff;
} }
.desc { .desc {
code { code {
background: #f5f5f5; background: #f5f5f5;
padding: 2px 6px; padding: 2px 6px;
border-radius: 4px; border-radius: 4px;
} }
}
} }
+1 -1
View File
@@ -14,7 +14,7 @@ export default defineComponent({
}, },
setup(props) { setup(props) {
return () => ( return () => (
<div class={styles.container}> <div class={styles.helloWorldMain}>
<h3 class={styles.title}>{props.msg}</h3> <h3 class={styles.title}>{props.msg}</h3>
<p class={styles.desc}> <p class={styles.desc}>
这是一个公共组件示例,采用 TSX 写法。你可以在 这是一个公共组件示例,采用 TSX 写法。你可以在
+1 -1
View File
@@ -4,4 +4,4 @@
*/ */
export { default as HelloWorld } from './HelloWorld'; export { default as HelloWorld } from './HelloWorld';
export { default as ChangePasswordModal } from './ChangePasswordModal'; export { default as ChangePasswordModal } from './ChangePasswordModal';
export { default as PageTabs } from './page/PageTabs'; export { default as PageTabs } from './pageTabs/PageTabs';
-185
View File
@@ -1,185 +0,0 @@
/**
* PageTabs — Chrome 风格标签栏样式
*
* 参考 VBEN tabs-chrome 的视觉设计:
* - 标签间通过负 margin 重叠
* - 激活态使用 SVG 绘制左下/右下曲线填充,形成 Chrome tab 效果
* - hover 态浅灰背景
* - 分隔线在相邻非激活标签之间
*/
// 主色调(antd 默认蓝)
@primary: #1677ff;
.tabsWrap {
display: flex;
align-items: center;
width: 100%;
height: 100%;
overflow-x: auto;
overflow-y: hidden;
// 隐藏横向滚动条
&::-webkit-scrollbar {
height: 0;
}
}
.tabItem {
position: relative;
display: flex;
align-items: center;
height: 100%;
user-select: none;
transition: all 0.15s ease;
padding: 0 8px 0 14px;
&:global(:not(.dragging)) {
cursor: pointer;
}
// ── hover 态(非激活) ──
&:not(.tabItemActive) {
&:hover {
// 自身分隔线消失
> .divider {
opacity: 0;
}
// 右侧邻居的分隔线也消失
& + .tabItem {
> .divider {
opacity: 0;
}
}
}
}
// ── 激活态 ──
&.tabItemActive {
z-index: 2;
// 右侧邻居的分隔线消失
& + .tabItem {
> .divider {
opacity: 0 !important;
}
}
// 文字激活色
.tabTitle {
color: @primary;
font-weight: 500;
}
// 背景蓝色
.tabBg {
&.tabBgActive {
.tabBgInner {
background-color: fade(@primary, 8%);
}
.tabBgCurveBefore,
.tabBgCurveAfter {
fill: fade(@primary, 8%);
}
}
}
}
}
// ── 分隔线 ──
.divider {
position: absolute;
left: 7px;
top: 50%;
z-index: 0;
width: 1px;
height: 16px;
background-color: #e8e8e8;
transform: translateY(-50%);
transition: opacity 0.15s;
}
// ── Chrome 风格背景层(激活态可见,hover 态可见但偏浅) ──
.tabBg {
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
padding: 0 calc(7px - 1px);
transition: opacity 0.15s;
}
// 背景主体:顶部圆角
.tabBgInner {
height: 100%;
border-radius: 7px 7px 0 0;
transition:
background-color 0.15s,
margin 0.15s,
border-radius 0.15s;
}
// 左下 SVG 曲线
.tabBgCurveBefore {
position: absolute;
left: -1px;
bottom: 0;
fill: transparent;
transition: fill 0.15s;
}
// 右下 SVG 曲线
.tabBgCurveAfter {
position: absolute;
right: -1px;
bottom: 0;
fill: transparent;
transition: fill 0.15s;
}
// ── 关闭按钮(flex 子元素,文字同行自然居中) ──
.tabClose {
flex-shrink: 0;
width: 16px;
height: 16px;
line-height: 16px;
font-size: 10px;
text-align: center;
margin-right: 12px;
color: rgba(0, 0, 0, 0.45);
border-radius: 50%;
cursor: pointer;
transition: all 0.15s;
&:hover {
color: rgba(0, 0, 0, 0.85);
background-color: rgba(0, 0, 0, 0.06);
}
}
.tabTitleCon {
height: 28px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
}
// hover 只在非激活标签时生效
.tabItem:not(.tabItemActive) {
.tabTitleCon:hover {
background-color: rgba(0, 0, 0, 0.06);
}
}
// ── 标签文字(flex 子元素,可收缩) ──
.tabTitle {
position: relative;
z-index: 2;
flex: 1;
min-width: 0;
padding: 2px 8px;
font-size: 13px;
color: rgba(0, 0, 0, 0.65);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@@ -0,0 +1,164 @@
@primary: #1677ff;
.pageTabsMain {
display: flex;
align-items: center;
width: 100%;
height: 100%;
overflow-x: auto;
overflow-y: hidden;
&::-webkit-scrollbar {
height: 0;
}
.tabItem {
position: relative;
display: flex;
align-items: center;
height: 100%;
user-select: none;
transition: all 0.15s ease;
padding: 0 8px 0 14px;
&:global(:not(.dragging)) {
cursor: pointer;
}
&:not(.tabItemActive) {
&:hover {
> .divider {
opacity: 0;
}
& + .tabItem {
> .divider {
opacity: 0;
}
}
}
}
&.tabItemActive {
z-index: 2;
& + .tabItem {
> .divider {
opacity: 0 !important;
}
}
.tabTitle {
color: @primary;
font-weight: 500;
}
.tabBg {
&.tabBgActive {
.tabBgInner {
background-color: fade(@primary, 8%);
}
.tabBgCurveBefore,
.tabBgCurveAfter {
fill: fade(@primary, 8%);
}
}
}
}
&:not(.tabItemActive) {
.tabTitleCon:hover {
background-color: rgba(0, 0, 0, 0.06);
}
}
}
.divider {
position: absolute;
left: 7px;
top: 50%;
z-index: 0;
width: 1px;
height: 16px;
background-color: #e8e8e8;
transform: translateY(-50%);
transition: opacity 0.15s;
}
.tabBg {
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
padding: 0 calc(7px - 1px);
transition: opacity 0.15s;
}
.tabBgInner {
height: 100%;
border-radius: 7px 7px 0 0;
transition:
background-color 0.15s,
margin 0.15s,
border-radius 0.15s;
}
.tabBgCurveBefore {
position: absolute;
left: -1px;
bottom: 0;
fill: transparent;
transition: fill 0.15s;
}
.tabBgCurveAfter {
position: absolute;
right: -1px;
bottom: 0;
fill: transparent;
transition: fill 0.15s;
}
.tabClose {
flex-shrink: 0;
width: 16px;
height: 16px;
line-height: 16px;
font-size: 10px;
text-align: center;
margin-right: 12px;
color: rgba(0, 0, 0, 0.45);
border-radius: 50%;
cursor: pointer;
transition: all 0.15s;
&:hover {
color: rgba(0, 0, 0, 0.85);
background-color: rgba(0, 0, 0, 0.06);
}
}
.tabTitleCon {
height: 28px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
}
.tabTitle {
position: relative;
z-index: 2;
flex: 1;
min-width: 0;
padding: 2px 8px;
font-size: 13px;
color: rgba(0, 0, 0, 0.65);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
@@ -43,7 +43,7 @@ const PageTabs = defineComponent({
}; };
return () => ( return () => (
<div class={styles.tabsWrap}> <div class={styles.pageTabsMain}>
{props.tabs.map((tab, i) => { {props.tabs.map((tab, i) => {
const isActive = tab.path === props.activeKey; const isActive = tab.path === props.activeKey;
return ( return (
+27 -32
View File
@@ -1,9 +1,8 @@
.container { .basicLayoutMain {
min-height: 100vh; min-height: 100vh;
height: 100vh; height: 100vh;
}
.logo { .logo {
height: 56px; height: 56px;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -11,15 +10,15 @@
overflow: hidden; overflow: hidden;
color: #1a1a1a; color: #1a1a1a;
background: #fff; background: #fff;
} }
.logoText { .logoText {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
white-space: nowrap; white-space: nowrap;
} }
.trigger { .trigger {
font-size: 18px; font-size: 18px;
cursor: pointer; cursor: pointer;
transition: color 0.3s; transition: color 0.3s;
@@ -30,10 +29,9 @@
&:hover { &:hover {
color: #1677ff; color: #1677ff;
} }
} }
// 面包屑 .breadcrumb {
.breadcrumb {
flex: 1; flex: 1;
margin-left: 8px; margin-left: 8px;
font-size: 14px; font-size: 14px;
@@ -55,22 +53,21 @@
} }
} }
} }
} }
// Header 右侧:账号信息 + 退出图标 .headerRight {
.headerRight {
margin-left: auto; margin-left: auto;
display: flex; display: flex;
gap: 10px; gap: 10px;
align-items: center; align-items: center;
} }
.userPhone { .userPhone {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.logoutIcon { .logoutIcon {
width: 18px; width: 18px;
height: 18px; height: 18px;
opacity: 0.45; opacity: 0.45;
@@ -80,10 +77,9 @@
&:hover { &:hover {
opacity: 1; opacity: 1;
} }
} }
// 下拉菜单项:图标 + 文字 .menuItem {
.menuItem {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
@@ -91,13 +87,13 @@
:global(.anticon) { :global(.anticon) {
font-size: 14px; font-size: 14px;
} }
} }
.menuItemDanger { .menuItemDanger {
color: #ff4d4f; color: #ff4d4f;
} }
.content { .content {
margin: 16px; margin: 16px;
border-radius: 8px; border-radius: 8px;
flex: 1; flex: 1;
@@ -105,29 +101,28 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
} }
.main { .main {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
// ── 顶部行:原 Header 中的三个区域(折叠按钮 / 面包屑 / 右侧账号信息)整体包成一个 row ── .headerRow {
.headerRow {
padding: 0 16px; padding: 0 16px;
width: 100%; width: 100%;
height: 48px; height: 48px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
// ── 页面标签栏容器(Chrome 风格 PageTabs 的外壳) ── .pageTabs {
.pageTabs {
width: 100%; width: 100%;
padding: 4px 16px 0 16px; padding: 4px 16px 0 16px;
height: 42px; height: 42px;
background: #fff; background: #fff;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
}
} }
+1 -1
View File
@@ -173,7 +173,7 @@ export default defineComponent({
}; };
return () => ( return () => (
<Layout class={styles.container}> <Layout class={styles.basicLayoutMain}>
<Sider style={siderStyle} collapsed={collapsed.value} trigger={null} collapsible> <Sider style={siderStyle} collapsed={collapsed.value} trigger={null} collapsible>
<div class={styles.logo}> <div class={styles.logo}>
<span class={styles.logoText}>{collapsed.value ? '6羽' : '六羽赛事运营平台'}</span> <span class={styles.logoText}>{collapsed.value ? '6羽' : '六羽赛事运营平台'}</span>
+7 -9
View File
@@ -1,20 +1,18 @@
.container { .aboutMain {
// 容器 .title {
}
.title {
margin-top: 0; margin-top: 0;
margin-bottom: 24px; margin-bottom: 24px;
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.subtitle { .subtitle {
margin: 16px 0 8px; margin: 16px 0 8px;
} }
.list { .list {
margin: 0; margin: 0;
padding-left: 20px; padding-left: 20px;
line-height: 2; line-height: 2;
}
} }
+1 -1
View File
@@ -23,7 +23,7 @@ export default defineComponent({
]; ];
return () => ( return () => (
<div class={styles.container}> <div class={styles.aboutMain}>
<h2 class={styles.title}>关于</h2> <h2 class={styles.title}>关于</h2>
<Card> <Card>
<p>CPMS 运营平台前端 PC 端。</p> <p>CPMS 运营平台前端 PC 端。</p>
+5 -7
View File
@@ -1,15 +1,12 @@
.container { .dashboardMain {
// 容器 .title {
}
.title {
margin-top: 0; margin-top: 0;
margin-bottom: 24px; margin-bottom: 24px;
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.panel { .panel {
margin-top: 16px; margin-top: 16px;
ul { ul {
@@ -24,4 +21,5 @@
border-radius: 4px; border-radius: 4px;
font-size: 13px; font-size: 13px;
} }
}
} }
+1 -1
View File
@@ -23,7 +23,7 @@ export default defineComponent({
]; ];
return () => ( return () => (
<div class={styles.container}> <div class={styles.dashboardMain}>
<h2 class={styles.title}>工作台</h2> <h2 class={styles.title}>工作台</h2>
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
@@ -1,4 +1,5 @@
.form { .bannerFormModalMain {
.form {
:global { :global {
.ant-form-item { .ant-form-item {
margin-bottom: 16px; margin-bottom: 16px;
@@ -7,14 +8,13 @@
font-size: 12px; font-size: 12px;
} }
} }
} }
/* ===== 上传 ===== */ .uploader {
.uploader {
position: relative; position: relative;
} }
.uploadCard { .uploadCard {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@@ -31,33 +31,32 @@
&:hover { &:hover {
border-color: #1677ff; border-color: #1677ff;
} }
} }
.uploadCardError { .uploadCardError {
border-color: #ff4d4f; border-color: #ff4d4f;
} }
.uploadIcon { .uploadIcon {
font-size: 32px; font-size: 32px;
color: #999; color: #999;
font-weight: 300; font-weight: 300;
line-height: 1; line-height: 1;
} }
.uploadHint { .uploadHint {
color: #666; color: #666;
font-size: 14px; font-size: 14px;
} }
.uploadTip { .uploadTip {
color: #999; color: #999;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
line-height: 1.6; line-height: 1.6;
} }
/* ===== 预览 ===== */ .previewWrapper {
.previewWrapper {
position: relative; position: relative;
width: 100%; width: 100%;
height: 140px; height: 140px;
@@ -73,16 +72,16 @@
height: 100%; height: 100%;
} }
} }
} }
.previewImg { .previewImg {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
display: block; display: block;
} }
.uploadAgainBtn { .uploadAgainBtn {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
@@ -99,10 +98,9 @@
&:hover { &:hover {
background: rgba(0, 0, 0, 0.65); background: rgba(0, 0, 0, 0.65);
} }
} }
/* ===== 提示 ===== */ .tip {
.tip {
padding: 8px 12px; padding: 8px 12px;
margin-bottom: 16px; margin-bottom: 16px;
background-color: #f0f5ff; background-color: #f0f5ff;
@@ -110,24 +108,23 @@
border-radius: 4px; border-radius: 4px;
color: #1677ff; color: #1677ff;
font-size: 13px; font-size: 13px;
} }
/* ===== 时间行(双列)===== */ .timeRow {
.timeRow {
display: flex; display: flex;
gap: 16px; gap: 16px;
.timeItem { .timeItem {
flex: 1; flex: 1;
} }
} }
/* ===== 底部按钮 ===== */ .footer {
.footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 8px; gap: 8px;
padding-top: 16px; padding-top: 16px;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
margin-top: 8px; margin-top: 8px;
}
} }
@@ -266,6 +266,7 @@ export default defineComponent({
destroyOnClose destroyOnClose
footer={null} footer={null}
centered centered
wrapClassName={styles.bannerFormModalMain}
> >
<Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark> <Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark>
{/* ===== Banner 标题 ===== */} {/* ===== Banner 标题 ===== */}
+8 -1
View File
@@ -1,4 +1,10 @@
.tableBody { .eventBannerMain {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
.tableBody {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
@@ -11,4 +17,5 @@
height: 100%; height: 100%;
} }
} }
}
} }
+3 -1
View File
@@ -15,7 +15,7 @@ import { useBannerModel, BANNER_STATUS_OPTIONS } from './model/useBannerModel';
import { useContainerSize } from '@/hooks'; import { useContainerSize } from '@/hooks';
import BannerFormModal from './components/BannerFormModal'; import BannerFormModal from './components/BannerFormModal';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less'; import pageStyles from '@/assets/styles/pageLayout.module.less';
/** /**
* bodyCell 渲染函数 * bodyCell 渲染函数
@@ -231,6 +231,7 @@ export default defineComponent({
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class={pageStyles.table}>
<div class={styles.eventBannerMain}>
<div ref={containerRef} class={styles.tableBody}> <div ref={containerRef} class={styles.tableBody}>
<Table <Table
columns={tableColumns} columns={tableColumns}
@@ -266,6 +267,7 @@ export default defineComponent({
/> />
</div> </div>
</div> </div>
</div>
{/* ===== 新增/编辑弹窗 ===== */} {/* ===== 新增/编辑弹窗 ===== */}
{modalVisible.value && ( {modalVisible.value && (
@@ -1,59 +1,61 @@
.section { .eventAuditModalMain {
.section {
margin-bottom: 24px; margin-bottom: 24px;
}
.section:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
}
.sectionTitle { .sectionTitle {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
margin-bottom: 12px; margin-bottom: 12px;
padding-left: 8px; padding-left: 8px;
border-left: 3px solid #1677ff; border-left: 3px solid #1677ff;
} }
.desc :global(.ant-descriptions-item-label) { .desc {
:global(.ant-descriptions-item-label) {
width: 110px; width: 110px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
}
// ── 审核操作区域 ── .auditSection {
.auditSection {
margin-top: 24px; margin-top: 24px;
} }
.auditHeader { .auditHeader {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 16px; margin-bottom: 16px;
} }
.auditTitle { .auditTitle {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
padding-left: 8px; padding-left: 8px;
border-left: 3px solid #1677ff; border-left: 3px solid #1677ff;
} }
.auditForm { .auditForm {
// 横线分隔标题与表单
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
padding-top: 16px; padding-top: 16px;
} }
.auditField { .auditField {
margin-bottom: 16px; margin-bottom: 16px;
&:last-child {
margin-bottom: 0;
}
:global(.ant-form-item-label) { :global(.ant-form-item-label) {
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
} }
.auditField:last-child {
margin-bottom: 0;
} }
@@ -80,6 +80,7 @@ export default defineComponent({
cancelText="取消" cancelText="取消"
centered centered
destroyOnClose destroyOnClose
wrapClassName={styles.eventAuditModalMain}
> >
{/* ===== 基础信息 ===== */} {/* ===== 基础信息 ===== */}
<div class={styles.section}> <div class={styles.section}>
@@ -1,21 +1,22 @@
.section { .eventDetailModalMain {
.section {
margin-bottom: 24px; margin-bottom: 24px;
}
.section:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
}
.sectionTitle { .sectionTitle {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
margin-bottom: 12px; margin-bottom: 12px;
padding-left: 8px; padding-left: 8px;
border-left: 3px solid #1677ff; border-left: 3px solid #1677ff;
} }
.textBlock { .textBlock {
font-size: 13px; font-size: 13px;
line-height: 1.8; line-height: 1.8;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
@@ -24,44 +25,44 @@
padding: 12px 16px; padding: 12px 16px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
} }
// Descriptions 列宽稍微压缩一些,避免单标签被挤 .desc {
.desc :global(.ant-descriptions-item-label) { :global(.ant-descriptions-item-label) {
width: 110px; width: 110px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
}
// 组别信息下的子表格 .group {
.group {
margin-bottom: 16px; margin-bottom: 16px;
}
.group:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
}
.groupTitle { .groupTitle {
font-size: 13px; font-size: 13px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
margin-bottom: 8px; margin-bottom: 8px;
font-weight: 500; font-weight: 500;
} }
.paginationRow { .paginationRow {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-top: 8px; margin-top: 8px;
} }
// 分组信息列表 .divisionList {
.divisionList {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 6px; gap: 6px;
} }
.divisionItem { .divisionItem {
font-size: 13px; font-size: 13px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
}
} }
@@ -110,6 +110,7 @@ export default defineComponent({
footer={null} footer={null}
centered centered
destroyOnClose destroyOnClose
wrapClassName={styles.eventDetailModalMain}
> >
{/* ===== 基础信息 ===== */} {/* ===== 基础信息 ===== */}
<div class={styles.section}> <div class={styles.section}>
@@ -1,21 +1,22 @@
.section { .eventRegulationModalMain {
.section {
margin-bottom: 20px; margin-bottom: 20px;
}
.section:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
}
.sectionTitle { .sectionTitle {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
margin-bottom: 10px; margin-bottom: 10px;
padding-left: 8px; padding-left: 8px;
border-left: 3px solid #1677ff; border-left: 3px solid #1677ff;
} }
.textBlock { .textBlock {
font-size: 13px; font-size: 13px;
line-height: 1.5; line-height: 1.5;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
@@ -24,15 +25,15 @@
padding: 12px 16px; padding: 12px 16px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
} }
.imageGrid { .imageGrid {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 12px; gap: 12px;
} }
.imageCell { .imageCell {
width: 100%; width: 100%;
aspect-ratio: 3 / 2; aspect-ratio: 3 / 2;
background: #f5f5f5; background: #f5f5f5;
@@ -42,10 +43,11 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
}
.imageCell :global(.ant-image) { :global(.ant-image) {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
}
}
} }
@@ -40,6 +40,7 @@ export default defineComponent({
footer={null} footer={null}
centered centered
destroyOnClose destroyOnClose
wrapClassName={styles.eventRegulationModalMain}
> >
{/* 规程文字 */} {/* 规程文字 */}
<div class={styles.section}> <div class={styles.section}>
+8 -5
View File
@@ -1,8 +1,10 @@
/** .eventListMain {
* 表格 body 容器:占满 flex 剩余空间,并确保 antd 嵌套 div 逐层传递 height: 100%, flex: 1;
* 使得 Table scroll.y = 'calc(100% - 55px)' 中的 100% 能正确解析。 min-height: 0;
*/ display: flex;
.tableBody { flex-direction: column;
.tableBody {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
@@ -15,4 +17,5 @@
height: 100%; height: 100%;
} }
} }
}
} }
+3 -1
View File
@@ -26,7 +26,7 @@ import EventRegulationModal from './components/EventRegulationModal';
import EventDetailModal from './components/EventDetailModal'; import EventDetailModal from './components/EventDetailModal';
import EventAuditModal from './components/EventAuditModal'; import EventAuditModal from './components/EventAuditModal';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less'; import pageStyles from '@/assets/styles/pageLayout.module.less';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
@@ -309,6 +309,7 @@ export default defineComponent({
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class={pageStyles.table}>
<div class={styles.eventListMain}>
<div ref={containerRef} class={styles.tableBody}> <div ref={containerRef} class={styles.tableBody}>
<Table <Table
columns={tableColumns} columns={tableColumns}
@@ -342,6 +343,7 @@ export default defineComponent({
/> />
</div> </div>
</div> </div>
</div>
{/* ===== 弹窗区 ===== */} {/* ===== 弹窗区 ===== */}
{regulationModalVisible.value && ( {regulationModalVisible.value && (
@@ -1,20 +1,20 @@
// ===== 自定义标题栏 ===== .orderDetailModalMain {
.modalHeader { .modalHeader {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 0 0 16px; padding: 0 0 16px;
margin-bottom: 16px; margin-bottom: 16px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
} }
.modalTitle { .modalTitle {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
.closeBtn { .closeBtn {
width: 28px; width: 28px;
height: 28px; height: 28px;
border: none; border: none;
@@ -30,15 +30,13 @@
background: rgba(0, 0, 0, 0.04); background: rgba(0, 0, 0, 0.04);
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
} }
// ===== 内容区 ===== .modalBody {
.modalBody {
padding-top: 0; padding-top: 0;
} }
// ===== 订单信息 grid ===== .infoGrid {
.infoGrid {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
row-gap: 12px; row-gap: 12px;
@@ -47,57 +45,53 @@
margin-bottom: 24px; margin-bottom: 24px;
padding-bottom: 16px; padding-bottom: 16px;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
} }
.infoItem { .infoItem {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
min-width: 0; min-width: 0;
} }
.infoLabel { .infoLabel {
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
flex-shrink: 0; flex-shrink: 0;
} }
// ===== 通用 section ===== .section {
.section {
margin-bottom: 24px; margin-bottom: 24px;
}
.section:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
}
.sectionTitle { .sectionTitle {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
margin-bottom: 12px; margin-bottom: 12px;
padding-left: 8px; padding-left: 8px;
border-left: 3px solid #1677ff; border-left: 3px solid #1677ff;
} }
// ===== 退款记录 ===== .refundHeader {
.refundHeader {
margin-bottom: 12px; margin-bottom: 12px;
} }
.refundSummary { .refundSummary {
display: flex; display: flex;
gap: 32px; gap: 32px;
font-size: 13px; font-size: 13px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
margin-bottom: 12px; margin-bottom: 12px;
} }
/** 固定高度 + 滚动 */ .refundList {
.refundList {
max-height: 320px; max-height: 320px;
overflow-y: auto; overflow-y: auto;
padding-right: 4px; padding-right: 4px;
// 自定义滚动条样式
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 6px; width: 6px;
} }
@@ -108,60 +102,60 @@
&::-webkit-scrollbar-track { &::-webkit-scrollbar-track {
background: transparent; background: transparent;
} }
} }
.refundCard { .refundCard {
padding: 14px 16px; padding: 14px 16px;
margin-bottom: 12px; margin-bottom: 12px;
background: #fafafa; background: #fafafa;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
border-radius: 6px; border-radius: 6px;
}
.refundCard:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
}
.refundCardHeader { .refundCardHeader {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 12px; margin-bottom: 12px;
padding-bottom: 10px; padding-bottom: 10px;
border-bottom: 1px dashed #e0e0e0; border-bottom: 1px dashed #e0e0e0;
} }
.refundIndex { .refundIndex {
font-size: 13px; font-size: 13px;
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
} }
.refundCardBody { .refundCardBody {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 6px 24px; gap: 6px 24px;
font-size: 13px; font-size: 13px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
line-height: 1.8; line-height: 1.8;
} }
.refundCol { .refundCol {
min-width: 0; min-width: 0;
} }
.refundAmount { .refundAmount {
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-weight: 500; font-weight: 500;
} }
.partialMark { .partialMark {
margin-left: 4px; margin-left: 4px;
color: #fa8c16; color: #fa8c16;
font-size: 12px; font-size: 12px;
} }
.refundEmpty { .refundEmpty {
padding: 32px 0; padding: 32px 0;
text-align: center; text-align: center;
font-size: 13px; font-size: 13px;
@@ -169,26 +163,24 @@
background: #fafafa; background: #fafafa;
border-radius: 6px; border-radius: 6px;
border: 1px dashed #e0e0e0; border: 1px dashed #e0e0e0;
} }
// 分页:右下角 .refundPagination {
.refundPagination {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-top: 12px; margin-top: 12px;
} }
// ===== 底部按钮区 ===== .modalFooter {
.modalFooter {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 12px; gap: 12px;
padding-top: 16px; padding-top: 16px;
margin-top: 8px; margin-top: 8px;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
}
} }
// ===== Modal 外层包裹:去除 antd 默认内边距,让自定义标题贴合 =====
.orderModalWrap { .orderModalWrap {
:global(.ant-modal-body) { :global(.ant-modal-body) {
padding-top: 16px; padding-top: 16px;
@@ -128,6 +128,7 @@ export default defineComponent({
closable={false} closable={false}
wrapClassName={styles.orderModalWrap} wrapClassName={styles.orderModalWrap}
> >
<div class={styles.orderDetailModalMain}>
{/* ===== 自定义标题栏 ===== */} {/* ===== 自定义标题栏 ===== */}
<div class={styles.modalHeader}> <div class={styles.modalHeader}>
<span class={styles.modalTitle}>订单信息</span> <span class={styles.modalTitle}>订单信息</span>
@@ -264,6 +265,7 @@ export default defineComponent({
</Button> </Button>
)} )}
</div> </div>
</div>
</Modal> </Modal>
); );
}, },
+20 -17
View File
@@ -1,23 +1,10 @@
/** .eventOrdersMain {
* 表格 body 容器:占满 flex 剩余空间,并确保 antd 嵌套 div 逐层传递 height: 100%,
* 使得 Table scroll.y = 'calc(100% - 55px)' 中的 100% 能正确解析。
*/
.tableBody {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow: hidden; display: flex;
flex-direction: column;
:global { .summaryBar {
.ant-spin-nested-loading,
.ant-spin-container,
.ant-table,
.ant-table-container {
height: 100%;
}
}
}
.summaryBar {
flex-shrink: 0; flex-shrink: 0;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -34,4 +21,20 @@
font-weight: 400; font-weight: 400;
} }
} }
}
.tableBody {
flex: 1;
min-height: 0;
overflow: hidden;
:global {
.ant-spin-nested-loading,
.ant-spin-container,
.ant-table,
.ant-table-container {
height: 100%;
}
}
}
} }
+3 -1
View File
@@ -15,7 +15,7 @@ import { useOrderModel, ORDER_STATUS_OPTIONS, REFUND_STATUS_OPTIONS } from './mo
import { useContainerSize, useState } from '@/hooks'; import { useContainerSize, useState } from '@/hooks';
import OrderDetailModal from './components/OrderDetailModal'; import OrderDetailModal from './components/OrderDetailModal';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less'; import pageStyles from '@/assets/styles/pageLayout.module.less';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
@@ -203,6 +203,7 @@ export default defineComponent({
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class={pageStyles.table}>
<div class={styles.eventOrdersMain}>
{/* 金额汇总 */} {/* 金额汇总 */}
<div class={styles.summaryBar}> <div class={styles.summaryBar}>
<span class={styles.summaryItem}> <span class={styles.summaryItem}>
@@ -251,6 +252,7 @@ export default defineComponent({
/> />
</div> </div>
</div> </div>
</div>
{/* ===== 详情弹窗 ===== */} {/* ===== 详情弹窗 ===== */}
{detailVisible.value && ( {detailVisible.value && (
+8 -5
View File
@@ -1,8 +1,10 @@
/** .eventUsersMain {
* 表格 body 容器:占满 flex 剩余空间,并确保 antd 嵌套 div 逐层传递 height: 100%, flex: 1;
* 使得 Table scroll.y = 'calc(100% - 55px)' 中的 100% 能正确解析。 min-height: 0;
*/ display: flex;
.tableBody { flex-direction: column;
.tableBody {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
@@ -15,4 +17,5 @@
height: 100%; height: 100%;
} }
} }
}
} }
+3 -1
View File
@@ -13,7 +13,7 @@ import {
import { useUserModel, USER_STATUS_OPTIONS } from './model/useUserModel'; import { useUserModel, USER_STATUS_OPTIONS } from './model/useUserModel';
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'; import pageStyles from '@/assets/styles/pageLayout.module.less';
/** /**
* bodyCell 渲染函数 * bodyCell 渲染函数
@@ -145,6 +145,7 @@ export default defineComponent({
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class={pageStyles.table}>
<div class={styles.eventUsersMain}>
<div ref={containerRef} class={styles.tableBody}> <div ref={containerRef} class={styles.tableBody}>
<Table <Table
columns={tableColumns} columns={tableColumns}
@@ -177,6 +178,7 @@ export default defineComponent({
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}, },
}); });
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -92,7 +92,7 @@ export default defineComponent({
]; ];
return () => ( return () => (
<div class={styles.container}> <div class={styles.loginMain}>
<div class={styles.brand}> <div class={styles.brand}>
<div class={styles.orb1} /> <div class={styles.orb1} />
<div class={styles.orb2} /> <div class={styles.orb2} />
@@ -1,33 +1,35 @@
.form { .roleFormModalMain {
.modal {
:global {
.ant-modal-body {
padding: 16px 24px 0;
}
}
}
.form {
:global { :global {
.ant-form-item { .ant-form-item {
margin-bottom: 16px; margin-bottom: 16px;
} }
} }
} }
.treeWrapper { .treeWrapper {
max-height: 380px; max-height: 380px;
overflow: auto; overflow: auto;
padding: 8px 12px; padding: 8px 12px;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
border-radius: 4px; border-radius: 4px;
background: #fafafa; background: #fafafa;
} }
.footer { .footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 8px; gap: 8px;
padding-top: 16px; padding-top: 16px;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
margin-top: 8px; margin-top: 8px;
}
.modal {
:global {
.ant-modal-body {
padding: 16px 24px 0;
}
} }
} }
@@ -100,6 +100,7 @@ export default defineComponent({
destroyOnClose destroyOnClose
footer={null} footer={null}
centered centered
wrapClassName={styles.roleFormModalMain}
class={styles.modal} class={styles.modal}
> >
<Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark> <Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark>
@@ -1,23 +1,25 @@
.filter { .userListModalMain {
.filter {
margin-bottom: 16px; margin-bottom: 16px;
} }
.bottom { .bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 16px; margin-top: 16px;
padding-top: 12px; padding-top: 12px;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
} }
.total { .total {
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
font-size: 13px; font-size: 13px;
} }
.paginationRow { .paginationRow {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-top: 12px; margin-top: 12px;
}
} }
@@ -78,6 +78,7 @@ export default defineComponent({
footer={null} footer={null}
centered centered
destroyOnClose destroyOnClose
wrapClassName={styles.userListModalMain}
> >
{/* 筛选 */} {/* 筛选 */}
<div class={styles.filter}> <div class={styles.filter}>
+14 -12
View File
@@ -1,7 +1,10 @@
/** .systemRolesMain {
* 表格 body 容器:占满 flex 剩余空间 flex: 1;
*/ min-height: 0;
.tableBody { display: flex;
flex-direction: column;
.tableBody {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
@@ -14,15 +17,13 @@
height: 100%; height: 100%;
} }
} }
} }
/* 用户数链接 */ .userCountLink {
.userCountLink {
font-variant-numeric: tabular-nums; font-variant-numeric: tabular-nums;
} }
/* ===== 删除确认弹窗 ===== */ .confirmContent {
.confirmContent {
padding: 4px 24px; padding: 4px 24px;
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
@@ -31,13 +32,14 @@
margin: 0 4px; margin: 0 4px;
font-weight: 600; font-weight: 600;
} }
} }
.confirmTip { .confirmTip {
margin-top: 8px; margin-top: 8px;
font-size: 12px; font-size: 12px;
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
line-height: 1.5; line-height: 1.5;
}
} }
:global(.deleteConfirmModal) { :global(.deleteConfirmModal) {
+5 -1
View File
@@ -6,7 +6,7 @@ import { useContainerSize } from '@/hooks';
import RoleFormModal from './components/RoleFormModal'; import RoleFormModal from './components/RoleFormModal';
import UserListModal from './components/UserListModal'; import UserListModal from './components/UserListModal';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less'; import pageStyles from '@/assets/styles/pageLayout.module.less';
/** /**
* bodyCell 渲染 * bodyCell 渲染
@@ -57,6 +57,7 @@ function confirmDelete({ record, onOk }: { record: any; onOk: (record: any) => v
icon: null, icon: null,
class: styles.deleteConfirmModal, class: styles.deleteConfirmModal,
content: ( content: (
<div class={styles.systemRolesMain}>
<div class={styles.confirmContent}> <div class={styles.confirmContent}>
<div> <div>
<span>确定要删除角色</span> <span>确定要删除角色</span>
@@ -65,6 +66,7 @@ function confirmDelete({ record, onOk }: { record: any; onOk: (record: any) => v
</div> </div>
<div class={styles.confirmTip}>删除后该角色下的用户将失去对应的权限,请谨慎操作。</div> <div class={styles.confirmTip}>删除后该角色下的用户将失去对应的权限,请谨慎操作。</div>
</div> </div>
</div>
), ),
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
@@ -148,6 +150,7 @@ export default defineComponent({
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class={pageStyles.table}>
<div class={styles.systemRolesMain}>
<div ref={containerRef} class={styles.tableBody}> <div ref={containerRef} class={styles.tableBody}>
<Table <Table
columns={tableColumns} columns={tableColumns}
@@ -181,6 +184,7 @@ export default defineComponent({
/> />
</div> </div>
</div> </div>
</div>
{/* ===== 角色表单弹窗 ===== */} {/* ===== 角色表单弹窗 ===== */}
{formVisible.value && ( {formVisible.value && (
@@ -1,27 +1,25 @@
/* ===== 表单行/列布局 ===== */ .userFormModalMain {
.row { .row {
display: flex; display: flex;
gap: 16px; gap: 16px;
flex-wrap: wrap; flex-wrap: wrap;
} }
.col { .col {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
} }
/* 让 antd Form.Item 在 col 里能正确控制宽度 */ .form {
.form {
:global { :global {
.ant-form-item { .ant-form-item {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
} }
} }
} }
/* ===== 密码区重置链接 ===== */ .resetLink {
.resetLink {
font-size: 14px; font-size: 14px;
color: #1677ff; color: #1677ff;
cursor: pointer; cursor: pointer;
@@ -30,23 +28,22 @@
&:hover { &:hover {
color: #4096ff; color: #4096ff;
} }
} }
/* ===== 取消重置行 ===== */ .cancelRow {
.cancelRow {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-top: -8px; margin-top: -8px;
margin-bottom: 16px; margin-bottom: 16px;
font-size: 12px; font-size: 12px;
} }
/* ===== 底部按钮 ===== */ .footer {
.footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 8px; gap: 8px;
padding-top: 16px; padding-top: 16px;
border-top: 1px solid #f0f0f0; border-top: 1px solid #f0f0f0;
margin-top: 8px; margin-top: 8px;
}
} }
@@ -121,6 +121,7 @@ export default defineComponent({
destroyOnClose destroyOnClose
footer={null} footer={null}
centered centered
wrapClassName={styles.userFormModalMain}
> >
<Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark> <Form ref={formRef} layout="vertical" model={formData} class={styles.form} requiredMark>
{/* 姓名 / 手机号:同一行 */} {/* 姓名 / 手机号:同一行 */}
+10 -12
View File
@@ -1,9 +1,10 @@
/** .systemUsersMain {
* 表格 body 容器:占满 flex 剩余空间, flex: 1;
* 确保 antd 嵌套 div 逐层传递 height: 100%, min-height: 0;
* 使得 Table scroll.y 能正确解析。 display: flex;
*/ flex-direction: column;
.tableBody {
.tableBody {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow: hidden; overflow: hidden;
@@ -16,12 +17,9 @@
height: 100%; height: 100%;
} }
} }
} }
/* ===== 禁用/启用 二次确认弹窗 ===== */ .confirmContent {
/* 内容块:左右加 padding,按用户要求 */
.confirmContent {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
@@ -33,9 +31,9 @@
margin: 0 4px; margin: 0 4px;
font-weight: 600; font-weight: 600;
} }
}
} }
/* antd Modal.confirm 默认 body 已经有 padding,这里额外覆盖一下确保一致 */
:global(.toggleConfirmModal) { :global(.toggleConfirmModal) {
.ant-modal-confirm-body { .ant-modal-confirm-body {
padding: 24px !important; padding: 24px !important;
+5 -1
View File
@@ -4,7 +4,7 @@ import { useUserModel, USER_ROLE_OPTIONS, USER_STATUS_OPTIONS } from './model/us
import { useContainerSize } from '@/hooks'; import { useContainerSize } from '@/hooks';
import UserFormModal from './components/UserFormModal'; import UserFormModal from './components/UserFormModal';
import styles from './index.module.less'; import styles from './index.module.less';
import pageStyles from '@/components/page/pageLayout.module.less'; import pageStyles from '@/assets/styles/pageLayout.module.less';
/** /**
* bodyCell 渲染函数 * bodyCell 渲染函数
@@ -54,11 +54,13 @@ function confirmToggleStatus({ record, onOk }: { record: any; onOk: (record: any
title: `确认${actionText}`, title: `确认${actionText}`,
class: styles.toggleConfirmModal, class: styles.toggleConfirmModal,
content: ( content: (
<div class={styles.systemUsersMain}>
<div class={styles.confirmContent}> <div class={styles.confirmContent}>
<span>确定要{actionText}用户</span> <span>确定要{actionText}用户</span>
<strong>{record.realName}</strong> <strong>{record.realName}</strong>
<span>吗?</span> <span>吗?</span>
</div> </div>
</div>
), ),
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
@@ -164,6 +166,7 @@ export default defineComponent({
{/* ===== 表格区 ===== */} {/* ===== 表格区 ===== */}
<div class={pageStyles.table}> <div class={pageStyles.table}>
<div class={styles.systemUsersMain}>
<div ref={containerRef} class={styles.tableBody}> <div ref={containerRef} class={styles.tableBody}>
<Table <Table
columns={tableColumns} columns={tableColumns}
@@ -196,6 +199,7 @@ export default defineComponent({
/> />
</div> </div>
</div> </div>
</div>
{/* ===== 新增/编辑弹窗 ===== */} {/* ===== 新增/编辑弹窗 ===== */}
{modalVisible.value && ( {modalVisible.value && (