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

easyUI loyout tabs自适应宽度

index.html 页面

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript">

$('#tabs').tabs({
pill:true 
});

if(user==""){
window.location="${pageContext.request.contextPath}/index.jsp";
}



</script>

<title>首页</title>
</head>
<body class="easyui-layout" data-options="fit : true,border : false" >

<div data-options="region:'north'" style="height:80px">
<jsp:include page="top.jsp"></jsp:include>
</div>

<!-- <div data-options="region:'east',split:true" title="East" style="width:100px;"></div> -->
<div data-options="region:'west',split:true" title="权限菜单" style="width:220px;">
<div class="easyui-accordion" style="height:100%;">

</ul>
</div>
</c:if>
</c:forEach>



</div>
</div>
<div data-options="region:'center',split:true" style="padding: 0px;overflow:hidden;">
<div id="tabs" class="easyui-tabs" data-options="fit : true" >
<div title="About" >
系统首页,无法关闭
</div>

</div>


</div>
</body>
</html>

<script type="text/javascript" src="${pageContext.request.contextPath}/js/aup.js"></script>

 

tabs 内嵌页 包含datagrid ; datagrid 外包一定要套一个div 并且设置高度,不然无法显示.

<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>系统信息列表</title>
	 
    <link rel="stylesheet" type="text/css" href="${ctx}/css/easyui.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/css/icon.css">
	
	</head>
	<body style="margin: 0px auto;" >
	
		<div style="height:780px;">
		<table  id="tt"  title="系统列表"></table>  
		</div>
		
			
	</body>
</html>

 datagrid js 代码

$(function() {
    $('#tt').datagrid({
        url: ctx + '/system/lisSystem.do',
        height:'500px',
        pagination: true,
        /*是否显示下面的分页菜单*/
        border: false,
        fit : true,
        fitColumns:true,//自动使列适应表格宽度以防止出现水平滚动。
        rownumbers: true,
        toolbar: toolbar,
        selectOnCheck: true,
        checkOnSelect: true,
        loadMsg: '数据加载中,请稍候......',
        columns: [[{
            field: 'id',
            title: '系统id',
            checkbox: true,
            width: 220
        },
        {
            field: 'sysName',
            title: '系统名称',
            width: 150
        },
        {
            field: 'sysCode',
            title: '系统编码',
            width: 150,
            align: 'right'
        },
        {
            field: 'status',
            title: '系统状态',
            width: 80,
            align: 'right',
            formatter: function(value, row, index) {
                if (row.status == 0) {
                    return "启用";
                } else if (row.status == 1) {
                    return "禁用";
                } else {
                    return "删除";
                }
            }
        },
        {
            field: 'operate',
            title: '操作',
            width: 150,
            align: 'center',
            formatter: formatOper
        }]]
    });
});

  

 

转载于:https://www.cnblogs.com/zuolun2017/p/5777709.html

相关文章:

  • react封装一个打印功能
  • 在linux环境下编译C++ 程序
  • react项目中,在tab列表上展示某个字段以 数组形式 展示
  • Spark Streaming官方文档学习--下
  • Vue 判断两个时间选择框的校验element 。开始时间不能大于结束时间
  • 为什么不能访问django自带的索引页
  • SSIS 数据类型和类型转换
  • Vue,列表展示。多个字段拼接展示
  • Swift开发:NSLayoutConstraint纯代码实现自动布局-初级篇
  • react中的 Modal.confirm
  • 数据挖掘之决策树ID3算法(C#实现)
  • 【一小时入门】webpack 入门指南
  • Vue中 beforeRouteLeave离开路由之前要执行的操作
  • AF3.1.0简单二次封装
  • Vue 项目中 根目录中router路由拦截 beforeEach 常用的写法
  • Google 是如何开发 Web 框架的
  • python3.6+scrapy+mysql 爬虫实战
  • “寒冬”下的金三银四跳槽季来了,帮你客观分析一下局面
  • 【笔记】你不知道的JS读书笔记——Promise
  • 【刷算法】从上往下打印二叉树
  • 【跃迁之路】【669天】程序员高效学习方法论探索系列(实验阶段426-2018.12.13)...
  • Android 初级面试者拾遗(前台界面篇)之 Activity 和 Fragment
  • HTML-表单
  • iOS动画编程-View动画[ 1 ] 基础View动画
  • js继承的实现方法
  • JS实现简单的MVC模式开发小游戏
  • mongo索引构建
  • Node + FFmpeg 实现Canvas动画导出视频
  • 程序员该如何有效的找工作?
  • 第2章 网络文档
  • 浅谈web中前端模板引擎的使用
  • 腾讯视频格式如何转换成mp4 将下载的qlv文件转换成mp4的方法
  • 协程
  • 与 ConTeXt MkIV 官方文档的接驳
  • 【运维趟坑回忆录 开篇】初入初创, 一脸懵
  • ​MySQL主从复制一致性检测
  • ​中南建设2022年半年报“韧”字当头,经营性现金流持续为正​
  • !$boo在php中什么意思,php前戏
  • #NOIP 2014# day.2 T2 寻找道路
  • #我与Java虚拟机的故事#连载12:一本书带我深入Java领域
  • ${ }的特别功能
  • (+4)2.2UML建模图
  • (1)Nginx简介和安装教程
  • (2)关于RabbitMq 的 Topic Exchange 主题交换机
  • (4)事件处理——(7)简单事件(Simple events)
  • (原创)boost.property_tree解析xml的帮助类以及中文解析问题的解决
  • (轉貼)《OOD启思录》:61条面向对象设计的经验原则 (OO)
  • .NET 自定义中间件 判断是否存在 AllowAnonymousAttribute 特性 来判断是否需要身份验证
  • .NET/C# 利用 Walterlv.WeakEvents 高性能地中转一个自定义的弱事件(可让任意 CLR 事件成为弱事件)
  • .net对接阿里云CSB服务
  • /proc/vmstat 详解
  • /usr/bin/perl:bad interpreter:No such file or directory 的解决办法
  • @ResponseBody
  • [22]. 括号生成
  • [Android]RecyclerView添加HeaderView出现宽度问题