1
0
forked from x/volcanos

fix modify text

This commit is contained in:
shaoying 2019-12-25 00:20:03 +08:00
parent 137e50aaa7
commit ed7e31e2a1

View File

@ -76,7 +76,7 @@ Volcanos("ondetail", {help: "组件详情", list: ["选择", "编辑", "删除",
"删除": "delete",
"编辑": function(event, can, msg, index, key, cmd, td) {
var text = td.innerHTML;
can.page.Appends(can, td, [{type: "input", style: {width: td.clientWidth+"px"}, data: {onkeydown: function(event) {
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 != "Enter") {return}
if (key == "value" && msg.key) {key = msg.key[index]}