mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 文档树支持 Ctrl+Click 和 Shift+↑/↓ 进行多选 https://github.com/siyuan-note/siyuan/issues/1359
This commit is contained in:
parent
47a8b0c050
commit
e3a6bb2251
4 changed files with 55 additions and 0 deletions
|
|
@ -193,6 +193,29 @@ func getHPathByPath(c *gin.Context) {
|
|||
ret.Data = hPath
|
||||
}
|
||||
|
||||
func getHPathsByPaths(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
pathsArg := arg["paths"].([]interface{})
|
||||
var paths []string
|
||||
for _, p := range pathsArg {
|
||||
paths = append(paths, p.(string))
|
||||
}
|
||||
hPath, err := model.GetHPathsByPaths(paths)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
ret.Data = hPath
|
||||
}
|
||||
|
||||
func getHPathByID(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue