mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add modify.focus
This commit is contained in:
parent
93ca4afb46
commit
4597718a87
2
frame.js
2
frame.js
@ -252,7 +252,7 @@ var can = Volcanos("chat", {
|
|||||||
}),
|
}),
|
||||||
}, Config.libs.concat(Config.list), function(can) {
|
}, Config.libs.concat(Config.list), function(can) {
|
||||||
can[Config.main] = can.Page(can, Config.main, Config, function(chat) {
|
can[Config.main] = can.Page(can, Config.main, Config, function(chat) {
|
||||||
chat.Login.Export(event||{}, can.user.Search(can, "layout")||"工作", "layout")
|
chat.Login.Export(event||{}, can.user.Search(can, "layout")||Config.layout.def, "layout")
|
||||||
chat.Login.Import(event||{}, "", "login")
|
chat.Login.Import(event||{}, "", "login")
|
||||||
}, document.body)
|
}, document.body)
|
||||||
})
|
})
|
||||||
|
2
order.js
2
order.js
@ -30,7 +30,7 @@ var Config = {context: "/chat/",
|
|||||||
{group: "index", name: "Action", pos: "bottom"},
|
{group: "index", name: "Action", pos: "bottom"},
|
||||||
{group: "index", name: "Footer", pos: "foot", state: ["ntxt", "ncmd"], title: '<a href="mailto:shylinux@163.com">shylinux@163.com</a>'},
|
{group: "index", name: "Footer", pos: "foot", state: ["ntxt", "ncmd"], title: '<a href="mailto:shylinux@163.com">shylinux@163.com</a>'},
|
||||||
|
|
||||||
], layout: {list: ["工作", "办公", "聊天"], size: {
|
], layout: {def: "办公", list: ["工作", "办公", "聊天"], size: {
|
||||||
"工作": {head: 30, foot: 30, left: 0, right: 100, bottom: -1, center: 0, top: 0},
|
"工作": {head: 30, foot: 30, left: 0, right: 100, bottom: -1, center: 0, top: 0},
|
||||||
"办公": {head: 30, foot: 30, left: 100, right: 100, bottom: -1, center: 0, top: 0},
|
"办公": {head: 30, foot: 30, left: 100, right: 100, bottom: -1, center: 0, top: 0},
|
||||||
"聊天": {head: 30, foot: 30, left: 100, right: 100, bottom: 300, center: 40, top: -2},
|
"聊天": {head: 30, foot: 30, left: 100, right: 100, bottom: 300, center: 40, top: -2},
|
||||||
|
@ -76,7 +76,7 @@ Volcanos("ondetail", {help: "组件详情", list: ["选择", "编辑", "删除",
|
|||||||
"删除": "delete",
|
"删除": "delete",
|
||||||
"编辑": function(event, can, msg, index, key, cmd, td) {
|
"编辑": function(event, can, msg, index, key, cmd, td) {
|
||||||
var text = td.innerHTML;
|
var text = td.innerHTML;
|
||||||
can.page.Appends(can, td, [{type: "input", value: text, style: {width: td.clientWidth+"px"}, data: {onkeydown: function(event) {
|
var input = can.page.Appends(can, td, [{type: "input", value: text, style: {width: td.clientWidth+"px"}, data: {onkeydown: function(event) {
|
||||||
if (event.key == " ") {return event.stopPropagation()}
|
if (event.key == " ") {return event.stopPropagation()}
|
||||||
if (event.key != "Enter") {return}
|
if (event.key != "Enter") {return}
|
||||||
if (key == "value" && msg.key) {key = msg.key[index]}
|
if (key == "value" && msg.key) {key = msg.key[index]}
|
||||||
@ -84,7 +84,9 @@ Volcanos("ondetail", {help: "组件详情", list: ["选择", "编辑", "删除",
|
|||||||
td.innerHTML = event.target.value;
|
td.innerHTML = event.target.value;
|
||||||
can.user.toast("修改成功")
|
can.user.toast("修改成功")
|
||||||
}, true)
|
}, true)
|
||||||
}}}]).first.focus()
|
}}}]).first;
|
||||||
|
input.focus();
|
||||||
|
input.setSelectionRange(0, input.value.length);
|
||||||
},
|
},
|
||||||
"复制": function(event, can, msg, index, key, cmd, target) {
|
"复制": function(event, can, msg, index, key, cmd, target) {
|
||||||
can.user.toast(can.page.CopyText(can, target.innerHTML), "复制成功")
|
can.user.toast(can.page.CopyText(can, target.innerHTML), "复制成功")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user