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 在项目根 ...
随机推荐
- linux c使用socket进行http 通信,并接收任意大小的http响应(四)
终于说到SOCKET 这里了.SOCKET进行http通信的实际就是利用socket将http请求信息发送给http服务器,然后再利用socket接收http响应. 由于本文与之通信的服务器是ip已知 ...
- adb command not found / abd' 不是内部或外部命令,也不是可运行的程序 或批处理文件。最简易修改
此处提供最简易高效的方法 不需要添加.bash_profile 只需手动设置环境变量 1.打开环境变量设置页面:确保你ANDROID_HOME, JAVA_HOME已经设置好,我们针对abd的环境配置 ...
- Linux之expr命令详解
expr命令: expr命令是一个手工命令行计数器,用于在UNIX/LINUX下求表达式变量的值,一般用于整数值,也可用于字符串. –格式为: expr Expression(命令读入Expressi ...
- BFC清除浮动
BFC 就是清除浮动 用来处理文档脱离文档流的问题 清除浮动的方法: a.父元素也添加一个浮动 产生弊端就是:margin 不能使用 b.给父元素添加一个:display:inline-block 弊 ...
- PyCharm基本用法
1.修改字体 在file->settings下进行修改如下图: 2 修改颜色背景 在file->settings下修改,如图: 3连接git 点击file->settings,选择版 ...
- copy GC 和 mark & compaction GC的算法异同
先标记 然后 copy GC是,对所有child,判断, 如果child没有被访问过,那么拷贝到新地址,child的forwording指向新地址,child标记为已访问,把自己对child的引用改为 ...
- webpack 3.X研究
目前webpack已经到了3.X版本,为了方便通过最新版本打包整个前端应用,现在开始对webpack操作进行简单介绍. 一.webpack安装 在安装webpack之前需要注意,webpack是通过n ...
- RabbitMQ学习之旅(一)
RabbitMQ学习总结(一) RabbitMQ简介 RabbitMQ是一个消息代理,其接收并转发消息.类似于现实生活中的邮局:你把信件投入邮箱的过程,相当于往队列中添加信息,因为所有邮箱中的信件最终 ...
- [LeetCode&Python] Problem 458. Poor Pigs
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. Th ...
- spring--多人开发,模块化配置
需要在配置文件中配置: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="h ...