mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 07:19:32 +08:00
线上课列表渲染优化
This commit is contained in:
@@ -11,8 +11,6 @@ interface Option {
|
||||
interface PropInterface {
|
||||
type: string;
|
||||
text: string;
|
||||
categoryCount: any;
|
||||
resourceTotal: number;
|
||||
|
||||
onUpdate: (keys: any, title: any) => void;
|
||||
}
|
||||
@@ -37,7 +35,7 @@ export const TreeCategory = (props: PropInterface) => {
|
||||
setTreeData(new_arr);
|
||||
}
|
||||
});
|
||||
}, [props.categoryCount]);
|
||||
}, []);
|
||||
|
||||
const checkArr = (categories: any[], id: number) => {
|
||||
const arr = [];
|
||||
|
||||
@@ -99,8 +99,6 @@ export const UploadImageButton = (props: PropsInterface) => {
|
||||
<Col span={7}>
|
||||
<TreeCategory
|
||||
type="no-cate"
|
||||
resourceTotal={0}
|
||||
categoryCount={{}}
|
||||
text={"图片"}
|
||||
onUpdate={(keys: any) => setCategoryIds(keys)}
|
||||
/>
|
||||
|
||||
@@ -32,8 +32,6 @@ export const UploadVideoSub = (props: PropsInterface) => {
|
||||
const [page, setPage] = useState(1);
|
||||
const [size, setSize] = useState(10);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [pureTotal, setPureTotal] = useState(0);
|
||||
const [categoryCount, setCategoryCount] = useState<any>({});
|
||||
|
||||
const [plainOptions, setPlainOptions] = useState<any>([]);
|
||||
const [checkedList, setCheckedList] = useState<CheckboxValueType[]>([]);
|
||||
@@ -48,8 +46,6 @@ export const UploadVideoSub = (props: PropsInterface) => {
|
||||
.then((res: any) => {
|
||||
setTotal(res.data.result.total);
|
||||
setVideoExtra(res.data.videos_extra);
|
||||
setCategoryCount(res.data.category_count);
|
||||
setPureTotal(res.data.pure_total);
|
||||
setVideoList(res.data.result.data);
|
||||
let data = res.data.result.data;
|
||||
const arr = [];
|
||||
@@ -150,8 +146,6 @@ export const UploadVideoSub = (props: PropsInterface) => {
|
||||
<Col span={7}>
|
||||
<TreeCategory
|
||||
type="no-cate"
|
||||
resourceTotal={pureTotal}
|
||||
categoryCount={{ categoryCount }}
|
||||
text={props.label}
|
||||
onUpdate={(keys: any) => setCategoryIds(keys)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user