import React from 'react'; import Loading from '@beisen-phoenix/icon/lib/loading'; import NoData from '@beisen-phoenix/icon/lib/no-data'; import './style/Placeholder.scss'; import utils from '@beisen-phoenix/common-utils'; const classes = utils.BEMClass('groupSingleSelect'); export interface PlaceHolderProps { loading?: Boolean translation?: any } export default class PlaceHolder extends React.PureComponent { constructor(props: PlaceHolderProps) { super(props); this.state = {}; } renderContent = () => { const { loading,translation } = this.props; const content = loading ? : (
{translation.noData}
); return
{content}
; } render() { const { loading = false } = this.props; return (
{ this.renderContent() }
) } }