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 寬度用百分比寫的 ,然后不能按照百分比撐開,同時style會受到scoped限制,文檔里面寫的是具體值,想問下怎么樣能夠自定義百分比寬度?
問題解答
回答1:可以嘗試class-name屬性,自定義一個類名,再寫css添加樣式
回答2:看文檔找到一種方法,是把 width 換成 min-width ,就支持百分比顯示啦 !
相關(guān)文章:
1. python - 數(shù)據(jù)與循環(huán)次數(shù)對應(yīng)不上2. node.js - nodejs開發(fā)中常用的連接mysql的庫3. mysql - jdbc的問題4. python - 我在使用pip install -r requirements.txt下載時,為什么部分能下載,部分不能下載5. 視頻文件不能播放,怎么辦?6. python - 編碼問題求助7. windows7 ping不通虛擬機VMware上的linux(ubuntu)的ip8. 網(wǎng)頁爬蟲 - python 爬取網(wǎng)站 并解析非json內(nèi)容9. mysql - 如何減少使用或者不用LEFT JOIN查詢?10. mysql - 分庫分表、分區(qū)、讀寫分離 這些都是用在什么場景下 ,會帶來哪些效率或者其他方面的好處
