Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return Children.map(this.props.children, (child) => {
if (child) {
const cType = child.type;
/* 针对下面两种组件不注入地图相关属性
* 1. 明确声明不需要注入的
* 2. DOM 元素
*/
if (cType.preventAmap || (typeof cType === 'string')) {
return child;
}
return cloneElement(child, {
__map__: this.map,
__raxMap__: this
});
}
return child;
});
}
styles.normalDot,
{
backgroundColor: itemColor,
width: itemSize,
height: itemSize
}
];
let dots = [];
const ActiveDot = this.props.activeDot ||
{
backgroundColor: itemColor,
width: itemSize,
height: itemSize
}
];
let dots = [];
const ActiveDot = this.props.activeDot ||
let tabs = this.getTabs().map((tab, index) => {
if (tab.props.children) {
tabContents.push(createElement(TabBarContents, {
key: index,
index: index,
selected: this.state.selectedIndex === index,
}, tab.props.children));
++ tabContentsCount;
} else {
tabContents.push(undefined);
}
return cloneElement(tab, {
index: index,
ref: `tab_${index}`,
selected: this.state.selectedIndex === index,
selectedIcon: tab.props.selectedIcon,
handleTouchTap: this.handleTouchTap,
inHorizontal: this.props.horizontal || false
});
});
{
backgroundColor: itemColor,
width: itemSize,
height: itemSize
}
];
let dots = [];
const ActiveDot = this.props.activeDot ||
styles.normalDot,
{
backgroundColor: itemColor,
width: itemSize,
height: itemSize
}
];
let dots = [];
const ActiveDot = this.props.activeDot ||
renderEditor(children) {
if (!children) {
return null;
}
if (Children.count(children) !== 1) {
return null;
}
return cloneElement(Children.only(children), {
__circle__: this.mapCircle,
__map__: this.map,
__ele__: this.element
});
}
cells = cells.concat(footer.map((child, index) => {
if (child) {
if (child.type != Header) {
return <header>{child}</header>;
} else {
return cloneElement(child, {});
}
}
}));