Files
lowcode-frontend/preview/views/Preview.vue
2024-11-06 00:19:58 +08:00

28 lines
709 B
Vue

<template>
<div v-if="!isEmpty(data)" class="box">
<template v-for="item in data" :key="item.id">
<!-- <component :is="componentsList[item.code]" :data="item"></component>-->
</template>
</div>
</template>
<script setup lang="ts">
import {onBeforeMount, shallowRef, ref} from "vue";
import {isEmpty} from "lodash";
import _ from "lodash";
const data = shallowRef<any>({});
onBeforeMount(() => {
// 接收客户端posemessage传递过来的消息
const obj = JSON.parse(localStorage.getItem("lowcode") || "");
console.log("数据哈哈哈", obj);
data.value = obj;
});
</script>
<style lang="scss" scoped>
.box {
width: 1000px;
height: 600px;
overflow: hidden;
}
</style>