fix:完善预览模式
This commit is contained in:
27
src/views/Preview.vue
Normal file
27
src/views/Preview.vue
Normal file
@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<DynamicComponent v-for="component in preView" :key="component.id" :componentData="component">
|
||||
{{ component.id }}
|
||||
</DynamicComponent>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onBeforeMount, shallowRef, ref} from "vue";
|
||||
import DynamicComponent from "@/components/DynamicComponent.vue";
|
||||
import { useSchemeStore } from '../stores/useSchemeStore';
|
||||
|
||||
const store = useSchemeStore();
|
||||
let preView=ref([])
|
||||
|
||||
|
||||
onBeforeMount(() => {
|
||||
store.designerMode=false
|
||||
preView = JSON.parse(localStorage.getItem("lowcode") || "");
|
||||
console.log(preView)
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 1000px;
|
||||
height: 600px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user