提交 89af27f3 编写于 作者: RedPig97's avatar RedPig97

update: 更新

上级 8a18cc6d
<script setup lang="ts">
interface Props {
viewCaption?: string
showHeader?: boolean
}
const props = withDefaults(defineProps<Props>(), {
// 设定默认值,可选属性可以在这初始化
showHeader: true,
})
</script>
<template>
<IbizDefaultViewLayout>
<IbizViewBaseLayout>
<template v-slot:header-left>
<slot name="caption" />
</template>
......@@ -31,7 +21,7 @@ const props = withDefaults(defineProps<Props>(), {
<template v-slot:footer-content>
<slot name="bottomMessage" />
</template>
</IbizDefaultViewLayout>
</IbizViewBaseLayout>
</template>
<style lang="scss">
......
<script setup lang="ts">
</script>
<template>
<IbizViewBaseLayout>
<template v-slot:header-left>
<slot name="caption" />
</template>
<template v-slot:header-right>
<slot name="toolbar" />
</template>
<template v-slot:header-bottom>
<slot name="topMessage" />
<slot name="searchForm" />
</template>
<template v-slot:body-top>
<slot name="bodyMessage" />
</template>
<slot />
<template v-slot:footer-content>
<slot name="bottomMessage" />
</template>
</IbizViewBaseLayout>
</template>
<style lang="scss">
</style>
\ No newline at end of file
<script setup lang="ts">
</script>
<template>
<a-layout class="app-index-view">
<a-layout-header>
<slot name="header-left" />
<slot name="header-content" />
<slot name="header-right" />
</a-layout-header>
<a-layout>
<slot name="side-left" />
<a-layout-content>
<slot name="content"></slot>
</a-layout-content>
<slot name="side-right" />
</a-layout>
<a-layout-footer>
<slot name="footer-left" />
<slot name="footer-content" />
<slot name="footer-right" />
</a-layout-footer>
</a-layout>
</template>
<style lang="scss">
.app-index-view {
width: 100%;
height: 100%;
.ant-layout-header {
display: flex;
background-color: #fff;
justify-content: space-between;
}
.ant-layout-sider {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
......@@ -17,13 +17,17 @@ const props = withDefaults(defineProps<LayoutProps>(), {
</script>
<template>
<a-layout class="app-index-view">
<a-layout-header>
<slot name="header"></slot>
<IbizIndexViewBaseLayout :collapsed="collapsed">
<template v-slot:header-left>
<slot name="caption"></slot>
</template>
<template v-slot:header-content>
<slot name="menu" v-if="Object.is(menuAlign, 'TOP')"></slot>
</template>
<template v-slot:header-right>
<slot name="user"></slot>
</a-layout-header>
<a-layout>
</template>
<template v-slot:side-left>
<a-layout-sider
v-if="Object.is(menuAlign, 'LEFT')"
theme="light"
......@@ -32,11 +36,11 @@ const props = withDefaults(defineProps<LayoutProps>(), {
:collapsed="collapsed">
<slot name="menu"></slot>
</a-layout-sider>
<a-layout-content>
<slot name="content"></slot>
</a-layout-content>
</a-layout>
</a-layout>
</template>
<template v-slot:content>
<slot name="router" />
</template>
</IbizIndexViewBaseLayout>
</template>
<style lang="scss">
......@@ -51,5 +55,8 @@ const props = withDefaults(defineProps<LayoutProps>(), {
.ant-layout-sider {
overflow-y: auto;
}
.ant-layout-footer {
padding: 0;
}
}
</style>
\ No newline at end of file
<script setup lang="ts">
interface Props {
viewCaption?: string
showHeader?: boolean
}
const props = withDefaults(defineProps<Props>(), {
// 设定默认值,可选属性可以在这初始化
showHeader: true,
})
const slots = useSlots();
const showHeader = computed(()=> props.showHeader && (props.viewCaption || slots.header || slots['header-left'] || slots['header-left'] || slots['header-right'] || slots['header-bottom']))
</script>
......
......@@ -38,8 +38,8 @@ const collapsedChange = () => {
</script>
<template>
<IbizDefaultIndexViewLayout class="ibiz-index-view" :menuAlign="state.menuAlign" :collapsed="collapsed">
<template #header>
<IbizIndexViewLayout class="ibiz-index-view" :menuAlign="state.menuAlign" :collapsed="collapsed">
<template #caption>
<div class="index-view-header">
\{{state.viewCaption}}
<MenuUnfoldOutlined
......@@ -63,10 +63,10 @@ const collapsedChange = () => {
:viewSubject="state.viewSubject"
></{{#page.ctrls}}{{#eq controlType "APPMENU"}}{{codeName}}Menu{{/eq}}{{/page.ctrls}}>
</template>
<template #content>
<template #router>
<router-view />
</template>
</IbizDefaultIndexViewLayout>
</IbizIndexViewLayout>
</template>
<style lang="scss">
......
......@@ -71,5 +71,6 @@ const { state, handleToolbarEvent } = new EditView(ViewConfig).moduleInstall(pro
.ibiz-edit-view {
height: 100%;
width: 100%;
overflow: auto;
}
</style>
\ No newline at end of file
......@@ -34,13 +34,13 @@ const { state, handleCtrlEvent } = new GridView(ViewConfig).moduleInstall(props)
</script>
<template>
<IbizDefaultViewLayout class="ibiz-grid-view">
<template v-slot:header-left>
<IbizGridViewLayout class="ibiz-grid-view">
<template v-slot:caption>
<IbizIconText class="ibiz-view__caption" size="large" :text="state.viewCaption" />
</template>
{{#page.ctrls}}
{{#eq controlType "TOOLBAR"}}
<template v-slot:header-right>
<template v-slot:toolbar>
<IbizToolbar
mode="button"
name="{{lowerCase codeName}}"
......@@ -61,7 +61,7 @@ const { state, handleCtrlEvent } = new GridView(ViewConfig).moduleInstall(props)
></{{codeName}}Grid>
{{/eq}}
{{/page.ctrls}}
</IbizDefaultViewLayout>
</IbizGridViewLayout>
</template>
<style lang="scss">
......
......@@ -51,7 +51,4 @@ const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(p
</a-form>
</template>
<style lang="scss">
.ibiz-form {
margin: 20px !important;
}
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册