feat: 部分样式修改 添加赛事规程查看弹窗
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user