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