diff --git a/panel/header.js b/panel/header.js index 5f1ff097..f4a15c39 100644 --- a/panel/header.js +++ b/panel/header.js @@ -188,8 +188,8 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, cb, t can.set("River", html.HEIGHT, -1), can.set("Action", html.HEIGHT, -1) }, config: function(event, can) { - can.user.input(event, can, [{name: nfs.FILE, value: "etc/local.shy"}], function(ev, button, meta, list, args) { - can.run(event, [ctx.CONFIG].concat(args), function(msg) { can.user.toast(can, "配置成功") }) + can.user.input(event, can, [{name: "scope", value: "etc/local.shy"}], function(ev, button, meta, list, args) { + can.run(event, [ctx.CONFIG].concat(args), function(msg) { can.user.jumps(msg.Result()) }) }) }, webpack: function(event, can) { diff --git a/plugin/state.js b/plugin/state.js index d9111948..76060976 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -8,6 +8,8 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf, if (can.user.confirm(_arg)) { can.run(sub._event, [ctx.ACTION, "confirm"], function() {}, true) } }, _location: function(can, msg) { location.href = msg._arg[0] }, + _replace: function(can, msg) { location.replace(msg._arg[0]) }, + _history: function(can, msg) { history.back() }, _rewrite: function(can, msg) { for (var i = 0; i < msg._arg.length; i += 2) { can.Option(msg._arg[i], msg._arg[i+1])