mirror of https://github.com/halo-dev/halo-admin
feat: add ConfirmPassword Validate (#116)
* feat: add ConfirmPassword Validate * Update Installation.vuepull/125/head
parent
e397180cde
commit
3a491c4e42
|
@ -114,7 +114,7 @@
|
||||||
placeholder="确定密码"
|
placeholder="确定密码"
|
||||||
v-decorator="[
|
v-decorator="[
|
||||||
'confirmPassword',
|
'confirmPassword',
|
||||||
{rules: [{ required: true, message: '请确定密码' }]}
|
{rules: [{ required: true, message: '请确定密码' },{ validator: handleValidateConfirmPassword }]}
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<a-icon
|
<a-icon
|
||||||
|
@ -231,6 +231,12 @@ export default {
|
||||||
this.$set(this.installation, 'url', window.location.protocol + '//' + window.location.host)
|
this.$set(this.installation, 'url', window.location.protocol + '//' + window.location.host)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleValidateConfirmPassword(rule,value, callback){
|
||||||
|
if (this.installation.confirmPassword && this.installation.password !== this.installation.confirmPassword ) {
|
||||||
|
callback('确认密码和密码不匹配')
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
},
|
||||||
verifyIsInstall() {
|
verifyIsInstall() {
|
||||||
adminApi.isInstalled().then(response => {
|
adminApi.isInstalled().then(response => {
|
||||||
if (response.data.data) {
|
if (response.data.data) {
|
||||||
|
|
Loading…
Reference in New Issue