For vue2 projects, use @94ai/common-ui
LLMs.md

nf-action ​

Action groups that move overflow items into a dropdown or popover.

Import the components below; see the package README for standalone installation.

Dynamic dropdown mode ​

Loading example…
Dynamic dropdown mode

Dynamic popover mode ​

Loading example…
Dynamic popover mode

Automatic folding by width ​

Loading example…
Automatic folding by width

Attribute ​

parametersDescriptionTypeOptional valueDefault value
modedisplayed modestringdropdown/popover'dropdown'
uniqueThe key of the component loop. If there is no loop, it does not need to be passed.number/string—0
spanThe upper limit of the number of child elements that triggers the drop-down; span=0 is calculated based on the available width; when span is exceeded, span−1 operations and one more entry are displayed.number—3
triggerThe behavior that triggers the drop-downstringhover/click/focus/manual'hover'
tabindextabindex of dropdown componentnumber—0
hide-timeoutThe delay of dropdown closing the drop-down menu (only valid when trigger is hover)number—150
show-timeoutThe delay of dropdown expansion drop-down menu (only valid when trigger is hover)number—250
hide-on-clickWhether dropdown hides the menu after clicking the menu itemboolean—true
placementpopover drop-down positionstringtop/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end'bottom'
offsetThe offset of where the popover appearsnumber—0
transitionPopover defines gradient animationstring—'fade-in-linear'
popper-classThe custom class name of the popover popup layer.string——
popper-optionsPopper 2 configuration of popover; the old version boundariesElement and gpuAcceleration need to be changed to modifiers.Object—
open-delayPopover display delay, in milliseconds; handled by Element Plus if not set.number—200
close-delayPopover hiding delay, in milliseconds.number—0
visible-arrowWhether the popover displays arrows.boolean—true
widthpopover elastic layer width.string / number—auto

Event ​

event nameDescriptioncallback parameters
showTriggered when popover is displayed—
after-enterTriggered after the popover display animation is finished playing—
hideTriggered when popover is hidden—
after-leaveTriggered after the popover hidden animation finishes playing—
visible-changeDropdown triggers when the drop-down box appears/hidesvisible: boolean

Slot ​

NameDescription
defaultaction content

Methods ​

method nameDescriptionreturn value
refreshStyle()Recalculated after layout changes.Promise<void>
open()Open the floating layer manually.void
close()Close the overlay manually.void

Instructions for use ​

Dynamic DOM child elements also support drop-down, such as buttons added or removed after permission control. The example shows the edit and import buttons after 5 seconds; the width example shows after 3 seconds. Each operation component is instantiated only once, and the floating layer moves the original node through Teleport.