Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveItem ¶
func MoveItem[T any](id int64, direction string, items []T, getID func(T) int64, getOrder func(T) int, updateOrder func(int64, int) error, ) error
MoveItem 通用排序移动逻辑(up/down/top)
func ReorderSiblings ¶ added in v1.6.0
ReorderSiblings 把 movedID 从 siblings 中抽出,插到 beforeID 之前; beforeID == 0 或未在 siblings 中找到时,追加到末尾。 返回重排后的切片;若 movedID 未在 siblings 中找到,原样返回。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.