breaking change: rename get-container to teleport

This commit is contained in:
chenjiahan
2020-08-21 10:58:02 +08:00
parent 07d1a2590f
commit 52b187692b
39 changed files with 154 additions and 127 deletions
+4 -4
View File
@@ -33,7 +33,7 @@ export const popupSharedProps = {
// overlay custom class name
overlayClass: String,
// teleport
getContainer: [String, Function],
teleport: [String, Object],
// whether to close popup when click overlay
closeOnClickOverlay: Boolean,
// z-index
@@ -319,9 +319,9 @@ export default createComponent({
},
render() {
const { getContainer } = this;
if (getContainer) {
const to = isFunction(getContainer) ? getContainer() : getContainer;
const { teleport } = this;
if (teleport) {
const to = isFunction(teleport) ? teleport() : teleport;
return (
<Teleport to={to}>
{this.genOverlay()}