Skip to content

Commit e2a627b

Browse files
committed
chore: wip
1 parent e744dc9 commit e2a627b

23 files changed

+33
-34
lines changed

engine.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ func (p *Engine) initPaths() {
242242

243243
// 加载初始化数据
244244
av.(interface {
245-
LoadInitData(ctx *Context) interface{}
246-
}).LoadInitData(&Context{})
245+
New(ctx *Context) interface{}
246+
}).New(&Context{})
247247

248248
// uri唯一标识
249249
uriKey := av.(interface {

template/admin/resource/actions/action.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ type Action struct {
9494
}
9595

9696
// 加载初始化数据
97-
func (p *Action) LoadInitData(ctx *quark.Context) interface{} {
97+
func (p *Action) New(ctx *quark.Context) interface{} {
9898
p.ActionType = "ajax"
9999

100100
return p

template/admin/resource/actions/drawer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Drawer struct {
99
}
1010

1111
// 初始化
12-
func (p *Drawer) LoadInitData(ctx *quark.Context) interface{} {
12+
func (p *Drawer) New(ctx *quark.Context) interface{} {
1313
p.ActionType = "drawer"
1414
p.Width = 520
1515

template/admin/resource/actions/drawer_form.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type DrawerForm struct {
1313
}
1414

1515
// 初始化
16-
func (p *DrawerForm) LoadInitData(ctx *quark.Context) interface{} {
16+
func (p *DrawerForm) New(ctx *quark.Context) interface{} {
1717
p.ActionType = "drawerForm"
1818
p.Width = 520
1919
p.Reload = "table"

template/admin/resource/actions/dropdown.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Dropdown struct {
1616
}
1717

1818
// 初始化
19-
func (p *Dropdown) LoadInitData(ctx *quark.Context) interface{} {
19+
func (p *Dropdown) New(ctx *quark.Context) interface{} {
2020
p.ActionType = "dropdown"
2121
p.Placement = "bottomLeft"
2222
p.Trigger = append(p.Trigger, "hover")
@@ -60,7 +60,7 @@ func (p *Dropdown) GetMenu(ctx *quark.Context) interface{} {
6060
actionInstance := v.(types.Actioner)
6161

6262
// 初始化模版
63-
actionInstance.LoadInitData(ctx)
63+
actionInstance.New(ctx)
6464

6565
// 初始化
6666
actionInstance.Init(ctx)

template/admin/resource/actions/link.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Link struct {
99
}
1010

1111
// 初始化
12-
func (p *Link) LoadInitData(ctx *quark.Context) interface{} {
12+
func (p *Link) New(ctx *quark.Context) interface{} {
1313
p.ActionType = "link"
1414
p.Target = "_self"
1515

template/admin/resource/actions/modal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Modal struct {
99
}
1010

1111
// 初始化
12-
func (p *Modal) LoadInitData(ctx *quark.Context) interface{} {
12+
func (p *Modal) New(ctx *quark.Context) interface{} {
1313
p.ActionType = "modal"
1414
p.Width = 520
1515

template/admin/resource/actions/modal_form.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type ModalForm struct {
1313
}
1414

1515
// 初始化
16-
func (p *ModalForm) LoadInitData(ctx *quark.Context) interface{} {
16+
func (p *ModalForm) New(ctx *quark.Context) interface{} {
1717
p.ActionType = "modalForm"
1818
p.Width = 520
1919
p.Reload = "table"

template/admin/resource/actions/step.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type Step struct {
77
}
88

99
// 初始化
10-
func (p *Step) LoadInitData(ctx *quark.Context) interface{} {
10+
func (p *Step) New(ctx *quark.Context) interface{} {
1111
p.ActionType = "step"
1212
p.Name = []string{"上一步", "下一步"}
1313
return p

template/admin/resource/requests/action.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (p *ActionRequest) Handle(ctx *quark.Context) error {
3030
actionInstance := v.(types.Actioner)
3131

3232
// 初始化模版
33-
actionInstance.LoadInitData(ctx)
33+
actionInstance.New(ctx)
3434

3535
// 初始化
3636
actionInstance.Init(ctx)
@@ -93,7 +93,7 @@ func (p *ActionRequest) Values(ctx *quark.Context) error {
9393
actionInstance := v.(types.Actioner)
9494

9595
// 初始化模版
96-
actionInstance.LoadInitData(ctx)
96+
actionInstance.New(ctx)
9797

9898
// 初始化
9999
actionInstance.Init(ctx)

0 commit comments

Comments
 (0)