@vxe-ui/core 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE +21 -21
  2. package/README.en.md +31 -31
  3. package/README.md +31 -31
  4. package/README.zh-TW.md +31 -31
  5. package/es/src/core.js +3 -2
  6. package/es/src/i18n.js +4 -0
  7. package/es/src/log.js +1 -1
  8. package/lib/index.umd.js +27 -22
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/src/clipboard.min.js +1 -1
  11. package/lib/src/commands.min.js +1 -1
  12. package/lib/src/core.js +2 -1
  13. package/lib/src/core.min.js +1 -1
  14. package/lib/src/event.min.js +1 -1
  15. package/lib/src/formats.min.js +1 -1
  16. package/lib/src/globalStore.min.js +1 -1
  17. package/lib/src/hooks.min.js +1 -1
  18. package/lib/src/i18n.js +7 -0
  19. package/lib/src/i18n.min.js +1 -1
  20. package/lib/src/i18nStore.min.js +1 -1
  21. package/lib/src/iconStore.min.js +1 -1
  22. package/lib/src/interceptor.min.js +1 -1
  23. package/lib/src/log.js +1 -1
  24. package/lib/src/log.min.js +1 -1
  25. package/lib/src/menus.min.js +1 -1
  26. package/lib/src/renderer.min.js +1 -1
  27. package/lib/src/resize.min.js +1 -1
  28. package/lib/src/store.min.js +1 -1
  29. package/lib/src/themeStore.min.js +1 -1
  30. package/lib/src/useFns.min.js +1 -1
  31. package/lib/src/validators.min.js +1 -1
  32. package/package.json +78 -78
  33. package/packages/index.ts +4 -4
  34. package/packages/src/clipboard.ts +53 -53
  35. package/packages/src/commands.ts +62 -62
  36. package/packages/src/core.ts +164 -163
  37. package/packages/src/event.ts +113 -113
  38. package/packages/src/formats.ts +62 -62
  39. package/packages/src/globalStore.ts +8 -8
  40. package/packages/src/hooks.ts +5 -5
  41. package/packages/src/i18n.ts +19 -14
  42. package/packages/src/i18nStore.ts +11 -11
  43. package/packages/src/iconStore.ts +3 -3
  44. package/packages/src/interceptor.ts +65 -65
  45. package/packages/src/log.ts +19 -19
  46. package/packages/src/menus.ts +62 -62
  47. package/packages/src/renderer.ts +50 -50
  48. package/packages/src/resize.ts +89 -89
  49. package/packages/src/store.ts +49 -49
  50. package/packages/src/themeStore.ts +7 -7
  51. package/packages/src/useFns.ts +18 -18
  52. package/packages/src/validators.ts +9 -9
  53. package/types/core/clipboard.d.ts +13 -13
  54. package/types/core/commands.d.ts +19 -19
  55. package/types/core/components.d.ts +4 -4
  56. package/types/core/formats.d.ts +19 -19
  57. package/types/core/global-config.d.ts +49 -49
  58. package/types/core/global-event.d.ts +39 -39
  59. package/types/core/global-icon.d.ts +6 -6
  60. package/types/core/global-lang.d.ts +1 -1
  61. package/types/core/global-resize.d.ts +3 -3
  62. package/types/core/global-theme.d.ts +1 -1
  63. package/types/core/hooks.d.ts +14 -14
  64. package/types/core/index.d.ts +216 -211
  65. package/types/core/interceptor.d.ts +22 -22
  66. package/types/core/log.d.ts +8 -8
  67. package/types/core/menus.d.ts +19 -19
  68. package/types/core/renderer.d.ts +14 -14
  69. package/types/core/useFn.d.ts +17 -17
  70. package/types/core/validators.d.ts +19 -19
  71. package/types/index.d.ts +10 -10
  72. package/types/tool/common.d.ts +70 -70
  73. package/types/tool/index.d.ts +2 -2
  74. package/types/tool/util.d.ts +4 -4
