@@ -4,6 +4,7 @@ import { ReactNextElement, wrapBrick } from "@next-core/react-element";
44import "@next-core/theme" ;
55import styleText from "./styles.shadow.css" ;
66import type {
7+ Placement ,
78 Popover ,
89 PopoverEvents ,
910 PopoverEventsMapping ,
@@ -45,6 +46,7 @@ export interface DropdownActionsProps
4546 extends Pick < ActionsProps , "actions" | "checkedKeys" | "themeVariant" > {
4647 disabled ?: boolean ;
4748 strategy ?: "absolute" | "fixed" ;
49+ placement ?: Placement ;
4850}
4951
5052export interface DropdownActionsEvents {
@@ -101,6 +103,14 @@ class EoDropdownActions
101103 @property ( )
102104 accessor strategy : "absolute" | "fixed" | undefined ;
103105
106+ /**
107+ * 弹出层放置位置
108+ *
109+ * @default "bottom-start"
110+ */
111+ @property ( )
112+ accessor placement : Placement | undefined ;
113+
104114 /** 主题变体 */
105115 @property ( )
106116 accessor themeVariant : "default" | "elevo" | undefined ;
@@ -136,6 +146,7 @@ class EoDropdownActions
136146 actions = { this . actions }
137147 disabled = { this . disabled }
138148 strategy = { this . strategy }
149+ placement = { this . placement }
139150 themeVariant = { this . themeVariant }
140151 onActionClick = { this . #handleClick}
141152 onVisibleChange = { this . #handleVisibleChange}
@@ -155,6 +166,7 @@ export function EoDropdownActionsComponent({
155166 checkedKeys,
156167 disabled,
157168 strategy,
169+ placement,
158170 themeVariant,
159171 onActionClick,
160172 onVisibleChange,
@@ -171,7 +183,7 @@ export function EoDropdownActionsComponent({
171183
172184 return (
173185 < WrappedPopover
174- placement = "bottom-start"
186+ placement = { placement ?? "bottom-start" }
175187 trigger = "click"
176188 disabled = { disabled }
177189 active = { visible }
0 commit comments