toast
This commit is contained in:
@@ -135,12 +135,14 @@ export default {
|
||||
saveLogin () {
|
||||
this.disabled = true
|
||||
if (!this.username) {
|
||||
this.toast('请输入用户名')
|
||||
// this.toast('请输入用户名')
|
||||
this.toast(this.$t('login.toast1'))
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.password) {
|
||||
this.toast('请输入密码')
|
||||
// this.toast('请输入密码')
|
||||
this.toast(this.$t('login.toast2'))
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
|
||||
@@ -308,22 +308,26 @@ export default {
|
||||
async _updatePass () {
|
||||
this.$refs.child.disabled = true
|
||||
if (!this.oldpassword) {
|
||||
this.toast('旧密码不能为空')
|
||||
// this.toast('旧密码不能为空')
|
||||
this.toast(this.$t('common.toast1'))
|
||||
this.$refs.child.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.newpassword1) {
|
||||
this.toast('新密码不能为空')
|
||||
// this.toast('新密码不能为空')
|
||||
this.toast(this.$t('common.toast2'))
|
||||
this.$refs.child.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.newpassword2) {
|
||||
this.toast('输入新密码')
|
||||
// this.toast('输入新密码')
|
||||
this.toast(this.$t('common.toast3'))
|
||||
this.$refs.child.disabled = false
|
||||
return
|
||||
}
|
||||
if (this.newpassword1 !== this.newpassword2) {
|
||||
this.toast('新密码输入不一致,请重新输入')
|
||||
// this.toast('新密码输入不一致,请重新输入')
|
||||
this.toast(this.$t('common.toast4'))
|
||||
this.$refs.child.disabled = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user