forked from x/volcanos
opt some
This commit is contained in:
parent
37ef8c0d39
commit
e68933a986
@ -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})
|
||||
|
@ -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)
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user