mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 移动折叠标题后自动展开 https://github.com/siyuan-note/siyuan/issues/6673
This commit is contained in:
parent
f23cd5005d
commit
5afffdb0f7
3 changed files with 34 additions and 0 deletions
|
|
@ -52,6 +52,20 @@ func swapBlockRef(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
func getHeadingChildrenIDs(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
ids := model.GetHeadingChildrenIDs(id)
|
||||
ret.Data = ids
|
||||
}
|
||||
|
||||
func getHeadingChildrenDOM(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
ginServer.Handle("POST", "/api/block/setBlockReminder", model.CheckAuth, setBlockReminder)
|
||||
ginServer.Handle("POST", "/api/block/getHeadingLevelTransaction", model.CheckAuth, getHeadingLevelTransaction)
|
||||
ginServer.Handle("POST", "/api/block/getHeadingDeleteTransaction", model.CheckAuth, getHeadingDeleteTransaction)
|
||||
ginServer.Handle("POST", "/api/block/getHeadingChildrenIDs", model.CheckAuth, getHeadingChildrenIDs)
|
||||
ginServer.Handle("POST", "/api/block/getHeadingChildrenDOM", model.CheckAuth, getHeadingChildrenDOM)
|
||||
ginServer.Handle("POST", "/api/block/swapBlockRef", model.CheckAuth, swapBlockRef)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue