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> <slot name="footer"></slot>
</template> </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-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> <template #page-bar-popover="{ page }"><slot name="page-bar-popover" :page="page"></slot></template>
</Framework> </Framework>

View File

@ -36,10 +36,12 @@
<AddPageBox :disabled-page-fragment="disabledPageFragment"></AddPageBox> <AddPageBox :disabled-page-fragment="disabledPageFragment"></AddPageBox>
</slot> </slot>
<PageBar :disabled-page-fragment="disabledPageFragment"> <slot name="page-bar">
<template #page-bar-title="{ page }"><slot name="page-bar-title" :page="page"></slot></template> <PageBar :disabled-page-fragment="disabledPageFragment">
<template #page-bar-popover="{ page }"><slot name="page-bar-popover" :page="page"></slot></template> <template #page-bar-title="{ page }"><slot name="page-bar-title" :page="page"></slot></template>
</PageBar> <template #page-bar-popover="{ page }"><slot name="page-bar-popover" :page="page"></slot></template>
</PageBar>
</slot>
</template> </template>
<template v-if="page" #right> <template v-if="page" #right>

View File

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