From d5f056f7974ddd6258c83574aaea7bd5b0b50f7c Mon Sep 17 00:00:00 2001 From: shaoying Date: Tue, 18 Jun 2019 09:04:45 +0800 Subject: [PATCH] add input.imports.auto --- src/contexts/ssh/ssh.go | 2 +- usr/librarys/chat.js | 1 + usr/librarys/example.js | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/contexts/ssh/ssh.go b/src/contexts/ssh/ssh.go index 79f2f0ba..a92149f5 100644 --- a/src/contexts/ssh/ssh.go +++ b/src/contexts/ssh/ssh.go @@ -178,7 +178,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心", "componet_type": "private", "componet_ctx": "ssh", "componet_cmd": "_route", "componet_args": []interface{}{"$$", "context", "$$", "context"}, "inputs": []interface{}{ map[string]interface{}{"type": "text", "name": "pod", "imports": "plugin_pod"}, - map[string]interface{}{"type": "text", "name": "ctx", "value": "nfs"}, + map[string]interface{}{"type": "text", "name": "ctx", "value": "nfs", "imports": "plugin_ctx"}, map[string]interface{}{"type": "button", "value": "模块"}, }, "exports": []interface{}{"ctx", "names"}, diff --git a/usr/librarys/chat.js b/usr/librarys/chat.js index 62bb195a..e3041974 100644 --- a/usr/librarys/chat.js +++ b/usr/librarys/chat.js @@ -598,6 +598,7 @@ var page = Page({ page.onlayout(null, page.conf.layout) kit.isMobile && page.action.Action["最宽"]() + page.action.Action["最大"]() ctx.Search("layout") && page.action.Action[ctx.Search("layout")]() page.footer.Order({"text": "", "ip": "", ".": "", ":":""}, ["ip", "text", ":", "."]) diff --git a/usr/librarys/example.js b/usr/librarys/example.js index 63b68838..8a0e8eb1 100644 --- a/usr/librarys/example.js +++ b/usr/librarys/example.js @@ -500,7 +500,8 @@ function Plugin(field, tool, args, plugin) { page.input = ui[name] index == 0 && ui[name] && ui[name].focus && ui[name].focus() item.imports && page.Sync(item.imports).change(function(value, old) { - ui[name].value = value + ui[name].value = value; + (index == total-1 || (index == total-2 && ui[name].parentNode.nextSibling.childNodes[1].type == "button")) && option.Runs(event) }) return ui[name] },