perf: 修改 panel

This commit is contained in:
ibuler 2025-03-11 10:57:55 +08:00
parent 05e3128dbc
commit 7c1d1278f6
5 changed files with 19 additions and 8 deletions

View File

@ -259,14 +259,14 @@ export default {
connectivity: connectivityMeta, connectivity: connectivityMeta,
actions: { actions: {
formatter: ActionsFormatter, formatter: ActionsFormatter,
has: false, has: this.showActions,
formatterArgs: { formatterArgs: {
hasUpdate: false, // can set function(row, value) hasUpdate: false, // can set function(row, value)
hasDelete: true, // can set function(row, value) hasDelete: true, // can set function(row, value)
hasClone: false, hasClone: false,
canDelete: () => vm.$hasPerm('accounts.delete_account'), canDelete: () => vm.$hasPerm('accounts.delete_account'),
moreActionsTitle: this.$t('More'), moreActionsTitle: this.$t('More'),
extraActions: this.showActions ? accountOtherActions(this) : [] extraActions: accountOtherActions(this)
} }
}, },
...this.columnsMeta ...this.columnsMeta

View File

@ -2,7 +2,7 @@
<div class="item-info"> <div class="item-info">
<el-row> <el-row>
<el-col v-for="item of infos" :key="item.content" :span="12" class="panel-item"> <el-col v-for="item of infos" :key="item.content" :span="12" class="panel-item">
<small class="item-label">{{ item.title }}:</small> <small class="item-label">{{ item.title }}</small>
<h4 class="item-value">{{ item.content }}</h4> <h4 class="item-value">{{ item.content }}</h4>
</el-col> </el-col>
</el-row> </el-row>
@ -21,9 +21,6 @@ export default {
}, },
data() { data() {
return {} return {}
},
mounted() {
console.log('INfo: ', this.infos)
} }
} }
</script> </script>

View File

@ -5,7 +5,7 @@
<el-avatar :src="imageUrl" shape="square" /> <el-avatar :src="imageUrl" shape="square" />
<div class="title-display"> <div class="title-display">
<span class="name">{{ object.name }}</span> <span class="name">{{ object.name }}</span>
<small class="comment">{{ object.provider.label }}</small> <span class="comment">{{ object.provider.label }}</span>
</div> </div>
</div> </div>
<div <div
@ -177,9 +177,15 @@ div.info-panel {
flex-direction: column; flex-direction: column;
text-align: left; text-align: left;
.name {
font-size: 1.1em;
color: #555555;
}
.comment { .comment {
color: #62686c; color: #62686c;
font-weight: 300; font-weight: 300;
font-size: 0.8em;
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<AccountListTable ref="table" :show-extra-actions="false" v-bind="tableConfig" /> <AccountListTable ref="table" :show-actions="false" v-bind="tableConfig" />
</template> </template>
<script> <script>

View File

@ -24,6 +24,14 @@ export default {
columns: [ columns: [
'service', 'service_id', 'asset', 'account', 'remote_addr', 'datetime' 'service', 'service_id', 'asset', 'account', 'remote_addr', 'datetime'
], ],
columnsShow: {
min: [
'service', 'account', 'datetime'
],
default: [
'service', 'asset', 'account', 'remote_addr', 'datetime'
]
},
extraQuery: { extraQuery: {
order: '-datetime' order: '-datetime'
}, },