1 | import { SaveFileFunction, ReadFileFunction, PrintFunction } from '../module/export'
|
2 | import { SizeType } from '../component'
|
3 | import { VxeTableProps } from '../table'
|
4 | import { VxeGridProps } from '../grid'
|
5 | import { VxeToolbarProps } from '../toolbar'
|
6 | import { VxeTooltipProps } from '../tooltip'
|
7 | import { VxePagerProps } from '../pager'
|
8 | import { VxeModalProps, ModalController } from '../modal'
|
9 | import { VxeDrawerProps, DrawerController } from '../drawer'
|
10 | import { VxeFormProps } from '../form'
|
11 | import { VxeListProps } from '../list'
|
12 | import { VxeSwitchProps } from '../switch'
|
13 | import { VxeSelectProps } from '../select'
|
14 | import { VxeInputProps } from '../input'
|
15 | import { VxeTextareaProps } from '../textarea'
|
16 | import { VxeButtonProps } from '../button'
|
17 | import { VxeButtonGroupProps } from '../button-group'
|
18 | import { VxeCheckboxProps } from '../checkbox'
|
19 | import { VxeCheckboxGroupProps } from '../checkbox-group'
|
20 | import { VxeRadioProps } from '../radio'
|
21 | import { VxeRadioButtonProps } from '../radio-button'
|
22 | import { VxeRadioGroupProps } from '../radio-group'
|
23 |
|
24 | import { VxeGlobalRenderer } from './renderer'
|
25 | import { VxeGlobalInterceptor } from './interceptor'
|
26 | import { VxeGlobalCommands } from './commands'
|
27 | import { VxeGlobalFormats } from './formats'
|
28 | import { VxeGlobalMenus } from './menus'
|
29 | import { VxeGlobalValidators } from './validators'
|
30 | import { VxeGlobalHooks } from './hooks'
|
31 |
|
32 |
|
33 |
|
34 | export interface VXETableConfigOptions {
|
35 | |
36 |
|
37 |
|
38 | authId?: string
|
39 | onAuth?(event: {
|
40 | status: boolean
|
41 | code: number
|
42 | msg: string
|
43 |
|
44 | [key: string]: any
|
45 | }): void
|
46 |
|
47 | theme?: null | '' | 'default' | 'dark'
|
48 |
|
49 | size?: SizeType
|
50 | zIndex?: number
|
51 | version?: number
|
52 | emptyCell?: string
|
53 | icon?: VxeGlobalIcon
|
54 | table?: VxeTableProps
|
55 | grid?: VxeGridProps
|
56 | export?: {
|
57 | types?: {
|
58 | [key: string]: 0 | 1 | 2
|
59 | }
|
60 | [key: string]: any
|
61 | }
|
62 | tooltip?: VxeTooltipProps
|
63 | pager?: VxePagerProps
|
64 | form?: VxeFormProps
|
65 | input?: VxeInputProps
|
66 | textarea?: VxeTextareaProps
|
67 | select?: VxeSelectProps
|
68 | toolbar?: VxeToolbarProps
|
69 | button?: VxeButtonProps
|
70 | buttonGroup?: VxeButtonGroupProps
|
71 | radio?: VxeRadioProps
|
72 | radioButton?: VxeRadioButtonProps
|
73 | radioGroup?: VxeRadioGroupProps
|
74 | checkbox?: VxeCheckboxProps
|
75 | checkboxGroup?: VxeCheckboxGroupProps
|
76 | switch?: VxeSwitchProps
|
77 | modal?: VxeModalProps
|
78 | drawer?: VxeDrawerProps
|
79 | list?: VxeListProps
|
80 | translate?(key: string, args?: any): string
|
81 | i18n?(key: string, args?: any): string
|
82 |
|
83 | |
84 |
|
85 |
|
86 |
|
87 | cellVaildMode?: 'obsolete' | '' | null
|
88 |
|
89 | [key: string]: any
|
90 | }
|
91 |
|
92 | export type VxeGlobalConfig = VXETableConfigOptions
|
93 |
|
94 | export interface VxeGlobalIcon {
|
95 | [ket: string]: string
|
96 | }
|
97 |
|
98 | export type VxeGlobalConfigMethod = (options?: VXETableConfigOptions) => VXETableCore
|
99 | export type VxeGlobalThemeMethod = (name?: '' | 'light' | 'dark') => VXETableCore
|
100 | export type VxeGlobalGetThemeMethod = () => 'light' | 'dark'
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 | export type VxeGlobalSetup = (options?: VXETableConfigOptions) => Required<VXETableConfigOptions>
|
107 |
|
108 |
|
109 |
|
110 | export type VXETableGlobalConfig = (options?: VXETableConfigOptions) => Required<VXETableConfigOptions>
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | export type VXETableSetupOptions = (options?: VXETableConfigOptions) => Required<VXETableConfigOptions>
|
116 |
|
117 | export class VXETableConfig {
|
118 | clipboard: {
|
119 | text: string
|
120 | html: string
|
121 | }
|
122 |
|
123 | get zIndex(): number
|
124 | get nextZIndex(): number
|
125 | |
126 |
|
127 |
|
128 | get exportTypes(): string[]
|
129 | |
130 |
|
131 |
|
132 | get importTypes(): string[]
|
133 | }
|
134 |
|
135 | export type VxeGlobalI18n = (key: string, args?: any) => string
|
136 | export type VxeGlobalTranslate = (key: string, args?: any) => string
|
137 | export type VxeGlobalUse = (plugin: VXETablePluginObject, ...options: any[]) => VXETableCore
|
138 |
|
139 | export const setConfig: VxeGlobalConfigMethod
|
140 | export const setTheme: VxeGlobalThemeMethod
|
141 | export const getTheme: VxeGlobalGetThemeMethod
|
142 |
|
143 | export const interceptor: VxeGlobalInterceptor
|
144 | export const renderer: VxeGlobalRenderer
|
145 | export const commands: VxeGlobalCommands
|
146 | export const formats: VxeGlobalFormats
|
147 | export const menus: VxeGlobalMenus
|
148 | export const validators: VxeGlobalValidators
|
149 | export const hooks: VxeGlobalHooks
|
150 | export const modal: ModalController
|
151 | export const drawer: DrawerController
|
152 | export const saveFile: SaveFileFunction
|
153 | export const readFile: ReadFileFunction
|
154 | export const print: PrintFunction
|
155 | export const t: VxeGlobalI18n
|
156 | export const _t: VxeGlobalTranslate
|
157 | export const use: VxeGlobalUse
|
158 |
|
159 |
|
160 |
|
161 |
|
162 | export const config: VXETableGlobalConfig
|
163 |
|
164 |
|
165 |
|
166 |
|
167 | export const setup: VXETableSetupOptions
|
168 |
|
169 |
|
170 |
|
171 |
|
172 | export const globalConfs: VXETableConfig
|
173 |
|
174 | export function getComponent (name: string): any
|
175 | export function component (comp: any): any
|
176 |
|
177 | export function setIcon(options?: VxeGlobalIcon): VXETableCore
|
178 |
|
179 | export interface VXETablePluginObject {
|
180 | install(vxetable: VXETableCore, ...options: any[]): void
|
181 | [key: string]: any
|
182 | }
|
183 |
|
184 | export interface VxeGlobalStore {
|
185 | [key: string]: any
|
186 | clipboard?: {
|
187 | text: string
|
188 | html: string
|
189 | }
|
190 | }
|
191 | export const globalStore: VxeGlobalStore
|
192 |
|
193 | export type VXETableVersion = 'v1' | 'v2' | 'v3' | 'v4'
|
194 |
|
195 | export const v: VXETableVersion
|
196 |
|
197 | export interface VXETableCore {
|
198 | tooltip?: boolean
|
199 | |
200 |
|
201 |
|
202 | version: string
|
203 | tableVersion?: string;
|
204 | |
205 |
|
206 |
|
207 | setConfig: VxeGlobalConfigMethod
|
208 | setTheme: VxeGlobalThemeMethod
|
209 | getTheme: VxeGlobalGetThemeMethod
|
210 | setIcon: typeof setIcon
|
211 | |
212 |
|
213 |
|
214 | globalStore: VxeGlobalStore
|
215 | |
216 |
|
217 |
|
218 | interceptor: VxeGlobalInterceptor
|
219 | |
220 |
|
221 |
|
222 | renderer: VxeGlobalRenderer
|
223 | |
224 |
|
225 |
|
226 | commands: VxeGlobalCommands
|
227 | |
228 |
|
229 |
|
230 | formats: VxeGlobalFormats
|
231 | |
232 |
|
233 |
|
234 | menus: VxeGlobalMenus
|
235 | |
236 |
|
237 |
|
238 | validators: VxeGlobalValidators
|
239 | |
240 |
|
241 |
|
242 | hooks: VxeGlobalHooks
|
243 | |
244 |
|
245 |
|
246 | modal: ModalController
|
247 | drawer: DrawerController
|
248 | |
249 |
|
250 |
|
251 | saveFile: SaveFileFunction
|
252 | |
253 |
|
254 |
|
255 | readFile: ReadFileFunction
|
256 | |
257 |
|
258 |
|
259 | print: PrintFunction
|
260 | |
261 |
|
262 |
|
263 |
|
264 |
|
265 | use: VxeGlobalUse
|
266 | |
267 |
|
268 |
|
269 | t: VxeGlobalI18n
|
270 | _t: VxeGlobalTranslate
|
271 |
|
272 | getComponent: typeof getComponent,
|
273 | component: typeof component,
|
274 |
|
275 | |
276 |
|
277 |
|
278 |
|
279 | config: VXETableGlobalConfig
|
280 | |
281 |
|
282 |
|
283 | globalConfs: VXETableConfig
|
284 | |
285 |
|
286 |
|
287 |
|
288 | v: VXETableVersion
|
289 | |
290 |
|
291 |
|
292 |
|
293 | setup: VXETableSetupOptions
|
294 | }
|
295 |
|
296 |
|
297 |
|
298 |
|
299 | export const VXETable: VXETableCore
|
300 | export const VxeUI: VXETableCore
|
301 |
|
302 | export * from './renderer'
|
303 | export * from './interceptor'
|
304 | export * from './commands'
|
305 | export * from './formats'
|
306 | export * from './menus'
|
307 | export * from './validators'
|
308 | export * from './hooks'
|
309 |
|
310 | export default VXETable
|