Skip to content

Commit

Permalink
small fix for crud and EventAction
Browse files Browse the repository at this point in the history
  • Loading branch information
zrcoder committed Dec 27, 2024
1 parent ec67e71 commit 9efa29a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions comp/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (c crud) Footer(value string) crud {
}

// HeaderToolbar 设置顶部区域
func (c crud) HeaderToolbar(value string) crud {
func (c crud) HeaderToolbar(value ...any) crud {
return c.set("headerToolbar", value)
}

Expand Down Expand Up @@ -174,7 +174,7 @@ func (c crud) EditorSetting(value string) crud {
}

// FooterToolbar 设置底部区域
func (c crud) FooterToolbar(value string) crud {
func (c crud) FooterToolbar(value ...any) crud {
return c.set("footerToolbar", value)
}

Expand Down Expand Up @@ -394,7 +394,7 @@ func (c crud) AutoGenerateFilter(value any) crud {
}

// BulkActions 设置批量操作
func (c crud) BulkActions(value string) crud {
func (c crud) BulkActions(value ...any) crud {
return c.set("bulkActions", value)
}

Expand Down
7 changes: 7 additions & 0 deletions comp/i_EventAction.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ func (la MEventAction) ActionType(value string) MEventAction {
return la.set("actionType", value)
}

// Drawer 定义弹出的抽屉
func (ea MEventAction) Drawer(value any) MEventAction {
return ea.set("drawer", value)
}

// TODO all components

// Script 在 actionType 为 custom 时设置自定义脚本
func (ea MEventAction) Script(value string) MEventAction {
return ea.set("script", value)
Expand Down

0 comments on commit 9efa29a

Please sign in to comment.