当前位置:网站首页>el form 表单validate成功后没有执行逻辑
el form 表单validate成功后没有执行逻辑
2022-07-02 05:06:00 【进击的yuan人】
form 表单validate成功后没有执行逻辑
01.问题分析
1.验证表单不通过的时候会执行提示,通过后没有执行任何逻辑,如下图所示
2.按正确逻辑,控制台会输出success,但是验证通过后没有执行任务逻辑,因此得出是验证规则通过后的方法返回问题
02.查看已有规则
1.查看form表单rules逻辑,如下图所示
2.图中对年龄进行验证,为空值进行提示
3.很多时候都觉得这样验证时没有问题的,但是这里只执行了错误的逻辑,没有执行正确的逻辑,所以存在值得情况下需要执行正确的逻辑
03.问题解决
1.在验证方法添加正确的处理逻辑,如下图所示
2.图中添加了callbak()方法,用于验证通过后的逻辑执行
注意
1.所有自定义验证规则的方法,任何(情况)下都需要执行callback()方法
边栏推荐
- Latest: the list of universities and disciplines for the second round of "double first-class" construction was announced
- Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
- JS interview collection test question 1
- How to recover deleted data in disk
- Feign realizes file uploading and downloading
- Pyechart1.19 national air quality exhibition
- What data does the main account of Zhengda Meiou 4 pay attention to?
- Starting from the classification of database, I understand the map database
- Lm09 Fisher inverse transform inversion mesh strategy
- Change deepin to Alibaba image source
猜你喜欢
06 装饰(Decorator)模式
C case of communication between server and client based on mqttnet
[Yu Yue education] autumn 2021 reference materials of Tongji University
Cannot activate CONDA virtual environment in vscode
How to write a client-side technical solution
How to recover deleted data in disk
Hcip day 17
win10 磁盘管理 压缩卷 无法启动问题
The underlying principle of go map (storage and capacity expansion)
Cultivate primary and secondary school students' love for educational robots
随机推荐
6.30 year end summary, end of student age
win10 磁盘管理 压缩卷 无法启动问题
Cubemx DMA notes
Application of intelligent robot in agricultural ecology
Go implements leetcode rotation array
ansible安装与使用
fastText文本分类
Differential identities (help find mean, variance, and other moments)
Embedded-c language-8-character pointer array / large program implementation
Line by line explanation of yolox source code of anchor free series network (7) -- obj in head_ loss、Cls_ Loss and reg_ Calculation and reverse transmission of loss I
Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
The El cascader echo only selects the questions that are not displayed
C# 图片显示占用问题
7.1模拟赛总结
Acelems Expressway microgrid energy efficiency management platform and intelligent lighting solution intelligent lighting tunnel
oracle 存储过程与job任务设置
A new attribute value must be added to the entity entity class in the code, but there is no corresponding column in the database table
Embedded-c language-9-makefile/ structure / Consortium
Rhcsa --- work on the fourth day
Pyechats 1.19 generate a web version of Baidu map