Skip to content

Commit

Permalink
fix: 修复K8S系统用户更新时令牌是必填项的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
decentralized-fi authored and ibuler committed Aug 28, 2020
1 parent 19267ee commit 40e7fcd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/views/assets/SystemUser/SystemUserCreateUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ export default {
type: 'textarea',
autosize: true
},
hidden: form => form.protocol !== 'k8s'
hidden: form => {
return form.protocol !== 'k8s'
}
},
protocol: {
rules: [
Expand Down Expand Up @@ -208,6 +210,16 @@ export default {
url: '/api/v1/assets/system-users/',
authHiden: false
}
},
method: {
},
mounted() {
const params = this.$route.params
const method = params.id ? 'post' : 'put'
if (method === 'post') {
this.fieldsMeta.token.rules[0].required = false
}
}
}
</script>
Expand Down

0 comments on commit 40e7fcd

Please sign in to comment.