|
@@ -1,14 +1,10 @@
|
|
<template>
|
|
<template>
|
|
- <el-row :gutter="cols" class="statistic">
|
|
|
|
- <div v-for="(item, index) in tags" :key="index">
|
|
|
|
- <el-col :span="span ? span : (index + 1) % col === 0 ? colSpan : colSpan - 1">
|
|
|
|
- <statistic-content :item="item"></statistic-content>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :key="index" :span="1" v-if="(index + 1) % col !== 0 && (index + 1) < tags.length">
|
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <div class="statistic">
|
|
|
|
+ <div v-for="(item, index) in tags" :style="{flex: (100 / col) + '%'}" class="item" :key="index">
|
|
|
|
+ <statistic-content :item="item"/>
|
|
|
|
+ <el-divider class="divider" v-if="(index + 1) % col !== 0 && (index + 1) < tags.length" direction="vertical"></el-divider>
|
|
</div>
|
|
</div>
|
|
- </el-row>
|
|
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
@@ -43,7 +39,7 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
colSpan() {
|
|
colSpan() {
|
|
- return this.cols / this.col
|
|
|
|
|
|
+ return 24 / this.col
|
|
},
|
|
},
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -65,40 +61,72 @@ export default {
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
- .statistic{
|
|
|
|
- padding: 20px 0;
|
|
|
|
- text-align: center;
|
|
|
|
|
|
+.statistic{
|
|
|
|
+ display: flex;
|
|
|
|
+ text-align: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+ .item{
|
|
|
|
+ display: flex;
|
|
|
|
+ position: relative;
|
|
|
|
+ }
|
|
|
|
+ /deep/ .statistic-content{
|
|
width: 100%;
|
|
width: 100%;
|
|
- margin: auto!important;
|
|
|
|
- /deep/ .el-icon-edit{
|
|
|
|
- cursor: pointer;
|
|
|
|
- color: #14928A;
|
|
|
|
- font-size: 20px;
|
|
|
|
- }
|
|
|
|
- /deep/ .el-col {
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- min-height: 60px;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
- flex-direction: column;
|
|
|
|
- }
|
|
|
|
- /deep/ .el-col-1{
|
|
|
|
- font-size: 60px;
|
|
|
|
- }
|
|
|
|
- /deep/ .statistic-content{
|
|
|
|
- >span{
|
|
|
|
- display: block;
|
|
|
|
- line-height: 1.8;
|
|
|
|
- color: rgba(0, 0, 0, .85);
|
|
|
|
- font-size: 24px;
|
|
|
|
- &:first-child{
|
|
|
|
- font-size: 14px;
|
|
|
|
- font-weight: normal;
|
|
|
|
- color: rgba(0, 0, 0, .45);
|
|
|
|
- }
|
|
|
|
|
|
+ >span{
|
|
|
|
+ display: block;
|
|
|
|
+ line-height: 1.8;
|
|
|
|
+ color: rgba(0, 0, 0, .85);
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ &:first-child{
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ font-weight: normal;
|
|
|
|
+ color: rgba(0, 0, 0, .45);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .divider{
|
|
|
|
+ width: 1px;
|
|
|
|
+ font-size: 60px;
|
|
|
|
+ margin: 0;
|
|
|
|
+ position: absolute;
|
|
|
|
+ right: 0;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+ // .statistic{
|
|
|
|
+ // padding: 20px 0;
|
|
|
|
+ // text-align: center;
|
|
|
|
+ // width: 100%;
|
|
|
|
+ // margin: auto!important;
|
|
|
|
+ // /deep/ .el-icon-edit{
|
|
|
|
+ // cursor: pointer;
|
|
|
|
+ // color: #14928A;
|
|
|
|
+ // font-size: 20px;
|
|
|
|
+ // }
|
|
|
|
+ // /deep/ .el-col {
|
|
|
|
+ // display: flex;
|
|
|
|
+ // align-items: center;
|
|
|
|
+ // min-height: 60px;
|
|
|
|
+ // align-items: center;
|
|
|
|
+ // justify-content: center;
|
|
|
|
+ // align-items: center;
|
|
|
|
+ // flex-direction: column;
|
|
|
|
+ // }
|
|
|
|
+ // /deep/ .el-col-1{
|
|
|
|
+ // font-size: 60px;
|
|
|
|
+ // }
|
|
|
|
+ // /deep/ .statistic-content{
|
|
|
|
+ // >span{
|
|
|
|
+ // display: block;
|
|
|
|
+ // line-height: 1.8;
|
|
|
|
+ // color: rgba(0, 0, 0, .85);
|
|
|
|
+ // font-size: 24px;
|
|
|
|
+ // &:first-child{
|
|
|
|
+ // font-size: 14px;
|
|
|
|
+ // font-weight: normal;
|
|
|
|
+ // color: rgba(0, 0, 0, .45);
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
</style>
|
|
</style>
|