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