@vxe-ui/core 4.4.12 → 4.4.13

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 (64) hide show
  1. package/LICENSE +21 -21
  2. package/README.en.md +43 -43
  3. package/README.md +43 -43
  4. package/README.zh-TW.md +43 -43
  5. package/dist/all.esm.js +920 -0
  6. package/es/src/core.js +1 -1
  7. package/es/src/log.js +1 -1
  8. package/lib/index.umd.js +173 -73
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/src/core.js +1 -1
  11. package/lib/src/core.min.js +1 -1
  12. package/lib/src/log.js +1 -1
  13. package/lib/src/log.min.js +1 -1
  14. package/package.json +82 -79
  15. package/packages/index.ts +149 -149
  16. package/packages/src/clipboard.ts +56 -56
  17. package/packages/src/commands.ts +56 -56
  18. package/packages/src/config.ts +30 -30
  19. package/packages/src/configStore.ts +8 -8
  20. package/packages/src/core.ts +11 -11
  21. package/packages/src/dataStore.ts +4 -4
  22. package/packages/src/event.ts +160 -160
  23. package/packages/src/formats.ts +56 -56
  24. package/packages/src/hooks.ts +5 -5
  25. package/packages/src/i18n.ts +63 -63
  26. package/packages/src/i18nStore.ts +11 -11
  27. package/packages/src/icon.ts +32 -32
  28. package/packages/src/iconStore.ts +3 -3
  29. package/packages/src/interceptor.ts +64 -64
  30. package/packages/src/log.ts +19 -19
  31. package/packages/src/menus.ts +56 -56
  32. package/packages/src/permission.ts +61 -61
  33. package/packages/src/renderer.ts +48 -48
  34. package/packages/src/resize.ts +89 -89
  35. package/packages/src/store.ts +47 -47
  36. package/packages/src/theme.ts +20 -20
  37. package/packages/src/themeStore.ts +7 -7
  38. package/packages/src/useFns.ts +34 -34
  39. package/packages/src/validators.ts +7 -7
  40. package/packages/src/vm.ts +10 -10
  41. package/types/core/clipboard.d.ts +22 -22
  42. package/types/core/commands.d.ts +19 -19
  43. package/types/core/components.d.ts +5 -5
  44. package/types/core/formats.d.ts +19 -19
  45. package/types/core/global-config.d.ts +70 -70
  46. package/types/core/global-data.d.ts +7 -7
  47. package/types/core/global-event.d.ts +47 -47
  48. package/types/core/global-icon.d.ts +10 -10
  49. package/types/core/global-lang.d.ts +27 -27
  50. package/types/core/global-resize.d.ts +3 -3
  51. package/types/core/global-theme.d.ts +1 -1
  52. package/types/core/hooks.d.ts +14 -14
  53. package/types/core/index.d.ts +294 -294
  54. package/types/core/interceptor.d.ts +22 -22
  55. package/types/core/log.d.ts +8 -8
  56. package/types/core/menus.d.ts +19 -19
  57. package/types/core/permission.d.ts +10 -10
  58. package/types/core/renderer.d.ts +14 -14
  59. package/types/core/useFn.d.ts +27 -27
  60. package/types/core/validators.d.ts +19 -19
  61. package/types/index.d.ts +13 -13
  62. package/types/tool/common.d.ts +150 -150
  63. package/types/tool/index.d.ts +2 -2
  64. package/types/tool/util.d.ts +4 -4
