修改故事列表

This commit is contained in:
jiangh277
2025-08-07 19:48:36 +08:00
parent 182a58d0db
commit efd3f4a82c
8 changed files with 202 additions and 85 deletions

View File

@@ -1,7 +1,7 @@
import { DownOutlined, PlusOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-components';
import { history, useRequest } from '@umijs/max';
import { Avatar, Button, Card, Dropdown, Input, List, Modal, Radio } from 'antd';
import { Avatar, Button, Card, Dropdown, Input, List, Modal } from 'antd';
import type { FC } from 'react';
import React, { useState } from 'react';
import OperationModal from './components/OperationModal';
@@ -9,12 +9,11 @@ import type { StoryType } from './data.d';
import { addStory, deleteStory, queryTimelineList, updateStory } from './service';
import useStyles from './style.style';
/*const RadioButton = Radio.Button;
const RadioGroup = Radio.Group;*/
const { Search } = Input;
const ListContent = ({
data: { ownerId, updatedId, createTime, updateTime, status },
data: { createTime, updateTime, updateName, ownerName, itemCount },
}: {
data: StoryType;
}) => {
@@ -23,15 +22,15 @@ const ListContent = ({
<div>
<div className={styles.listContentItem}>
<span></span>
<p>{ownerId}</p>
<p>{ownerName}</p>
</div>
<div className={styles.listContentItem}>
<span></span>
<p>{updatedId}</p>
<p>{updateName}</p>
</div>
<div className={styles.listContentItem}>
<span></span>
<p>{111}</p>
<p>{itemCount}</p>
</div>
<div className={styles.listContentItem}>
<span></span>
@@ -107,11 +106,19 @@ export const BasicList: FC = () => {
};
const extraContent = (
<div>
{/*<RadioGroup defaultValue="all">
<RadioButton value="all">全部</RadioButton>
<RadioButton value="progress">进行中</RadioButton>
<RadioButton value="waiting">等待中</RadioButton>
</RadioGroup>*/}
<Button
type="dashed"
onClick={() => {
setVisible(true);
}}
style={{
marginBottom: 8,
float: 'left'
}}
>
<PlusOutlined />
</Button>
<Search
className={styles.extraContentSearch}
placeholder="请输入"
@@ -211,19 +218,6 @@ export const BasicList: FC = () => {
</Card>
</div>
</PageContainer>
<Button
type="dashed"
onClick={() => {
setVisible(true);
}}
style={{
width: '100%',
marginBottom: 8,
}}
>
<PlusOutlined />
</Button>
<OperationModal
done={done}
open={open}