import { inject } from 'vue'; import Empty from '../empty'; import { defaultConfigProvider } from '.'; import type { VueNode } from '../_util/type'; export interface RenderEmptyProps { componentName?: string; } const RenderEmpty = (props: RenderEmptyProps) => { const configProvider = inject('configProvider', defaultConfigProvider); const renderHtml = (componentName?: string) => { const { getPrefixCls } = configProvider; const prefix = getPrefixCls('empty'); switch (componentName) { case 'Table': case 'List': return ; case 'Select': case 'TreeSelect': case 'Cascader': case 'Transfer': case 'Mentions': return ; default: return ; } }; return renderHtml(props.componentName); }; function renderEmpty(componentName?: string): VueNode { return ; } export type RenderEmptyHandler = typeof renderEmpty; export default renderEmpty;