fix: admin用户设置无法删除

This commit is contained in:
fit2cloud-chenyw 2021-06-02 17:23:27 +08:00
parent c627f44e6e
commit fad49bd4bf

View File

@ -187,6 +187,7 @@ export default {
show: this.checkPermission(['user:edit']) show: this.checkPermission(['user:edit'])
}, { }, {
label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.del, label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.del,
disabled: this.btnDisabled,
show: this.checkPermission(['user:del']) show: this.checkPermission(['user:del'])
}, { }, {
label: this.$t('member.edit_password'), icon: 'el-icon-s-tools', type: 'success', click: this.editPassword, label: this.$t('member.edit_password'), icon: 'el-icon-s-tools', type: 'success', click: this.editPassword,
@ -489,6 +490,9 @@ export default {
allRoles().then(res => { allRoles().then(res => {
this.roles = res.data this.roles = res.data
}) })
},
btnDisabled(row) {
return row.userId === 1
} }
} }
} }