import React from 'react'; import { Tooltip } from 'antd'; import './index.less'; import Assets from '@src/components/Assets'; import Module from '../Module'; import ProgressButton from '../ProgressButton'; import Button from '../Button'; export default function Panel(props) { const { style, message, data = {}, col = 3, title, onClick } = props; return ( {title} {message && ( )} {(data.info || []).map(row => { return ( {row.title} {row.number} {row.unit} ); })} {(data.desc || []).length > 0 && ( {(data.desc || []).map(row => { return {row}; })} )} {(data.children || []).map(item => { return ( { if (onClick) onClick(item); }} > {item.title} ); })} ); } export function WaitPanel(props) { const { style, message, data = {}, col = 3, title, onClick } = props; return ( {title} {message && ( )} 您还未开通本月机经 {(data.desc || []).length > 0 && ( {(data.desc || []).map(row => { return {row}; })} )} {(data.info || []).map(row => { return ( {row.title} {row.number} {row.unit} ); })} {(data.children || []).map(item => { return ( { if (onClick) onClick(item); }} > {item.title} ); })} 立即开通 ); } export function BuyPanel(props) { const { style, message, title } = props; return ( {title} {message && ( )} 您还未购买本月机经 立即购买 ); } export function SmallPanel(props) { const { style, title, lock, data = {} } = props; return ( {title} {lock && } {(data.info || []).map(row => { return ( {row.title} {row.number} {row.unit} ); })} 有效期至:2019-11-13 ); } export function SmallWaitPanel(props) { const { style, title } = props; return ( {title} 请于20190-07-05前开通 立即开通 ); } export function SmallBuyPanel(props) { const { style, title } = props; return ( {title} 立即购买 ); }