我创建了一个简单的 Dialog 组件,它是可拖动的,可以根据此处的示例代码进出(使用 Grow)过渡:https : //material-ui.com/components/dialogs/#transitions(向下滚动可拖动例子)
当我尝试使用此对话框时,它运行良好。但是,控制台每次都会收到几个警告:

这是我的代码:
const Transition = React.forwardRef(function Transition(props, ref) {
return <Grow ref={ref} {...props} />;
});
export class PaperComponent extends React.Component {
render() {
return (
<Draggable handle="#draggable-dialog-title" cancel={'[class*="MuiDialogContent-root"]'}>
<Paper {...this.props} />
</Draggable>
);
}
}
export class BasicDialog extends React.Component {
render() {
return (
<Dialog
open={this.props.dialogData.title ?? false}
PaperComponent={PaperComponent}
TransitionComponent={Transition}>
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
{this.props.dialogData.title}
</DialogTitle>
<DialogContent style={{ textAlign: 'center' }}>
<DialogContentText>
{this.props.dialogData.text}
</DialogContentText>
{this.props.dialogData.content}
</DialogContent>
<DialogActions style={{ justifyContent: …Run Code Online (Sandbox Code Playgroud)