VSpeedDial API
属性
名称 | 类型 | 默认值 |
---|---|---|
activator | ||
Explicitly sets the overlay’s activator. | ||
activator-props | ||
Apply custom properties to the activator. | ||
attach | ||
Specifies which DOM element the overlay content should teleport to. Can be a direct element reference, querySelector string, or true to disable teleporting. Uses body by default. Generally not recommended except as a last resort: the default positioning algorithm should handle most scenarios better than is possible without teleporting, and you may have unexpected behavior if the menu ends up as child of its activator. | ||
close-delay | ||
Milliseconds to wait before closing component. Only works with the open-on-hover prop. | ||
close-on-back | ||
Closes the overlay content when the browser’s back button is pressed or $router.back() is called, cancelling the original navigation. persistent overlays will cancel navigation and animate as if they were clicked outside instead of closing. | ||
close-on-content-click | ||
Closes component when you click on its content. | ||
contained | ||
Limits the size of the component and scrim to its offset parent. Implies absolute and attach. (Note: The parent element must have position: relative.). | ||
content-class | ||
Applies a custom class to the detached element. This is useful because the content is moved to the beginning of the v-app component (unless the attach prop is provided) and is not targetable by classes passed directly on the component. | ||
content-props | ||
Apply custom properties to the content. | ||
disabled | ||
emoves the ability to click or target the component. | ||
eager | ||
Forces the component’s content to render when it mounts. This is useful if you have content that will not be rendered in the DOM that you want crawled for SEO. | ||
height | ||
Sets the height for the component. | ||
id | ||
The unique identifier of the component. | ||
location | ||
Specifies the anchor point for positioning the component, using directional cues to align it either horizontally, vertically, or both… | ||
location-strategy | ||
A function used to specifies how the component should position relative to its activator. | ||
max-height | ||
Sets the minimum height for the component. | ||
max-width | ||
Sets the minimum height for the component. | ||
min-height | ||
Sets the minimum height for the component. | ||
min-width | ||
Sets the minimum width for the component. Use auto to use the activator width. | ||
model-value | ||
The v-model value of the component. If component supports the multiple prop, this defaults to an empty array. | ||
no-click-animation | ||
Disables the bounce effect when clicking outside of the content element when using the persistent prop. | ||
offset | ||
A single value that offsets content away from the target based upon what side it is on. | ||
opacity | ||
Sets the overlay opacity. | ||
open-delay | ||
Milliseconds to wait before opening component. Only works with the open-on-hover prop. | ||
open-on-click | ||
Activate the component when the activator is focused. | ||
open-on-focus | ||
Activate the component when the activator is focused. | ||
open-on-hover | ||
Opens speed-dial on hover. | ||
origin | ||
Sets the transition origin on the element. You can find more information on the MDN documentation for transition origin . | ||
persistent | ||
Clicking outside of the element or pressing esc key will not deactivate it. | ||
scrim | ||
Accepts true/false to enable background, and string to define color. | ||
scroll-strategy | ||
Strategy used when the component is activate and user scrolls. | ||
target | ||
For locationStrategy=“connected”, specify an element or array of x,y coordinates that the overlay should position itself relative to. This will be the activator element by default. | ||
theme | ||
Specify a theme for this component and all of its children. | ||
transition | ||
Sets the component transition. Can be one of the built in or custom transition. | ||
width | ||
Sets the width for the component. | ||
z-index | ||
The z-index used for the component. |
事件
名称 | 类型 |
---|---|
update:modelValue | |
Event that is emitted when the component’s model changes. |
插槽
activator |
When used, will activate the component when clicked (or hover for specific components). This manually stops the event propagation. Without this slot, if you open the component through its model, you will need to manually stop the event propagation. |
default |
The default Vue slot. |