标签:width ini cti return end asc func ati fun
$.extend($.fn.datagrid.defaults.editors, { numberbox: { init: function (container, options) { var input = $(‘<input type="text">‘).appendTo(container); if (options && options.ratio) { input.data("ratio", options.ratio); } return input.numberbox(options);; }, destroy: function (target) { $(target).numberbox(‘destroy‘); }, getValue: function (target) { var value = $(target).numberbox(‘getValue‘); var ratio = $(target).data("ratio"); if (ratio) { value = value*ratio; } return value; }, setValue: function (target, value) { var ratio = $(target).data("ratio"); if (ratio) { value = value / ratio; } return $(target).numberbox(‘setValue‘,value); }, resize: function (target, width) { $(target).numberbox("resize", width); } } });
重写EasyUI的$.fn.datagrid.defaults.editors
标签:width ini cti return end asc func ati fun
原文地址:http://www.cnblogs.com/tangchun/p/7761489.html