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

update: 更新

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