diff --git a/frame.js b/frame.js index 4efa7d16..731568b8 100644 --- a/frame.js +++ b/frame.js @@ -183,7 +183,7 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, {name: "spided", help: "网页爬虫", index: "web.code.chrome.spided", args: location && location.protocol && location.protocol=="chrome-extension:"? ["1", "", "spide"]: ["1"]}, ]}, "context": {name: "理念 context", action: [ - {name: "context", help: "编程", index: "web.wiki.word", args: ["usr/learning/社会/管理/context.shy"]}, + {name: "contexts", help: "上下文", index: "web.wiki.word", args: ["src/task.shy"]}, ]}, }}, "project": {name: "研发群", storm: { @@ -222,7 +222,6 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta, {name: "redis", help: "缓存", index: "web.wiki.word", args: ["usr/redis-story/src/main.shy"]}, ]}, "mysql": {name: "数据 mysql", action: [ - {name: "es", help: "搜索引擎", index: "web.wiki.word", args: ["usr/icebergs/misc/es/es.shy"]}, {name: "mysql", help: "数据存储", index: "web.wiki.word", args: ["usr/mysql-story/src/main.shy"]}, ]}, "context": {name: "环境 context", action: [ diff --git a/plugin/table.js b/plugin/table.js index 4d701fd8..999db28f 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -13,7 +13,9 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, // 自动刷新 var refresh = msg.Option("_refresh") || can.Conf("feature")["_refresh"] - refresh && can.Timer(refresh, function() { can.run({}) }) + var i = 0; refresh && can.Timer(refresh, function(timer) { + if (i > 100) { timer.stop = true} else { can.run({}) } + }) // 展示数据 can.ui = can.page.Appends(can, can._target, [ diff --git a/proto.js b/proto.js index a2ed0639..0fe3a84f 100644 --- a/proto.js +++ b/proto.js @@ -199,12 +199,12 @@ var Volcanos = shy("火山架", {cache: {}, index: 1, order: 1, pack: {}, libs: }), Timer: shy("定时器, value, [1,2,3,4], {value, length}", function(interval, cb, cbs) { interval = typeof interval == "object"? interval || []: [interval] var timer = {stop: false} - function loop(event, i) {if (timer.stop || i >= interval.length && interval.length >= 0) {return typeof cbs == "function" && cbs(event, interval)} - return typeof cb == "function" && cb(event, interval.value||interval[i], i, interval)? - typeof cbs == "function" && cbs(event, interval): - setTimeout(function() {loop(event, i+1)}, interval.value||interval[i+1]) + function loop(timer, i) {if (timer.stop || i >= interval.length && interval.length >= 0) {return typeof cbs == "function" && cbs(timer, interval)} + return typeof cb == "function" && cb(timer, interval.value||interval[i], i, interval)? + typeof cbs == "function" && cbs(timer, interval): + setTimeout(function() {loop(timer, i+1)}, interval.value||interval[i+1]) } - setTimeout(function(event) {loop(event, 0)}, interval.value||interval[0]) + setTimeout(function() {loop(timer, 0)}, interval.value||interval[0]) return timer }), })