mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 12:17:37 +08:00
feat(components): [menu] add popper-effect
menu attribute (#10867)
This commit is contained in:
parent
e0150db5b6
commit
0fb2dc950c
@ -15,7 +15,7 @@
|
||||
rootMenu.props.collapse &&
|
||||
$slots.title
|
||||
"
|
||||
:effect="Effect.DARK"
|
||||
:effect="rootMenu.props.popperEffect"
|
||||
placement="right"
|
||||
:fallback-placements="['left']"
|
||||
persistent
|
||||
@ -47,7 +47,6 @@ import {
|
||||
toRef,
|
||||
} from 'vue'
|
||||
import ElTooltip from '@element-plus/components/tooltip'
|
||||
import { Effect } from '@element-plus/components/popper'
|
||||
import { throwError } from '@element-plus/utils'
|
||||
import { useNamespace } from '@element-plus/hooks'
|
||||
import useMenu from './use-menu'
|
||||
@ -106,7 +105,6 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
return {
|
||||
Effect,
|
||||
parentMenu,
|
||||
rootMenu,
|
||||
active,
|
||||
|
@ -66,6 +66,11 @@ export const menuProps = buildProps({
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
popperEffect: {
|
||||
type: String,
|
||||
values: ['dark', 'light'],
|
||||
default: 'dark',
|
||||
},
|
||||
} as const)
|
||||
export type MenuProps = ExtractPropTypes<typeof menuProps>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user