mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-18 23:10:25 +08:00
阶段性提交
This commit is contained in:
23
internal/web/actions/default/api/helper.go
Normal file
23
internal/web/actions/default/api/helper.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package api
|
||||
|
||||
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"] = "api"
|
||||
|
||||
selectedTabbar, _ := action.Data["mainTab"]
|
||||
|
||||
tabbar := actionutils.NewTabbar()
|
||||
tabbar.Add("API节点", "", "/api", "", selectedTabbar == "node")
|
||||
actionutils.SetTabbar(action, tabbar)
|
||||
}
|
||||
Reference in New Issue
Block a user