File tree 4 files changed +33
-2
lines changed 4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const (
23
23
AppName = "QuarkGo"
24
24
25
25
// 版本号
26
- Version = "3.9.9 "
26
+ Version = "3.9.10 "
27
27
28
28
// 包名
29
29
PkgName = "github.com/quarkcloudio/quark-go/v3"
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ import (
18
18
// },
19
19
// }
20
20
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 )
22
23
}
23
24
24
25
// 列表工具栏菜单,示例如下:
Original file line number Diff line number Diff line change @@ -269,6 +269,22 @@ func (p *Template) Actions(ctx *quark.Context) []interface{} {
269
269
return []interface {}{}
270
270
}
271
271
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
+
272
288
// 数据导出前回调
273
289
func (p * Template ) BeforeExporting (ctx * quark.Context , list []map [string ]interface {}) []interface {} {
274
290
result := []interface {}{}
Original file line number Diff line number Diff line change @@ -177,6 +177,20 @@ type Resourcer interface {
177
177
// 行为
178
178
Actions (ctx * quark.Context ) []interface {}
179
179
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
+
180
194
// 创建行为组件
181
195
BuildAction (ctx * quark.Context , item interface {}) interface {}
182
196
You can’t perform that action at this time.
0 commit comments