Skip to content

<WorkspaceWidget>

INFO

<WorkspaceWidget> 必须放在 <DesignerRoot> 内使用。

<WorkspaceWidget> 是设计器主画布区域。有当前场景时渲染模板,没有场景时显示空状态。

插槽

插槽说明
#toolbar传给渲染器的工具栏内容
#empty无场景时的空状态内容

示例

vue
<template>
    <WorkspaceWidget>
        <template #toolbar>
            <button @click="designer.undo()">撤销</button>
        </template>
        <template #empty>
            <p>当前没有选中场景。</p>
        </template>
    </WorkspaceWidget>
</template>