index.tsx 784 B

123456789101112131415161718192021222324252627
  1. import { useResource } from "@/modules/resource";
  2. import { defineComponent } from "vue";
  3. import PromotionUI from "./components";
  4. import { PromotionController } from "./components/PromotionController";
  5. import { PageListController } from "@queenjs/controllers";
  6. export default defineComponent({
  7. setup() {
  8. const resource = useResource();
  9. const ctrl= new PromotionController();
  10. ctrl.ListCtrl = new PageListController(resource.config?.httpConfig);
  11. ctrl.ListCtrl.setCrudPrefix("/h5")
  12. ctrl.createPromotion = resource.actions.createPromotion;
  13. return () => (
  14. <PromotionUI
  15. Controller={ctrl}
  16. slots={{
  17. // MaterialItem: ()=>{
  18. // return <div>item</div>
  19. // }
  20. }}
  21. ></PromotionUI>
  22. );
  23. },
  24. });