Main
为主要内容提供应用布局区域。
实时预览
正在加载预览…
参数配置
Go 代码
Go
// Inside a view; c is *ui.Context, t is nui.Theme.
nui.Main(c.Key("main"), t, func() {
nui.Card(c.Key("content"), t, nui.CardOptions{Title: "Workspace"}, func() { ui.Text(c, "Main application content") })
})使用说明
Main 为主内容提供布局容器,示例中包含一张 Card。它可以和 Header、Sidebar、Footer 组合;业务内容通过同步回调构建。
API 参考
Main
源码func Main(c *ui.Context, t Theme, children func()) ui.Element