This commit is contained in:
parent
add1a74fc2
commit
b837423b6b
|
@ -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") {
|
||||
|
|
|
@ -83,6 +83,7 @@ import classNames from 'classnames'
|
|||
clearItem(){
|
||||
this.setState({iptVal:''});
|
||||
this.setState({iptVallength:0});
|
||||
this.props.onClearItem();
|
||||
}
|
||||
// 焦点事件,伸展宽度
|
||||
focusFn(e){
|
||||
|
|
Loading…
Reference in New Issue