当前位置: 首页 > news >正文

武威做网站chatgpt 网址

武威做网站,chatgpt 网址,wordpress热点插件,建网赚网站需求背景 历史项目使用 BootstrapTable 作为前端组件 应客户需要调整&#xff1a; 冻结前四列对于大文本文字显示部分内容&#xff0c;鼠标悬浮显示完整内容 冻结列 1、引入相关CSS,JS CSS <link rel"stylesheet" href"/css/bootstrap.min.css"> …

需求背景

历史项目使用 BootstrapTable 作为前端组件
应客户需要调整:

  • 冻结前四列
  • 对于大文本文字显示部分内容,鼠标悬浮显示完整内容

冻结列

1、引入相关CSS,JS

CSS

<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/plugins/bootstrap-table/bootstrap-table.min.css">
<link rel="stylesheet" href="/editor-app/css/bootstrap-table-fixed-columns.css">

JS

<script src="/js/plugins/bootstrap-table/bootstrap-table.js"></script>
<script src="/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/editor-app/libs/bootstrap-table-fixed-columns.js"></script>

完整示例

<!DOCTYPE html>
<html xmlns:shiro="http://www.w3.org/1999/xhtml"  xmlns:th="http://www.w3.org/1999/xhtml">
<html>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/plugins/bootstrap-table/bootstrap-table.min.css">
<link rel="stylesheet" href="/editor-app/css/bootstrap-table-fixed-columns.css">
<style>
</style>
<head th:include="include :: header"></head>
<body class="gray-bg"><div class="wrapper wrapper-content "><table style="width: 100%;"></table><div class="row"><div class="col-sm-12 select-table table-striped"><table id="***Table" data-mobile-responsive="true"></table></div></div></div><!--shiro控制bootstraptable行内按钮看见性  --></div><div th:include="include :: footer"></div><script src="/js/plugins/bootstrap-table/bootstrap-table.js"></script><script src="/js/plugins/bootstrap-table/bootstrap-table.min.js"></script><script src="/editor-app/libs/bootstrap-table-fixed-columns.js"></script><script type="text/javascript" src="/js/appjs/***test.js"></script>
</body>
</html>
2、对应BootstrapTable增加冻结列属性

fixedColumns: true, //是否开启冻结列
fixedNumber: 4, //冻结列数

完整示例

function load() {$('#***Table').bootstrapTable({id: "***Table",type: 0, // 0 代表bootstrapTable 1代表bootstrapTreeTablemethod: 'get', // 服务器数据的请求方式 get or posturl: prefix + "/list", // 服务器数据的加载地址exportUrl: prefix + "/export",//	showRefresh : true,//	showToggle : true,//	showColumns : true,fixedColumns: true, //是否开启冻结列fixedNumber: 4, //冻结列数iconSize: 'outline',toolbar: 'toolbar',striped: true, // 设置为true会有隔行变色效果dataType: "json", // 服务器返回的数据类型pagination: true, // 设置为true会在底部显示分页条// queryParamsType : "limit",// //设置为limit则会发送符合RESTFull格式的参数singleSelect: false, // 设置为true将禁止多选// contentType : "application/x-www-form-urlencoded",// //发送到服务器的数据编码类型pageSize: 5, // 如果设置了分页,每页数据条数pageNumber: 1, // 如果设置了分布,首页页码//search : true, // 是否显示搜索框showColumns: false, // 是否显示内容下拉框(选择显示的列)sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"queryParams: function (params) {return {//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对limit: params.limit,offset: params.offset,year:$('#year').val(),companyName:$('#companyName').val(),};},columns: [{field: 'projectId',visible: false,},{field: 'year',title: '年度批次',halign: 'center',align: 'center',width:'73px'},{field: 'type',title: '项目类型',halign: 'center',align: 'center',width:'72px'},//........{title: '操作',field: 'id',align: 'center',formatter: function (value, row, index) {var e = '<a href="###" style="color: #00a3ff" title="编辑" οnclick="edit(\''+ row.projectId+ '\')">编辑</a> ';return e;}}]});
}

实现效果
N列固定前四列

控制大文本显示部分,鼠标悬浮显示完整内容

处理前
在这里插入图片描述

处理后
在这里插入图片描述

实现方案

在对应列增如下属性

{field: 'other',title: '其他',halign: 'center',align: 'center',cellStyle: function (value, row, index) {return {css: {"min-width": "40px","white-space": "nowrap","text-overflow": "ellipsis","overflow": "hidden","max-width": "120px"}}},formatter: function (value, row, index) {console.log(value);var span = document.createElement('span');span.setAttribute('title', value);span.innerHTML = value;return span.outerHTML;}}
http://www.hotlads.com/news/2005.html

相关文章:

  • 江门建设银行网站上海外贸网站seo
  • 学会网站建设指数函数和对数函数
  • 大型网站 建设意义江小白网络营销案例
  • 做网站apache如何网络推广是什么工作内容
  • 厦门市建设局官方网站网页设计案例
  • 做游戏门户网站要注意什么lpl赛区战绩
  • 陕西四通建设工程有限责任公司网站nba最新新闻
  • 徐州网站建设公司官网seo百度快速排名软件
  • 网站建设用什么服务器最新实时新闻
  • 移动微网站建设二维码seo业务培训
  • 欧美独立站建站石家庄市人民政府官网
  • 重庆游戏网站开发公司佛山今日头条
  • 福州建企业网互联网优化
  • 电商网站如何生成app如何在手机上制作网站
  • 织梦网站模板教程自媒体培训
  • 东莞做网站乐云seo北京互联网公司排名
  • 小鼠标网站建设搜索引擎优化理解
  • 蓝色为主的网站案例徐州seo推广
  • 网站w3c标准杭州seo排名优化
  • 广告行业网站建设方案博客推广的方法与技巧
  • 丰县网站建设百度排名工具
  • 网站加v怎么做微信营销策略有哪些
  • 深圳搭建网站公司什么都不懂能去干运营吗
  • 万网域名申请网站长沙网站seo外包
  • 网站做进一步优化如何做推广和引流
  • 什么公司做网站好网络平台推广方案
  • 全媒体广告策划营销seo培训教程
  • 沈阳做网站的地方百度网站介绍
  • 网络工程师工作好找吗什么建站程序最利于seo
  • 百度做公司网站多少钱营销传播服务