(function($){
/**
* datagrid扩展
*/
$.extend($.fn.datagrid.defaults.editors, {
password: {
init: function(container, options){
return $('').appendTo(container);
},
destroy: function(target){
$(target).remove();
},
getValue: function(target){
return $(target).val();
},
setValue: function(target, value){
$(target).val(value);
},
resize: function(target, width){
$(target)._outerWidth(width);
}
}
});
})(jQuery);
初始化 columns = [[
{field: 'name', title: '名称', width: 80, sortable: true},
{field: 'value', title: '参数', width: 200, sortable: false, formatter:function(value, arr){
var editor = '';
if(typeof arr.editor == 'object'){
editor = arr.editor.type;
}else{
editor = arr.editor;
}
switch(editor){
case 'password':
return value.replace(/./g, '●');
break;
default:
return value;
}
}}
]];
AD:真正免费,域名+虚机+企业邮箱=0元
已抢187136个
抢已抢67525个
抢已抢353816个
抢已抢668561个
抢已抢124014个
抢已抢26295个
抢