fix: 优化赛事列表详情弹窗
This commit is contained in:
@@ -162,6 +162,12 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 显示报名起止时间 */
|
||||||
|
const signupTimeDisplay = (startTime?: string, endTime?: string) => {
|
||||||
|
if (!startTime || !endTime) return '--';
|
||||||
|
return `${startTime} 至 ${endTime}`;
|
||||||
|
};
|
||||||
|
|
||||||
// 弹窗打开且 有 record.id 时自动请求(useEffect 带 immediate: true,兼容 destroyOnClose 重建场景)
|
// 弹窗打开且 有 record.id 时自动请求(useEffect 带 immediate: true,兼容 destroyOnClose 重建场景)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.visible && props.record?.id) {
|
if (props.visible && props.record?.id) {
|
||||||
@@ -200,7 +206,7 @@ export default defineComponent({
|
|||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
|
||||||
<Descriptions.Item label="报名起止时间" span={3}>
|
<Descriptions.Item label="报名起止时间" span={3}>
|
||||||
{detail.value.signupTimeBegin} 至 {detail.value.signupTimeEnd}
|
{signupTimeDisplay(detail.value.signupTimeBegin, detail.value.signupTimeEnd)}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
|
||||||
<Descriptions.Item label="省市区">{detail.value.venueArea}</Descriptions.Item>
|
<Descriptions.Item label="省市区">{detail.value.venueArea}</Descriptions.Item>
|
||||||
@@ -276,7 +282,7 @@ export default defineComponent({
|
|||||||
size="small"
|
size="small"
|
||||||
pagination={false}
|
pagination={false}
|
||||||
bordered
|
bordered
|
||||||
scroll={{ x: 'max-content', y: 200 }}
|
scroll={{ x: 'max-content' }}
|
||||||
/>
|
/>
|
||||||
{categoryPlayerTotal.value[cat.id] > 0 && (
|
{categoryPlayerTotal.value[cat.id] > 0 && (
|
||||||
<div class={styles.paginationRow}>
|
<div class={styles.paginationRow}>
|
||||||
|
|||||||
Reference in New Issue
Block a user