Vue中table表头合并的用法
<div class="panel-container">
<div>
<table class="table-head" width="80%">
<thead>
<tr>
<th class="headerTable" rowspan="2">名称</th>
<th rowspan="2">性别</th>
<th colspan="2">回来时间</th>
<th colspan="2">出去时间</th>
</tr>
<tr class="num">
<th>准时度</th>
<th>准时率</th>
<th>准时度</th>
<th>准时率</th>
</tr>
</thead>
</table>
</div>
<div class="timeBody">
<table>
<tbody>
<tr v-for="(item, index) in list" :key="index">
<td :title="item.name">{{item.name}}</td>
<td>{{item.sex}}</td>
<td>{{item.outTotal}}</td>
<td>{{item.outPer}}</td>
<td>{{item.inTotal}}</td>
<td>{{item.inPer}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<script>
export default {
data() {
return {
list: [{
name: '地名1',
result: '1',
outTotal: '12',
outPer: '30%',
inTotal: '16',
inPer: '34%'
},{
name: '地名2',
result: '1'
outTotal: '12',
outPer: '30%',
inTotal: '16',
inPer: '34%'
},{
name: '地名3',
result: '0',
outTotal: '12',
outPer: '30%',
inTotal: '16',
inPer: '34%'
}]
}
}
}
</script>
.panel-container {
height: 100%;
.table-head {
width: 100%;
color: #B3BBC7;
border: .01rem solid #2B2F33;
tr {
height: .35rem;
&:first-child {
border-top: .01rem solid #2B2F33;
border-bottom: .01rem solid #2B2F33;
background: #3F4348;
th:first-child, th:nth-child(2) {
width: 13.4%;
}
}
&nth-child(odd) td {
background: #3A3A3A;
}
}
th, td {
background: #3A3E43;
}
td {
text-align: center;
}
}
/deep/ .table-list {
height: 92%;
.ivu-table {
overflow: auto;
.ivu-table-body {
border-bottom: .01rem solid #2B2F33;
}
}
/deep/ thead {
diaplay: none !important;
}
}
.num {
background: #3A3E43;
}
} .timeBody {
height: 91%;
overflow-y: auto;
::-webkit-scrollbar {
display: none;
}
table {
width: 100%;
tbody {
width: 100%;
color: #B3BBC7;
border: .01rem solid #2B2F33;
tr {
width: 100%;
height: .35rem;
&:first-child {
border-top: .01rem solid #2B2F33;
border-bottom: .01rem solid #2B2F33;
background: #3F4348;
}
&:nth-child(odd) td {
background: #3A3E43;
}
}
th, td {
border-right: .01rem solid #2B2F33;
}
td {
text-align: center;
width: 7.2%;
&:nth-of-type(1) {
width: 13.3%;
}
&:nth-of-type(2) {
width: 13.15%;
}
}
}
}
}
}
.timeBody::-webkit-scrollbar {
display: none;
}
Vue中table表头合并的用法的更多相关文章
- Vue基础01vue的基本示例,vue的双向数据绑定,vue中常见的几种用法,vue相关常见指令
自学vue框架,每天记录重要的知识点,与大家分享!有不足之处,希望大家指正. 本篇将讲述:vue的基本示例,vue的双向数据绑定,vue中常见的几种用法,vue相关常见指令 前期学习基础,使用vue. ...
- vue中mixin的理解与用法
vue中提供了一种混合机制--mixins,用来更高效的实现组件内容的复用.最开始我一度认为这个和组件好像没啥区别..后来发现错了.下面我们来看看mixins和普通情况下引入组件有什么区别? 组件在引 ...
- vue中computed的作用以及用法
在vue中computed是计算属性,主要作用是把数据存储到内存中,减少不必要的请求,还可以利用computed给子组件的data赋值. 参考地址:https://www.jianshu.com/p/ ...
- Vue中table合并单元格用法
<table> <tr> <th>地名</th> <th>结果</th> <th>人名</th> < ...
- vue中is的作用和用法
回顾vue官方文档的过程中发现了is这个特性,虽然以我的写代码风格实在用不上,不过还是记录一下这个知识点 is的作用 <ul> <li></li> <li&g ...
- react ,ant Design UI中table组件合并单元格并展开详情的问题
需求:购物车订单列表,如图: 一:单元格合并 遇到这种你会怎么办呢? 单元格合并? 还是其他的方法? 下面是我的处理方式,就是在table 组件的columns上处理,这里拿商品举例,其余的类似, ...
- element-ui中table表头表格错误问题解决
我用的是element-ui v1.4.3 在iframe关闭和切换导航会引起有table的表格错位,解决办法: handleAdminNavTab: function(tab) { var admi ...
- vue中computed和watch的用法
computed用来监控自己定义的变量,该变量不在data里面声明,直接在computed里面定义,然后就可以在页面上进行双向数据绑定展示出结果或者用作其他处理: computed比较适合对多个变量或 ...
- vue 中 px转vw的用法
下面介绍最简单的用法 1 下载依赖 npm install postcss-import postcss-loader postcss-px-to-viewport --save-dev 2 在项目根 ...
随机推荐
- ThinkPHP5的数据操作和Thinkphp3.2.3对比小结
前言: 由于Thinkphp5和Thinkphp3.2.3的版本差距过大, 在记忆方面容易混淆. 故特意记录一下在数据操作上的对比的不同. Tp3.2.3 增:add(),addAll() 查:fin ...
- HttpsessionListener 实现在线人数统计
最近在学servlet jsp,用的林信良先生的 jsp&servlet 这本书,在第五章有道在线人数统计的课后题完成,做一次记录. 实际效果: 一:用户类: package cc.openh ...
- Maximum Average Subarray
Given an array with positive and negative numbers, find the maximum average subarray which length sh ...
- [转] MySql 数据类型
转自:http://blog.csdn.net/anxpp/article/details/51284106 1.概述 要了解一个数据库,我们也必须了解其支持的数据类型. MySQL支持所有标准的SQ ...
- 18-10-09 Linux常用命令大全(非常全!!!)
Linux常用命令大全(非常全!!!) Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制, ...
- TestLink测试管理工具的使用举例—第二篇
本篇博客接上面TestLink测试管理工具的使用举例—第一篇的内容继续讲解如何使用TestLink工具进行测试管理. 创建一个名为“购物V1.1系统测试”的测试计划. 2.2版本管理 点击主页“测试计 ...
- pandas 将excel一列拆分成多列重新保存
利用pd.read_excel 做到将第二列“EVT-LBL”按“-”分割后重新加三列在df后面 1 读取表格df 2. 分割第二列短横连接的数字,保存到df2---- 参考:str.spilt( ...
- SQL注入之Sqli-labs系列第三十三关(基于宽字符逃逸注入)
开始挑战第三十三关(Bypass addslashes) 0x1查看源码 本关和第三十二关其实是一样的,只是这里用到了addslashes()函数 function check_addslashes( ...
- Dubbo的Filter链梳理---分组可见和顺序调整
前言: 刚刚写了篇博文: Dubbo透传traceId/logid的一种思路, 对dubbo的filter机制有了一个直观的理解. 同时对filter也多了一些好奇心, 好奇filter链是如何组织的 ...
- hibernate---级联保存、级联删除
直接上菜: dept.hbm.xml:关键点标蓝色这部分,inverse表示放弃维护外键关系,cascade就不用说了 <hibernate-mapping package="com. ...