-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathenv.d.ts
144 lines (127 loc) · 3.34 KB
/
env.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/// <reference types="vite/client" />
interface Package {
name: string
version: string
description: string
author: string
license: string
repository: string
bugs: string
homepage: string
devDependencies: {
[key: string]: string
}
dependencies: {
[key: string]: string
}
}
interface BackendResponse<T> {
code: number
data: T
msg: string
}
interface Tab {
id: string
name?: string
}
declare const __APP_PKG: Package
declare module 'vue-virtual-scroller' {
import {
type ObjectEmitsOptions,
type PublicProps,
type SetupContext,
type SlotsType,
type VNode,
} from 'vue'
interface RecycleScrollerProps<T> {
items: readonly T[]
direction?: 'vertical' | 'horizontal'
itemSize?: number | null
gridItems?: number
itemSecondarySize?: number
minItemSize?: number
sizeField?: string
typeField?: string
keyField?: keyof T
pageMode?: boolean
prerender?: number
buffer?: number
emitUpdate?: boolean
updateInterval?: number
listClass?: string
itemClass?: string
listTag?: string
itemTag?: string
}
interface DynamicScrollerProps<T> extends RecycleScrollerProps<T> {
minItemSize: number
}
interface RecycleScrollerEmitOptions extends ObjectEmitsOptions {
resize: () => void
visible: () => void
hidden: () => void
update: (
startIndex: number,
endIndex: number,
visibleStartIndex: number,
visibleEndIndex: number,
) => void
'scroll-start': () => void
'scroll-end': () => void
}
interface RecycleScrollerSlotProps<T> {
item: T
index: number
active: boolean
}
interface RecycleScrollerSlots<T> {
default(slotProps: RecycleScrollerSlotProps<T>): unknown
before(): unknown
empty(): unknown
after(): unknown
}
export interface RecycleScrollerInstance {
getScroll(): { start: number; end: number }
scrollToItem(index: number): void
scrollToPosition(position: number): void
}
export const RecycleScroller: <T>(
props: RecycleScrollerProps<T> & PublicProps,
ctx?: SetupContext<RecycleScrollerEmitOptions, SlotsType<RecycleScrollerSlots<T>>>,
expose?: (exposed: RecycleScrollerInstance) => void,
) => VNode & {
__ctx?: {
props: RecycleScrollerProps<T> & PublicProps
expose(exposed: RecycleScrollerInstance): void
slots: RecycleScrollerSlots<T>
}
}
export const DynamicScroller: <T>(
props: DynamicScrollerProps<T> & PublicProps,
ctx?: SetupContext<RecycleScrollerEmitOptions, SlotsType<RecycleScrollerSlots<T>>>,
expose?: (exposed: RecycleScrollerInstance) => void,
) => VNode & {
__ctx?: {
props: DynamicScrollerProps<T> & PublicProps
expose(exposed: RecycleScrollerInstance): void
slots: RecycleScrollerSlots<T>
}
}
interface DynamicScrollerItemProps<T> {
item: T
active: boolean
sizeDependencies?: unknown[]
watchData?: boolean
tag?: string
emitResize?: boolean
onResize?: () => void
}
interface DynamicScrollerItemEmitOptions extends ObjectEmitsOptions {
resize: () => void
}
export const DynamicScrollerItem: <T>(
props: DynamicScrollerItemProps<T> & PublicProps,
ctx?: SetupContext<DynamicScrollerItemEmitOptions>,
) => VNode
export function IdState(options?: { idProp?: (value: any) => unknown }): ComponentOptionsMixin
}