mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt some
This commit is contained in:
parent
2ea5a22363
commit
ca8b0a8ab5
27
frame.js
27
frame.js
@ -627,6 +627,7 @@ Volcanos("onkeypop", {help: "键盘交互", list: [], _init: function(can) {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
document.body.onkeydown = function(event) { if (event.target != document.body) { return }
|
||||
if (can.onkeypop.action && can.onkeypop.action.onimport) {
|
||||
can.onkeypop.action.onimport.keydown(event, can.onkeypop.action, event.key)
|
||||
@ -634,6 +635,32 @@ Volcanos("onkeypop", {help: "键盘交互", list: [], _init: function(can) {
|
||||
}
|
||||
switch (event.key) {
|
||||
case " ":
|
||||
break
|
||||
case "g":
|
||||
can.page.Select(can, document.body, "fieldset.Action>div.output", function(item) {
|
||||
item.scrollBy(0, -10000)
|
||||
})
|
||||
break
|
||||
case "j":
|
||||
can.page.Select(can, document.body, "fieldset.Action>div.output", function(item) {
|
||||
item.scrollBy(0, 30)
|
||||
})
|
||||
break
|
||||
case "f":
|
||||
can.page.Select(can, document.body, "fieldset.Action>div.output", function(item) {
|
||||
item.scrollBy(0, 300)
|
||||
})
|
||||
break
|
||||
case "e":
|
||||
can.page.Select(can, document.body, "fieldset.Action>div.output", function(item) {
|
||||
item.scrollBy(0, -30)
|
||||
})
|
||||
break
|
||||
case "k":
|
||||
can.page.Select(can, document.body, "fieldset.Action>div.output", function(item) {
|
||||
item.scrollBy(0, -30)
|
||||
})
|
||||
break
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ Volcanos("onaction", {help: "控件交互", list: [],
|
||||
})
|
||||
can.page.Select(can, can.ui.tags, "tr", function(item, index) {
|
||||
index == 1 && can.page.Select(can, item, "td", function(item, index) {
|
||||
index == 0 && item.click()
|
||||
index == 0 && item.innerText && item.click()
|
||||
})
|
||||
})
|
||||
}, true)
|
||||
|
Loading…
x
Reference in New Issue
Block a user