@@ -1,211 +1,216 @@
1
- import { VxeGlobalConfig } from './global-config'
2
- import { VxeGlobalIcon } from './global-icon'
3
- import { VxeGlobalThemeName } from './global-theme'
4
- import { VxeGlobalI18nLocale } from './global-lang'
5
- import { VxeGlobalEvents, VxeGlobalEventKey, VxeGlobalCreateEventMethod } from './global-event'
6
- import { VxeGlobalResize } from './global-resize'
7
- import { VxeGlobalRenderer } from './renderer'
8
- import { VxeGlobalValidators } from './validators'
9
- import { VxeGlobalMenus } from './menus'
10
- import { VxeGlobalFormats } from './formats'
11
- import { VxeGlobalCommands } from './commands'
12
- import { VxeGlobalInterceptor } from './interceptor'
13
- import { VxeGlobalClipboard } from './clipboard'
14
- import { VxeGlobalComponentMethod, VxeGlobalGetComponentMethod } from './components'
15
- import { VxeGlobalUseFns } from './useFn'
16
- import { VxeGlobalHooks } from './hooks'
17
- import { VxeGlobalLog } from './log'
18
-
19
- /* eslint-disable no-use-before-define */
20
-
21
- export function setTheme(name: VxeGlobalThemeName): VxeUIExport
22
-
23
- export function getTheme(): VxeGlobalThemeName
24
-
25
- export function setConfig(options?: VxeGlobalConfig): VxeUIExport
26
- export function getConfig(): Required<VxeGlobalConfig>
27
- export function getConfig(key: keyof VxeGlobalConfig, defaultValue?: any): any
28
-
29
- export function setIcon(options?: VxeGlobalIcon): VxeUIExport
30
- export function getIcon(): Required<VxeGlobalIcon>
31
- export function getIcon(key: keyof VxeGlobalIcon): any
32
-
33
- export function hasLanguage(locale: VxeGlobalI18nLocale): boolean
34
- export function setLanguage(locale: VxeGlobalI18nLocale): VxeUIExport
35
- export function setI18n(locale: VxeGlobalI18nLocale, data: Record<string, any>): VxeUIExport
36
- export function getI18n(key: string, args?: any): string
37
-
38
- export const component: VxeGlobalComponentMethod
39
- export const getComponent: VxeGlobalGetComponentMethod
40
-
41
- export const coreVersion: string
42
-
43
- export const renderer: VxeGlobalRenderer
44
-
45
- export const validators: VxeGlobalValidators
46
-
47
- export const menus: VxeGlobalMenus
48
-
49
- export const formats: VxeGlobalFormats
50
-
51
- export const commands: VxeGlobalCommands
52
-
53
- export const interceptor: VxeGlobalInterceptor
54
-
55
- export const clipboard: VxeGlobalClipboard
56
-
57
- export const globalEvents: VxeGlobalEvents
58
-
59
- export const globalResize: VxeGlobalResize
60
-
61
- export const log: VxeGlobalLog
62
-
63
- export const useFns: VxeGlobalUseFns
64
-
65
- export const hooks: VxeGlobalHooks
66
-
67
- export interface VxeUIPluginObject {
68
- install(vxeui: VxeUIExport, ...options: any[]): void
69
- [key: string]: any
70
- }
71
-
72
- export function use (plugin: VxeUIPluginObject, ...options: any[]): VxeUIExport
73
-
74
- export interface VxeUIExport {
75
- /**
76
- * 版本号
77
- */
78
- coreVersion: string
79
- /**
80
- * 设置全局主题
81
- */
82
- setTheme: typeof setTheme
83
- /**
84
- * 获取全局主题
85
- */
86
- getTheme: typeof getTheme
87
- /**
88
- * 设置全局参数
89
- */
90
- setConfig: typeof setConfig
91
- /**
92
- * 获取全局参数
93
- */
94
- getConfig: typeof getConfig
95
- /**
96
- * 设置全局图标
97
- */
98
- setIcon: typeof setIcon
99
- /**
100
- * 判断是否支持该语言,安装语言包后返回 true
101
- */
102
- hasLanguage: typeof hasLanguage
103
- /**
104
- * 设置组件当前语言
105
- */
106
- setLanguage: typeof setLanguage
107
- /**
108
- * 设置组件语言数据
109
- */
110
- setI18n: typeof setI18n
111
- /**
112
- * 获取组件语言值
113
- */
114
- getI18n: typeof getI18n
115
-
116
- /**
117
- * 获取全局图标
118
- */
119
- getIcon: typeof getIcon,
120
-
121
- /**
122
- * 全局渲染器
123
- */
124
- renderer: VxeGlobalRenderer
125
- /**
126
- * 全局校验扩展
127
- */
128
- validators: VxeGlobalValidators
129
- /**
130
- * 全局右键菜单扩展
131
- */
132
- menus: VxeGlobalMenus
133
- /**
134
- * 全局格式化对象
135
- */
136
- formats: VxeGlobalFormats
137
- /**
138
- * 全局操作指令
139
- */
140
- commands: VxeGlobalCommands
141
- /**
142
- * 全局事件拦截处理对象
143
- */
144
- interceptor: VxeGlobalInterceptor
145
- /**
146
- * 全局剪贴板
147
- */
148
- clipboard: VxeGlobalClipboard
149
-
150
- /**
151
- * 全局事件管理
152
- */
153
- globalEvents: VxeGlobalEvents
154
- createEvent: VxeGlobalCreateEventMethod
155
- GLOBAL_EVENT_KEYS: VxeGlobalEventKey
156
-
157
- /**
158
- * 全局观察者事件
159
- */
160
- globalResize: VxeGlobalResize
161
-
162
- /**
163
- * 全局日志
164
- */
165
- log: VxeGlobalLog
166
-
167
- /**
168
- * 已使用的组件
169
- */
170
- component: VxeGlobalComponentMethod
171
- getComponent: VxeGlobalGetComponentMethod
172
-
173
- /**
174
- * 扩展插件
175
- */
176
- hooks: VxeGlobalHooks
177
-
178
- /**
179
- * 通用 Use API 函数
180
- */
181
- useFns: VxeGlobalUseFns
182
-
183
- /**
184
- * 安装插件
185
- */
186
- use: (plugin: VxeUIPluginObject, ...options: any[]) => VxeUIExport
187
- }
188
-
189
- export const VxeUI: VxeUIExport
190
-
191
- export * from './global-config'
192
- export * from './global-icon'
193
- export * from './global-theme'
194
- export * from './global-lang'
195
- export * from './global-event'
196
- export * from './global-resize'
197
-
198
- export * from './renderer'
199
- export * from './validators'
200
- export * from './menus'
201
- export * from './formats'
202
- export * from './commands'
203
- export * from './interceptor'
204
- export * from './clipboard'
205
- export * from './log'
206
-
207
- export * from './components'
208
- export * from './useFn'
209
- export * from './hooks'
210
-
211
- export default VxeUI
1
+ import { VxeGlobalConfig } from './global-config'
2
+ import { VxeGlobalIcon } from './global-icon'
3
+ import { VxeGlobalThemeName } from './global-theme'
4
+ import { VxeGlobalI18nLocale } from './global-lang'
5
+ import { VxeGlobalEvents, VxeGlobalEventKey, VxeGlobalCreateEventMethod } from './global-event'
6
+ import { VxeGlobalResize } from './global-resize'
7
+ import { VxeGlobalRenderer } from './renderer'
8
+ import { VxeGlobalValidators } from './validators'
9
+ import { VxeGlobalMenus } from './menus'
10
+ import { VxeGlobalFormats } from './formats'
11
+ import { VxeGlobalCommands } from './commands'
12
+ import { VxeGlobalInterceptor } from './interceptor'
13
+ import { VxeGlobalClipboard } from './clipboard'
14
+ import { VxeGlobalComponentMethod, VxeGlobalGetComponentMethod } from './components'
15
+ import { VxeGlobalUseFns } from './useFn'
16
+ import { VxeGlobalHooks } from './hooks'
17
+ import { VxeGlobalLog } from './log'
18
+
19
+ /* eslint-disable no-use-before-define */
20
+
21
+ export function setTheme(name: VxeGlobalThemeName): VxeUIExport
22
+
23
+ export function getTheme(): VxeGlobalThemeName
24
+
25
+ export function setConfig(options?: VxeGlobalConfig): VxeUIExport
26
+ export function getConfig(): Required<VxeGlobalConfig>
27
+ export function getConfig(key: keyof VxeGlobalConfig, defaultValue?: any): any
28
+
29
+ export function setIcon(options?: VxeGlobalIcon): VxeUIExport
30
+ export function getIcon(): Required<VxeGlobalIcon>
31
+ export function getIcon(key: keyof VxeGlobalIcon): any
32
+
33
+ export function hasLanguage(locale: VxeGlobalI18nLocale): boolean
34
+ export function getLanguage(): VxeGlobalI18nLocale
35
+ export function setLanguage(locale: VxeGlobalI18nLocale): VxeUIExport
36
+ export function setI18n(locale: VxeGlobalI18nLocale, data: Record<string, any>): VxeUIExport
37
+ export function getI18n(key: string, args?: any): string
38
+
39
+ export const component: VxeGlobalComponentMethod
40
+ export const getComponent: VxeGlobalGetComponentMethod
41
+
42
+ export const coreVersion: string
43
+
44
+ export const renderer: VxeGlobalRenderer
45
+
46
+ export const validators: VxeGlobalValidators
47
+
48
+ export const menus: VxeGlobalMenus
49
+
50
+ export const formats: VxeGlobalFormats
51
+
52
+ export const commands: VxeGlobalCommands
53
+
54
+ export const interceptor: VxeGlobalInterceptor
55
+
56
+ export const clipboard: VxeGlobalClipboard
57
+
58
+ export const globalEvents: VxeGlobalEvents
59
+
60
+ export const globalResize: VxeGlobalResize
61
+
62
+ export const log: VxeGlobalLog
63
+
64
+ export const useFns: VxeGlobalUseFns
65
+
66
+ export const hooks: VxeGlobalHooks
67
+
68
+ export interface VxeUIPluginObject {
69
+ install(vxeui: VxeUIExport, ...options: any[]): void
70
+ [key: string]: any
71
+ }
72
+
73
+ export function use (plugin: VxeUIPluginObject, ...options: any[]): VxeUIExport
74
+
75
+ export interface VxeUIExport {
76
+ /**
77
+ * 版本号
78
+ */
79
+ coreVersion: string
80
+ /**
81
+ * 设置全局主题
82
+ */
83
+ setTheme: typeof setTheme
84
+ /**
85
+ * 获取全局主题
86
+ */
87
+ getTheme: typeof getTheme
88
+ /**
89
+ * 设置全局参数
90
+ */
91
+ setConfig: typeof setConfig
92
+ /**
93
+ * 获取全局参数
94
+ */
95
+ getConfig: typeof getConfig
96
+ /**
97
+ * 设置全局图标
98
+ */
99
+ setIcon: typeof setIcon
100
+ /**
101
+ * 判断是否支持该语言,安装语言包后返回 true
102
+ */
103
+ hasLanguage: typeof hasLanguage
104
+ /**
105
+ * 获取当前显示语言
106
+ */
107
+ getLanguage: typeof getLanguage
108
+ /**
109
+ * 设置组件当前语言
110
+ */
111
+ setLanguage: typeof setLanguage
112
+ /**
113
+ * 设置组件语言数据
114
+ */
115
+ setI18n: typeof setI18n
116
+ /**
117
+ * 获取组件语言值
118
+ */
119
+ getI18n: typeof getI18n
120
+
121
+ /**
122
+ * 获取全局图标
123
+ */
124
+ getIcon: typeof getIcon,
125
+
126
+ /**
127
+ * 全局渲染器
128
+ */
129
+ renderer: VxeGlobalRenderer
130
+ /**
131
+ * 全局校验扩展
132
+ */
133
+ validators: VxeGlobalValidators
134
+ /**
135
+ * 全局右键菜单扩展
136
+ */
137
+ menus: VxeGlobalMenus
138
+ /**
139
+ * 全局格式化对象
140
+ */
141
+ formats: VxeGlobalFormats
142
+ /**
143
+ * 全局操作指令
144
+ */
145
+ commands: VxeGlobalCommands
146
+ /**
147
+ * 全局事件拦截处理对象
148
+ */
149
+ interceptor: VxeGlobalInterceptor
150
+ /**
151
+ * 全局剪贴板
152
+ */
153
+ clipboard: VxeGlobalClipboard
154
+
155
+ /**
156
+ * 全局事件管理
157
+ */
158
+ globalEvents: VxeGlobalEvents
159
+ createEvent: VxeGlobalCreateEventMethod
160
+ GLOBAL_EVENT_KEYS: VxeGlobalEventKey
161
+
162
+ /**
163
+ * 全局观察者事件
164
+ */
165
+ globalResize: VxeGlobalResize
166
+
167
+ /**
168
+ * 全局日志
169
+ */
170
+ log: VxeGlobalLog
171
+
172
+ /**
173
+ * 已使用的组件
174
+ */
175
+ component: VxeGlobalComponentMethod
176
+ getComponent: VxeGlobalGetComponentMethod
177
+
178
+ /**
179
+ * 扩展插件
180
+ */
181
+ hooks: VxeGlobalHooks
182
+
183
+ /**
184
+ * 通用 Use API 函数
185
+ */
186
+ useFns: VxeGlobalUseFns
187
+
188
+ /**
189
+ * 安装插件
190
+ */
191
+ use: (plugin: VxeUIPluginObject, ...options: any[]) => VxeUIExport
192
+ }
193
+
194
+ export const VxeUI: VxeUIExport
195
+
196
+ export * from './global-config'
197
+ export * from './global-icon'
198
+ export * from './global-theme'
199
+ export * from './global-lang'
200
+ export * from './global-event'
201
+ export * from './global-resize'
202
+
203
+ export * from './renderer'
204
+ export * from './validators'
205
+ export * from './menus'
206
+ export * from './formats'
207
+ export * from './commands'
208
+ export * from './interceptor'
209
+ export * from './clipboard'
210
+ export * from './log'
211
+
212
+ export * from './components'
213
+ export * from './useFn'
214
+ export * from './hooks'
215
+
216
+ export default VxeUI
@@ -1,22 +1,22 @@
1
- /* eslint-disable no-use-before-define */
2
-
3
- export namespace VxeGlobalInterceptorHandles {
4
- export interface InterceptorOptions {
5
- tableInterceptorMethod?: (params: any) => any
6
- }
7
-
8
- export type InterceptorCallback = (params: any) => any
9
- export interface InterceptorParams {}
10
- }
11
-
12
- /**
13
- * 全局事件拦截器
14
- */
15
- export interface VxeGlobalInterceptor {
16
- mixin(options: {
17
- [type: string]: VxeGlobalInterceptorHandles.InterceptorOptions | VxeGlobalInterceptorHandles.InterceptorCallback
18
- }): VxeGlobalInterceptor
19
- get(type: string): VxeGlobalInterceptorHandles.InterceptorCallback[]
20
- add(type: string, callback: VxeGlobalInterceptorHandles.InterceptorOptions | VxeGlobalInterceptorHandles.InterceptorCallback): VxeGlobalInterceptor
21
- delete(type: string, callback?: VxeGlobalInterceptorHandles.InterceptorOptions | VxeGlobalInterceptorHandles.InterceptorCallback): void
22
- }
1
+ /* eslint-disable no-use-before-define */
2
+
3
+ export namespace VxeGlobalInterceptorHandles {
4
+ export interface InterceptorOptions {
5
+ tableInterceptorMethod?: (params: any) => any
6
+ }
7
+
8
+ export type InterceptorCallback = (params: any) => any
9
+ export interface InterceptorParams {}
10
+ }
11
+
12
+ /**
13
+ * 全局事件拦截器
14
+ */
15
+ export interface VxeGlobalInterceptor {
16
+ mixin(options: {
17
+ [type: string]: VxeGlobalInterceptorHandles.InterceptorOptions | VxeGlobalInterceptorHandles.InterceptorCallback
18
+ }): VxeGlobalInterceptor
19
+ get(type: string): VxeGlobalInterceptorHandles.InterceptorCallback[]
20
+ add(type: string, callback: VxeGlobalInterceptorHandles.InterceptorOptions | VxeGlobalInterceptorHandles.InterceptorCallback): VxeGlobalInterceptor
21
+ delete(type: string, callback?: VxeGlobalInterceptorHandles.InterceptorOptions | VxeGlobalInterceptorHandles.InterceptorCallback): void
22
+ }
@@ -1,8 +1,8 @@
1
- export function warnLog(): string
2
- export function errLog(): string
3
-
4
- export interface VxeGlobalLog {
5
- create (type: 'log' | 'warn' | 'error', name?: string): ((key: string, args?: any) => string)
6
- warn(key: string, args?: any): string
7
- err(key: string, args?: any): string
8
- }
1
+ export function warnLog(): string
2
+ export function errLog(): string
3
+
4
+ export interface VxeGlobalLog {
5
+ create (type: 'log' | 'warn' | 'error', name?: string): ((key: string, args?: any) => string)
6
+ warn(key: string, args?: any): string
7
+ err(key: string, args?: any): string
8
+ }
@@ -1,19 +1,19 @@
1
- /* eslint-disable no-use-before-define */
2
-
3
- export namespace VxeGlobalMenusHandles {
4
- export interface MenusOption {}
5
- }
6
-
7
- /**
8
- * 全局快捷菜单
9
- */
10
- export interface VxeGlobalMenus {
11
- mixin(opts: {
12
- [code: string]: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)
13
- }): VxeGlobalMenus
14
- has(code: string): boolean
15
- get(code: string): VxeGlobalMenusHandles.MenusOption
16
- add(code: string, options: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)): VxeGlobalMenus
17
- delete(code: string): void
18
- forEach(callback: (options: VxeGlobalMenusHandles.MenusOption, code: string) => void): void
19
- }
1
+ /* eslint-disable no-use-before-define */
2
+
3
+ export namespace VxeGlobalMenusHandles {
4
+ export interface MenusOption {}
5
+ }
6
+
7
+ /**
8
+ * 全局快捷菜单
9
+ */
10
+ export interface VxeGlobalMenus {
11
+ mixin(opts: {
12
+ [code: string]: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)
13
+ }): VxeGlobalMenus
14
+ has(code: string): boolean
15
+ get(code: string): VxeGlobalMenusHandles.MenusOption
16
+ add(code: string, options: VxeGlobalMenusHandles.MenusOption | ((params: any, event: Event) => any)): VxeGlobalMenus
17
+ delete(code: string): void
18
+ forEach(callback: (options: VxeGlobalMenusHandles.MenusOption, code: string) => void): void
19
+ }
@@ -1,14 +1,14 @@
1
- export interface VxeGlobalRendererOptions {}
2
-
3
- export namespace VxeGlobalRendererHandles {}
4
-
5
- /**
6
- * 渲染器
7
- */
8
- export interface VxeGlobalRenderer {
9
- mixin(options: Record<string, VxeGlobalRendererOptions>): VxeGlobalRenderer
10
- get(name: string | null | undefined): VxeGlobalRendererOptions
11
- add(name: string, options: VxeGlobalRendererOptions): VxeGlobalRenderer
12
- forEach(callback: (item: VxeGlobalRendererOptions, name: string, renderMap: Record<string, VxeGlobalRendererOptions>) => void): VxeGlobalRenderer
13
- delete(name: string): void
14
- }
1
+ export interface VxeGlobalRendererOptions {}
2
+
3
+ export namespace VxeGlobalRendererHandles {}
4
+
5
+ /**
6
+ * 渲染器
7
+ */
8
+ export interface VxeGlobalRenderer {
9
+ mixin(options: Record<string, VxeGlobalRendererOptions>): VxeGlobalRenderer
10
+ get(name: string | null | undefined): VxeGlobalRendererOptions
11
+ add(name: string, options: VxeGlobalRendererOptions): VxeGlobalRenderer
12
+ forEach(callback: (item: VxeGlobalRendererOptions, name: string, renderMap: Record<string, VxeGlobalRendererOptions>) => void): VxeGlobalRenderer
13
+ delete(name: string): void
14
+ }
@@ -1,17 +1,17 @@
1
- import { ComputedRef } from 'vue'
2
- import { VxeComponentSizeType } from '../tool'
3
-
4
- export type VxeUseFnUseSize = (props: {
5
- size?: VxeComponentSizeType;
6
- }) => {
7
- computeSize: ComputedRef<VxeComponentSizeType>;
8
- }
9
-
10
- export const useSize: VxeUseFnUseSize
11
-
12
- /**
13
- * 全局剪贴板
14
- */
15
- export interface VxeGlobalUseFns {
16
- useSize: VxeUseFnUseSize
17
- }
1
+ import { ComputedRef } from 'vue'
2
+ import { VxeComponentSizeType } from '../tool'
3
+
4
+ export type VxeUseFnUseSize = (props: {
5
+ size?: VxeComponentSizeType;
6
+ }) => {
7
+ computeSize: ComputedRef<VxeComponentSizeType>;
8
+ }
9
+
10
+ export const useSize: VxeUseFnUseSize
11
+
12
+ /**
13
+ * 全局剪贴板
14
+ */
15
+ export interface VxeGlobalUseFns {
16
+ useSize: VxeUseFnUseSize
17
+ }
@@ -1,19 +1,19 @@
1
- /* eslint-disable no-use-before-define */
2
-
3
- export namespace VxeGlobalValidatorsHandles {
4
- export interface ValidatorsOptions {}
5
- }
6
-
7
- /**
8
- * 全局快捷菜单
9
- */
10
- export interface VxeGlobalValidators {
11
- mixin(options: {
12
- [code: string]: VxeGlobalValidatorsHandles.ValidatorsOptions
13
- }): VxeGlobalValidators
14
- has(code: string): boolean
15
- get(code: string): VxeGlobalValidatorsHandles.ValidatorsOptions
16
- add(code: string, callback: VxeGlobalValidatorsHandles.ValidatorsOptions): VxeGlobalValidators
17
- delete(code: string): void
18
- forEach(callback: (options: VxeGlobalValidatorsHandles.ValidatorsOptions, code: string) => void): void
19
- }
1
+ /* eslint-disable no-use-before-define */
2
+
3
+ export namespace VxeGlobalValidatorsHandles {
4
+ export interface ValidatorsOptions {}
5
+ }
6
+
7
+ /**
8
+ * 全局快捷菜单
9
+ */
10
+ export interface VxeGlobalValidators {
11
+ mixin(options: {
12
+ [code: string]: VxeGlobalValidatorsHandles.ValidatorsOptions
13
+ }): VxeGlobalValidators
14
+ has(code: string): boolean
15
+ get(code: string): VxeGlobalValidatorsHandles.ValidatorsOptions
16
+ add(code: string, callback: VxeGlobalValidatorsHandles.ValidatorsOptions): VxeGlobalValidators
17
+ delete(code: string): void
18
+ forEach(callback: (options: VxeGlobalValidatorsHandles.ValidatorsOptions, code: string) => void): void
19
+ }
package/types/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { VxeUIExport } from './core'
2
-
3
- declare global {
4
- interface Window {
5
- VxeUI: VxeUIExport;
6
- }
7
- }
8
-
9
- export * from './tool'
10
- export * from './core'
1
+ import { VxeUIExport } from './core'
2
+
3
+ declare global {
4
+ interface Window {
5
+ VxeUI: VxeUIExport;
6
+ }
7
+ }
8
+
9
+ export * from './tool'
10
+ export * from './core'