html5 - How to set the percentage display of el-table-column in ElementUI table.
黄舟
黄舟 2017-05-24 11:36:14
0
2
3078

Introducing elementui table template,
<p class="content">

      <el-table :data="tableData" style="width: 100%;" stripe border>
          <el-table-column prop="title" label="申诉" width="100%" 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限制,文档里面写的是具体值,想问下怎么样能够自定义百分比宽度?
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
大家讲道理

You can try class-nameattributes, customize a class name, and then write css to add styles

仅有的幸福

Look at the documentation and find a way to replace width with min-width, which will support percentage display!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template