Footer
在页面底部提供说明和次要操作。
实时预览
正在加载预览…
参数配置
全部字段 4
FooterOptions
Go 代码
Go
// Inside a view; c is *ui.Context, t is nui.Theme.
nui.FooterLayout(c.Key("footer"), t, nui.FooterOptions{Text: "Built with NuxtUI Go", Actions: func(c *ui.Context, t nui.Theme) {
nui.Button(c.Key("help"), t, "Help", nui.ButtonOptions{Variant: nui.LinkVariant})
}})使用说明
修改页脚文字,观察 FooterLayout 如何组合说明与次要操作。Help 按钮仅展示操作区,应用可在此绑定帮助页面或其他行为。
API 参考
FooterLayout
源码func FooterLayout(c *ui.Context, t Theme, o FooterOptions) ui.ElementFooterOptions
源码type FooterOptions struct {
Text string
Actions func(*ui.Context, Theme)
Decoration
}| 字段 | 类型 | 说明 |
|---|---|---|
Text | stringGo 零值: | 显示的文字内容。 |
Actions | func(*ui.Context, Theme)Go 零值: | 附加操作或操作区域构建函数。 |
UI | StylesGo 零值: | 以部件名称为键覆盖外观和间距。 |
Style | func(Slot, ui.Element)Go 零值: | 同步配置当前构建的部件;不要保留 Element。 |