Skip to content

Commit

Permalink
chore(*): container should be any
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed Jan 13, 2020
1 parent 822c84b commit 58c5f40
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 28 deletions.
4 changes: 2 additions & 2 deletions src/balloon/balloon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ class Balloon extends React.Component {
/**
* 指定浮层渲染的父节点, 可以为节点id的字符串,也可以返回节点的函数。
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
container: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
container: PropTypes.any,
/**
* 弹层组件style,透传给Popup
*/
Expand Down
2 changes: 1 addition & 1 deletion src/balloon/tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class Tooltip extends React.Component {
/**
* 指定浮层渲染的父节点, 可以为节点id的字符串,也可以返回节点的函数。
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 是否跟随滚动
*/
Expand Down
2 changes: 1 addition & 1 deletion src/cascader-select/cascader-select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default class CascaderSelect extends Component {
/**
* 下拉框挂载的容器节点
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 透传到 Popup 的属性对象
*/
Expand Down
10 changes: 2 additions & 8 deletions src/config-provider/config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ export function config(Component, options = {}) {
pure: PropTypes.bool,
rtl: PropTypes.bool,
device: PropTypes.oneOf(['tablet', 'desktop', 'phone']),
popupContainer: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
]),
popupContainer: PropTypes.any,
errorBoundary: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.object,
Expand All @@ -113,10 +110,7 @@ export function config(Component, options = {}) {
nextRtl: PropTypes.bool,
nextWarning: PropTypes.bool,
nextDevice: PropTypes.oneOf(['tablet', 'desktop', 'phone']),
nextPopupContainer: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
]),
nextPopupContainer: PropTypes.any,
nextErrorBoundary: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.object,
Expand Down
2 changes: 1 addition & 1 deletion src/config-provider/consumer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Consumer.contextTypes = {
newRtl: PropTypes.bool,
nextWarning: PropTypes.bool,
nextDevice: PropTypes.oneOf(['tablet', 'desktop', 'phone']),
nextPopupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
nextPopupContainer: PropTypes.any,
};

export default Consumer;
7 changes: 2 additions & 5 deletions src/config-provider/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ConfigProvider extends Component {
/**
* 指定浮层渲染的父节点, 可以为节点id的字符串,也可以返回节点的函数
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
};

static defaultProps = {
Expand All @@ -90,10 +90,7 @@ class ConfigProvider extends Component {
nextRtl: PropTypes.bool,
nextWarning: PropTypes.bool,
nextDevice: PropTypes.oneOf(['tablet', 'desktop', 'phone']),
nextPopupContainer: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
]),
nextPopupContainer: PropTypes.any,
nextErrorBoundary: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.object,
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/date-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default class DatePicker extends Component {
* @param {Element} target 目标元素
* @return {Element} 弹层的容器元素
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 弹层自定义样式
*/
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/month-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MonthPicker extends Component {
* @param {Element} target 目标元素
* @return {Element} 弹层的容器元素
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 弹层自定义样式
*/
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/range-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class RangePicker extends Component {
* @param {Element} target 目标元素
* @return {Element} 弹层的容器元素
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 弹层自定义样式
*/
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/week-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class WeekPicker extends Component {
* @param {Element} target 目标元素
* @return {Element} 弹层的容器元素
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 弹层自定义样式
*/
Expand Down
2 changes: 1 addition & 1 deletion src/date-picker/year-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class YearPicker extends Component {
* @param {Element} target 目标元素
* @return {Element} 弹层的容器元素
*/
popupContainer: PropTypes.func,
popupContainer: PropTypes.any,
/**
* 弹层自定义样式
*/
Expand Down
2 changes: 1 addition & 1 deletion src/menu-button/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MenuButton extends React.Component {
/**
* 弹层容器
*/
popupContainer: PropTypes.func,
popupContainer: PropTypes.any,
/**
* 弹层展开状态
*/
Expand Down
2 changes: 1 addition & 1 deletion src/overlay/position.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class Position extends Component {
static propTypes = {
children: PropTypes.node,
target: PropTypes.any,
container: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
container: PropTypes.any,
align: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
offset: PropTypes.array,
beforePosition: PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion src/select/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default class Base extends React.Component {
/**
* 弹层挂载的容器节点
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 弹层的 className
*/
Expand Down
2 changes: 1 addition & 1 deletion src/time-picker/time-picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class TimePicker extends Component {
* @param {Object} target 目标节点
* @return {ReactNode} 容器节点
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 弹层对齐方式, 详情见Overlay 文档
*/
Expand Down
2 changes: 1 addition & 1 deletion src/tree-select/tree-select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default class TreeSelect extends Component {
/**
* 下拉框挂载的容器节点
*/
popupContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
popupContainer: PropTypes.any,
/**
* 透传到 Popup 的属性对象
*/
Expand Down

0 comments on commit 58c5f40

Please sign in to comment.