diff --git a/src/examples/code/code.go b/src/examples/code/code.go index bf29d454..37ffcfca 100644 --- a/src/examples/code/code.go +++ b/src/examples/code/code.go @@ -158,6 +158,20 @@ var Index = &ctx.Context{Name: "code", Help: "代码中心", map[string]interface{}{"type": "button", "label": "refresh"}, }, }, + map[string]interface{}{"componet_name": "ccc", "componet_help": "ccc", "template": "componet", + "context": "cli.shy", "componet_cmd": "context", "arguments": []interface{}{"@current_ctx", "@ccc"}, + "display_result": "", + "inputs": []interface{}{ + map[string]interface{}{"type": "choice", "name": "ccc", + "label": "ccc", "value": "command", "choice": []interface{}{ + map[string]interface{}{"name": "command", "value": "command"}, + map[string]interface{}{"name": "config", "value": "config"}, + map[string]interface{}{"name": "cache", "value": "cache"}, + }, + }, + map[string]interface{}{"type": "button", "label": "refresh"}, + }, + }, map[string]interface{}{"componet_name": "cmd", "componet_help": "cmd", "template": "componet", "context": "cli.shy", "componet_cmd": "context", "arguments": []interface{}{"@current_ctx", "command", "list"}, "pre_run": true, "display_result": "", @@ -165,7 +179,7 @@ var Index = &ctx.Context{Name: "code", Help: "代码中心", map[string]interface{}{"type": "button", "label": "refresh"}, }, }, - map[string]interface{}{"componet_name": "command_list", "componet_help": "command_list", "template": "componet", + map[string]interface{}{"componet_name": "history", "componet_help": "history", "template": "componet", "context": "cli", "componet_cmd": "config", "arguments": []interface{}{"source_list"}, "pre_run": true, "display_result": "", "inputs": []interface{}{ diff --git a/usr/template/code/code.tmpl b/usr/template/code/code.tmpl index 5fd07a52..932e8503 100644 --- a/usr/template/code/code.tmpl +++ b/usr/template/code/code.tmpl @@ -124,12 +124,9 @@ {{if eq $form_type "upload"}} {{end}}