diff --git a/components/carousel/index.jsx b/components/carousel/index.jsx index 2adbc46a2..a00d55886 100644 --- a/components/carousel/index.jsx +++ b/components/carousel/index.jsx @@ -2,7 +2,7 @@ import PropTypes from '../_util/vue-types'; import debounce from 'lodash/debounce'; import hasProp, { initDefaultProps, - getComponentFromProp, + getComponent, filterEmpty, getListeners, } from '../_util/props-util'; @@ -174,8 +174,8 @@ const Carousel = { const SlickCarouselProps = { props: { ...props, - nextArrow: getComponentFromProp(this, 'nextArrow'), - prevArrow: getComponentFromProp(this, 'prevArrow'), + nextArrow: getComponent(this, 'nextArrow'), + prevArrow: getComponent(this, 'prevArrow'), }, on: getListeners(this), scopedSlots: this.$scopedSlots, diff --git a/components/date-picker/RangePicker.jsx b/components/date-picker/RangePicker.jsx index 193f9fdc5..2bd257f12 100644 --- a/components/date-picker/RangePicker.jsx +++ b/components/date-picker/RangePicker.jsx @@ -13,7 +13,7 @@ import { getOptionProps, initDefaultProps, mergeProps, - getComponentFromProp, + getComponent, getListeners, } from '../_util/props-util'; import BaseMixin from '../_util/BaseMixin'; @@ -262,7 +262,7 @@ export default { render() { const props = getOptionProps(this); - let suffixIcon = getComponentFromProp(this, 'suffixIcon'); + let suffixIcon = getComponent(this, 'suffixIcon'); suffixIcon = Array.isArray(suffixIcon) ? suffixIcon[0] : suffixIcon; const { sValue: value, diff --git a/components/date-picker/WeekPicker.jsx b/components/date-picker/WeekPicker.jsx index 402fa46c3..ed3f76ceb 100644 --- a/components/date-picker/WeekPicker.jsx +++ b/components/date-picker/WeekPicker.jsx @@ -7,7 +7,7 @@ import { hasProp, getOptionProps, initDefaultProps, - getComponentFromProp, + getComponent, getListeners, } from '../_util/props-util'; import BaseMixin from '../_util/BaseMixin'; @@ -135,7 +135,7 @@ export default { render() { const props = getOptionProps(this); - let suffixIcon = getComponentFromProp(this, 'suffixIcon'); + let suffixIcon = getComponent(this, 'suffixIcon'); suffixIcon = Array.isArray(suffixIcon) ? suffixIcon[0] : suffixIcon; const { prefixCls: customizePrefixCls, diff --git a/components/date-picker/createPicker.js b/components/date-picker/createPicker.js index 889a79252..c7a7bf37e 100644 --- a/components/date-picker/createPicker.js +++ b/components/date-picker/createPicker.js @@ -13,7 +13,7 @@ import { getOptionProps, initDefaultProps, mergeProps, - getComponentFromProp, + getComponent, isValidElement, getListeners, } from '../_util/props-util'; @@ -135,7 +135,7 @@ export default function createPicker(TheCalendar, props) { render() { const { $scopedSlots } = this; const { sValue: value, showDate, _open: open } = this.$data; - let suffixIcon = getComponentFromProp(this, 'suffixIcon'); + let suffixIcon = getComponent(this, 'suffixIcon'); suffixIcon = Array.isArray(suffixIcon) ? suffixIcon[0] : suffixIcon; const listeners = getListeners(this); const { panelChange = noop, focus = noop, blur = noop, ok = noop } = listeners; diff --git a/components/time-picker/index.jsx b/components/time-picker/index.jsx index 2248cd344..b5b091175 100644 --- a/components/time-picker/index.jsx +++ b/components/time-picker/index.jsx @@ -11,7 +11,7 @@ import { initDefaultProps, hasProp, getOptionProps, - getComponentFromProp, + getComponent, isValidElement, getListeners, } from '../_util/props-util'; @@ -174,7 +174,7 @@ const TimePicker = { }, renderInputIcon(prefixCls) { - let suffixIcon = getComponentFromProp(this, 'suffixIcon'); + let suffixIcon = getComponent(this, 'suffixIcon'); suffixIcon = Array.isArray(suffixIcon) ? suffixIcon[0] : suffixIcon; const clockIcon = (suffixIcon && isValidElement(suffixIcon) && @@ -186,7 +186,7 @@ const TimePicker = { }, renderClearIcon(prefixCls) { - const clearIcon = getComponentFromProp(this, 'clearIcon'); + const clearIcon = getComponent(this, 'clearIcon'); const clearIconPrefixCls = `${prefixCls}-clear`; if (clearIcon && isValidElement(clearIcon)) { @@ -210,7 +210,7 @@ const TimePicker = { const pickerClassName = { [`${prefixCls}-${size}`]: !!size, }; - const tempAddon = getComponentFromProp(this, 'addon', {}, false); + const tempAddon = getComponent(this, 'addon', {}, false); const pickerAddon = panel => { return tempAddon ? (