fix: 修复账号模版删除后列表不自动刷新问题

This commit is contained in:
“huailei000”
2022-12-02 11:11:30 +08:00
committed by huailei
parent 650b5ded35
commit 917c22a9eb

View File

@@ -35,8 +35,8 @@ export default {
actions: {
formatter: ActionsFormatter,
formatterArgs: {
hasUpdate: true, // can set function(row, value)
hasDelete: false, // can set function(row, value)
hasUpdate: true,
hasDelete: true,
hasClone: this.hasClone,
moreActionsTitle: this.$t('common.More'),
extraActions: [
@@ -53,18 +53,6 @@ export default {
vm.showViewSecretDialog = true
})
}
},
{
name: 'Delete',
title: this.$t('common.Delete'),
can: this.$hasPerm('assets.delete_account'),
type: 'primary',
callback: ({ row }) => {
this.$axios.delete(`/api/v1/assets/account-templates/${row.id}/`).then(() => {
this.$message.success(this.$tc('common.deleteSuccessMsg'))
this.$refs.ListTable.reloadTable()
})
}
}
]
}