cjd-parkball
Version:
> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用
14 lines (12 loc) • 389 B
JavaScript
import React from 'react'
// import PropTypes from 'prop-types'
export default class BaseComponent extends React.PureComponent {
static propTypes = {
authKey (props, propName, componentName) {
if (!/(.*\.){3}.*/.test(props[propName])) {
new Error(`Invalid prop \`${propName}\` supplied to` +
` \`${componentName}\`. Validation failed.`)
}
},
}
}