@@ -1,70 +1,70 @@
1
- import { VxeComponentSizeType } from '../tool'
2
-
3
- import { VxeGlobalThemeName, VxeComponentPermissionCodeType, VxeComponentPermissionResult } from '../../types'
4
-
5
- /**
6
- * 全局参数对象
7
- */
8
- export interface VxeGlobalConfig {
9
- /**
10
- * 企业版 - 设置授权 ID
11
- */
12
- authId?: string
13
- /**
14
- * 企业版 - 是否在控制台打印授权信息
15
- */
16
- showAuthLog?: boolean
17
- /**
18
- * 企业版 - 授权状态监听
19
- */
20
- onAuth?(params: {
21
- status: boolean
22
- code: number
23
- msg: string
24
- }): void
25
-
26
- /**
27
- * 权限码全局判断方法,返回 { visible, disabled }
28
- */
29
- permissionMethod?:(params: {
30
- code: VxeComponentPermissionCodeType
31
- }) => VxeComponentPermissionResult
32
- /**
33
- * 全局默认 z-index
34
- */
35
- zIndex?: number
36
- /**
37
- * 全局组件尺寸
38
- */
39
- size?: VxeComponentSizeType
40
- /**
41
- * 支持对组件中特定的字段进行翻译
42
- * @param key
43
- * @param args
44
- * @returns string
45
- */
46
- translate?:(key: string, args?: any) => string
47
- /**
48
- * 自定义方式对组件内置的语言进行翻译
49
- * @param key
50
- * @param args
51
- * @returns string
52
- */
53
- i18n?:(key: string, args?: any) => string | number
54
-
55
- /**
56
- * 已废弃,请使用 VxeUI.setConfig({ table: { resizeInterval: 300 } })
57
- * @deprecated
58
- */
59
- resizeInterval?: number
60
- /**
61
- * 已废弃,请使用 VxeUI.tableVersion
62
- * @deprecated
63
- */
64
- version?: string | number
65
- /**
66
- * 已废弃,请使用 VxeUI.setTheme('dark')
67
- * @deprecated
68
- */
69
- theme?: VxeGlobalThemeName
70
- }
1
+ import { VxeComponentSizeType } from '../tool'
2
+
3
+ import { VxeGlobalThemeName, VxeComponentPermissionCodeType, VxeComponentPermissionResult } from '../../types'
4
+
5
+ /**
6
+ * 全局参数对象
7
+ */
8
+ export interface VxeGlobalConfig {
9
+ /**
10
+ * 企业版 - 设置授权 ID
11
+ */
12
+ authId?: string
13
+ /**
14
+ * 企业版 - 是否在控制台打印授权信息
15
+ */
16
+ showAuthLog?: boolean
17
+ /**
18
+ * 企业版 - 授权状态监听
19
+ */
20
+ onAuth?(params: {
21
+ status: boolean
22
+ code: number
23
+ msg: string
24
+ }): void
25
+
26
+ /**
27
+ * 权限码全局判断方法,返回 { visible, disabled }
28
+ */
29
+ permissionMethod?:(params: {
30
+ code: VxeComponentPermissionCodeType
31
+ }) => VxeComponentPermissionResult
32
+ /**
33
+ * 全局默认 z-index
34
+ */
35
+ zIndex?: number
36
+ /**
37
+ * 全局组件尺寸
38
+ */
39
+ size?: VxeComponentSizeType
40
+ /**
41
+ * 支持对组件中特定的字段进行翻译
42
+ * @param key
43
+ * @param args
44
+ * @returns string
45
+ */
46
+ translate?:(key: string, args?: any) => string
47
+ /**
48
+ * 自定义方式对组件内置的语言进行翻译
49
+ * @param key
50
+ * @param args
51
+ * @returns string
52
+ */
53
+ i18n?:(key: string, args?: any) => string | number
54
+
55
+ /**
56
+ * 已废弃,请使用 VxeUI.setConfig({ table: { resizeInterval: 300 } })
57
+ * @deprecated
58
+ */
59
+ resizeInterval?: number
60
+ /**
61
+ * 已废弃,请使用 VxeUI.tableVersion
62
+ * @deprecated
63
+ */
64
+ version?: string | number
65
+ /**
66
+ * 已废弃,请使用 VxeUI.setTheme('dark')
67
+ * @deprecated
68
+ */
69
+ theme?: VxeGlobalThemeName
70
+ }
@@ -1,7 +1,7 @@
1
- export interface VxeGlobalData {
2
- [key: string]: any
3
- clipboard?: {
4
- text: string
5
- html: string
6
- }
7
- }
1
+ export interface VxeGlobalData {
2
+ [key: string]: any
3
+ clipboard?: {
4
+ text: string
5
+ html: string
6
+ }
7
+ }
@@ -1,47 +1,47 @@
1
- import { VxeComponentBaseOptions, VxeComponentEvent } from '../tool'
2
-
3
- export type VxeGlobalEventType = 'copy' | 'cut' | 'paste' | 'keydown' | 'contextmenu' | 'mousedown' | 'click' | 'blur' | 'resize' | 'mousewheel' | 'scroll'
4
-
5
- export type VxeGlobalEventKey = {
6
- F2: 'F2'
7
- F10: 'F10'
8
- TAB: 'Tab'
9
- ESCAPE: 'Escape'
10
- ENTER: 'Enter'
11
- DELETE: 'Delete'
12
- BACKSPACE: 'Backspace'
13
- SPACEBAR: ' '
14
- CONTEXT_MENU: 'ContextMenu'
15
- ARROW_UP: 'ArrowUp'
16
- ARROW_DOWN: 'ArrowDown'
17
- ARROW_LEFT: 'ArrowLeft'
18
- ARROW_RIGHT: 'ArrowRight'
19
- PAGE_UP: 'PageUp'
20
- PAGE_DOWN: 'PageDown'
21
- HOME: 'Home'
22
- END: 'End'
23
- A: 'A'
24
- X: 'X'
25
- C: 'C'
26
- V: 'V'
27
- D: 'D'
28
- F: 'F'
29
- H: 'H'
30
- M: 'M'
31
- Y: 'Y'
32
- Z: 'Z'
33
- R: 'R'
34
- P: 'P'
35
- }
36
-
37
- export const GLOBAL_EVENT_KEYS: VxeGlobalEventKey
38
-
39
- export type VxeGlobalCreateEventMethod = (evnt: Event | null, params1: any, params2?: any) => VxeComponentEvent
40
-
41
- export const createEvent: VxeGlobalCreateEventMethod
42
-
43
- export interface VxeGlobalEvents {
44
- on (comp: VxeComponentBaseOptions, type: VxeGlobalEventType, cb: (evnt: any) => void): void
45
- off (comp: VxeComponentBaseOptions, type: VxeGlobalEventType): void
46
- hasKey(evnt: KeyboardEvent, targetKey: string): boolean,
47
- }
1
+ import { VxeComponentBaseOptions, VxeComponentEvent } from '../tool'
2
+
3
+ export type VxeGlobalEventType = 'copy' | 'cut' | 'paste' | 'keydown' | 'contextmenu' | 'mousedown' | 'click' | 'blur' | 'resize' | 'mousewheel' | 'scroll'
4
+
5
+ export type VxeGlobalEventKey = {
6
+ F2: 'F2'
7
+ F10: 'F10'
8
+ TAB: 'Tab'
9
+ ESCAPE: 'Escape'
10
+ ENTER: 'Enter'
11
+ DELETE: 'Delete'
12
+ BACKSPACE: 'Backspace'
13
+ SPACEBAR: ' '
14
+ CONTEXT_MENU: 'ContextMenu'
15
+ ARROW_UP: 'ArrowUp'
16
+ ARROW_DOWN: 'ArrowDown'
17
+ ARROW_LEFT: 'ArrowLeft'
18
+ ARROW_RIGHT: 'ArrowRight'
19
+ PAGE_UP: 'PageUp'
20
+ PAGE_DOWN: 'PageDown'
21
+ HOME: 'Home'
22
+ END: 'End'
23
+ A: 'A'
24
+ X: 'X'
25
+ C: 'C'
26
+ V: 'V'
27
+ D: 'D'
28
+ F: 'F'
29
+ H: 'H'
30
+ M: 'M'
31
+ Y: 'Y'
32
+ Z: 'Z'
33
+ R: 'R'
34
+ P: 'P'
35
+ }
36
+
37
+ export const GLOBAL_EVENT_KEYS: VxeGlobalEventKey
38
+
39
+ export type VxeGlobalCreateEventMethod = (evnt: Event | null, params1: any, params2?: any) => VxeComponentEvent
40
+
41
+ export const createEvent: VxeGlobalCreateEventMethod
42
+
43
+ export interface VxeGlobalEvents {
44
+ on (comp: VxeComponentBaseOptions, type: VxeGlobalEventType, cb: (evnt: any) => void): void
45
+ off (comp: VxeComponentBaseOptions, type: VxeGlobalEventType): void
46
+ hasKey(evnt: KeyboardEvent, targetKey: string): boolean,
47
+ }
@@ -1,10 +1,10 @@
1
- import { VNode } from 'vue'
2
-
3
- export type VxeGlobalIconConfig = string | ((params: { name: string }) => VNode | string)
4
-
5
- /**
6
- * 全局图标参数
7
- */
8
- export interface VxeGlobalIcon {
9
- LOGO?: VxeGlobalIconConfig
10
- }
1
+ import { VNode } from 'vue'
2
+
3
+ export type VxeGlobalIconConfig = string | ((params: { name: string }) => VNode | string)
4
+
5
+ /**
6
+ * 全局图标参数
7
+ */
8
+ export interface VxeGlobalIcon {
9
+ LOGO?: VxeGlobalIconConfig
10
+ }
@@ -1,27 +1,27 @@
1
- export type VxeGlobalI18nLocale = '' |
2
- 'zh-CN' | // 中文(简体)
3
- 'zh-CHT' | // 中文(繁体)
4
- 'zh-HK' | // 中文(香港)
5
- 'zh-MO' | // 中文(澳门)
6
- 'zh-TW' | // 中文(繁体)
7
- // 'zh-TC' | // !!!已废弃!!!
8
- 'en-US' | // 英语(美国)
9
- 'ja-JP' | // 日语
10
- 'es-ES' | // 西班牙语(国际)
11
- 'pt-BR' | // 葡萄牙语
12
- 'vi-VN' | // 越南语
13
- 'ru-RU' | // 俄语
14
- 'ko-KR' | // 朝鲜语
15
- 'hu-HU' | // 匈牙利语
16
- 'ug-CN' | // 维吾尔语
17
- 'uz-UZ' | // 乌兹别克语(西里尔文)
18
- 'nb-NO' | // 挪威语(伯克梅尔)(挪威)
19
- 'hy-AM' | // 亚美尼亚语
20
- 'fr-FR' | // 法语(法国)
21
- 'de-DE' | // 德语(德国)
22
- 'ar-EG' | // 阿拉伯语(埃及)
23
- 'uk-UA' | // 乌克兰语
24
- 'th-TH' | // 泰语
25
- 'it-IT' | // 意大利语(意大利)
26
- 'id-ID' | // 印度尼西亚语
27
- 'ms-MY' // 马来语(马来西亚)
1
+ export type VxeGlobalI18nLocale = '' |
2
+ 'zh-CN' | // 中文(简体)
3
+ 'zh-CHT' | // 中文(繁体)
4
+ 'zh-HK' | // 中文(香港)
5
+ 'zh-MO' | // 中文(澳门)
6
+ 'zh-TW' | // 中文(繁体)
7
+ // 'zh-TC' | // !!!已废弃!!!
8
+ 'en-US' | // 英语(美国)
9
+ 'ja-JP' | // 日语
10
+ 'es-ES' | // 西班牙语(国际)
11
+ 'pt-BR' | // 葡萄牙语
12
+ 'vi-VN' | // 越南语
13
+ 'ru-RU' | // 俄语
14
+ 'ko-KR' | // 朝鲜语
15
+ 'hu-HU' | // 匈牙利语
16
+ 'ug-CN' | // 维吾尔语
17
+ 'uz-UZ' | // 乌兹别克语(西里尔文)
18
+ 'nb-NO' | // 挪威语(伯克梅尔)(挪威)
19
+ 'hy-AM' | // 亚美尼亚语
20
+ 'fr-FR' | // 法语(法国)
21
+ 'de-DE' | // 德语(德国)
22
+ 'ar-EG' | // 阿拉伯语(埃及)
23
+ 'uk-UA' | // 乌克兰语
24
+ 'th-TH' | // 泰语
25
+ 'it-IT' | // 意大利语(意大利)
26
+ 'id-ID' | // 印度尼西亚语
27
+ 'ms-MY' // 马来语(马来西亚)
@@ -1,3 +1,3 @@
1
- export interface VxeGlobalResize {
2
- create (callback: (...args: any[]) => void): ResizeObserver
3
- }
1
+ export interface VxeGlobalResize {
2
+ create (callback: (...args: any[]) => void): ResizeObserver
3
+ }
@@ -1 +1 @@
1
- export type VxeGlobalThemeName = null | '' | 'default' | 'light' | 'dark'
1
+ export type VxeGlobalThemeName = null | '' | 'default' | 'light' | 'dark'
@@ -1,14 +1,14 @@
1
- export namespace VxeGlobalHooksHandles {
2
- export interface HookOptions {}
3
- }
4
-
5
- export interface VxeGlobalHooks {
6
- mixin(options: {
7
- [type: string]: VxeGlobalHooksHandles.HookOptions
8
- }): VxeGlobalHooks
9
- has(type: string | null | undefined): boolean
10
- get(type: string | null | undefined): VxeGlobalHooksHandles.HookOptions
11
- add(type: string, options: VxeGlobalHooksHandles.HookOptions): VxeGlobalHooks
12
- delete(type: string): void
13
- forEach(callback: (options: VxeGlobalHooksHandles.HookOptions, type: string) => void): void
14
- }
1
+ export namespace VxeGlobalHooksHandles {
2
+ export interface HookOptions {}
3
+ }
4
+
5
+ export interface VxeGlobalHooks {
6
+ mixin(options: {
7
+ [type: string]: VxeGlobalHooksHandles.HookOptions
8
+ }): VxeGlobalHooks
9
+ has(type: string | null | undefined): boolean
10
+ get(type: string | null | undefined): VxeGlobalHooksHandles.HookOptions
11
+ add(type: string, options: VxeGlobalHooksHandles.HookOptions): VxeGlobalHooks
12
+ delete(type: string): void
13
+ forEach(callback: (options: VxeGlobalHooksHandles.HookOptions, type: string) => void): void
14
+ }