mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 标题块标菜单支持 删除标题及下方块 和 剪切标题及下方块 https://github.com/siyuan-note/siyuan/issues/6135
This commit is contained in:
parent
c5119731ee
commit
d0dc9c7d05
3 changed files with 66 additions and 0 deletions
|
|
@ -66,6 +66,28 @@ func getHeadingChildrenDOM(c *gin.Context) {
|
|||
ret.Data = dom
|
||||
}
|
||||
|
||||
func getHeadingDeleteTransaction(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)
|
||||
|
||||
transaction, err := model.GetHeadingDeleteTransaction(id)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 7000}
|
||||
return
|
||||
}
|
||||
|
||||
ret.Data = transaction
|
||||
}
|
||||
|
||||
func getHeadingLevelTransaction(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue