问题描述
navigate(n,showEvenIfInvalid = false) {
this.parsley.whenValidate({
group: "block-" + this.currentTab
}).done(() => {
this.tabValidationState[this.currentTab].state = "valid";
this.currentTab = parseInt(n);
this.prevIoUsTab = this.currentTab-1;
// Otherwise,display the correct tab:
this.showTab(this.currentTab);
}).fail(() => {
// $("#validated-" + this.currentTab).val("False");
this.tabValidationState[this.currentTab].state = "invalid";
if (showEvenIfInvalid){
this.currentTab = parseInt(n);
this.prevIoUsTab = this.currentTab-1;
// Otherwise,display the correct tab:
this.showTab(this.currentTab);
}
}
在每个选项卡中都有多个必填字段。如果我有一些遗漏,我会尝试导航到下一个选项卡,欧芹开始并正确跳转到第一个错误。但是如果我填写并尝试再次按 Next 按钮保持活动状态并且表单不会跳转到下一个错误。我需要再次单击该按钮才能使其正常工作。调试js时我看不到任何奇怪的东西。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)