首页 前端知识 【若依】表格固定列宽

【若依】表格固定列宽

2024-09-21 22:09:30 前端知识 前端哥 194 467 我要收藏

0. 修改前表格

在这里插入图片描述

1. 添加代码

{
    field: 'gymc',
    title: '工艺名称',
    formatter: function (value, row, index) {
        return '<div style="width:120px;">' + value + '</div>';
    }
}
return '<div style="width:120px;">' + value + '</div>';
{
    title: '操作',
    align: 'center',
    formatter: function (value, row, index) {
        var actions = [];
        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
        /*return actions.join('');*/
        return '<div style="width:100px;">' + actions.join('') +'</div>';
    }
}
return '<div style="width:100px;">' + actions.join('') +'</div>';

2. 修改后表格

在这里插入图片描述

转载请注明出处或者链接地址:https://www.qianduange.cn//article/18551.html
标签
评论
发布的文章

javascript jQuery

2024-09-21 22:09:33

【若依】表格固定列宽

2024-09-21 22:09:30

Knockout-jQueryUI 使用指南

2024-09-21 22:09:29

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!