diff --git a/base/nfs/nfs.go b/base/nfs/nfs.go index a0484841..86d2de01 100644 --- a/base/nfs/nfs.go +++ b/base/nfs/nfs.go @@ -151,8 +151,8 @@ var Index = &ice.Context{Name: "nfs", Help: "文件模块", kit.MDB_INPUT, "button", "name", "返回", "cb", "Last", ), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { rg, _ := regexp.Compile(m.Option("dir_reg")) - dir(m, kit.Select("./", m.Option("dir_root")), kit.Select("", arg, 0), 0, false, "both", rg, - strings.Split(kit.Select("time size line path", arg, 2), " "), ice.ICE_TIME) + dir(m, kit.Select("./", m.Option("dir_root")), kit.Select("", arg, 0), 0, m.Options("dir_deep"), "both", rg, + strings.Split(kit.Select("time size line path", arg, 1), " "), ice.ICE_TIME) }}, "save": {Name: "save path text", Help: "保存", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { if f, p, e := kit.Create(arg[0]); m.Assert(e) { diff --git a/core/wiki/wiki.go b/core/wiki/wiki.go index dba14022..571474a5 100644 --- a/core/wiki/wiki.go +++ b/core/wiki/wiki.go @@ -163,6 +163,8 @@ var Index = &ice.Context{Name: "wiki", Help: "文档模块", m.Echo(string(markdown.ToHTML(buffer.Bytes(), nil, nil))) }}, "_tree": {Name: "_tree path", Help: "文库", Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) { + m.Option("dir_deep", "true") + m.Option("dir_reg", ".*\\.md") m.Cmdy("nfs.dir", kit.Select(m.Conf("note", "meta.path"), arg, 0), m.Conf("note", "meta.head")) }}, "note": {Name: "note file", Help: "笔记", Meta: kit.Dict("remote", "you", "display", "inner"), List: kit.List(