grid中添加过滤器cellFilter

tech2023-02-10  98

今天学到一种新的过滤器方法cellFilter

var app = angular.module('typeList', ['ngGrid']); app.controller('typeListCtrl',function() { $scope.gridOptions = { ...... columnDefs: [ { field: 'createtime',displayName: '创建时间',cellFilter:"dataFilter", width:110}, ] }; }//日期过滤 .filter("dataFilter",function(){ return function(val){ return val.slice(0,10); }; });
最新回复(0)