html5 - ElementUI table中el-table-column怎么设置百分比显示。
问题描述
引入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='医院' width='15%'></el-table-column> <el-table-column prop='cash' label='金额' width='8%'></el-table-column> <el-table-column prop='state' label='审核状态' 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 ,就支持百分比显示啦 !
相关文章:
1. MYSQL 运算的问题2. python的文件读写问题?3. mysql按照时间热度排序4. angular.js使用$resource服务把数据存入mongodb的问题。5. 网页爬虫 - 关于Python的编码与解码问题6. php - 两个表数据怎么插到一个模板中,并按时间排序?7. mysql - SQL添加记录的数据来源于同一个表8. 网页爬虫 - python爬虫用BeautifulSoup爬取<s>元素并写入字典,但某些div下没有这一元素,导致自动写入下一条,如何解决?9. linux - 为什么我在mysql的my.cnf下找不到bind-address?10. mysql - 表名称前缀到底有啥用?

网公网安备