v-snackbar
组件用于向用户显示快速消息。消息条支持定位、移除延迟和回调。
从下面选择您想要的组件,并查看可用的属性、插槽、事件和函数。
给组件应用 position: absolute
Respects boundaries of—and will not overlap with—other app
components like v-app-bar
, v-navigation-drawer
, and v-footer
.
将组件向底部对齐。
Positions the snackbar in the center of the screen, (x and y axis).
将指定的颜色应用于控件 - 它可以是 material color 的名称(例如 success
或者 purple
)或 css 颜色 (#033
或 rgba(255, 0, 0, 0.5)
)。 你可以在 colors page 中找到内置类的列表。
Apply a custom class to the snackbar content
将暗色主题变量应用到组件。你可以在 dark themes 的 Material Design 文档中找到更多有关信息。
组件的海拔可接受 0 到 24 之间的值。你可以在 elevation page 浏览更多信息。
设定组件的高度。
将组件向左边对齐。
为组件设置浅色主题。
设定组件的最大高度。
设定组件的最大宽度。
设定组件的最小高度。
设定组件的最小宽度。
使消息条具有更大的最低高度。
Removes elevation (box-shadow) and adds a thin border.
将组件向右边对齐。
Designates the border-radius applied to the component. You can find more information on the Border Radius page.
Applies a large border radius on the top left and bottom right of the card.
指定在根元素上使用的自定义标签。
将定义的 color 应用于文本和同样的低透明度背景。
Removes the component's border-radius.
等待 Snackbars 自动隐藏的时间。使用 0 来保持永久开启。
将组件向顶部对齐。
设置组件转换。可以是一个 built in transitions 或者是自己自定义的。
控制组件可见还是隐藏。
将消息条内容堆叠在操作(按钮)之上。
设定组件的宽度。
Used to bind styles to v-btn to match MD2 specification.
{
attrs: object
}
默认Vue 插槽。
被绑定模型的更新
boolean
1 !default;
8px !default;
#333333 !default;
$border-radius-root !default;
0 !default;
0 !default;
0 8px !default;
hsla(0, 0%, 100%, .87) !default;
0 !default;
map-deep-get($headings, 'body-2', 'size') !default;
map-deep-get($headings, 'body-2', 'weight') !default;
map-deep-get($headings, 'body-2', 'letter-spacing') !default;
map-deep-get($headings, 'body-2', 'line-height') !default;
14px 16px !default;
map-deep-get($headings, 'body-2', 'text-transform') !default;
0 !default;
6 !default;
$snackbar-content-font-size !default;
0 !default;
68px !default;
0 !default;
map-get($rounded, 'xl') $snackbar-border-radius !default;
0 !default;
.8 !default;
8px !default;
0 !default;
initial !default;
8px !default;
$snackbar-content-max-width !default;
48px !default;
$snackbar-content-min-width !default;
0 !default;
1000 !default;