feat(editor): 添加stage slot

This commit is contained in:
roymondchen 2022-08-24 09:36:06 +08:00 committed by jia000
parent 31029bc8f1
commit 98bc4e2dbb
3 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@
<template #workspace>
<slot name="workspace" :editorService="editorService">
<workspace>
<template #stage><slot name="stage"></slot></template>
<template #workspace-content><slot name="workspace-content" :editorService="editorService"></slot></template>
<template #page-bar-title="{ page }"><slot name="page-bar-title" :page="page"></slot></template>
<template #page-bar-popover="{ page }"><slot name="page-bar-popover" :page="page"></slot></template>

View File

@ -10,7 +10,7 @@
<div class="m-editor-page-bar-title">
<slot name="page-bar-title" :page="item">
<el-tooltip effect="dark" placement="top-start" :content="item.name">
<span>{{ item.name }}</span>
<span>{{ item.name || item.id }}</span>
</el-tooltip>
</slot>
</div>

View File

@ -1,6 +1,8 @@
<template>
<div class="m-editor-workspace" tabindex="1" ref="workspace">
<magic-stage :key="page?.id"></magic-stage>
<slot name="stage">
<magic-stage :key="page?.id"></magic-stage>
</slot>
<slot name="workspace-content"></slot>