index.ts 717 B

12345678910111213141516171819202122232425
  1. import { PageListController } from "@queenjs/controllers";
  2. import { ModuleRoot } from "queenjs";
  3. import actions from "./actions";
  4. import { https } from "./http";
  5. import { stores } from "./stores";
  6. export default class ListModule extends ModuleRoot {
  7. config = this.setConfig({
  8. httpConfig: {
  9. baseURL: "./",
  10. },
  11. });
  12. store = this.createStore([stores]);
  13. actions = this.createActions(actions);
  14. https = this.createHttps([https]);
  15. controls = {
  16. backendList: new PageListController(this.config.httpConfig),
  17. };
  18. onReady() {
  19. this.controls.backendList.setCrudPrefix("/antique");
  20. this.actions.initAnimateAttr();
  21. }
  22. }
  23. export const { useList, initList, setList } = ListModule.hook("List");