This commit is contained in:
北海一刀 2021-11-11 18:05:55 +08:00
parent add1a74fc2
commit b837423b6b
2 changed files with 3 additions and 4 deletions

View File

@ -155,6 +155,7 @@ export default class form extends React.Component {
validator() {
console.log("表单验证")
console.log(this.props.model)
let doms = document.getElementsByClassName("form-Item");
let self = this;
for (let i = 0; i < doms.length; i++) {
@ -168,8 +169,6 @@ export default class form extends React.Component {
let rules_item = _.get(this.state.rules, formItem.props.prop)
if (rules_item) {
for (let j = 0; j < rules_item.length; j++) {
if (rules_item[j].type == "required") {
console.log("当前值")
console.log(formItem_com.value)
@ -182,7 +181,6 @@ export default class form extends React.Component {
else{
self.removeClasss(item)
}
}
if (rules_item[j].type == "regExp") {

View File

@ -83,6 +83,7 @@ import classNames from 'classnames'
clearItem(){
this.setState({iptVal:''});
this.setState({iptVallength:0});
this.props.onClearItem();
}
// 焦点事件,伸展宽度
focusFn(e){