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 在项目根 ...
随机推荐
- 【转】Ubuntu英文系统下安装中文输入法
转自:https://my.oschina.net/No5stranger/blog/290026 ubuntu默认的输入法是ibus,综合网上评论,fcitx的支持者更多,而且个人感觉fcitx也的 ...
- oracle 导出某用户下的表
exp test/test@orcl owner=test file=E:/all.dmp
- teamview修改id
怎么修改 TeamViewer ID 呢?按照下列的操作步骤,就能很简单的改变TeamViewer的id哦!1. 开始 > 运行,录入%appdata%,删除TeamViewer的文件夹: ...
- Visual Basic 2017 操作Excel和word【2】持续更新……
1.控制台程序创建Excel,并设置状态栏显示“Hello World”文本 Module Module1 Private exitXL As Boolean = False Dim WithEven ...
- HTTP,RFC自学心得
HTTP协议描述的是:发送方与接收方的通信协议,通过两方的自觉遵守而存在,当然有不少的浏览器并没有百分百遵守这份协议. HTTP是运行于应用层的协议,基于TCP协议而运作.基本上是客户/服务器对答模式 ...
- Qt中的Q_D宏和d指针
_ZTS7QObject 一.Q_D的在文件中的提法 Q_D的设置意在方便地获取私有类指针,文件为qglobal.h.下面的##是宏定义的连字符.假设类名是A,那么A##Private翻译过来就是AP ...
- React Native backgroundColor 的颜色值
React Native 的 css 跟 web开发中css还是很相似的,其中 backgroundColor 支持的颜色值与 css 一致,为方便查找写在这里. 其他样式可以参考 CSS 样式网站 ...
- git 本地重命名文件夹大小写并提交到远程分支
git branch 查看本地分支 git branch -a 查看本地 本地分支可直接切换:git checkout name 进入正题: 1.文件夹备份 2.git config core.ign ...
- AFN 二次封装
#import "YQDataManager.h" #import <YYModel/YYModel.h> #pragma mark - 数据model基类 @impl ...
- 软件工程 week 04
四则运算 一.摘要 作业地址:https://edu.cnblogs.com/campus/nenu/2016CS/homework/2266 git仓库地址:https://git.coding.n ...