Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

feat: add ConfirmPassword Validate #116

Merged
merged 2 commits into from
Apr 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/views/system/Installation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
placeholder="确定密码"
v-decorator="[
'confirmPassword',
{rules: [{ required: true, message: '请确定密码' }]}
{rules: [{ required: true, message: '请确定密码' },{ validator: handleValidateConfirmPassword }]}
]"
>
<a-icon
Expand Down Expand Up @@ -229,6 +229,12 @@ export default {
this.$set(this.installation, 'url', window.location.protocol + '//' + window.location.host)
},
methods: {
handleValidateConfirmPassword(rule,value, callback){
if (this.installation.confirmPassword && this.installation.password !== this.installation.confirmPassword ) {
callback('确认密码和密码不匹配')
}
callback()
},
verifyIsInstall() {
adminApi.isInstalled().then(response => {
if (response.data.data) {
Expand Down