!2592 优化:资源列表数据请求

pull/2590/MERGE
黄诗津 7 months ago committed by ChenX
parent ec533ba2c2
commit 11b4944d20

@ -26,6 +26,12 @@ export const ResourcePanelType = {
export class ResourcePanel extends Component<{}, {}>
{
resourceStore = ResourceStore.GetInstance();
constructor(prop)
{
super(prop);
this.resourceStore.InitAllModulesFolder();
}
componentWillUnmount()
{
this.resourceStore.currentState = ResourcePanelType.publicLibrary;

@ -43,14 +43,19 @@ import { GetPrivateModuleDirs, GetPrivateModuleList, GetUserCollectDir, GetUserC
export const pageCount: string = '20';
export default class ResourceStore
{
isInit = false;
//更新账号内所有库
InitAllModulesFolder()
{
this.InitClassList(this.class_type);
this.InitUserCollectDir(this.folderSort);
this.GetPrivateDir();
this.GetPrivateModule();
this.currentState = ResourcePanelType.publicLibrary;
if (!this.isInit)
{
this.InitClassList(this.class_type);
this.InitUserCollectDir(this.folderSort);
this.GetPrivateDir();
this.GetPrivateModule();
this.currentState = ResourcePanelType.publicLibrary;
this.isInit = true;
}
}
class_type: number = 1;

@ -29,7 +29,6 @@ import { datalistStore } from "../Components/Common/DatalistStore";
import { commonPanelStore } from "../Components/SourceManage/CommonPanelStore";
import { AppToaster, ToasterValueError } from "../Components/Toaster";
import RoomBaseParamsStore from "../Components/ToolBar/ModifyModel/RoomBaseParamsStore";
import ResourceStore from "../Components/ToolBar/ResourceLibrary/RsourceStore";
import { bbsEditorStore } from "./BBSEditorStore";
import { IConfigStore } from "./BoardStore";
import { configListMapStore } from "./ConfigListMapStore";
@ -281,7 +280,6 @@ export class UserConfigStore extends Singleton
this.InitDoorWindowPanelStore();
RoomBaseParamsStore.GetSingleInstance();
ResourceStore.GetInstance().InitAllModulesFolder();
await this.InitCustomCmd();
await LimitCommand();

Loading…
Cancel
Save