1
0
mirror of synced 2026-04-03 14:38:37 +08:00

feat(editor): 新增page-bar slot

This commit is contained in:
roymondchen
2023-12-20 15:08:24 +08:00
parent f9cf6fa500
commit 7c90b9339d
3 changed files with 8 additions and 4 deletions

View File

@@ -88,6 +88,7 @@
<slot name="footer"></slot>
</template>
<template #page-bar><slot name="page-bar"></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>
</Framework>

View File

@@ -36,10 +36,12 @@
<AddPageBox :disabled-page-fragment="disabledPageFragment"></AddPageBox>
</slot>
<PageBar :disabled-page-fragment="disabledPageFragment">
<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>
</PageBar>
<slot name="page-bar">
<PageBar :disabled-page-fragment="disabledPageFragment">
<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>
</PageBar>
</slot>
</template>
<template v-if="page" #right>

View File

@@ -54,6 +54,7 @@ export interface FrameworkSlots {
workspace(props: {}): any;
'props-panel'(props: {}): any;
'footer'(props: {}): any;
'page-bar'(props: {}): any;
'page-bar-title'(props: { page: MPage | MPageFragment }): any;
'page-bar-popover'(props: { page: MPage | MPageFragment }): any;
}