mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
pref: 更新 table pager
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import ChoicesFormatter from '@/components/TableFormatters/ChoicesFormatter'
|
||||
import i18n from '@/i18n/i18n'
|
||||
|
||||
@@ -7,30 +6,21 @@ export const connectivityMeta = {
|
||||
formatter: ChoicesFormatter,
|
||||
formatterArgs: {
|
||||
faChoices: {
|
||||
ok: 'fa-check',
|
||||
failed: 'fa-times',
|
||||
unknown: 'fa-circle-o'
|
||||
ok: 'fa-check-circle',
|
||||
failed: 'fa-times-circle',
|
||||
unknown: ' '
|
||||
},
|
||||
classChoices: {
|
||||
ok: 'text-primary',
|
||||
failed: 'text-danger',
|
||||
unknown: 'text-warning'
|
||||
unknown: ''
|
||||
},
|
||||
hasTips: true,
|
||||
getTips: ({ row, cellValue }) => {
|
||||
const mapper = {
|
||||
'ok': i18n.t('assets.Reachable'),
|
||||
'failed': i18n.t('assets.Unreachable'),
|
||||
'unknown': i18n.t('assets.Unknown')
|
||||
}
|
||||
let tips = mapper[cellValue]
|
||||
if (row['date_verified']) {
|
||||
const datetime = toSafeLocalDateStr(row['date_verified'])
|
||||
tips += '<br> ' + datetime
|
||||
}
|
||||
return tips
|
||||
textChoices: {
|
||||
ok: 'Avail',
|
||||
failed: 'Failed',
|
||||
unknown: '-'
|
||||
}
|
||||
},
|
||||
width: '90px',
|
||||
width: '100px',
|
||||
align: 'center'
|
||||
}
|
||||
|
||||
@@ -127,7 +127,6 @@
|
||||
:page-size="size"
|
||||
:total="total"
|
||||
:background="paginationBackground"
|
||||
style="text-align: right; padding: 10px 0;"
|
||||
:layout="paginationLayout"
|
||||
v-bind="extraPaginationAttrs"
|
||||
@size-change="handleSizeChange"
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
.el-data-table ::v-deep .el-pagination{
|
||||
text-align: center !important;
|
||||
}
|
||||
.el-data-table ::v-deep .el-table td{
|
||||
padding: 4px 0;
|
||||
}
|
||||
.el-data-table ::v-deep .el-table th{
|
||||
padding: 4px 0;
|
||||
}
|
||||
.el-data-table ::v-deep .el-form-item{
|
||||
margin-bottom:10px !important ;
|
||||
margin-top:10px;
|
||||
}
|
||||
.el-data-table ::v-deep .el-pagination{
|
||||
padding:15px 0 !important ;
|
||||
.el-data-table ::v-deep .el-table td {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.el-data-table ::v-deep .el-table th {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.el-data-table ::v-deep .el-form-item {
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.el-data-table ::v-deep .el-pagination {
|
||||
text-align: right;
|
||||
padding: 15px 25px 20px 15px;
|
||||
|
||||
.el-pagination__total {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -189,14 +189,6 @@ export default {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
//分页
|
||||
.el-pagination ::v-deep .el-pagination__total{
|
||||
float: left;
|
||||
}
|
||||
|
||||
.el-pagination ::v-deep .el-pagination__sizes{
|
||||
float: left;
|
||||
}
|
||||
//修改颜色
|
||||
// .el-button--text{
|
||||
// color: #409EFF;
|
||||
|
||||
@@ -219,6 +219,17 @@ export default {
|
||||
permissions: ['settings.change_terminal']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'applets/:id',
|
||||
name: 'AppletDetail',
|
||||
component: () => import('@/views/settings/Applet/Applet/AppletDetail/index'),
|
||||
hidden: true,
|
||||
meta: {
|
||||
title: i18n.t('route.AppletDetail'),
|
||||
permissions: ['settings.change_terminal'],
|
||||
activeMenu: '/settings/applets'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'hosts/create',
|
||||
name: 'AppletHostCreate',
|
||||
|
||||
@@ -126,7 +126,6 @@ export default {
|
||||
.map(i => this.platforms.find(p => p.id === i))
|
||||
.filter(p => p)
|
||||
.map(p => p.id)
|
||||
console.log('This. platform id: ', this.recentPlatformIds)
|
||||
},
|
||||
onConfirm() {
|
||||
this.iVisible = false
|
||||
|
||||
Reference in New Issue
Block a user