mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
ffa089bb9b
commit
54e91096d6
2
frame.js
2
frame.js
@ -171,8 +171,8 @@ Volcanos("onengine", {help: "解析引擎", list: [], _init: function(can, meta,
|
||||
{name: "tmux", help: "命令行", index: "web.wiki.word", args: ["usr/icebergs/misc/tmux/tmux.shy"]},
|
||||
{name: "git", help: "代码库", index: "web.wiki.word", args: ["usr/icebergs/misc/git/git.shy"]},
|
||||
{name: "vim", help: "编辑器", index: "web.wiki.word", args: ["usr/icebergs/misc/vim/vim.shy"]},
|
||||
{name: "ssh", help: "命令行", index: "web.wiki.word", args: ["usr/icebergs/base/ssh/ssh.shy"]},
|
||||
{name: "zsh", help: "命令行", index: "web.wiki.word", args: ["usr/icebergs/misc/bash/zsh.shy"]},
|
||||
{name: "ssh", help: "命令行", index: "web.wiki.word", args: ["usr/icebergs/base/ssh/ssh.shy"]},
|
||||
]},
|
||||
"web": {name: "网页 web", action: [
|
||||
{name: "HTML5", help: "浏览器", index: "web.wiki.word", args: ["usr/icebergs/misc/chrome/chrome.shy"]},
|
||||
|
@ -135,6 +135,7 @@ var user = Volcanos("user", {help: "用户模块", agent: {
|
||||
if (item.value.indexOf("=") > 0) {
|
||||
var pval = item.value.slice(1).split("=")[1]
|
||||
}
|
||||
item._action = msg.Option("action")
|
||||
|
||||
target.type != "button" && (target.value = pval || msg.Option(item.name))
|
||||
can.page.Modify(can, target, {autocomplete: "off"})
|
||||
|
@ -7,6 +7,7 @@ Volcanos("onfigure", {help: "控件详情", list: [], _init: function(can, item,
|
||||
},
|
||||
key: {onclick: function(event, can, item, target) {
|
||||
function run() { var msg = can.request(event); msg.Option(can.Option())
|
||||
msg.Option("action", item._action)
|
||||
can.run(event, ["action", "inputs", item.name, target.value], function(msg) {
|
||||
if (!msg.append) { return }
|
||||
|
||||
|
@ -32,7 +32,6 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
||||
}
|
||||
}, can.ui.display)
|
||||
|
||||
|
||||
can.onappend.board(can, msg, can.ui.display, "board")
|
||||
can.onimport._board(can, msg)
|
||||
return typeof cb == "function" && cb(msg)
|
||||
@ -97,6 +96,8 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
||||
if (target.tagName == "INPUT" && target.type == "button") { var msg = can.sup.request(event); msg.Option(can.Option())
|
||||
key == "value"? can.core.List(array, function(item, index) { msg.Option(item.key, item.value) }): msg.Option(line)
|
||||
|
||||
var msg = can.request(event)
|
||||
msg.Option("action", target.name)
|
||||
var cb = can.onaction[target.name]; return typeof cb == "function"? cb(event, can, target.name):
|
||||
can.sup.onaction.input(event, can.sup, target.name, function(msg) {
|
||||
can.user.toast(can, msg.Result())
|
||||
@ -162,9 +163,14 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
||||
return true
|
||||
},
|
||||
_inner: function(can, msg) {
|
||||
can.onappend.table(can, msg, can.ui.display, "table", function(value, key, index, line, array) {
|
||||
return can.onimport._table(can, value, key, index, line, array)
|
||||
})
|
||||
|
||||
can.onappend.board(can, msg, can.ui.display, "board")
|
||||
can.onimport._board(can, msg)
|
||||
return true
|
||||
|
||||
},
|
||||
_field: function(can, msg) {
|
||||
msg.Table(function(value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user