mirror of
https://github.com/PlayEdu/backend
synced 2025-07-08 10:52:49 +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>
|
<span>全部{props.text}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{treeData.length > 0 && (
|
||||||
<Tree
|
<Tree
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
selectedKeys={selectKey}
|
selectedKeys={selectKey}
|
||||||
onExpand={onExpand}
|
onExpand={onExpand}
|
||||||
treeData={treeData}
|
treeData={treeData}
|
||||||
|
defaultExpandAll={true}
|
||||||
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -71,8 +71,10 @@ export const UploadImageButton = (props: PropsInterface) => {
|
|||||||
|
|
||||||
// 加载图片列表
|
// 加载图片列表
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (showModal) {
|
||||||
getImageList();
|
getImageList();
|
||||||
}, [category_ids, refresh, page, size]);
|
}
|
||||||
|
}, [category_ids, refresh, page, size, showModal]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -434,6 +434,7 @@ export const CourseCreate: React.FC<PropInterface> = ({
|
|||||||
style={{ width: 424 }}
|
style={{ width: 424 }}
|
||||||
treeData={categories}
|
treeData={categories}
|
||||||
placeholder="请选择课程分类"
|
placeholder="请选择课程分类"
|
||||||
|
treeDefaultExpandAll
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
@ -190,6 +190,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
|
|||||||
style={{ width: 424 }}
|
style={{ width: 424 }}
|
||||||
treeData={categories}
|
treeData={categories}
|
||||||
placeholder="请选择课程分类"
|
placeholder="请选择课程分类"
|
||||||
|
treeDefaultExpandAll
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
@ -372,6 +372,7 @@ const ResourceCategoryPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="playedu-main-body">
|
<div className="playedu-main-body">
|
||||||
<div style={{ width: 366 }}>
|
<div style={{ width: 366 }}>
|
||||||
|
{treeData.length > 0 && (
|
||||||
<Tree
|
<Tree
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
treeData={treeData}
|
treeData={treeData}
|
||||||
@ -379,8 +380,10 @@ const ResourceCategoryPage = () => {
|
|||||||
blockNode
|
blockNode
|
||||||
onDragEnter={onDragEnter}
|
onDragEnter={onDragEnter}
|
||||||
onDrop={onDrop}
|
onDrop={onDrop}
|
||||||
|
defaultExpandAll={true}
|
||||||
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<ResourceCategoryCreate
|
<ResourceCategoryCreate
|
||||||
open={createVisible}
|
open={createVisible}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user