登录按钮懒加载


<van-button round block type=”info” native-type=”submit” :disabled=”disabledSubmit” @@click=”handleLogin”>登录</van-button>

 

disabledSubmit: false

 

handleLogin() {
  this.$refs.form.validate().then(() => {
    this.disabledSubmit = true;
    let loading = this.$toast.loading({
      message: ‘提交中…’,
      forbidClick: true,
      duration: 0
    })
    if (this.formUser.username == ‘admin’) {
      loading.clear()

      this.disabledSubmit = true;

     }

      console.log(“登录成功”);
    }).catch(() => {

    })

  },

原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/245365.html

(0)
上一篇 2022年4月18日 07:07
下一篇 2022年4月18日 07:07

相关推荐

发表回复

登录后才能评论