diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index 7ce02072..9ba89cff 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -32,6 +32,9 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg, list, cb, msg.result = [can.Conf("content")] } + can.user.isMobile || can.page.Modify(can, can.ui.content, {style: {"min-width": document.body.innerWidth-200+"px"}}) + can.user.isMobile || can.page.Modify(can, can.ui.profile, {style: {"min-width": document.body.innerWidth-100+"px"}}) + can.tabview = {}, can.history = [] can.tabview[can.Option("path")+can.Option("file")] = msg msg.Option({path: can.Option("path"), file: can.Option("file"), line: can.Option("line")||1}) diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index 6592b9d0..971b7fec 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -19,6 +19,13 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, can.ui.editor = ui.editor can.ui.command = ui.command can.onkeymap._init(can, "insert") + can.ui.profile.onscroll = function(event) { var target = can.current + can.ui.editor && can.page.Modify(can, can.ui.editor, {className: "editor "+can.mode, value: target.innerText, style: { + height: target.offsetHeight, width: target.offsetWidth, + left: target.offsetLeft, top: target.offsetTop - target.parentNode.parentNode.scrollTop, + display: "block", + }}) + } typeof cb == "function" && cb() }, target) })