mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
perf: update accounts list can hidden actions
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user