pull/2992/head
tanjinzhou 4 years ago
commit 642ed2fcce

@ -40,10 +40,6 @@ const parseStyleText = (cssText = '', camel) => {
return res;
};
const getComponentFromSetup = (props, slots, name, options) => {
return props[name] ? props[name] : slots[name]?.(options);
};
const hasProp = (instance, prop) => {
return prop in getOptionProps(instance);
};
@ -394,7 +390,6 @@ function isValidElement(element) {
}
export {
getComponentFromSetup,
splitAttrs,
hasProp,
getOptionProps,

@ -1,6 +1,5 @@
import { reactive, provide, VNodeTypes, PropType, defineComponent, App } from 'vue';
import PropTypes from '../_util/vue-types';
import { getComponentFromSetup } from '../_util/props-util';
import defaultRenderEmpty, { RenderEmptyHandler } from './renderEmpty';
import LocaleProvider, { Locale, ANT_MARK } from '../locale-provider';
@ -117,7 +116,8 @@ const ConfigProvider = defineComponent({
};
const renderEmptyComponent = (name?: string) => {
const renderEmpty = (getComponentFromSetup(props, slots, 'renderEmpty') ||
const renderEmpty = (props.renderEmpty ||
slots.renderEmpty ||
defaultRenderEmpty) as RenderEmptyHandler;
return renderEmpty(name);
};

Loading…
Cancel
Save