maishu-dilu-react
Advanced tools
Comparing version 1.3.0 to 1.4.0
/*! | ||
* | ||
* maishu-dilu-react v1.2.0 | ||
* maishu-dilu-react v1.3.0 | ||
* Copyright (c) 2016-2018, shu mai <ansiboy@163.com> | ||
@@ -854,3 +854,3 @@ * Licensed under the MIT License. | ||
} | ||
else { | ||
else if (typeof conditionOrName == "string") { | ||
name = conditionOrName; | ||
@@ -868,4 +868,6 @@ } | ||
c.validateUndefineValue = true; | ||
if (c.check() == false) | ||
if (c.check() == false) { | ||
console.error(c.state.errorMessage); | ||
r = false; | ||
} | ||
}); | ||
@@ -872,0 +874,0 @@ return r; |
@@ -0,1 +1,2 @@ | ||
/// <reference types="react" /> | ||
import { Rule } from "maishu-dilu"; | ||
@@ -6,7 +7,7 @@ import { FieldValidator, ValidityCondition } from "./value-validator"; | ||
get fieldValidators(): FieldValidator[]; | ||
field(value: any, rules: Rule[], condition?: ValidityCondition): any; | ||
field(value: any, rules: Rule[], name?: string): any; | ||
field(value: any, rules: Rule[], condition: ValidityCondition, name: string): any; | ||
field(value: any, rules: Rule[], condition?: ValidityCondition): JSX.Element; | ||
field(value: any, rules: Rule[], name?: string): JSX.Element; | ||
field(value: any, rules: Rule[], condition: ValidityCondition, name: string): JSX.Element; | ||
check(): boolean; | ||
clearErrors(): void; | ||
} |
@@ -18,3 +18,3 @@ "use strict"; | ||
} | ||
else { | ||
else if (typeof conditionOrName == "string") { | ||
name = conditionOrName; | ||
@@ -32,4 +32,6 @@ } | ||
c.validateUndefineValue = true; | ||
if (c.check() == false) | ||
if (c.check() == false) { | ||
console.error(c.state.errorMessage); | ||
r = false; | ||
} | ||
}); | ||
@@ -36,0 +38,0 @@ return r; |
{ | ||
"name": "maishu-dilu-react", | ||
"version": "1.3.0", | ||
"main": "./dist/idnex", | ||
"version": "1.4.0", | ||
"main": "./dist/index", | ||
"types": "./out/index.d.ts", | ||
@@ -6,0 +6,0 @@ "dependencies": {}, |
@@ -7,4 +7,5 @@ { | ||
"outDir": "../out", | ||
"declaration": true | ||
"declaration": true, | ||
"strict": true | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
394385
7831