✨: dropdown 默认渲染至 body
This commit is contained in:
@@ -72,13 +72,15 @@
|
||||
border-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.layui-dropdown-content .layui-dropdown{
|
||||
.layui-dropdown-content .layui-menu li.layui-disabled:hover {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
// fix style
|
||||
.layui-dropdown-menu .layui-dropdown{
|
||||
display: block;
|
||||
width: -moz-available;
|
||||
width: -webkit-fill-available;
|
||||
width: fill-available;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.layui-dropdown-content .layui-menu li.layui-disabled:hover {
|
||||
background-color: inherit;
|
||||
}
|
||||
@@ -73,6 +73,7 @@ const props = withDefaults(defineProps<LayDropdownProps>(), {
|
||||
mouseLeaveDelay: 150,
|
||||
focusDelay: 150,
|
||||
alignPoint: false,
|
||||
popupContainer: "body",
|
||||
});
|
||||
|
||||
const childrenRefs = new Set<Ref<HTMLElement>>();
|
||||
|
||||
@@ -36,6 +36,7 @@ const props = withDefaults(defineProps<LayDropdownSubMenuProps>(), {
|
||||
:auto-fit-min-width="false"
|
||||
:contentOffset="contentOffset"
|
||||
:disabled="disabled"
|
||||
updateAtScroll
|
||||
>
|
||||
<lay-dropdown-menu-item :disabled="disabled">
|
||||
<template v-if="$slots.prefix" #prefix>
|
||||
|
||||
@@ -367,6 +367,15 @@
|
||||
.layui-this {
|
||||
background-color: var(--global-primary-color);
|
||||
}
|
||||
|
||||
// fix style
|
||||
.layui-dropdown {
|
||||
display: block;
|
||||
width: -moz-available;
|
||||
width: -webkit-fill-available;
|
||||
width: fill-available;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.layui-sub-menu-popup-theme {
|
||||
|
||||
@@ -34,6 +34,7 @@ const isOpen = computed(() => {
|
||||
:autoFitMinWidth="false"
|
||||
:contentOffset="3"
|
||||
popupContainer="body"
|
||||
updateAtScroll
|
||||
class="layui-sub-menu-popup"
|
||||
>
|
||||
<li :class="['layui-nav-item']">
|
||||
|
||||
Reference in New Issue
Block a user