【vue】element实现el-table-column设置宽度百分比(%)以及插入自定义内容
<el-table
:data="tableData"
style="width: 100%"
stripe= "true"><el-table-column
type="selection"
min-width="5%">
</el-table-column><el-table-column
label="书名"
min-width="55%"><template slot-scope="scope">
<i class="el-icon-document"></i>
<span style="margin-left: 10px">{{scope.row.name}}</span>
<p>{{ scope.row.authors | join }}</p>
</template></el-table-column>
<el-table-column
prop="category"
label="类别"
min-width="20%">
</el-table-column>
<el-table-column
prop="published"
label="出版日期"
min-width="20%"
>
</el-table-column>
</el-table>
红色部分表示给el-table-column,设置宽度百分比,蓝色内容是为插入自定义内容
更多推荐
所有评论(0)