diff --git a/frame.js b/frame.js index 085c6a61..459bf0bd 100644 --- a/frame.js +++ b/frame.js @@ -660,8 +660,8 @@ Volcanos("onkeypop", {help: "键盘交互", list: [], _focus: [], _init: functio repeat(cb, count); return list } - var map = can.onkeypop._engine[mode]; for (var i = list.length-1; i > pre-1; i--) { - var cb = map[list[i]]; switch (typeof cb) { + var map = can.onkeypop._engine[mode]||{}; for (var i = list.length-1; i > pre-1; i--) { + var cb = map[list[i]]||{}; switch (typeof cb) { case lang.FUNCION: repeat(cb, count); return list case lang.OBJECT: map = cb; continue case lang.STRING: diff --git a/plugin/state.js b/plugin/state.js index 7ed6fdd3..42a78539 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -31,6 +31,8 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf, _field: function(can, msg) { msg.Table(function(item) { can.onappend._plugin(can, item, {arg: can.base.Obj(item[ice.ARG], [])}, function(sub, meta) { var opt = can.base.Obj(item[ice.OPT], []) + sub.Conf("height", can.Conf("height")) + sub.Conf("width", can.Conf("width")) sub.run = function(event, cmds, cb, silent) { var res = can.request(event, can.Option()) for (var i = 0; i < opt.length; i += 2) { res.Option(opt[i], opt[i+1]) } diff --git a/plugin/story/spide.js b/plugin/story/spide.js index 1fc9fd3b..f771387a 100644 --- a/plugin/story/spide.js +++ b/plugin/story/spide.js @@ -210,6 +210,7 @@ Volcanos("ondetail", {help: "用户交互", list: [], top = 48, sub.Conf(chat.HEIGHT, height-top) } } else { + height += (can.user.mod.isCmd? 0: 300) sub.Conf(chat.HEIGHT, height-top) }