Skip to content

Commit

Permalink
Merge pull request #491 from xhwgood/master
Browse files Browse the repository at this point in the history
fix: 修复 FormItem rules 更新错误的问题
  • Loading branch information
ijry authored Aug 22, 2024
2 parents 0b1d938 + cffbd2d commit 2cbb6c4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@
// 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则
setRules(rules) {
// 判断是否有规则
if (rules.length === 0) return;
if (rules.length === 0) {
this.itemRules = [];
return
};
this.itemRules = rules;
},
// 获取父组件的参数
Expand Down

0 comments on commit 2cbb6c4

Please sign in to comment.