1.table
<template slot-scope="{ row }">
1.1element-ui table使用type=‘selection‘復(fù)選框全禁用-全選禁用
2.單機(jī)改變單元格顏色
3.單元格class樣式無(wú)效
<style scoped>
@import "../../assets/common.css";
// 其余作用域內(nèi)樣式代碼
</style>
3.單元格樣式class
columnIndex從0開(kāi)始
html
<el-table :data="tableData" border style="width: 100%" :cell-class-name="changeCellStyle">
<el-table-column type="index" label="編號(hào)" width="50"></el-table-column>
<el-table-column prop="name" label="姓名"></el-table-column>
<el-table-column prop="userid" label="工號(hào)"></el-table-column>
<el-table-column prop="class" label="部門(mén)"></el-table-column>
<el-table-column prop="ontime" label="上班"></el-table-column>
<el-table-column prop="outtime" label="下班"></el-table-column>
</el-table>
js
changeCellStyle({ row, column, rowIndex, columnIndex }) {
//第八列添加 red 類
console.log(row, "sadas");
if (columnIndex === 4) {
return row.oncolor + "Style";
}
if (columnIndex === 5) {
return row.outcolor + "Style";
}
},
4.單元格寬度、高度
https://blog.csdn.net/caijunfen/article/details/79668780?utm_source=blogxgwz3
<tableList
ref="tableList"
height="auto"
5.切換tab后 el_table 固定列下方多了一條線

item.showPoint = (item.jzyzcz_ljzs - item.jzyzcz_mb) >= 0?false:true

7.文字過(guò)長(zhǎng)省略號(hào)
https://blog.csdn.net/lannieZ/article/details/107485780
樣式
https://blog.csdn.net/scy_fighting/article/details/87795216
8.換行
https://blog.csdn.net/weixin_38779534/article/details/103022901
9.去除橫線
https://blog.csdn.net/weixin_44171757/article/details/91542152
10.列名過(guò)長(zhǎng)
https://blog.csdn.net/qq_38110572/article/details/107683701
可復(fù)制
https://www.cnblogs.com/mzhen/p/13215721.html
超長(zhǎng)才有
https://www.cnblogs.com/zhaotq/p/9786812.html
<template slot="header">
<el-tooltip class="item"
popper-class="orderTip"
effect="light"
content="按注冊(cè)登記類型分類"
placement="top">
<span>按注冊(cè)登記類型分類</span>
</el-tooltip>
</template>
11.el-tooltip樣式
12.element使用table樣式混亂問(wèn)題解決方案(doLayout)
13.elementUI table組件獲取表格當(dāng)前行的索引
14.element-ui設(shè)置table組件寬度(width)為百分比
https://blog.csdn.net/weixin_46074961/article/details/105822028
15.elementui設(shè)置el-table-column寬度百分比
16.展示復(fù)雜數(shù)據(jù)(數(shù)組)
17.數(shù)據(jù)過(guò)多時(shí)滾動(dòng)條
.el-table__body-wrapper {
overflow-y: auto;
}
18.邊框
.el-table td,
.el-table th .is-leaf,
.el-table--border,
.el-table--group,
.el-table--border th {
border-color: #c5cce0 !important;
}
19.使用header-cell-class-name 改變不了樣式
https://segmentfault.com/q/1010000016148475/a-1020000016221215
.table-header-wrap {
background: #F5F7FA !important;
color: #333;
font-size: 14px;
}
20.清除排序
21.表格內(nèi)容滾動(dòng)
https://blog.csdn.net/m0_49159526/article/details/115519424#comments_20188213
21.el-table列表自適應(yīng)高度
22.table報(bào)錯(cuò)RangeErr Maximum call stack size exceeded
23.element el-table 全選selection加v-if刷新串行
24.table form
https://www.cnblogs.com/midnight-visitor/p/12409805.html
https://blog.csdn.net/sinat_17775997/article/details/126336027
el-form 和 el-table 實(shí)現(xiàn)表單校驗(yàn)
https://blog.csdn.net/csheng88/article/details/132685820
<el-form :model="tableDataForm" :ref="tableDataForm.tableId" :rules="formRules">
<el-table ref="dts-table" :data="tableDataForm.tableList" stripe border style="width: 100%">
<el-table-column label="字段名稱" min-width="30%">
<template slot-scope="scope">
<el-form-item
:prop="'tableList.'+scope.$index+'.showName'"
:rules="formRules.showName"
>
25.tree-props
tree-props
id不能為0
26.el-table 自定義表頭checkbox失效問(wèn)題
https://blog.csdn.net/oTianKongLan123/article/details/112968746
27.span-method實(shí)現(xiàn)表格行合并
27.el-table封裝
https://blog.csdn.net/pleasantsheep_/article/details/126420671
29.排序
// 排序會(huì)觸發(fā)獲取表格的接口
this.$refs['table-wrap'].clearSort();
this.$refs['table-wrap'].sort('total','descending');
30.table樹(shù)形數(shù)據(jù)
toggleRowExpansionALL(data, isExpand) {
data.forEach((item) => {
this.$refs.staTable.toggleRowExpansion(item, isExpand);
if (item.children) {
this.toggleRowExpansionALL(item.children, isExpand)
}
})
},
31.vue elementUI 實(shí)現(xiàn)el-table 表頭篩選,表頭排序功能
https://blog.csdn.net/nsnydnz/article/details/120959262
https://blog.csdn.net/m0_60067716/article/details/120828207
32.vue 解決el-table 表體數(shù)據(jù)發(fā)生變化時(shí),未重新渲染問(wèn)題|頁(yè)面不更新問(wèn)題
https://www.cnblogs.com/tanweiwei/p/16813605.html
http://www.itdecent.cn/p/3ece295d7213