Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
324 views
in Technique[技术] by (71.8m points)

ant design pro中使用protable改变默认组件

在antdesignpro中protable通过设置options属性可出现如下默认配置项
image.png

image.png

但是点击出来的弹出框找不到可修改的代码(如下图)
image.png
需求是想在弹出框加一个按钮,请问如何加上?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

我看了组件的实现方式,没有提供 children 的功能,只能手动插入dom,给该 dom 插入一个按钮或者组件

function showDialog() {
  var div = document.createElement('div');
  ReactDOM.render(
     <Component />,
     document.body.appendChild(div) //这里换成想要承载的dom
  );
} 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...