fourteendp
2024-07-04 64a4992a84dadb33614e937f5d7464dcd312a1bd
提交 | 用户 | age
6753e2 1 import { h } from 'vue';
64a499 2 import { VxeGlobalRendererHandles, VxeGlobalRendererOptions } from 'vxe-table';
6753e2 3 import { getComponent } from './common';
L 4
5 function createEmptyRender() {
64a499 6   return function (renderOpts: VxeGlobalRendererHandles.RenderTableEmptyOptions) {
6753e2 7     const { name, attrs, props } = renderOpts;
L 8
9     const Component = getComponent(name);
10     return [
11       h(
12         'div',
13         {
14           class: 'flex items-center justify-center',
15         },
16         h(Component, {
17           ...attrs,
18           ...props,
19         }),
20       ),
21     ];
22   };
23 }
24
25 export default {
64a499 26   renderTableEmptyView: createEmptyRender(),
F 27 } as VxeGlobalRendererOptions;