From be779573889d940aebc0e154dd7f4a31e7ce1870 Mon Sep 17 00:00:00 2001 From: shaoying Date: Mon, 21 Sep 2020 20:20:45 +0800 Subject: [PATCH] opt some --- plugin/input.js | 2 +- plugin/state.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin/input.js b/plugin/input.js index 6d1da1ff..a673810b 100644 --- a/plugin/input.js +++ b/plugin/input.js @@ -34,7 +34,7 @@ Volcanos("onaction", {help: "控件交互", list: [], var feature = can.sup.Conf("feature") var input = feature && feature[name]; if (input) { return can.sup.onaction.input(event, can.sup, name, function(msg) { - can.run({}) + // can.run({}) }) } diff --git a/plugin/state.js b/plugin/state.js index 534bbd52..af4702d1 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -10,13 +10,15 @@ Volcanos("onaction", {help: "交互操作", list: [], _init: function(can, msg, key && value && args.push(key, value) }) - can.run(event, args, function(msg) { + var sub = can._outputs && can._outputs[can._outputs.length-1] + + sub.run(event, args, function(msg) { typeof cb == "function" && cb(msg) }) return true }): can.run(event, ["action", name], function(msg) { typeof cb == "function" && cb(msg) - }, true) + }) }, change: function(event, can, name, value, cb) { can.page.Select(can, can._option, "input.args", function(input) { if (input.name == name) { var data = input.dataset || {}