html5 - ElementUI table中el-table-column怎么設(shè)置百分比顯示。
問題描述
引入elementui table 模板,<p class='content'>
<el-table :data='tableData' stripe border> <el-table-column prop='title' label='申訴' class='con-tableTitle'> <el-table-column prop='date' label='日期' width='15%'></el-table-column> <el-table-column prop='name' label='姓名' width='5%'></el-table-column> <el-table-column prop='id' label='身份證' width='15%'></el-table-column> <el-table-column prop='hospital' label='醫(yī)院' width='15%'></el-table-column> <el-table-column prop='cash' label='金額' width='8%'></el-table-column> <el-table-column prop='state' label='審核狀態(tài)' width='7%'></el-table-column> <el-table-column prop='suggest' label='審核意見' width='25%'></el-table-column> <el-table-column label='操作' width='10%'> <template scope='scope'> <el-button size='small' type='primary' @click='unappeal(scope.$index, scope.row)'>提交</el-button> </template> </el-table-column> </el-table-column> </el-table> </p> 代碼部分el-table-column 寬度用百分比寫的 ,然后不能按照百分比撐開,同時(shí)style會(huì)受到scoped限制,文檔里面寫的是具體值,想問下怎么樣能夠自定義百分比寬度?
問題解答
回答1:可以嘗試class-name屬性,自定義一個(gè)類名,再寫css添加樣式
回答2:看文檔找到一種方法,是把 width 換成 min-width ,就支持百分比顯示啦 !
相關(guān)文章:
1. 安全性測(cè)試 - nodejs中如何防m(xù)ySQL注入2. javascript - 關(guān)于apply()與call()的問題3. html - eclipse 標(biāo)簽錯(cuò)誤4. python 利用subprocess庫(kù)調(diào)用mplayer時(shí)發(fā)生錯(cuò)誤5. python - Pycharm的Debug用不了6. datetime - Python如何獲取當(dāng)前時(shí)間7. 請(qǐng)問PHPstudy中的數(shù)據(jù)庫(kù)如何創(chuàng)建索引8. python - pycharm 自動(dòng)刪除行尾空格9. python文檔怎么查看?10. javascript - nginx反向代理靜態(tài)資源403錯(cuò)誤?
