mirror of
https://github.com/PlayEdu/backend
synced 2025-06-29 06:02:48 +08:00
学员页面重复请求api和分类默认展开
This commit is contained in:
parent
dfc33aa754
commit
d90afcc08b
@ -89,13 +89,16 @@ export const TreeCategory = (props: PropInterface) => {
|
||||
<span>全部{props.text}</span>
|
||||
</div>
|
||||
</div>
|
||||
<Tree
|
||||
onSelect={onSelect}
|
||||
selectedKeys={selectKey}
|
||||
onExpand={onExpand}
|
||||
treeData={treeData}
|
||||
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
||||
/>
|
||||
{treeData.length > 0 && (
|
||||
<Tree
|
||||
onSelect={onSelect}
|
||||
selectedKeys={selectKey}
|
||||
onExpand={onExpand}
|
||||
treeData={treeData}
|
||||
defaultExpandAll={true}
|
||||
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -71,8 +71,10 @@ export const UploadImageButton = (props: PropsInterface) => {
|
||||
|
||||
// 加载图片列表
|
||||
useEffect(() => {
|
||||
getImageList();
|
||||
}, [category_ids, refresh, page, size]);
|
||||
if (showModal) {
|
||||
getImageList();
|
||||
}
|
||||
}, [category_ids, refresh, page, size, showModal]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -434,6 +434,7 @@ export const CourseCreate: React.FC<PropInterface> = ({
|
||||
style={{ width: 424 }}
|
||||
treeData={categories}
|
||||
placeholder="请选择课程分类"
|
||||
treeDefaultExpandAll
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
|
@ -190,6 +190,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
||||
style={{ width: 424 }}
|
||||
treeData={categories}
|
||||
placeholder="请选择课程分类"
|
||||
treeDefaultExpandAll
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
|
@ -372,15 +372,18 @@ const ResourceCategoryPage = () => {
|
||||
</div>
|
||||
<div className="playedu-main-body">
|
||||
<div style={{ width: 366 }}>
|
||||
<Tree
|
||||
onSelect={onSelect}
|
||||
treeData={treeData}
|
||||
draggable
|
||||
blockNode
|
||||
onDragEnter={onDragEnter}
|
||||
onDrop={onDrop}
|
||||
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
||||
/>
|
||||
{treeData.length > 0 && (
|
||||
<Tree
|
||||
onSelect={onSelect}
|
||||
treeData={treeData}
|
||||
draggable
|
||||
blockNode
|
||||
onDragEnter={onDragEnter}
|
||||
onDrop={onDrop}
|
||||
defaultExpandAll={true}
|
||||
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<ResourceCategoryCreate
|
||||
open={createVisible}
|
||||
|
Loading…
x
Reference in New Issue
Block a user