From 047f62e9b4f36b5bed664de5f74b2a3c042d1b98 Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Sun, 17 Sep 2017 02:48:44 -0500 Subject: [PATCH] Mark refs to private (#7600) --- components/affix/index.tsx | 3 ++- components/anchor/Anchor.tsx | 2 +- components/calendar/Header.tsx | 2 +- components/card/index.tsx | 2 +- components/carousel/index.tsx | 4 ++-- components/cascader/index.tsx | 2 +- components/input/Search.tsx | 2 +- components/input/TextArea.tsx | 4 +++- components/list/index.tsx | 3 ++- components/popconfirm/index.tsx | 2 +- components/popover/index.tsx | 2 +- components/time-picker/index.tsx | 2 +- components/tooltip/index.tsx | 2 +- components/upload/Upload.tsx | 2 +- 14 files changed, 19 insertions(+), 15 deletions(-) diff --git a/components/affix/index.tsx b/components/affix/index.tsx index 7c1fa9e1d3..f9291b6c6e 100644 --- a/components/affix/index.tsx +++ b/components/affix/index.tsx @@ -69,7 +69,6 @@ export default class Affix extends React.Component { scrollEvent: any; resizeEvent: any; timeout: any; - fixedNode: HTMLElement; events = [ 'resize', @@ -83,6 +82,8 @@ export default class Affix extends React.Component { eventHandlers = {}; + private fixedNode: HTMLElement; + constructor(props) { super(props); this.state = { diff --git a/components/anchor/Anchor.tsx b/components/anchor/Anchor.tsx index f9e3339e2e..f25bc21474 100644 --- a/components/anchor/Anchor.tsx +++ b/components/anchor/Anchor.tsx @@ -95,7 +95,7 @@ export default class Anchor extends React.Component { antAnchor: PropTypes.object, }; - inkNode: HTMLElement; + private inkNode: HTMLElement; private links: String[]; private scrollEvent: any; diff --git a/components/calendar/Header.tsx b/components/calendar/Header.tsx index ad840b41bf..76aa58e25a 100644 --- a/components/calendar/Header.tsx +++ b/components/calendar/Header.tsx @@ -24,7 +24,7 @@ export default class Header extends React.Component { yearSelectTotal: 20, }; - calenderHeaderNode: any; + private calenderHeaderNode: any; getYearSelectElement(year) { const { yearSelectOffset, yearSelectTotal, locale, prefixCls, fullscreen } = this.props; diff --git a/components/card/index.tsx b/components/card/index.tsx index a87edca71b..425c6b4426 100644 --- a/components/card/index.tsx +++ b/components/card/index.tsx @@ -36,12 +36,12 @@ export interface CardProps { export default class Card extends Component { static Grid: typeof Grid = Grid; static Meta: typeof Meta = Meta; - container: HTMLDivElement; resizeEvent: any; updateWiderPaddingCalled: boolean; state = { widerPadding: false, }; + private container: HTMLDivElement; componentDidMount() { this.updateWiderPadding(); this.resizeEvent = addEventListener(window, 'resize', this.updateWiderPadding); diff --git a/components/carousel/index.tsx b/components/carousel/index.tsx index b12dbc7fe8..93c5208412 100644 --- a/components/carousel/index.tsx +++ b/components/carousel/index.tsx @@ -74,10 +74,10 @@ export default class Carousel extends React.Component { draggable: false, }; - slick: any; - innerSlider: any; + private slick: any; + constructor() { super(); this.onWindowResized = debounce(this.onWindowResized, 500, { diff --git a/components/cascader/index.tsx b/components/cascader/index.tsx index 8baab4fa93..61d599163e 100644 --- a/components/cascader/index.tsx +++ b/components/cascader/index.tsx @@ -108,7 +108,7 @@ export default class Cascader extends React.Component { cachedOptions: CascaderOptionType[]; - input: Input; + private input: Input; constructor(props) { super(props); diff --git a/components/input/Search.tsx b/components/input/Search.tsx index bf9c88787c..a78e26cf31 100644 --- a/components/input/Search.tsx +++ b/components/input/Search.tsx @@ -15,7 +15,7 @@ export default class Search extends React.Component { enterButton: false, }; - input: Input; + private input: Input; onSearch = () => { const { onSearch } = this.props; diff --git a/components/input/TextArea.tsx b/components/input/TextArea.tsx index 3ae09786e6..b6966b627f 100644 --- a/components/input/TextArea.tsx +++ b/components/input/TextArea.tsx @@ -37,11 +37,13 @@ export default class TextArea extends React.Component { scrollEvent: any; resizeEvent: any; timeout: any; - node: any; events = [ 'resize', @@ -102,6 +101,8 @@ export default class List extends Component { infiniteLoaded = false; eventHandlers = {}; + private node: any; + getChildContext() { return { grid: this.props.grid, diff --git a/components/popconfirm/index.tsx b/components/popconfirm/index.tsx index be13faf2e1..0da6cc806d 100644 --- a/components/popconfirm/index.tsx +++ b/components/popconfirm/index.tsx @@ -23,7 +23,7 @@ abstract class Popconfirm extends React.Component { okType: 'primary', }; - tooltip: Tooltip; + private tooltip: Tooltip; constructor(props: PopconfirmProps) { super(props); diff --git a/components/popover/index.tsx b/components/popover/index.tsx index c987c3c530..d9d7fa7cb7 100644 --- a/components/popover/index.tsx +++ b/components/popover/index.tsx @@ -19,7 +19,7 @@ export default class Popover extends React.Component { overlayStyle: {}, }; - tooltip: Tooltip; + private tooltip: Tooltip; getPopupDomNode() { return this.tooltip.getPopupDomNode(); diff --git a/components/time-picker/index.tsx b/components/time-picker/index.tsx index 20180c7e49..3695d2175c 100644 --- a/components/time-picker/index.tsx +++ b/components/time-picker/index.tsx @@ -55,7 +55,7 @@ abstract class TimePicker extends React.Component { transitionName: 'slide-up', }; - timePickerRef: any; + private timePickerRef: any; constructor(props: TimePickerProps) { super(props); diff --git a/components/tooltip/index.tsx b/components/tooltip/index.tsx index 66a843b81f..40d4721cb9 100644 --- a/components/tooltip/index.tsx +++ b/components/tooltip/index.tsx @@ -59,7 +59,7 @@ export default class Tooltip extends React.Component { autoAdjustOverflow: true, }; - tooltip: any; + private tooltip: any; constructor(props: TooltipProps) { super(props); diff --git a/components/upload/Upload.tsx b/components/upload/Upload.tsx index d888578a11..a3f3bcdfdd 100644 --- a/components/upload/Upload.tsx +++ b/components/upload/Upload.tsx @@ -49,7 +49,7 @@ export default class Upload extends React.Component { recentUploadStatus: boolean | PromiseLike; progressTimer: any; - upload: any; + private upload: any; constructor(props) { super(props);