阶段性提交

This commit is contained in:
刘祥超
2020-08-21 21:09:42 +08:00
parent 145f0580fb
commit d7e3cefa4d
161 changed files with 3520 additions and 219 deletions

View File

@@ -0,0 +1,24 @@
package components
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/iwind/TeaGo/actions"
)
type Helper struct {
}
func NewHelper() *Helper {
return &Helper{}
}
func (this *Helper) BeforeAction(action *actions.ActionObject) {
action.Data["teaMenu"] = "servers"
selectedTabbar, _ := action.Data["mainTab"]
tabbar := actionutils.NewTabbar()
tabbar.Add("服务", "", "/servers", "", selectedTabbar == "server")
tabbar.Add("组件", "", "/servers/components", "", selectedTabbar == "component")
actionutils.SetTabbar(action, tabbar)
}