Skip to content

Commit

Permalink
fix(ui/types): add list.d.ts
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed Nov 21, 2021
1 parent 9c3f547 commit ab06a8f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/varlet-ui/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ declare module 'vue' {
VarIndexBar: typeof import('@varlet/ui')['_IndexBarComponent']
VarInput: typeof import('@varlet/ui')['_InputComponent']
VarLazy: typeof import('@varlet/ui')['_LazyComponent']
VarList: typeof import('@varlet/ui')['_ListComponent']
VarLoading: typeof import('@varlet/ui')['_LoadingComponent']
VarLocale: typeof import('@varlet/ui')['_LocaleComponent']
VarMenu: typeof import('@varlet/ui')['_MenuComponent']
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export * from './indexAnchor'
export * from './indexBar'
export * from './input'
export * from './lazy'
export * from './list'
export * from './loading'
export * from './locale'
export * from './menu'
Expand Down
21 changes: 21 additions & 0 deletions packages/varlet-ui/types/list.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { VarComponent } from './varComponent'

export interface ListProps {
loading?: boolean
immediateCheck?: boolean
finished?: boolean
error?: boolean
offset?: string | number
loadingText?: string
finishedText?: string
errorText?: string
onLoad?: () => void
'onUpdate:loading'?: (loading: boolean) => void
'onUpdate:error'?: (error: boolean) => void
}

export class List extends VarComponent {
$props: ListProps
}

export class _ListComponent extends List {}

0 comments on commit ab06a8f

Please sign in to comment.