index.tsx 636 B

12345678910111213141516171819202122
  1. import { useEditor } from "@/modules/editor";
  2. import { defineUI } from "queenjs";
  3. export default defineUI({
  4. setup() {
  5. const editor = useEditor();
  6. const { store, components } = editor;
  7. return () => (
  8. <div class="h-1/1 text-center overflow-y-auto scrollbar">
  9. <div
  10. class="inline-block w-375px min-h-750px"
  11. style={store.designData.pageStyle}
  12. >
  13. {store.designData.content.map((d) => {
  14. const Comp = components.CompUI[d.compKey];
  15. return <Comp {...d.props} v-model={[d.props.value, "value"]} />;
  16. })}
  17. </div>
  18. </div>
  19. );
  20. },
  21. });