問題描述如下
相應代碼段
<el
-table style
="width: 100%" height
="330px" :data
="tableData" border stripe
><el
-table
-column align
="center" type
="index" label
="#"></el
-table
-column
><el
-table
-column align
="center" label
="社團編號" prop
="assoid"></el
-table
-column
><el
-table
-column align
="center" label
="負責人編號" prop
="userid"></el
-table
-column
><el
-table
-column align
="center" label
="社團名字" prop
="assoname"></el
-table
-column
><el
-table
-column align
="center" label
="社團簡介" prop
="introduce"></el
-table
-column
><el
-table
-column align
="center" label
="現人數" prop
="numcurrent"></el
-table
-column
><el
-table
-column align
="center" label
="成立時間" prop
="establishtime"></el
-table
-column
><el
-table
-column align
="center" label
="創建時間" prop
="buildtime"></el
-table
-column
><el
-table
-column align
="center" label
="審核狀態" :formatter
="formatterStatus" prop
="status"></el
-table
-column
><el
-table
-column align
="center" label
="操作"><template slot
-scope
="scope" width
="100px"><el
-button size
="medium" type
="primary" icon
="el-icon-edit" v
-if="editType"@click="openEdit(scope.$index, scope.row)">修改
</el
-button
><el
-button size
="medium" type
="danger" icon
="el-icon-delete" v
-if="deleteType"@click="clickDelete(scope.$index, scope.row)">撤銷
</el
-button
></template
></el
-table
-column
></el
-table
>
只需要添加在相應字段的位置添加該屬性show-overflow-tooltip即可
如下圖所示
效果如下
總結
以上是生活随笔為你收集整理的element ui 表格中的字太长,想要把多余的字变成...解决方法,一个属性即可的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。