From 2b25b56b445fed6ca607c7f2456a5f8901126a9f Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 27 Jun 2019 20:35:39 +0800 Subject: [PATCH] add wait.plugin.example.js --- usr/librarys/example.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr/librarys/example.js b/usr/librarys/example.js index 5ed7f03e..79e7ef93 100644 --- a/usr/librarys/example.js +++ b/usr/librarys/example.js @@ -659,10 +659,13 @@ function Plugin(page, pane, field) { }) }, Runs: function(event, cb) { - this.Clear(), event.Plugin = plugin, field.Run(event, kit.Selector(option, ".args", function(item, index) { + if (wait) { + return + } + wait = true, event.Plugin = plugin, this.Clear(), field.Run(event, kit.Selector(option, ".args", function(item, index) { return item.value }), function(msg) { - typeof cb == "function" && cb(msg) + wait = false, typeof cb == "function" && cb(msg) plugin.ondaemon[display.deal||"table"](msg) }) },