update package/component/src/component/layout/index.vue.
修复如果只引入了Footer组件,layui-layout-vertical样式不会生效,而导致布局错位的问题 <lay-layout class="example"> <lay-layout> <lay-side>side</lay-side> <lay-body>content</lay-body> </lay-layout> <lay-footer>footer</lay-footer> </lay-layout> Signed-off-by: 蒲公英 <qifeiweb@vip.qq.com>
This commit is contained in:
parent
ccf208e884
commit
4a263d1ee8
@ -7,6 +7,7 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import { Component, computed, useSlots } from "vue";
|
||||
import Header from "../header/index.vue";
|
||||
import Footer from "../footer/index.vue";
|
||||
import "./index.less";
|
||||
|
||||
export interface LayLayoutProps {
|
||||
@ -25,7 +26,7 @@ const isVertical = computed(() => {
|
||||
return vNodes.some((vNode) => {
|
||||
const componentName = (vNode.type as Component).name;
|
||||
if (!componentName) return false;
|
||||
return [Header.name].includes(componentName);
|
||||
return [Header.name].includes(componentName) || [Footer.name].includes(componentName);
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user