Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

请教各位大佬element中table组件如何宽度自适应

如图,在缩小浏览器尺寸后table组件并不会缩小宽度,请教各位大佬如何去宽度自适应呢,在网上也找了找,有人说可以用position,除此之外有没有其他方法,请大佬帮帮忙

imageimage

<el-table
 :data="tableData"
>
 <el-table-column
 prop="date"
 label="排名"
 >
 </el-table-column>
 <el-table-column
 prop="name"
 label="商品"
 >
 </el-table-column>
 <el-table-column
 prop="address"
 label="来自供应商">
 </el-table-column>
 <el-table-column
 prop="address"
 label="商品销量">
 </el-table-column>
 <el-table-column
 prop="address"
 label="分享量">
 </el-table-column>
 <el-table-column
 prop="address"
 label="浏览量">
 </el-table-column>
 <el-table-column
 prop="address"
 label="销售金额">
 </el-table-column>
 <el-table-column
 prop="address"
 label="转换率">
 </el-table-column>
</el-table>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

不设置列的宽度就可以了吧


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...