博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
改写ui-grid headerCellTemplate
阅读量:4156 次
发布时间:2019-05-26

本文共 1188 字,大约阅读时间需要 3 分钟。

改写ui-grid headerCellTemplate  myHeaderCellTemplate  中为uigrid表头模板,此处copy过来,改写           /**改写ui-grid myHeaderCellTemplate,注意必须增加 trustHtml过滤器(在模块中增加)* 取代原有的 CUSTOM_FILTERS ***     * myApp.filter('trustHtml', function ($sce) {     *      return function (input) {      *          return $sce.trustAsHtml(input);     *      }     *  });      * **/    //原: {
{ col.displayName CUSTOM_FILTERS }}
//现: var myHeaderCellTemplate =`
{
{col.sort.priority + 1}}
`; function rebuildColumnDefs(data){ var columnDefs = []; if(data && data.length){ data.forEach(function(val,idx){ columnDefs.push({ name: val.data, displayName: val.title, minWidth: 150, //headerCellTemplate: '
Name \n (editable)
'//这种方式会改变表头样式和相关功能,只能在极其简单情况下使用 //headerCellTemplate: '
'+val.title+'
' headerCellTemplate:myHeaderCellTemplate }); }); } return columnDefs; }

转载地址:http://ukkxi.baihongyu.com/

你可能感兴趣的文章
Multi-Object Tracking with Quadruplet Convolutional Neural Networks
查看>>
关于多目标跟踪的一点理解
查看>>
Learning by tracking:Siamese CNN for robust target association
查看>>
MUSTer:Multi-Store Tracker:A Cognitive Psychology Inspired Approach to Object Tracking
查看>>
Understanding and Diagnosing Visual Tracking Systems
查看>>
Multiple People Tracking by Lifted Multicut and Person Re-identification
查看>>
Visual Tracking Using Attention-Modulated Disintegration and Integration
查看>>
Action-Decision Networks for Visual Tracking with Deep Reinforcement Learning
查看>>
Multiple Object Tracking with High Performance Detection and Appearance Feature
查看>>
深度学习入门(上)-第一章 必备基础知识点
查看>>
ubuntu unzip解压时提示错误 解决方法
查看>>
sprintf函数的说明
查看>>
BOOST_TYPEOF和BOOST_AUTO 作用
查看>>
随机森林概述
查看>>
2011十大战略技术
查看>>
大学应该学的软件知识
查看>>
腾讯与360战争背后的云计算阴影
查看>>
腾讯看了会沉默,360看了会流泪
查看>>
李开复:移动互联网机会最大 微博会现最大赢家
查看>>
2006年的IT十大战略技术
查看>>