index.tsx 653 B

123456789101112131415161718192021222324252627
  1. import { useEditor } from "@/modules/editor";
  2. import { useResource } from "@/modules/resource";
  3. import { defineComponent } from "vue";
  4. import PromotionUI from "./components";
  5. import { createPromotinController } from "./controller";
  6. export default defineComponent({
  7. setup() {
  8. const resource = useResource();
  9. const editor = useEditor();
  10. const ctrl = createPromotinController(resource, editor);
  11. return () => (
  12. <PromotionUI
  13. Controller={ctrl}
  14. slots={
  15. {
  16. // MaterialItem: ()=>{
  17. // return <div>item</div>
  18. // }
  19. }
  20. }
  21. ></PromotionUI>
  22. );
  23. },
  24. });