feat: 部分样式修改 添加赛事规程查看弹窗

This commit is contained in:
ZhuRui
2026-07-29 10:15:23 +08:00
parent 715666b5b6
commit 594324c459
6 changed files with 14 additions and 27 deletions
+1 -6
View File
@@ -107,12 +107,7 @@ function renderBodyCell({
<Button type="link" size="small" onClick={() => onEdit(record)}>
</Button>
<Button
type="link"
size="small"
style={isEnabled ? { color: '#faad14' } : { color: '#52c41a' }}
onClick={() => onToggleStatus(record)}
>
<Button type="link" size="small" onClick={() => onToggleStatus(record)}>
{isEnabled ? '禁用' : '启用'}
</Button>
<Button type="link" size="small" danger onClick={() => onDelete(record)}>
@@ -29,7 +29,7 @@
.imageGrid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-columns: repeat(5, 1fr);
gap: 12px;
}
@@ -7,7 +7,7 @@ interface EventRegulationModalProps {
onClose: () => void;
}
/** 规程文字 */
/** 规程内容 */
const REGULATION_TEXT = [
'一、赛事目的:推动羽毛球运动发展,提高运动员技术水平,增进体育文化交流。',
'二、参赛资格:凡身体健康、年龄符合要求的羽毛球爱好者均可报名参加。',
@@ -35,16 +35,16 @@ export default defineComponent({
<Modal
visible={props.visible}
title="赛事规程"
width={760}
width={880}
onCancel={props.onClose}
footer={null}
centered
destroyOnClose
wrapClassName={styles.eventRegulationModalMain}
>
{/* 规程文字 */}
{/* 规程内容 */}
<div class={styles.section}>
<div class={styles.sectionTitle}></div>
<div class={styles.sectionTitle}></div>
<div class={styles.textBlock}>{REGULATION_TEXT}</div>
</div>
+6 -8
View File
@@ -37,6 +37,7 @@ function renderBodyCell({
text,
record,
onView,
onViewRegulation,
onAudit,
onToggleShelf,
}: {
@@ -44,6 +45,7 @@ function renderBodyCell({
text: any;
record: any;
onView: (record: any) => void;
onViewRegulation: (record: any) => void;
onAudit: (record: any) => void;
onToggleShelf: (record: any) => void;
}) {
@@ -62,7 +64,7 @@ function renderBodyCell({
if (column.key === 'regulation') {
return (
<a style={{ cursor: 'pointer' }} onClick={() => onView(record)}>
<a style={{ cursor: 'pointer' }} onClick={() => onViewRegulation(record)}>
</a>
);
@@ -89,7 +91,7 @@ function renderBodyCell({
<Button type="link" size="small" onClick={() => onView(record)}>
</Button>
<Button type="link" size="small" danger onClick={() => onToggleShelf(record)}>
<Button type="link" size="small" onClick={() => onToggleShelf(record)}>
</Button>
</Space>
@@ -100,12 +102,7 @@ function renderBodyCell({
<Button type="link" size="small" onClick={() => onView(record)}>
</Button>
<Button
type="link"
size="small"
style={{ color: '#52c41a' }}
onClick={() => onToggleShelf(record)}
>
<Button type="link" size="small" onClick={() => onToggleShelf(record)}>
</Button>
</Space>
@@ -313,6 +310,7 @@ export default defineComponent({
renderBodyCell({
...args,
onView: handleView,
onViewRegulation: handleViewRegulation,
onAudit: handleAudit,
onToggleShelf: handleToggleShelf,
}),
+1 -1
View File
@@ -46,7 +46,7 @@ function renderBodyCell({
if (column.key === 'action') {
const isActive = record.status === 'active';
return (
<Button type="link" size="small" danger={isActive} onClick={() => onToggleStatus(record)}>
<Button type="link" size="small" onClick={() => onToggleStatus(record)}>
{isActive ? '禁用' : '启用'}
</Button>
);
+1 -7
View File
@@ -28,13 +28,7 @@ function renderBodyCell({
<Button type="link" size="small" onClick={() => onEdit(record)}>
</Button>
<Button
type="link"
size="small"
danger={isActive}
style={isActive ? {} : { color: '#52c41a' }}
onClick={() => onToggleStatus(record)}
>
<Button type="link" size="small" onClick={() => onToggleStatus(record)}>
{isActive ? '禁用' : '启用'}
</Button>
</Space>