index.tsx 841 B

1234567891011121314151617181920212223242526272829
  1. import { defineUI } from "queenjs";
  2. import { h } from "vue";
  3. import { useEditor } from "../../../..";
  4. import { CompTree } from "./CompTree";
  5. export default defineUI({
  6. setup() {
  7. const editor = useEditor();
  8. return () => {
  9. const { currComp } = editor.store;
  10. const Form = editor.controls.compUICtrl.state.components.get(
  11. currComp?.compKey
  12. )?.Form;
  13. return (
  14. <div class="flex flex-col h-1/1">
  15. <div class="p-16px border-bottom !border-2px">设置栏</div>
  16. <div class="flex-1 p-16px scrollbar">
  17. <Form component={currComp} />
  18. </div>
  19. <div class="p-16px border-bottom !border-2px border-top">组件树</div>
  20. <div class="h-300px py-20px pr-20px scrollbar">
  21. <CompTree />
  22. </div>
  23. </div>
  24. );
  25. };
  26. },
  27. });