element-ui el-col 奇数份


Element Layout 布局设置奇数份分栏:

1.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<el-col :xs="12" :sm="12" :lg="lgSpan" class="card-panel-col" v-for="item in panelData">
<div class="card-panel">
<div class="num">{{item.num}}</div>
<div class="name">{{item.name}}</div>
</div>
</el-col>

<script>
props: {
lgSpan: {
type: Object,
default: function() {
return { span: '4-8' }
}
}
}
</script>

<style lang="scss" scoped>
.el-col-lg-4-8 {
width: 20%;
}
</style>

参考文档