zoukankan      html  css  js  c++  java
  • EasyUI datagrid单元格文本超出显示省略号,鼠标移动到单元格显示文本

    nowrap : true;  是前提

    $('#×××').datagrid({
        nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取        
    });

    省略号样式:


    <style type="text/css"> .datagrid-cell, .datagrid-cell-group, .datagrid-header-rownumber, .datagrid-cell-rownumber { text-overflow: ellipsis; } </style>

    鼠标移动到单元格显示文本

    <th data-options="field:'×××',70,align:'center',formatter:show1">×××</th>

    代码1:

    function show1(val,row){
        if (val){
            return '<span style="font-size:15px" title="' + val + '">' + val + '</span>';
        } else {
            return val;
        }
    }

    代码2:

    function show2(value, row, index){
        var content = '';
        if(value != undefined && value != '' && value != null ){ 
            var abValue = value +'';
            content = '<a style="font-size:15px" href="javascript:void(0);"  title="' + abValue + '" class="easyui-tooltip">' + abValue + '</a>'; 
        }   
        return content;
    }
  • 相关阅读:
    少壮不努力,老大徒伤悲
    吾日三省吾身
    记录生活
    为人处世
    时间不等人
    博客两年记忆
    抬起头吧
    下一步计划
    寻找遗失的平静
    暑假第二十六测
  • 原文地址:https://www.cnblogs.com/raitorei/p/9878192.html
Copyright © 2011-2022 走看看