VPBanner
小于 1 分钟
Banner 组件,用于展示 banner。
案例
基础横幅
<VPBanner
title="Mr.Hope"
content="Where there is light, there is hope"
logo="https://mister-hope.com/logo.svg"
:actions='[
{
text: "访问",
link:"https://mister-hope.com",
},
{
text: "仓库",
link: "https://github/Mister-Hope/Mister-Hope.github.io",
type: "default",
},
]'
/>选项
title必填
string横幅标题。
content
string横幅内容。
logo
string横幅图标。
actions
BannerAction[]横幅操作。
actions[*].text必填
string操作的文字。
actions[*].link必填
string操作的链接。
actions[*].type
"primary" | "default"默认值
"primary"操作的类型。
background
string横幅背景。
color
string横幅字体颜色。
提示
为了让背景和字体颜色能自动适配夜间模式,你可以传入 css variable,如: var(--my-bg)。
更新日志
2026/9/28 12:45
查看所有更新日志
0c1aa-于1bd5f-于4fe0d-于0739c-于