mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
opt draw.js
This commit is contained in:
parent
f0b3a57395
commit
06dc70c4fe
@ -12,11 +12,9 @@ const DRAW = "draw"
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Index.Merge(&ice.Context{Configs: map[string]*ice.Config{
|
Index.Merge(&ice.Context{Configs: map[string]*ice.Config{
|
||||||
DRAW: {Name: DRAW, Help: "思维导图", Value: kit.Data(
|
DRAW: {Name: DRAW, Help: "思维导图", Value: kit.Data(kit.MDB_REGEXP, ".*\\.svg")},
|
||||||
kit.MDB_PATH, "", kit.MDB_REGEXP, ".*\\.svg",
|
|
||||||
)},
|
|
||||||
}, Commands: map[string]*ice.Command{
|
}, Commands: map[string]*ice.Command{
|
||||||
DRAW: {Name: "draw path=src/main.svg refresh:button=auto 编辑 save 项目 参数", Help: "思维导图", Meta: kit.Dict(
|
DRAW: {Name: "draw path=src/main.svg refresh:button=auto edit save project actions", Help: "思维导图", Meta: kit.Dict(
|
||||||
ice.Display("/plugin/local/wiki/draw.js"),
|
ice.Display("/plugin/local/wiki/draw.js"),
|
||||||
), Action: map[string]*ice.Action{
|
), Action: map[string]*ice.Action{
|
||||||
nfs.SAVE: {Name: "save path", Help: "保存", Hand: func(m *ice.Message, arg ...string) {
|
nfs.SAVE: {Name: "save path", Help: "保存", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -27,15 +27,15 @@ func init() {
|
|||||||
}, Commands: map[string]*ice.Command{
|
}, Commands: map[string]*ice.Command{
|
||||||
TOTAL: {Name: "total name auto pie", Help: "统计量", Action: map[string]*ice.Action{
|
TOTAL: {Name: "total name auto pie", Help: "统计量", Action: map[string]*ice.Action{
|
||||||
"pie": {Name: "pie", Help: "饼图", Hand: func(m *ice.Message, arg ...string) {
|
"pie": {Name: "pie", Help: "饼图", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
defer m.Display("/plugin/story/pie.js")
|
||||||
m.Cmd(TOTAL).Table(func(index int, value map[string]string, head []string) {
|
m.Cmd(TOTAL).Table(func(index int, value map[string]string, head []string) {
|
||||||
if value["name"] == "total" {
|
if value["name"] == "total" {
|
||||||
|
m.StatusTimeCount("name", "total", "value", "1", "total", value["rest"])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Push("name", value["name"])
|
m.Push("name", value["name"])
|
||||||
m.Push("value", value["rest"])
|
m.Push("value", value["rest"])
|
||||||
})
|
})
|
||||||
m.Display("/plugin/story/pie.js")
|
|
||||||
m.StatusTimeCount("name", "total", "value", "1")
|
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
if len(arg) > 0 { // 提交详情
|
if len(arg) > 0 { // 提交详情
|
||||||
|
Loading…
x
Reference in New Issue
Block a user