1234567891011121314151617181920212223 |
- import { PageListController } from "@queenjs/controllers";
- import { ModuleRoot } from "queenjs";
- import { actions } from "./actions";
- import { compoents } from "./components";
- import { store } from "./store";
- export class ResourceModule extends ModuleRoot {
- actions = this.createActions(actions);
- store = this.createStore([store]);
- components = this.useComponents(compoents);
- controls = {
- materialListCtrl: new PageListController(this.config?.httpConfig),
- matTempListCtrl: new PageListController(this.config?.httpConfig),
- };
- onReady() {
- this.controls.materialListCtrl.setCrudPrefix("/");
- this.controls.matTempListCtrl.setCrudPrefix("/");
- }
- }
- export const { useResource, initResource } = ResourceModule.hook("Resource");
|