javascript - Can the value of fixed header height of element ui table be a variable?
为情所困
为情所困 2017-07-05 10:35:46
0
1
1538

Use element ui's table table to set the height attribute of the table content. Can you set the variable without hard-coding? The height of different screens is different. For example, in the following code, height="250", how can the attribute value be implemented using a variable?

<el-table

:data="tableData3"
height="250"
border
style="width: 100%">
<el-table-column
  prop="date"
  label="日期"
  width="180">
</el-table-column>
<el-table-column
  prop="name"
  label="姓名"
  width="180">
</el-table-column>
<el-table-column
  prop="address"
  label="地址">
</el-table-column>

</el-table>

为情所困
为情所困

reply all(1)
習慣沉默
//定义变量
const a = 200;
//使用变量,注意冒号
:height="a"
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template