perf: update accounts list can hidden actions

This commit is contained in:
ibuler
2025-03-10 17:03:38 +08:00
parent d3ee790186
commit ae8292ebb3
2 changed files with 15 additions and 6 deletions

View File

@@ -53,7 +53,12 @@
import { mapGetters } from 'vuex'
import { accountOtherActions, accountQuickFilters, connectivityMeta } from './const'
import { openTaskPage } from '@/utils/jms'
import { ActionsFormatter, PlatformFormatter, SecretViewerFormatter, AccountConnectFormatter } from '@/components/Table/TableFormatters'
import {
AccountConnectFormatter,
ActionsFormatter,
PlatformFormatter,
SecretViewerFormatter
} from '@/components/Table/TableFormatters'
import ViewSecret from './ViewSecret.vue'
import UpdateSecretInfo from './UpdateSecretInfo.vue'
import ResultDialog from './BulkCreateResultDialog.vue'
@@ -138,6 +143,10 @@ export default {
showQuickFilters: {
type: Boolean,
default: true
},
showActions: {
type: Boolean,
default: true
}
},
data() {
@@ -210,7 +219,7 @@ export default {
},
platform: {
label: this.$t('Platform'),
width: '170px',
width: '150px',
formatter: PlatformFormatter,
formatterArgs: {
platformAttr: 'asset.platform'
@@ -250,13 +259,14 @@ export default {
connectivity: connectivityMeta,
actions: {
formatter: ActionsFormatter,
has: false,
formatterArgs: {
hasUpdate: false, // can set function(row, value)
hasDelete: true, // can set function(row, value)
hasClone: false,
canDelete: () => vm.$hasPerm('accounts.delete_account'),
moreActionsTitle: this.$t('More'),
extraActions: accountOtherActions(this)
extraActions: this.showActions ? accountOtherActions(this) : []
}
},
...this.columnsMeta

View File

@@ -1,5 +1,5 @@
<template>
<AccountListTable ref="table" v-bind="tableConfig" />
<AccountListTable ref="table" :show-extra-actions="false" v-bind="tableConfig" />
</template>
<script>
@@ -46,8 +46,7 @@ export default {
},
mounted() {
},
methods: {
}
methods: {}
}
</script>