feat: 整合elements主题

This commit is contained in:
2026-01-08 11:20:30 +08:00
parent b174a57b7f
commit e673ee2479
9 changed files with 92 additions and 31 deletions

View File

@@ -19,6 +19,7 @@ import (
apiDocDefine "git.zhangdeman.cn/zhangdeman/api-doc/define"
"git.zhangdeman.cn/zhangdeman/api-doc/enums"
"git.zhangdeman.cn/zhangdeman/api-doc/openapi"
"git.zhangdeman.cn/zhangdeman/consts"
"git.zhangdeman.cn/zhangdeman/gin/define"
"git.zhangdeman.cn/zhangdeman/graceful"
"github.com/jedib0t/go-pretty/v6/table"
@@ -172,7 +173,7 @@ func (s *server) RegisterDocHandler() {
})
ctx.Abort()
}
}, NewSwaggerUI(fmt.Sprintf("[%v]接口文档", s.option.docConfig.Flag), s.option.docConfig.BaseUri, enums.SwaggerUITheme(s.option.docConfig.UiTheme)).Handler())
}, NewSwaggerUI(fmt.Sprintf("[%v]接口文档", s.option.docConfig.Flag), s.option.docConfig.BaseUri, consts.SwaggerUITheme(s.option.docConfig.UiTheme)).Handler())
s.router.GET("/swagger-resources", func(ctx *gin.Context) { // lucky UI获取分组信息
ctx.Writer.Header().Set("Access-Control-Allow-Origin", "*") // 允许访问所有域
ctx.JSON(http.StatusOK, []map[string]any{