Merge pull request #3323 from jumpserver/pr@dev@perf_dashboard_data

perf: 优化首页 rank 的宽度
This commit is contained in:
老广 2023-08-08 17:12:48 +08:00 committed by GitHub
commit 992025e618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -13,6 +13,7 @@
<script>
import RankTable from '../components/RankTable.vue'
export default {
components: {
RankTable
@ -31,7 +32,8 @@ export default {
},
{
prop: 'total',
label: this.$t('dashboard.LoginCount')
label: this.$t('dashboard.LoginCount'),
width: '80px'
}
]
},
@ -47,7 +49,8 @@ export default {
},
{
prop: 'total',
label: this.$t('dashboard.NumberOfVisits')
label: this.$t('dashboard.NumberOfVisits'),
width: '80px'
}
]
}

View File

@ -6,10 +6,10 @@
</div>
<el-table
:data="tableData"
style="width: 100%"
class="table"
style="width: 100%"
>
<el-table-column :label="$tc('dashboard.ranking')">
<el-table-column :label="$tc('dashboard.ranking')" width="60px">
<template v-slot="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
@ -17,8 +17,9 @@
<el-table-column
v-for="i in config.columns"
:key="i.prop"
:prop="i.prop"
:label="i.label"
:prop="i.prop"
:width="i.width"
/>
</el-table>
</div>
@ -81,5 +82,10 @@ export default {
}
>>> .el-table th, .el-table tr {
background-color: #F5F6F7!important;
}
>>> .el-table .cell {
white-space: nowrap;
}
</style>