Empty: add empty component (#21080)

This commit is contained in:
好多大米
2021-06-17 15:18:15 +08:00
committed by GitHub
parent 75290629ae
commit d0b3454032
68 changed files with 787 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ import { ElDrawer } from './drawer'
import { ElPopconfirm } from './popconfirm'
import { ElSkeleton } from './skeleton'
import { ElSkeletonItem } from './skeleton-item'
import { ElEmpty } from './empty'
export interface InstallationOptions {
locale: any,
@@ -352,3 +353,6 @@ export class Skeleton extends ElSkeleton {}
/** Skeleton Item Component */
export class SkeletonItem extends ElSkeletonItem {}
/** Empty Component */
export class Empty extends ElEmpty {}

31
types/empty.d.ts vendored Normal file
View File

@@ -0,0 +1,31 @@
import { ElementUIComponent } from './component'
import { VNode } from 'vue'
interface ELEmptySlots {
/* default slot: Custom bottom content */
default: VNode[]
/* image slot: Custom image */
image: VNode[]
/* description slot: Custom description */
description: VNode[]
[key: string]: VNode[]
}
/** Placeholder hints for empty states. */
export declare class ElEmpty extends ElementUIComponent {
/* image URL */
image: string
/* image size (width) */
imageSize: number
/* description */
description: string
$slots: ELEmptySlots
}