Ticket/InsdepUI/expand/datagrid-cellediting/datagrid-cellediting.js
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function($){
$.extend($.fn.datagrid.defaults, {
clickToEdit: true,
dblclickToEdit: false,
navHandler: {
'37': function(e){
var opts = $(this).datagrid('options');
return navHandler.call(this, e, opts.isRtl?'right':'left');
},
'39': function(e){
var opts = $(this).datagrid('options');
return navHandler.call(this, e, opts.isRtl?'left':'right');
},
'38': function(e){
return navHandler.call(this, e, 'up');
},
'40': function(e){
return navHandler.call(this, e, 'down');
},
'13': function(e){
return enterHandler.call(this, e);
},
'27': function(e){
return escHandler.call(this, e);
},
'8': function(e){
return clearHandler.call(this, e);
},
'46': function(e){
return clearHandler.call(this, e);
},
'keypress': function(e){
if (e.metaKey || e.ctrlKey){
return;
}
var dg = $(this);
var param = dg.datagrid('cell'); // current cell information
if (!param){return;}
var input = dg.datagrid('input', param);
if (!input){
var tmp = $('<span></span>');
tmp.html(String.fromCharCode(e.which));
var c = tmp.text();
tmp.remove();
if (c){
dg.datagrid('editCell', {
index: param.index,
field: param.field,
value: c
});
return false;
}
}
}
},
onBeforeCellEdit: function(index, field){},
onCellEdit: function(index, field, value){
var input = $(this).datagrid('input', {index:index, field:field});
if (input){
if (value != undefined){
后面还有 454 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。