index.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { initExpViewer } from "@queenjs-modules/queentree-explorer-viewer";
  2. import { PageListController, UploadController } from "@queenjs/controllers";
  3. import { ModuleRoot } from "queenjs";
  4. import { matchAction } from "./module/actions/match";
  5. import { designAction } from "./module/actions/design";
  6. import { initAction } from "./module/actions/init";
  7. import { helper } from "./module/helper";
  8. import { https } from "./module/http";
  9. import { designStore } from "./module/stores/design";
  10. export class MatchModule extends ModuleRoot {
  11. config = this.setConfig({});
  12. https = this.createHttps([https]);
  13. store = this.createStore(designStore);
  14. helper = this.createHelper(helper);
  15. actions = this.createActions([initAction, matchAction, designAction]);
  16. controls = {
  17. listCtrl: new PageListController(this.config?.httpConfig),
  18. uploader: new UploadController({
  19. httpConfig: {
  20. baseURL: "https://www.infish.cn/tree/v1/assetcenter",
  21. },
  22. dir: "queentree",
  23. }),
  24. };
  25. // modules = this.useModules({
  26. // expViewer: initExpViewer,
  27. // });
  28. onReady() {
  29. this.controls.listCtrl.setCrudPrefix("/match/style");
  30. }
  31. }
  32. export const { initMatch, useMatch } = MatchModule.hook("Match");