Skip to content

Commit 43868ec

Browse files
committed
chore: wip
1 parent 7156d8c commit 43868ec

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
AppName = "QuarkGo"
2424

2525
// 版本号
26-
Version = "3.9.9"
26+
Version = "3.9.10"
2727

2828
// 包名
2929
PkgName = "github.com/quarkcloudio/quark-go/v3"

template/admin/resource/resolves_toolbar.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import (
1818
// },
1919
// }
2020
func (p *Template) IndexTableMenuItems(ctx *quark.Context) []map[string]string {
21-
return []map[string]string{}
21+
template := ctx.Template.(types.Resourcer)
22+
return template.MenuItems(ctx)
2223
}
2324

2425
// 列表工具栏菜单,示例如下:

template/admin/resource/resource.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,22 @@ func (p *Template) Actions(ctx *quark.Context) []interface{} {
269269
return []interface{}{}
270270
}
271271

272+
// 列表工具栏菜单项,示例如下:
273+
//
274+
// []map[string]string{
275+
// {
276+
// "key": "day",
277+
// "label": "日账单",
278+
// },
279+
// {
280+
// "key": "week",
281+
// "label": "周账单",
282+
// },
283+
// }
284+
func (p *Template) MenuItems(ctx *quark.Context) []map[string]string {
285+
return []map[string]string{}
286+
}
287+
272288
// 数据导出前回调
273289
func (p *Template) BeforeExporting(ctx *quark.Context, list []map[string]interface{}) []interface{} {
274290
result := []interface{}{}

template/admin/resource/types/resourcer.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,20 @@ type Resourcer interface {
177177
// 行为
178178
Actions(ctx *quark.Context) []interface{}
179179

180+
// 列表工具栏菜单项,示例如下:
181+
//
182+
// []map[string]string{
183+
// {
184+
// "key": "day",
185+
// "label": "日账单",
186+
// },
187+
// {
188+
// "key": "week",
189+
// "label": "周账单",
190+
// },
191+
// }
192+
MenuItems(ctx *quark.Context) []map[string]string
193+
180194
// 创建行为组件
181195
BuildAction(ctx *quark.Context, item interface{}) interface{}
182196

0 commit comments

Comments
 (0)