commit Table component
commit Table component
This commit is contained in:
parent
d2e82cd7f6
commit
2cb8a6d93e
12 changed files with 334 additions and 0 deletions
|
@ -75,4 +75,16 @@ export function getStyle (element, styleName) {
|
|||
} catch(e) {
|
||||
return element.style[styleName];
|
||||
}
|
||||
}
|
||||
|
||||
// firstUpperCase
|
||||
function firstUpperCase(str) {
|
||||
return str.toString()[0].toUpperCase() + str.toString().slice(1);
|
||||
}
|
||||
|
||||
// Warn
|
||||
export function warnProp(component, prop, correctType, wrongType) {
|
||||
correctType = firstUpperCase(correctType);
|
||||
wrongType = firstUpperCase(wrongType);
|
||||
console.error(`[iView warn]: Invalid prop: type check failed for prop ${prop}. Expected ${correctType}, got ${wrongType}. (found in component: ${component})`);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue