This commit is contained in:
2025-03-25 14:15:42 +08:00
parent 7dffc94035
commit da612380e0
845 changed files with 5330 additions and 5153 deletions

View File

@@ -377,7 +377,8 @@ func convertToUITree(data []*db.SysMenu, parentID int32) []*dto.MenuUIDto {
Icon: item.Avatar,
Type: 1,
OpenType: "_iframe",
Href: item.Url,
// OpenType: "_component",
Href: item.Url,
}
root = append(root, temp)
} else {

View File

@@ -3,6 +3,7 @@ package tpl
import (
"html/template"
"path/filepath"
"strings"
"management/internal/db/model/dto"
)
@@ -18,9 +19,10 @@ func (r *render) btnFuncs() map[string]any {
var res string
for _, action := range actionNames {
for _, btn := range btns {
btn.Style = strings.ReplaceAll(btn.Style, "pear", "layui")
base := filepath.Base(btn.Url)
if base == action {
res += `<button type="button" class="pear-btn ` + btn.Style + `" lay-event="` + firstLower(action) + `" lay-on="` + firstLower(action) + `">`
res += `<button type="button" class="layui-btn ` + btn.Style + `" lay-event="` + firstLower(action) + `" lay-on="` + firstLower(action) + `">`
if len(btn.Avatar) > 0 {
res += `<i class="` + btn.Avatar + `"></i> `
}
@@ -40,9 +42,10 @@ func (r *render) btnFuncs() map[string]any {
var res string
for _, action := range actionNames {
for _, btn := range btns {
btn.Style = strings.ReplaceAll(btn.Style, "pear", "layui")
base := filepath.Base(btn.Url)
if base == action {
res += `<button type="button" style="font-size:12px !important;" class="pear-btn ` + btn.Style + `" lay-event="` + firstLower(action) + `" lay-on="` + firstLower(action) + `">`
res += `<button type="button" style="font-size:12px !important;" class="layui-btn ` + btn.Style + `" lay-event="` + firstLower(action) + `" lay-on="` + firstLower(action) + `">`
if len(btn.Avatar) > 0 {
res += `<i class="` + btn.Avatar + `"></i> `
}
@@ -69,9 +72,10 @@ func (r *render) btnFuncs() map[string]any {
var res string
for _, action := range actionNames {
for _, btn := range btns {
btn.Style = strings.ReplaceAll(btn.Style, "pear", "layui")
base := filepath.Base(btn.Url)
if base == action {
res += `<button type="submit" class="pear-btn ` + btn.Style + `" lay-submit lay-filter="` + firstLower(action) + `">`
res += `<button type="submit" class="layui-btn ` + btn.Style + `" lay-submit lay-filter="` + firstLower(action) + `">`
if len(btn.Avatar) > 0 {
res += `<i class="` + btn.Avatar + `"></i> `
}