<template>
  <a-layout class="home">
    <a-layout-content class="a-layout-content-class">
      <!--预览组件-->
      <preview-components v-if="designId" :designId="designId"></preview-components>
    </a-layout-content>
  </a-layout>
</template>

<script setup name="PortalDesignPreView">
import PreviewComponents from '@/views/portal/components/preview-components.vue';
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';

const props = defineProps({
  designId: String
});

// route router
const route = useRoute();

// 门户设计id
const designId = ref('');

onMounted(() => {
  let id = route.query?.id || props.designId;
  if (id) {
    designId.value = id;
  }
});
</script>

<style scoped lang="less">
.home {
  height: 100%;
  background-color: #fff;
}

:deep(.ant-layout-header) {
  padding: 0;
}

.a-layout-content-class {
  background-color: #fff;
}
</style>
