Skip to content

<Preview>

<Preview> 用于使用当前 runtime 和渲染器模板渲染页面。

Props

  • app: Runtime 必填

示例

vue
<template>
    <Preview :app="runtime" />
</template>

<script setup>
import { useRuntimeApp, Preview } from '@ptahjs/ui-vue';

const runtime = useRuntimeApp({ id: 've1' });
runtime.schema(pageJson);
</script>

说明

  • 依赖 RESOURCE_TYPE.RENDERER_CONFIG
  • 没有模板时会显示 PREVIEW ERROR