import React from 'react'; import Portal from '../portal'; import AlertContainer from './AlertContainer'; import {Action, CallbackOnBackHandler} from './PropsType'; export default function a( title: React.ReactNode, content: React.ReactNode, actions: Action[] = [{text: '确定'}], onBackHandler?: CallbackOnBackHandler, ) { const key = Portal.add( { if (!visible) { Portal.remove(key); } }} onBackHandler={onBackHandler} />, ); return key; }